diff mbox series

[v3,3/3] ACPI: delay enumeration of devices with a _DEP pointing to INTC1059 device

Message ID 1679898188-14426-4-git-send-email-wentong.wu@intel.com (mailing list archive)
State New, archived
Headers show
Series media: pci: intel: ivsc: Add driver of Intel Visual Sensing Controller(IVSC) | expand

Commit Message

Wu, Wentong March 27, 2023, 6:23 a.m. UTC
Inside IVSC, switching ownership requires an interface with two different
hardware modules, ACE and CSI. The software interface to these modules is
based on Intel MEI framework. Usually mei client devices are dynamically
created, so the info of consumers depending on mei client devices is not
present in the firmware tables.

This causes problems with the probe ordering with respect to drivers for
consumers of these mei client devices. But on these camera sensor devices,
the ACPI nodes describing the sensors all have a _DEP dependency on the
matching INTC1059 ACPI device, so adding INTC1059 to acpi_honor_dep_ids
allows solving the probe-ordering problem by delaying the enumeration of
ACPI-devices which have a _DEP dependency on an INTC1059 device.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
---
 drivers/acpi/scan.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Sakari Ailus March 27, 2023, 7:06 a.m. UTC | #1
Hi Wentong,

On Mon, Mar 27, 2023 at 02:23:08PM +0800, Wentong Wu wrote:
> Inside IVSC, switching ownership requires an interface with two different
> hardware modules, ACE and CSI. The software interface to these modules is
> based on Intel MEI framework. Usually mei client devices are dynamically
> created, so the info of consumers depending on mei client devices is not
> present in the firmware tables.

Ouch.

> 
> This causes problems with the probe ordering with respect to drivers for
> consumers of these mei client devices. But on these camera sensor devices,
> the ACPI nodes describing the sensors all have a _DEP dependency on the
> matching INTC1059 ACPI device, so adding INTC1059 to acpi_honor_dep_ids
> allows solving the probe-ordering problem by delaying the enumeration of
> ACPI-devices which have a _DEP dependency on an INTC1059 device.

What does the INTC1059 device represent?
Wu, Wentong March 27, 2023, 7:17 a.m. UTC | #2
> -----Original Message-----
> From: Sakari Ailus <sakari.ailus@linux.intel.com>
> 
> Hi Wentong,
> 
> On Mon, Mar 27, 2023 at 02:23:08PM +0800, Wentong Wu wrote:
> > Inside IVSC, switching ownership requires an interface with two
> > different hardware modules, ACE and CSI. The software interface to
> > these modules is based on Intel MEI framework. Usually mei client
> > devices are dynamically created, so the info of consumers depending on
> > mei client devices is not present in the firmware tables.
> 
> Ouch.

MEI client devices are not ACPI devices in our case.

> 
> >
> > This causes problems with the probe ordering with respect to drivers
> > for consumers of these mei client devices. But on these camera sensor
> > devices, the ACPI nodes describing the sensors all have a _DEP
> > dependency on the matching INTC1059 ACPI device, so adding INTC1059 to
> > acpi_honor_dep_ids allows solving the probe-ordering problem by
> > delaying the enumeration of ACPI-devices which have a _DEP dependency on
> an INTC1059 device.
> 
> What does the INTC1059 device represent?

