Bug 2333647

Summary: IPU6 camera not working on HP Spectre x360 2-in-1 Laptop 16-f1xxx/891D, hi556
Product: [Fedora] Fedora Reporter: John Freed <okrh>
Component: kernelAssignee: Hans de Goede <hdegoede>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 41CC: acaringi, adscvr, airlied, alciregi, bskeggs, effigies, hdegoede, hpa, josef, kernel-maint, linville, masami256, mchehab, ptalbert, steved, suraj.ghimire7
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
kernel log
none
i2c devices
none
spi devices
none
lsusb
none
lsmod none

Description John Freed 2024-12-21 13:41:26 UTC
Created attachment 2063419 [details]
kernel log

Created attachment 2063419 [details]
kernel log

1. Please describe the problem:
IPU6 camera does not work


2. What is the Version-Release number of the kernel:
6.12.5

3. Did it work previously in Fedora? If so, what kernel version did the issue
   *first* appear?  Old kernels are available for download at
   https://koji.fedoraproject.org/koji/packageinfo?packageID=8 :
Never worked.

4. Can you reproduce this issue? If so, please provide the steps to reproduce
   the issue below:
a. Boot
b. qcam -v
c. Result: 
[0:00:28.933202002] [3785]  INFO Camera camera_manager.cpp:325 libcamera v0.3.2
[0:00:28.939646372] [3797]  INFO SimplePipeline simple.cpp:1548 No sensor found for /dev/media0


5. Does this problem occur with the latest Rawhide kernel? To install the
   Rawhide kernel, run ``sudo dnf install fedora-repos-rawhide`` followed by
   ``sudo dnf update --enablerepo=rawhide kernel``:
Yes.

6. Are you running any modules that not shipped with directly Fedora's kernel?:
Yes. (Note: kernel is not tainted.)

7. Please attach the kernel logs. You can get the complete kernel log
   for a boot with ``journalctl --no-hostname -k > dmesg.txt``. If the
   issue occurred on a previous boot, use the journalctl ``-b`` flag.

Comment 1 John Freed 2024-12-21 13:42:18 UTC
Created attachment 2063420 [details]
i2c devices

Comment 2 John Freed 2024-12-21 13:42:44 UTC
Created attachment 2063421 [details]
spi devices

Comment 3 John Freed 2024-12-21 13:43:06 UTC
Created attachment 2063422 [details]
lsusb

Comment 4 Hans de Goede 2024-12-21 13:52:29 UTC
Thank you for filing this bug and providing all the logs.

At a first look it looks like the problem is missing powerdown gpio support in the hi556 driver.

I'll look into preparing a patch + a Fedora kernel with that patch after the holidays (I'll be back January 6th, but I'll have a lot of things to go through then).

Comment 5 John Freed 2024-12-22 08:42:23 UTC
Created attachment 2063487 [details]
lsmod

Comment 6 Hans de Goede 2025-01-13 11:38:28 UTC
I'm afraid it is going to take a little longer before I will get around to looking into this and providing a test kernel.

I'm fully booked this week, so hopefully next week.

Also my initial analysis of a missing powerdown pin support in the hi556 driver is wrong. Looking at this again these lines from the kernel log are the problem:

Dec 21 12:16:59 fedora kernel: int3472-discrete INT3472:01: unknown \_SB.GPI0 pin 83 active-high
Dec 21 12:16:59 fedora kernel: int3472-discrete INT3472:01: GPIO type 0x12 unknown; the sensor may not work

Type 0x12 is a handshake pin, but is unclear yet how to handle this pin. So fixing this is going to be tricky / will likely take a while I'm afraid.

Comment 7 Hans de Goede 2025-03-26 20:20:11 UTC
Note to self: This is an Alder Lake machine.

Sorry for being slow in getting back to you. I just finished a patch series to deal with the special handshake signal your laptop seems to need and posted version 1 of this upstream:

https://lore.kernel.org/platform-driver-x86/20250325161340.342192-1-hdegoede@redhat.com/

I've build a test-kernel with these patches, please give this a go:
https://koji.fedoraproject.org/koji/taskinfo?taskID=130775742

Here are some instructions for directly installing a kernel from koji:

https://fedorapeople.org/~jwrdegoede/kernel-test-instructions.txt

Comment 8 Hans de Goede 2025-05-27 16:06:52 UTC
In the mean time handshake GPIO support has been added to the Fedora kernels and I've just done another Fedora test-kernel build with some extra hi556 fixes for bug 2368506):

https://koji.fedoraproject.org/koji/taskinfo?taskID=133212953

This kernel is ready to download and install now.

For instructions for directly installing a kernel from koji (Fedora's buildsystem) see:

https://fedorapeople.org/~jwrdegoede/kernel-test-instructions.txt

Please give this kernel a try and if things still do not work please collect new kernel logs using "journalctl -b 0 -k > kernel.txt".