Skip to content

[TEST] double-check impact of ACPI patch on suspend-resume#3521

Closed
plbossart wants to merge 3 commits intothesofproject:topic/sof-devfrom
plbossart:fix/revert-acpi-cid-check
Closed

[TEST] double-check impact of ACPI patch on suspend-resume#3521
plbossart wants to merge 3 commits intothesofproject:topic/sof-devfrom
plbossart:fix/revert-acpi-cid-check

Conversation

@plbossart
Copy link
Member

Let's record the results on TGL_RVP_SDW and CML_HELIOS, where suspend-resume seems to be broken due to commit e38f9ff

…lid"

This reverts commit e38f9ff.

Suspend-resume regressions were noticed on Intel TGLU_RVP and CML
Helios Chromebook.

BugLink: thesofproject#3459
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
@plbossart
Copy link
Member Author

https://sof-ci.01.org/linuxpr/PR3521/build7362/devicetest/ shows that with this revert both TGLU_RVP_SDW and CML_HEL_RT5682 have no problems with suspend-resume.

Let's re-add this commit and see what happens.

Section 6.1.2 of ACPI 6.4 explicitly requires _HID to be present for
_CID to be defined, so don't add device IDs from _CID to the device
IDs list of a device if _HID is not valid.

Link: https://uefi.org/specs/ACPI/6.4/06_Device_Configuration/Device_Configuration.html#cid-compatible-id
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
@plbossart plbossart marked this pull request as draft March 15, 2022 16:33
@plbossart
Copy link
Member Author

plbossart commented Mar 15, 2022

Adding this commit shows a regression again for TGL_RVP_SDW and CML_HELIOS: https://sof-ci.01.org/linuxpr/PR3521/build7363/devicetest/ (Zephyr results to be ignored)

Let's try to revert one more time and see what happens

…lid"

This reverts commit e38f9ff.

Suspend-resume regressions were noticed on Intel TGLU_RVP and CML
Helios Chromebook.

BugLink: thesofproject#3459
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
@plbossart
Copy link
Member Author

Second revert gives good results again on TGL_RVP_SDW and CML_HELIOS, c.f. https://sof-ci.01.org/linuxpr/PR3521/build7364/devicetest/

@plbossart
Copy link
Member Author

@rafaeljw @andy-shev @ujfalusi I think the results speak for themselves, we have two confirmed regressions with commit e38f9ff, so somehow filtering out the pnp_cid list has a very large impact.

I was able to fix the SoundWire regression by using the DPM_FLAG_SMART_SUSPEND to prevent a spurious pm_runtime resume, the other regression on a Chromebook is not clear at all.

@rafaeljw
Copy link

rafaeljw commented Mar 16, 2022 via email

@ujfalusi
Copy link
Collaborator

ujfalusi commented Mar 16, 2022

The other thing said patch causes is that the drivers/acpi/container.c is not going to be invoked for PNP0A05, which is one of the skipped ones (PRP00001 and PNP0A05 is the _CID under SNDW and UAOL w/o them having _HID).

static const struct acpi_device_id container_device_ids[] = {
	{"ACPI0004", 0},
	{"PNP0A05", 0},
	{"PNP0A06", 0},
	{"", 0},
};

But interestingly the debug (on a laptop which does not break with the offending patch):

[    0.389012] ACPI: acpi_set_pnp_ids: CID without HID, name: SNDW
[    0.389013] ACPI: acpi_set_pnp_ids:   CID #0/2: string: PRP00001
[    0.389015] ACPI: acpi_set_pnp_ids:   CID #1/2: string: PNP0A05
[    0.392189] ACPI: acpi_set_pnp_ids: CID without HID, name: UAOL
[    0.392190] ACPI: acpi_set_pnp_ids:   CID #0/2: string: PRP00001
[    0.392191] ACPI: acpi_set_pnp_ids:   CID #1/2: string: PNP0A05
...
[    0.666706] acpi PRP00001:00: container_device_attach: ENTER
[    0.666752] acpi PRP00001:01: container_device_attach: ENTER

If I acpi_add_id() the CIDs without HID. ^^^^

If I don't then the container_device_attach is not going to be called. The adev->dev gets it's name from the first CID in this case?