This is the IVSC device on which camera sensor has _DEP 

            Device (CVFD)
            {
                Name (_HID, "INTC1059")  // _HID: Hardware ID
                Name (_DDN, "Intel CVF Device")  // _DDN: DOS Device Name
                Method (SID, 1, Serialized)
                {
                    Return (HCID (One))
                }
            }

        Device (LNK1)
        {
            Name (PNIO, Package (0x01)
            {
                "\\_SB.PC00.SPI1.SPFD.CVFD"
            })
            Name (PUSB, Package (0x02)
            {
                "\\_SB.PC00.SPI1.SPFD.CVFD", 
                "\\_SB.PC00.XHCI.RHUB.HS08.VIC0"
            })
            Method (_STA, 0, NotSerialized)  // _STA: Status
            {
                If (L1EN)
                {
                    Return (0x0F)
                }
                Else
                {
                    Return (Zero)
                }
            }

            Method (_DEP, 0, NotSerialized)  // _DEP: Dependencies
            {
                If (L1EN)
                {
                    If ((CVFS == 0x02))
                    {
                        Return (PUSB) /* \_SB_.PC00.LNK1.PUSB */
                    }

                    If ((CVFS == One))
                    {
                        Return (PNIO) /* \_SB_.PC00.LNK1.PNIO */
                    }
                    Else
                    {
                        Return (CDEP (L1CL, L1BS))
                    }
                }
                Else
                {
                    Return (Package (0x01)
                    {
                        PC00
                    })
                }
            }
> 
> --
> Sakari Ailus
Sakari Ailus March 27, 2023, 7:32 a.m. UTC | #3
Hi Wentong,

On Mon, Mar 27, 2023 at 07:17:13AM +0000, Wu, Wentong wrote:
> 
> 
> > -----Original Message-----
> > From: Sakari Ailus <sakari.ailus@linux.intel.com>
> > 
> > Hi Wentong,
> > 
> > On Mon, Mar 27, 2023 at 02:23:08PM +0800, Wentong Wu wrote:
> > > Inside IVSC, switching ownership requires an interface with two
> > > different hardware modules, ACE and CSI. The software interface to
> > > these modules is based on Intel MEI framework. Usually mei client
> > > devices are dynamically created, so the info of consumers depending on
> > > mei client devices is not present in the firmware tables.
> > 
> > Ouch.
> 
> MEI client devices are not ACPI devices in our case.
> 
> > 
> > >
> > > This causes problems with the probe ordering with respect to drivers
> > > for consumers of these mei client devices. But on these camera sensor
> > > devices, the ACPI nodes describing the sensors all have a _DEP
> > > dependency on the matching INTC1059 ACPI device, so adding INTC1059 to
> > > acpi_honor_dep_ids allows solving the probe-ordering problem by
> > > delaying the enumeration of ACPI-devices which have a _DEP dependency on
> > an INTC1059 device.
> > 
> > What does the INTC1059 device represent?
> 
> This is the IVSC device on which camera sensor has _DEP 
> 
>             Device (CVFD)
>             {
>                 Name (_HID, "INTC1059")  // _HID: Hardware ID
>                 Name (_DDN, "Intel CVF Device")  // _DDN: DOS Device Name
>                 Method (SID, 1, Serialized)
>                 {
>                     Return (HCID (One))
>                 }
>             }

Should this be interpreted that if you have a _DEP to this device, then the
IVSC is between the sensor and the IPU?
Wu, Wentong March 27, 2023, 7:36 a.m. UTC | #4
> -----Original Message-----
> From: Sakari Ailus <sakari.ailus@linux.intel.com>
> Sent: Monday, March 27, 2023 3:33 PM
> 
> Hi Wentong,
> 
> On Mon, Mar 27, 2023 at 07:17:13AM +0000, Wu, Wentong wrote:
> >
> >
> > > -----Original Message-----
> > > From: Sakari Ailus <sakari.ailus@linux.intel.com>
> > >
> > > Hi Wentong,
> > >
> > > On Mon, Mar 27, 2023 at 02:23:08PM +0800, Wentong Wu wrote:
> > > > Inside IVSC, switching ownership requires an interface with two
> > > > different hardware modules, ACE and CSI. The software interface to
> > > > these modules is based on Intel MEI framework. Usually mei client
> > > > devices are dynamically created, so the info of consumers
> > > > depending on mei client devices is not present in the firmware tables.
> > >
> > > Ouch.
> >
> > MEI client devices are not ACPI devices in our case.
> >
> > >
> > > >
> > > > This causes problems with the probe ordering with respect to
> > > > drivers for consumers of these mei client devices. But on these
> > > > camera sensor devices, the ACPI nodes describing the sensors all
> > > > have a _DEP dependency on the matching INTC1059 ACPI device, so
> > > > adding INTC1059 to acpi_honor_dep_ids allows solving the
> > > > probe-ordering problem by delaying the enumeration of ACPI-devices
> > > > which have a _DEP dependency on
> > > an INTC1059 device.
> > >
> > > What does the INTC1059 device represent?
> >
> > This is the IVSC device on which camera sensor has _DEP
> >
> >             Device (CVFD)
> >             {
> >                 Name (_HID, "INTC1059")  // _HID: Hardware ID
> >                 Name (_DDN, "Intel CVF Device")  // _DDN: DOS Device Name
> >                 Method (SID, 1, Serialized)
> >                 {
> >                     Return (HCID (One))
> >                 }
> >             }
> 
> Should this be interpreted that if you have a _DEP to this device, then the IVSC is
> between the sensor and the IPU?

Ok, I can explain more in next version patch set. Thanks

BR,
Wentong

> 
> --
> Kind regards,
> 
> Sakari Ailus
diff mbox series

Patch

diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 2743444..5b48dcd 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -796,6 +796,7 @@  static const char * const acpi_ignore_dep_ids[] = {
 /* List of HIDs for which we honor deps of matching ACPI devs, when checking _DEP lists. */
 static const char * const acpi_honor_dep_ids[] = {
 	"INT3472", /* Camera sensor PMIC / clk and regulator info */
+	"INTC1059",
 	NULL
 };