failed to build against linux v6.6

Bug #2026402 reported by You-Sheng Yang
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ipu6-drivers (Ubuntu)
Fix Released
High
You-Sheng Yang
Mantic
Won't Fix
High
You-Sheng Yang

Bug Description

[SRU Justifications]

[Impact]

ipu6 dkms driver now fails to build against v6.6 and on.

[Fix]

https://github.com/intel/ipu6-drivers/pull/174

[Test Case]

This is verified on MTL VSC platforms, as well as previous generations e.g. TGL and ADL.

To actually verify the camera framework:
```
# enable mantic-proposed, install linux-unstable-6.6 kernel from kernel team ppa:
$ sudo apt-add-repository ppa:canonical-kernel-team/unstable
$ sudo apt install linux-generic-wip
$ sudo apt install intel-ipu6-dkms intel-vsc-dkms
$ sudo add-apt-repository ppa:oem-solutions-group/intel-ipu6 -y -u
$ sudo apt install gstreamer1.0-icamera v4l2-relayd
```
In the above steps, make sure that only gstreamer1.0-icamera, v4l2-relayd, and their dependencies, are fetched from the oem-solutions-group PPA. Everything else must come from the mantic archive.

And then browse https://webcamtests.com/ for testing.

[Where problems could occur]

The fixing patch itself adds a few conditional compiling sections that utilize V4L2/GPIO APIs from the new kernel version, no functional change and no runtime behavior change is expected.

[Other Info]

========== original bug report ==========

```
<<DKMSDIR>>/build/ipu6-drivers/0~git202302081010.7fdfb5eb-0ubuntu0.23.10.1/build/drivers/media/pci/intel/ipu6/../ipu-psys.c: In function 'ipu_psys_get_userpages':
<<DKMSDIR>>/build/ipu6-drivers/0~git202302081010.7fdfb5eb-0ubuntu0.23.10.1/build/drivers/media/pci/intel/ipu6/../ipu-psys.c:214:22: error: too many arguments to function 'get_user_pages'
  214 | nr = get_user_pages(start & PAGE_MASK, npages,
      | ^~~~~~~~~~~~~~
In file included from ./include/linux/scatterlist.h:8,
                 from ./include/linux/dma-buf.h:19,
                 from <<DKMSDIR>>/build/ipu6-drivers/0~git202302081010.7fdfb5eb-0ubuntu0.23.10.1/build/drivers/media/pci/intel/ipu6/../ipu-psys.c:7:
./include/linux/mm.h:2476:6: note: declared here
 2476 | long get_user_pages(unsigned long start, unsigned long nr_pages,
      | ^~~~~~~~~~~~~~
<<DKMSDIR>>/build/ipu6-drivers/0~git202302081010.7fdfb5eb-0ubuntu0.23.10.1/build/drivers/media/pci/intel/ipu6/../ipu-isys-csi2.c:473:1: warning: 'csi2_try_fmt' defined but not used [-Wunused-function]
  473 | csi2_try_fmt(struct ipu_isys_video *av,
      | ^~~~~~~~~~~~
make[6]: *** [scripts/Makefile.build:251: <<DKMSDIR>>/build/ipu6-drivers/0~git202302081010.7fdfb5eb-0ubuntu0.23.10.1/build/drivers/media/pci/intel/ipu6/../ipu-psys.o] Error 1
make[6]: *** Waiting for unfinished jobs....
make[5]: *** [scripts/Makefile.build:485: <<DKMSDIR>>/build/ipu6-drivers/0~git202302081010.7fdfb5eb-0ubuntu0.23.10.1/build/drivers/media/pci/intel/ipu6] Error 2
make[4]: *** [scripts/Makefile.build:485: <<DKMSDIR>>/build/ipu6-drivers/0~git202302081010.7fdfb5eb-0ubuntu0.23.10.1/build/drivers/media/pci/intel] Error 2
make[3]: *** [<<DKMSDIR>>/headers/linux-headers-6.4.0-20230706-next/Makefile:2025: <<DKMSDIR>>/build/ipu6-drivers/0~git202302081010.7fdfb5eb-0ubuntu0.23.10.1/build] Error 2
make[2]: *** [Makefile:234: __sub-make] Error 2
make[2]: Leaving directory '<<DKMSDIR>>/headers/linux-headers-6.4.0-20230706-next'
make[1]: *** [Makefile:37: all] Error 2
make[1]: Leaving directory '<<DKMSDIR>>/build/ipu6-drivers/0~git202302081010.7fdfb5eb-0ubuntu0.23.10.1/build'
make: *** [debian/rules.d/2-binary-arch.mk:240: /build/mantic/debian/stamps/stamp-install-next] Error 10
```

Revision history for this message
You-Sheng Yang (vicamo) wrote : Re: failed to build against linux v6.5-rc1
summary: - failed to build against linux next-20230706
+ failed to build against linux v6.5-rc1
Revision history for this message
You-Sheng Yang (vicamo) wrote :

See bug 2021740 for proposed debdiff.

You-Sheng Yang (vicamo)
Changed in ipu6-drivers (Ubuntu Mantic):
status: New → In Progress
importance: Undecided → High
assignee: nobody → You-Sheng Yang (vicamo)
You-Sheng Yang (vicamo)
description: updated
Revision history for this message
You-Sheng Yang (vicamo) wrote :
Revision history for this message
You-Sheng Yang (vicamo) wrote (last edit ):