@ujfalusi
Copy link
Collaborator

Not invoking container_device_attach() has some cascade effect on the device properties observable via sysfs.
With the patch reverted (not ignoring the _CID wihtout _HID):

# ls -al /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:2b
total 0
drwxr-xr-x   7 root root    0 Mar 16 13:45 .
drwxr-xr-x 105 root root    0 Mar 16 13:45 ..
-r--r--r--   1 root root 4096 Mar 16 13:46 adr
drwxr-xr-x   3 root root    0 Mar 16 13:45 device:30
-r--r--r--   1 root root 4096 Mar 16 13:46 path
lrwxrwxrwx   1 root root    0 Mar 16 13:46 physical_node -> ../../../../pci0000:00/0000:00:1f.3
drwxr-xr-x   2 root root    0 Mar 16 13:46 power
-r--r--r--   1 root root 4096 Mar 16 13:46 power_state
drwxr-xr-x  11 root root    0 Mar 16 13:45 PRP00001:00
drwxr-xr-x   5 root root    0 Mar 16 13:45 PRP00001:01
lrwxrwxrwx   1 root root    0 Mar 16 13:45 subsystem -> ../../../../../bus/acpi
-rw-r--r--   1 root root 4096 Mar 16 13:45 uevent
drwxr-xr-x   3 root root    0 Mar 16 13:45 wakeup

# ls -al /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:2b/PRP00001:00
total 0
drwxr-xr-x 11 root root    0 Mar 16 13:45 .
drwxr-xr-x  7 root root    0 Mar 16 13:45 ..
-r--r--r--  1 root root 4096 Mar 16 13:46 adr
drwxr-xr-x 14 root root    0 Mar 16 13:45 device:2c
drwxr-xr-x 16 root root    0 Mar 16 13:45 device:2d
drwxr-xr-x 14 root root    0 Mar 16 13:45 device:2e
drwxr-xr-x 13 root root    0 Mar 16 13:45 device:2f
-r--r--r--  1 root root 4096 Mar 16 13:46 hid
drwxr-xr-x  2 root root    0 Mar 16 13:46 mipi-sdw-link-0-subproperties
drwxr-xr-x  2 root root    0 Mar 16 13:46 mipi-sdw-link-1-subproperties
drwxr-xr-x  2 root root    0 Mar 16 13:46 mipi-sdw-link-2-subproperties
drwxr-xr-x  2 root root    0 Mar 16 13:46 mipi-sdw-link-3-subproperties
-r--r--r--  1 root root 4096 Mar 16 13:46 modalias
-r--r--r--  1 root root 4096 Mar 16 13:46 path
lrwxrwxrwx  1 root root    0 Mar 16 13:46 physical_node -> ../../../../../system/container/PRP00001:00
lrwxrwxrwx  1 root root    0 Mar 16 13:46 physical_node1 -> ../../../../../pci0000:00/0000:00:1f.3/soundwire_intel.link.0
lrwxrwxrwx  1 root root    0 Mar 16 13:46 physical_node2 -> ../../../../../pci0000:00/0000:00:1f.3/soundwire_intel.link.0/sdw-master-0
lrwxrwxrwx  1 root root    0 Mar 16 13:46 physical_node3 -> ../../../../../pci0000:00/0000:00:1f.3/soundwire_intel.link.1
lrwxrwxrwx  1 root root    0 Mar 16 13:46 physical_node4 -> ../../../../../pci0000:00/0000:00:1f.3/soundwire_intel.link.1/sdw-master-1
lrwxrwxrwx  1 root root    0 Mar 16 13:46 physical_node5 -> ../../../../../pci0000:00/0000:00:1f.3/soundwire_intel.link.2
lrwxrwxrwx  1 root root    0 Mar 16 13:46 physical_node6 -> ../../../../../pci0000:00/0000:00:1f.3/soundwire_intel.link.2/sdw-master-2
drwxr-xr-x  2 root root    0 Mar 16 13:46 power
-r--r--r--  1 root root 4096 Mar 16 13:46 status
lrwxrwxrwx  1 root root    0 Mar 16 13:45 subsystem -> ../../../../../../bus/acpi
-rw-r--r--  1 root root 4096 Mar 16 13:45 uevent

# ls -al /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:2b/PRP00001:01
total 0
drwxr-xr-x 5 root root    0 Mar 16 13:45 .
drwxr-xr-x 7 root root    0 Mar 16 13:45 ..
-r--r--r-- 1 root root 4096 Mar 16 13:46 adr
-r--r--r-- 1 root root 4096 Mar 16 13:46 hid
-r--r--r-- 1 root root 4096 Mar 16 13:46 modalias
-r--r--r-- 1 root root 4096 Mar 16 13:46 path
lrwxrwxrwx 1 root root    0 Mar 16 13:46 physical_node -> ../../../../../system/container/PRP00001:01
drwxr-xr-x 2 root root    0 Mar 16 13:46 power
-r--r--r-- 1 root root 4096 Mar 16 13:46 status
lrwxrwxrwx 1 root root    0 Mar 16 13:45 subsystem -> ../../../../../../bus/acpi
drwxr-xr-x 2 root root    0 Mar 16 13:46 uaol-descriptor-0
drwxr-xr-x 2 root root    0 Mar 16 13:46 uaol-descriptor-1
-rw-r--r-- 1 root root 4096 Mar 16 13:45 uevent

and with the patch (ignoring _CIDs without _HID):

# ls -al /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:2b
total 0
drwxr-xr-x   7 root root    0 Mar 16 13:49 .
drwxr-xr-x 105 root root    0 Mar 16 13:49 ..
-r--r--r--   1 root root 4096 Mar 16 13:50 adr
drwxr-xr-x  12 root root    0 Mar 16 13:49 device:2c
drwxr-xr-x   5 root root    0 Mar 16 13:49 device:31
drwxr-xr-x   3 root root    0 Mar 16 13:49 device:32
-r--r--r--   1 root root 4096 Mar 16 13:50 path
lrwxrwxrwx   1 root root    0 Mar 16 13:50 physical_node -> ../../../../pci0000:00/0000:00:1f.3
drwxr-xr-x   2 root root    0 Mar 16 13:50 power
-r--r--r--   1 root root 4096 Mar 16 13:50 power_state
lrwxrwxrwx   1 root root    0 Mar 16 13:49 subsystem -> ../../../../../bus/acpi
-rw-r--r--   1 root root 4096 Mar 16 13:49 uevent
drwxr-xr-x   3 root root    0 Mar 16 13:49 wakeup

# ls -al /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:2b/device:2c
total 0
drwxr-xr-x 12 root root    0 Mar 16 13:49 .
drwxr-xr-x  7 root root    0 Mar 16 13:49 ..
-r--r--r--  1 root root 4096 Mar 16 13:51 adr
drwxr-xr-x 14 root root    0 Mar 16 13:49 device:2d
drwxr-xr-x 16 root root    0 Mar 16 13:49 device:2e
drwxr-xr-x 14 root root    0 Mar 16 13:49 device:2f
drwxr-xr-x 13 root root    0 Mar 16 13:49 device:30
drwxr-xr-x  2 root root    0 Mar 16 13:51 mipi-sdw-link-0-subproperties
drwxr-xr-x  2 root root    0 Mar 16 13:51 mipi-sdw-link-1-subproperties
drwxr-xr-x  2 root root    0 Mar 16 13:51 mipi-sdw-link-2-subproperties
drwxr-xr-x  2 root root    0 Mar 16 13:51 mipi-sdw-link-3-subproperties
-r--r--r--  1 root root 4096 Mar 16 13:51 path
lrwxrwxrwx  1 root root    0 Mar 16 13:51 physical_node -> ../../../../../pci0000:00/0000:00:1f.3/soundwire_intel.link.0
lrwxrwxrwx  1 root root    0 Mar 16 13:51 physical_node1 -> ../../../../../pci0000:00/0000:00:1f.3/soundwire_intel.link.0/sdw-master-0
lrwxrwxrwx  1 root root    0 Mar 16 13:51 physical_node2 -> ../../../../../pci0000:00/0000:00:1f.3/soundwire_intel.link.1
lrwxrwxrwx  1 root root    0 Mar 16 13:51 physical_node3 -> ../../../../../pci0000:00/0000:00:1f.3/soundwire_intel.link.1/sdw-master-1
lrwxrwxrwx  1 root root    0 Mar 16 13:51 physical_node4 -> ../../../../../pci0000:00/0000:00:1f.3/soundwire_intel.link.2
lrwxrwxrwx  1 root root    0 Mar 16 13:51 physical_node5 -> ../../../../../pci0000:00/0000:00:1f.3/soundwire_intel.link.2/sdw-master-2
drwxr-xr-x  2 root root    0 Mar 16 13:51 power
-r--r--r--  1 root root 4096 Mar 16 13:51 status
lrwxrwxrwx  1 root root    0 Mar 16 13:49 subsystem -> ../../../../../../bus/acpi
-rw-r--r--  1 root root 4096 Mar 16 13:49 uevent
drwxr-xr-x  3 root root    0 Mar 16 13:49 wakeup