For mantic, it has been resolved by bug 2028930. Amend this bug to fix build failure against v6.6 for noble, and the debdiff is included in bug 2031412.

Changed in ipu6-drivers (Ubuntu Mantic):
status: In Progress → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ipu6-drivers - 0~git202310180730.3f813580-0ubuntu0.24.04.1

---------------
ipu6-drivers (0~git202310180730.3f813580-0ubuntu0.24.04.1) noble; urgency=low

  [ Hao Yao ]
  * New upstream 20230802_1500_mtl_plat release.
  * New upstream 20230911_0620_mtl_plat_pv release.

  [ Hans de Goede ]
  * Fix compilation with kernels >= 6.5.0 (LP: #2026402)
    - ipu-psys: Fix compilation with kernels >= 6.5.0
    - ipu6: Fix compilation with kernels >= 6.6.0
    - ipu6: Fix sensor driver compilation with kernels >= 6.6.0

  [ You-Sheng Yang ]
  * Support mipi camera on Intel Meteor Lake platform (LP: #2031412)
    - debian: refresh patches
  * dkms: add CONFIG_VIDEO_V4L2_I2C to BUILD_EXCLUSIVE_CONFIG (LP: #2012407)
  * debian: add modaliases (LP: #2021740)
  * UBUNTU: SAUCE: i2c: compile omitted sensor drivers

 -- You-Sheng Yang <email address hidden> Fri, 01 Sep 2023 17:51:53 +0800

Changed in ipu6-drivers (Ubuntu):
status: In Progress → Fix Released
You-Sheng Yang (vicamo)
Changed in ipu6-drivers (Ubuntu Mantic):
status: Triaged → In Progress
Revision history for this message
Andreas Hasenack (ahasenack) wrote (last edit ):

It's confusing that this bug is mentioning other bugs fixed in the same upload, when each one of those already has the SRU template filled in, with their own test cases.

What is the test case for this exact bug here, 2026402? We don't need test cases for the other bugs, since they have them already.

In fact, if you look at the exact test plan section of this bug here as it stands now, it does not mention a test case for this bug, just the others:
```
[Test Case]

Bug 2012407: make sure intel-ipu6-dkms build will be skipped on platforms without CONFIG_VIDEO_V4L2_I2C, and intel-vsc-dkms on platforms without CONFIG_GPIOLIB_IRQCHIP, such as linux-headers-kvm/jammy.

Bug 2021740: check built binary deb has XB-Modaliases tag in `dpkg-deb --info` output.

For rest of the changes, they should be verified on next IPU6 equipped platform.
```

What is the test plan for this bug here, 2026402?

There is also no need to mention the other bugs in detail in the impact section and so on: each bug has its own SRU template.

Changed in ipu6-drivers (Ubuntu Mantic):
status: In Progress → Incomplete
Revision history for this message
You-Sheng Yang (vicamo) wrote :

Don't confuse. Updated the bug description.

There are many issues to be resolved at the same time, and each of them has their own tracking bug. In the past I uploaded debdiffs to the last one only, one debdiff covers all, and therefore SRU justifications squeezed in one bug. This one is once the latest bug, but it has been moved to bug 2031412 then.

description: updated
description: updated
You-Sheng Yang (vicamo)
Changed in ipu6-drivers (Ubuntu Mantic):
status: Incomplete → In Progress
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

but this bug is actually fixed already in the current version that is in mantic..

Revision history for this message
You-Sheng Yang (vicamo) wrote :

At the time this bug was filed, it's v6.5, and as time goes by, patches were added to fix v6.6 and newer. While bug 2028930 fixed v6.5, it leaves v6.6 broken.

Updated bug title, description. debian/changelog has the details already.

summary: - failed to build against linux v6.5-rc1
+ failed to build against linux v6.6
description: updated
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

there's no need to fix this in mantic..

Changed in ipu6-drivers (Ubuntu Mantic):
status: In Progress → Won't Fix
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

And would be best to file a new bug for 6.6, and not hijack old ones. It only adds to the confusion

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Mantic has the 6.5 kernel, and the current ipu6-dkms package that is in mantic (git202302081010.7fdfb5eb-0ubuntu0.23.10.2) builds fine with it.

I'm also told that mantic will not get a 6.6 kernel.

Finally, the patches that I could locate about this issue also warn what 6.6 made "significant changes":

  Kernel 6.6 has made some significant changes to how v4l2-async
  (sub)dev registration works. Adjust the code accordingly.

It seems all to be #ifdef'ed, so less risky, unless a mistake was made (regression potential!).

Therefore, I have to ask, what's the reason to add patches to fix a non-existent problem, at least at this time? Are we expecting there to be a 6.6 kernel available for mantic, which will need these fixes? I know Timo already marked the bug as wontfix, and I agree with him, but that would mean rejecting the package currently in mantic-unapproved and asking to remove the patches that address this bug here, and I want to give you a chance to comment on this issue. Perhaps we missed something.

Revision history for this message
You-Sheng Yang (vicamo) wrote :

Uploaded a new revision with this removed to bug 2031412.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.