# ls -al /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:2b/device:31
total 0
drwxr-xr-x 5 root root    0 Mar 16 13:49 .
drwxr-xr-x 7 root root    0 Mar 16 13:49 ..
-r--r--r-- 1 root root 4096 Mar 16 13:51 adr
-r--r--r-- 1 root root 4096 Mar 16 13:51 path
drwxr-xr-x 2 root root    0 Mar 16 13:51 power
-r--r--r-- 1 root root 4096 Mar 16 13:51 status
lrwxrwxrwx 1 root root    0 Mar 16 13:49 subsystem -> ../../../../../../bus/acpi
drwxr-xr-x 2 root root    0 Mar 16 13:51 uaol-descriptor-0
drwxr-xr-x 2 root root    0 Mar 16 13:51 uaol-descriptor-1
-rw-r--r-- 1 root root 4096 Mar 16 13:49 uevent

Notable differences are the number of physical_node links for the subdevices.
The lack of wakeup file in case first prints for the subdevices (why???).
Obviously the PRP00001 present in the first logs in place of device:2b in the second.

@plbossart
Copy link
Member Author

For the information of everyone on the mailing lists: Commit e38f9ff ("ACPI: scan: Do not add device IDs from _CID if _HID is not valid") is going to be reverted, because it caused multiple systems to misbehave as per the below.

@rafaeljw can you point us to an upstream commit in the ACPI tree, we'll cherry-pick it in ours. Thank you!

@plbossart plbossart closed this Mar 18, 2022
plbossart added a commit to plbossart/sound that referenced this pull request Mar 18, 2022
…lid"

This reverts commit e38f9ff.

Suspend-resume regressions were noticed on Intel TGLU_RVP and CML
Helios Chromebook.

Excert from discussion with ACPI maintainer in from
thesofproject#3521 (comment):

Commit e38f9ff ("ACPI: scan: Do not add device IDs from _CID if _HID
is not valid") is going to be reverted, because it caused multiple
systems to misbehave as per the below.

BugLink: thesofproject#3459
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
ranj063 pushed a commit that referenced this pull request Mar 30, 2022
…lid"

This reverts commit e38f9ff.

Suspend-resume regressions were noticed on Intel TGLU_RVP and CML
Helios Chromebook.

Excert from discussion with ACPI maintainer in from
#3521 (comment):

Commit e38f9ff ("ACPI: scan: Do not add device IDs from _CID if _HID
is not valid") is going to be reverted, because it caused multiple
systems to misbehave as per the below.

BugLink: #3459
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
plbossart added a commit that referenced this pull request Apr 6, 2022
…lid"

This reverts commit e38f9ff.

Suspend-resume regressions were noticed on Intel TGLU_RVP and CML
Helios Chromebook.

Excert from discussion with ACPI maintainer in from
#3521 (comment):

Commit e38f9ff ("ACPI: scan: Do not add device IDs from _CID if _HID
is not valid") is going to be reverted, because it caused multiple
systems to misbehave as per the below.

BugLink: #3459
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
@rafaeljw
Copy link

rafaeljw commented Oct 11, 2022 via email

@rafaeljw
Copy link

rafaeljw commented Oct 11, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants