test/xe_pm: Assert on unbounded VSP
PATCH 1/1 test/xe_pm: Assert on unbounded VSP
Discrete GFX cards gfx may have multiple PCIe endpoints, they connects to root port via pcie upstream switch port(USP) and virtual pcie switch port(VSP), sometimes VSP pcie devices doesn't bind to pcieport driver. Without pcieport driver pcie PM comes without any warranty and with unbounded VSP runtime pm and system wide suspend/resume IGT test cases may get pass as false positive.
Therefore assert the xe_pm igt tests on unbounded VSP.
--- tests/xe/xe_pm.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
tests/xe/xe_pm.c +10 -1
@@ -33,6 +33,7 @@typedef struct {int fd_xe;struct pci_device *pci_xe; +struct pci_device *pci_parent;struct pci_device *pci_root; }device_t ;
@@ -344,6 +345,7 @@ NULL)); igt_main {struct drm_xe_engine_class_instance *hwe; +struct drm_xe_query_config *config;device_t device;char d3cold_allowed[2 ]; const struct s_state {
@@ -369,8 +371,15 @@ igt_main device.fd_xe =drm_open_driver (DRIVER_XE ); device.pci_xe =igt_device_get_pci_device (device.fd_xe); device.pci_root =igt_device_get_pci_root_port (device.fd_xe); + device.pci_parent =pci_device_get_parent_bridge (device.pci_xe); -xe_device_get (device.fd_xe); + config =xe_device_get (device.fd_xe)->config; + +if (config->info[XE_QUERY_CONFIG_FLAGS ] &XE_QUERY_CONFIG_FLAGS_HAS_VRAM ) { +igt_assert (device.pci_parent); +igt_assert_f (!pci_device_has_kernel_driver (device.pci_parent), +"pci bridge device does not bind with pcieport driver\n" ); + }/* Always perform initial once-basic exec checking for health */ xe_for_each_hw_engine (device.fd_xe, hwe)
Signature · 1 line
2.25.1
Patchwork
CI[Intel-xe] ✗ CI.Patch_applied: failure for test/xe_pm: Assert on unbounded VSP
== Series Details ==
== Series Details ==
Series: test/xe_pm: Assert on unbounded VSP
URL : https://patchwork.freedesktop.org/series/116810/
State : failure
== Summary ==
=== Applying kernel patches on branch 'drm-xe-next' with base: === Base commit: 7c1c3d389 drm/xe: Enable d3cold support for dgfx === git am output follows ===
error: tests/xe/xe_pm.c: does not exist in index
hint: Use 'git am --show-current-patch' to see the failed patch
Applying: test/xe_pm: Assert on unbounded VSP
Patch failed at 0001 test/xe_pm: Assert on unbounded VSP When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort".
Quoted 7 lines · Anshuman Gupta
Discrete GFX cards gfx may have multiple PCIe endpoints, they connects to root port via pcie upstream switch port(USP) and virtual pcie switch port(VSP), sometimes VSP pcie devices doesn't bind to pcieport driver. Without pcieport driver pcie PM comes without any warranty and with unbounded VSP runtime pm and system wide suspend/resume IGT test cases may get pass as false positive.
I'm not sure if I'm following here... you mean that in cases like this we cannot suspend/resume at all? What are the false positive? I'm not following the whole scenario here...
Quoted 48 lines
Therefore assert the
xe_pmigt tests on unbounded VSP.Signed-off-by Anshuman Gupta <[email protected]>--- tests/xe/xe_pm.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)tests/xe/xe_pm.c +10
-1@@ -33,6 +33,7 @@typedef struct {int fd_xe;struct pci_device *pci_xe; +struct pci_device *pci_parent;struct pci_device *pci_root; }device_t ;@@ -344,6 +345,7 @@ NULL)); igt_main {struct drm_xe_engine_class_instance *hwe; +struct drm_xe_query_config *config;device_t device;char d3cold_allowed[2 ]; const struct s_state {@@ -369,8 +371,15 @@ igt_main device.fd_xe =drm_open_driver (DRIVER_XE ); device.pci_xe =igt_device_get_pci_device (device.fd_xe); device.pci_root =igt_device_get_pci_root_port (device.fd_xe); + device.pci_parent =pci_device_get_parent_bridge (device.pci_xe); -xe_device_get (device.fd_xe); + config =xe_device_get (device.fd_xe)->config; + +if (config->info[XE_QUERY_CONFIG_FLAGS ] &XE_QUERY_CONFIG_FLAGS_HAS_VRAM ) { +igt_assert (device.pci_parent); +igt_assert_f (!pci_device_has_kernel_driver (device.pci_parent), +"pci bridge device does not bind with pcieport driver\n" ); + }/* Always perform initial once-basic exec checking for health */ xe_for_each_hw_engine (device.fd_xe, hwe)Signature · 1 line
2.25.1
Quoted 16 lines
-----Original Message-----
From: Rodrigo Vivi <[email protected]>
Sent: Friday, April 21, 2023 7:25 PM
To: Gupta, Anshuman <[email protected]>
Cc: [email protected]; Chehab, Mauro <[email protected]>; Vivi, Rodrigo <[email protected]>
Subject: Re: [Intel-xe] [PATCH i-g-t] test/xe_pm: Assert on unbounded VSPQuoted 5 lines · Anshuman Gupta
Discrete GFX cards gfx may have multiple PCIe endpoints, they connects to root port via pcie upstream switch port(USP) and virtual pcie switch port(VSP), sometimes VSP pcie devices doesn't bind to pcieport driver. Without pcieport driver pcie PM comes without any warranty and with unbounded VSP runtime pm and system wide suspend/resume IGT
Quoted 6 lines
test
Quoted 1 line
cases may get pass as false positive.
I'm not sure if I'm following here... you mean that in cases like this we cannot suspend/resume at all? What are the false positive?
I'm not following the whole scenario here...
Recently Linux core kernel revert the L1 substate save/restore feature from Linux.
That eventually requires L1 substate to be disable from BIOS, otherwise s2idle fails on a HOST with DG2 card as DG2 was not able to exit form L1 substate. But due to the unbounded VSP our CI missed to report such issue. As VSP were unbounded and DG2 Link was not transitioning to low power Link State and our tests were passing instead of failing.
Br,
Anshuman Gupta.
Quoted 55 lines
Quoted 30 lines
Therefore assert the
xe_pmigt tests on unbounded VSP.Signed-off-by Anshuman Gupta <[email protected]>--- tests/xe/xe_pm.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)tests/xe/xe_pm.c index renamed from tests/xe/xe_pm.c +0
-0
23b8246ed..78d9374cf100644tests/xe/xe_pm.c +2
-0@@ -33,6 +33,7 @@typedef struct {int fd_xe;struct pci_device *pci_xe; +struct pci_device *pci_parent;struct pci_device *pci_root; }device_t ;@@ -344,6 +345,7 @@ NULL)); igt_main {struct drm_xe_engine_class_instance *hwe; +struct drm_xe_query_config *config;device_t device;char d3cold_allowed[2 ]; const struct s_state {tests/xe/xe_pm.c igt_main · line 373
Quoted 3 lines
tests/xe/xe_pm.c +0
-0@@ -369,8 +371,15 @@ igt_main device.fd_xe =drm_open_driver (DRIVER_XE ); device.pci_xe =igt_device_get_pci_device (device.fd_xe); device.pci_root =
igt_device_get_pci_root_port(device.fd_xe);tests/xe/xe_pm.c igt_main · line 374
Quoted 1 line
tests/xe/xe_pm.c +1
-0+ device.pci_parent =
pci_device_get_parent_bridge(device.pci_xe);tests/xe/xe_pm.c igt_main
Quoted 5 lines
tests/xe/xe_pm.c +3
-1-xe_device_get (device.fd_xe); + config =xe_device_get (device.fd_xe)->config; + + if (config->info[XE_QUERY_CONFIG_FLAGS] &
XE_QUERY_CONFIG_FLAGS_HAS_VRAM) {tests/xe/xe_pm.c igt_main · line 379
Quoted 2 lines
tests/xe/xe_pm.c +2
-0+igt_assert (device.pci_parent); +igt_assert_f(!pci_device_has_kernel_driver(device.pci_parent),
tests/xe/xe_pm.c igt_main · line 380
Quoted 1 line
tests/xe/xe_pm.c +1
-0+ "pci bridge device does not bind withpcieport driver\n");
tests/xe/xe_pm.c igt_main
Quoted 3 lines
tests/xe/xe_pm.c +1
-0+ }/* Always perform initial once-basic exec checking for health */
Quoted 4 lines
tests/xe/xe_pm.c +0
-1xe_for_each_hw_engine (device.fd_xe, hwe) --2.25.1
Quoted 19 lines · Anshuman
Quoted 19 lines
-----Original Message-----
From: Rodrigo Vivi <[email protected]>
Sent: Friday, April 21, 2023 7:25 PM
To: Gupta, Anshuman <[email protected]>
Cc: [email protected]; Chehab, Mauro <[email protected]>; Vivi, Rodrigo <[email protected]>
Subject: Re: [Intel-xe] [PATCH i-g-t] test/xe_pm: Assert on unbounded VSPQuoted 5 lines · Anshuman Gupta
Discrete GFX cards gfx may have multiple PCIe endpoints, they connects to root port via pcie upstream switch port(USP) and virtual pcie switch port(VSP), sometimes VSP pcie devices doesn't bind to pcieport driver. Without pcieport driver pcie PM comes without any warranty and with unbounded VSP runtime pm and system wide suspend/resume IGT
test
Quoted 1 line
cases may get pass as false positive.
Quoted 8 lines
Quoted 3 lines
I'm not sure if I'm following here... you mean that in cases like this we cannot suspend/resume at all? What are the false positive?
I'm not following the whole scenario here...Recently Linux core kernel revert the L1 substate save/restore feature from Linux.
That eventually requires L1 substate to be disable from BIOS, otherwise s2idle fails on a HOST with DG2 card as DG2 was not able to exit form L1 substate. But due to the unbounded VSP our CI missed to report such issue. As VSP were unbounded and DG2 Link was not transitioning to low power Link State and our tests were passing instead of failing.
But then on this case we are just avoiding the test now?
Why don't we cherry-pick the linux core kernel fix as a temporary topic/core-for-CI instead of blocking the test?
Or why are we not handling this case in kernel side then? Why block even s3 tests if this is only about the s2idle?
Quoted 58 lines
Br,
Anshuman Gupta.Quoted 55 lines
Quoted 30 lines
Therefore assert the
xe_pmigt tests on unbounded VSP.Signed-off-by Anshuman Gupta <[email protected]>--- tests/xe/xe_pm.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)tests/xe/xe_pm.c index renamed from tests/xe/xe_pm.c +0
-0
23b8246ed..78d9374cf100644tests/xe/xe_pm.c +2
-0@@ -33,6 +33,7 @@typedef struct {int fd_xe;struct pci_device *pci_xe; +struct pci_device *pci_parent;struct pci_device *pci_root; }device_t ;@@ -344,6 +345,7 @@ NULL)); igt_main {struct drm_xe_engine_class_instance *hwe; +struct drm_xe_query_config *config;device_t device;char d3cold_allowed[2 ]; const struct s_state {tests/xe/xe_pm.c igt_main · line 373
Quoted 3 lines
tests/xe/xe_pm.c +0
-0@@ -369,8 +371,15 @@ igt_main device.fd_xe =drm_open_driver (DRIVER_XE ); device.pci_xe =igt_device_get_pci_device (device.fd_xe); device.pci_root =
igt_device_get_pci_root_port(device.fd_xe);tests/xe/xe_pm.c igt_main · line 374
Quoted 1 line
tests/xe/xe_pm.c +1
-0+ device.pci_parent =
pci_device_get_parent_bridge(device.pci_xe);tests/xe/xe_pm.c igt_main
Quoted 5 lines
tests/xe/xe_pm.c +3
-1-xe_device_get (device.fd_xe); + config =xe_device_get (device.fd_xe)->config; + + if (config->info[XE_QUERY_CONFIG_FLAGS] &
XE_QUERY_CONFIG_FLAGS_HAS_VRAM) {tests/xe/xe_pm.c igt_main · line 379
Quoted 2 lines
tests/xe/xe_pm.c +2
-0+igt_assert (device.pci_parent); +igt_assert_f(!pci_device_has_kernel_driver(device.pci_parent),
tests/xe/xe_pm.c igt_main · line 380
Quoted 1 line
tests/xe/xe_pm.c +1
-0+ "pci bridge device does not bind withpcieport driver\n");
tests/xe/xe_pm.c igt_main
Quoted 3 lines
tests/xe/xe_pm.c +1
-0+ }/* Always perform initial once-basic exec checking for health */
Quoted 4 lines
tests/xe/xe_pm.c +0
-1xe_for_each_hw_engine (device.fd_xe, hwe) --2.25.1
Quoted 39 lines
-----Original Message-----
From: Rodrigo Vivi <[email protected]>
Sent: Monday, April 24, 2023 5:52 PM
To: Gupta, Anshuman <[email protected]>
Cc: Chehab, Mauro <[email protected]>; intel- [email protected]; Vivi, Rodrigo <[email protected]>
Subject: Re: [Intel-xe] [PATCH i-g-t] test/xe_pm: Assert on unbounded VSPQuoted 18 lines · Anshuman
Quoted 18 lines
-----Original Message-----
From: Rodrigo Vivi <[email protected]>
Sent: Friday, April 21, 2023 7:25 PM
To: Gupta, Anshuman <[email protected]>
Cc: [email protected]; Chehab, Mauro <[email protected]>; Vivi, Rodrigo <[email protected]>
Subject: Re: [Intel-xe] [PATCH i-g-t] test/xe_pm: Assert on unbounded VSPQuoted 6 lines · Anshuman Gupta
Discrete GFX cards gfx may have multiple PCIe endpoints, they connects to root port via pcie upstream switch port(USP) and virtual pcie switch port(VSP), sometimes VSP pcie devices doesn't bind to pcieport driver. Without pcieport driver pcie PM comes without any warranty and with unbounded VSP runtime pm and system wide suspend/resume IGT
Quoted 7 lines
Quoted 6 lines
test
Quoted 1 line
cases may get pass as false positive.
I'm not sure if I'm following here... you mean that in cases like this we cannot suspend/resume at all? What are the false positive? I'm not following the whole scenario here...
Recently Linux core kernel revert the L1 substate save/restore feature
from Linux.
Quoted 2 lines
That eventually requires L1 substate to be disable from BIOS, otherwise s2idle fails on a HOST with DG2 card as DG2 was not able to exit
Quoted 8 lines
form L1 substate. But due to the unbounded VSP our CI missed to report such issue.
Quoted 2 lines
As VSP were unbounded and DG2 Link was not transitioning to low power Link State and our tests were passing instead of failing.
But then on this case we are just avoiding the test now?
Why don't we cherry-pick the linux core kernel fix as a temporary topic/core- for-CI instead of blocking the test?
We don't have any fix yet, Atm Linux core Kernel does not support L1 substate during Suspend/Resume.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/pci/pcie/aspm.c?id=a7152be79b627428c628da2a887ca4b2512a78fd
Quoted 3 lines
Or why are we not handling this case in kernel side then? Why block even s3 tests if this is only about the s2idle?
This is about D0/D3 and Link state for our discrete graphics card not directly related to s2idle/S3. Due to unbounded VSP, PM core will always keep the bridge devices in D0, L0 state, There is no point to test D3 and Suspend/Resume with unbounded VSP.
Unbounded VSP was the one of reason on i915 that we missed runtime pm wakeref before accessing lmem.
Br,
Anshuman Gupta.
Quoted 59 lines
Quoted 59 lines
Br,
Anshuman Gupta.Quoted 55 lines
Quoted 30 lines
Therefore assert the
xe_pmigt tests on unbounded VSP.Signed-off-by Anshuman Gupta <[email protected]>--- tests/xe/xe_pm.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)tests/xe/xe_pm.c index renamed from tests/xe/xe_pm.c +0
-0
23b8246ed..78d9374cf100644tests/xe/xe_pm.c +2
-0@@ -33,6 +33,7 @@typedef struct {int fd_xe;struct pci_device *pci_xe; +struct pci_device *pci_parent;struct pci_device *pci_root; }device_t ;@@ -344,6 +345,7 @@ NULL)); igt_main {struct drm_xe_engine_class_instance *hwe; +struct drm_xe_query_config *config;device_t device;char d3cold_allowed[2 ]; const struct s_state {tests/xe/xe_pm.c igt_main · line 373
Quoted 3 lines
tests/xe/xe_pm.c +0
-0@@ -369,8 +371,15 @@ igt_main device.fd_xe =drm_open_driver (DRIVER_XE ); device.pci_xe =igt_device_get_pci_device (device.fd_xe); device.pci_root =
igt_device_get_pci_root_port(device.fd_xe);tests/xe/xe_pm.c igt_main · line 374
Quoted 1 line
tests/xe/xe_pm.c +1
-0+ device.pci_parent =
pci_device_get_parent_bridge(device.pci_xe);tests/xe/xe_pm.c igt_main
Quoted 5 lines
tests/xe/xe_pm.c +3
-1-xe_device_get (device.fd_xe); + config =xe_device_get (device.fd_xe)->config; + + if (config->info[XE_QUERY_CONFIG_FLAGS] &
XE_QUERY_CONFIG_FLAGS_HAS_VRAM) {tests/xe/xe_pm.c igt_main · line 379
Quoted 2 lines
tests/xe/xe_pm.c +2
-0+igt_assert (device.pci_parent); +igt_assert_f(!pci_device_has_kernel_driver(device.pci_parent),
tests/xe/xe_pm.c igt_main · line 380
Quoted 1 line
tests/xe/xe_pm.c +1
-0+ "pci bridge device does not bind withpcieport driver\n");
tests/xe/xe_pm.c igt_main
Quoted 3 lines
tests/xe/xe_pm.c +1
-0+ }/* Always perform initial once-basic exec checking for health */
Quoted 4 lines
tests/xe/xe_pm.c +0
-1xe_for_each_hw_engine (device.fd_xe, hwe) --2.25.1
Quoted 50 lines · Anshuman
Quoted 39 lines
-----Original Message-----
From: Rodrigo Vivi <[email protected]>
Sent: Monday, April 24, 2023 5:52 PM
To: Gupta, Anshuman <[email protected]>
Cc: Chehab, Mauro <[email protected]>; intel- [email protected]; Vivi, Rodrigo <[email protected]>
Subject: Re: [Intel-xe] [PATCH i-g-t] test/xe_pm: Assert on unbounded VSPQuoted 18 lines · Anshuman
Quoted 18 lines
-----Original Message-----
From: Rodrigo Vivi <[email protected]>
Sent: Friday, April 21, 2023 7:25 PM
To: Gupta, Anshuman <[email protected]>
Cc: [email protected]; Chehab, Mauro <[email protected]>; Vivi, Rodrigo <[email protected]>
Subject: Re: [Intel-xe] [PATCH i-g-t] test/xe_pm: Assert on unbounded VSPQuoted 6 lines · Anshuman Gupta
Discrete GFX cards gfx may have multiple PCIe endpoints, they connects to root port via pcie upstream switch port(USP) and virtual pcie switch port(VSP), sometimes VSP pcie devices doesn't bind to pcieport driver. Without pcieport driver pcie PM comes without any warranty and with unbounded VSP runtime pm and system wide suspend/resume IGT
Quoted 7 lines
Quoted 6 lines
test
Quoted 1 line
cases may get pass as false positive.
I'm not sure if I'm following here... you mean that in cases like this we cannot suspend/resume at all? What are the false positive? I'm not following the whole scenario here...
Recently Linux core kernel revert the L1 substate save/restore feature
from Linux.
Quoted 2 lines
That eventually requires L1 substate to be disable from BIOS, otherwise s2idle fails on a HOST with DG2 card as DG2 was not able to exit
Quoted 8 lines
form L1 substate. But due to the unbounded VSP our CI missed to report such issue.
Quoted 2 lines
As VSP were unbounded and DG2 Link was not transitioning to low power Link State and our tests were passing instead of failing.
But then on this case we are just avoiding the test now?
Why don't we cherry-pick the linux core kernel fix as a temporary topic/core- for-CI instead of blocking the test?We don't have any fix yet, Atm Linux core Kernel does not support L1 substate during Suspend/Resume.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/pci/pcie/aspm.c?id=a7152be79b627428c628da2a887ca4b2512a78fdQuoted 1 line
Quoted 6 lines
Quoted 2 lines
Or why are we not handling this case in kernel side then? Why block even s3 tests if this is only about the s2idle?
This is about D0/D3 and Link state for our discrete graphics card not directly related to s2idle/S3. Due to unbounded VSP, PM core will always keep the bridge devices in D0, L0 state, There is no point to test D3 and Suspend/Resume with unbounded VSP.
Unbounded VSP was the one of reason on i915 that we missed runtime pm wakeref before accessing lmem.
I have 2 problems with this patch:
1. It will fail the PM operations, while the problem is not the PM operations itself.
2. It doesn't protect the PM operations. I'm failing to see any protection in the kernel level. It will be just errors that will be ignored.
So, we need:
1. A test that tackles the right issue.
2. A protection at the kernel level. If we cannot do PM operations in this case, we cannot simply fail in the test and ignore the kernel failure.
Quoted 63 lines
Br,
Anshuman Gupta.Quoted 59 lines
Quoted 59 lines
Br,
Anshuman Gupta.Quoted 55 lines
Quoted 30 lines
Therefore assert the
xe_pmigt tests on unbounded VSP.Signed-off-by Anshuman Gupta <[email protected]>--- tests/xe/xe_pm.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)tests/xe/xe_pm.c index renamed from tests/xe/xe_pm.c +0
-0
23b8246ed..78d9374cf100644tests/xe/xe_pm.c +2
-0@@ -33,6 +33,7 @@typedef struct {int fd_xe;struct pci_device *pci_xe; +struct pci_device *pci_parent;struct pci_device *pci_root; }device_t ;@@ -344,6 +345,7 @@ NULL)); igt_main {struct drm_xe_engine_class_instance *hwe; +struct drm_xe_query_config *config;device_t device;char d3cold_allowed[2 ]; const struct s_state {tests/xe/xe_pm.c igt_main · line 373
Quoted 3 lines
tests/xe/xe_pm.c +0
-0@@ -369,8 +371,15 @@ igt_main device.fd_xe =drm_open_driver (DRIVER_XE ); device.pci_xe =igt_device_get_pci_device (device.fd_xe); device.pci_root =
igt_device_get_pci_root_port(device.fd_xe);tests/xe/xe_pm.c igt_main · line 374
Quoted 1 line
tests/xe/xe_pm.c +1
-0+ device.pci_parent =
pci_device_get_parent_bridge(device.pci_xe);tests/xe/xe_pm.c igt_main
Quoted 5 lines
tests/xe/xe_pm.c +3
-1-xe_device_get (device.fd_xe); + config =xe_device_get (device.fd_xe)->config; + + if (config->info[XE_QUERY_CONFIG_FLAGS] &
XE_QUERY_CONFIG_FLAGS_HAS_VRAM) {tests/xe/xe_pm.c igt_main · line 379
Quoted 2 lines
tests/xe/xe_pm.c +2
-0+igt_assert (device.pci_parent); +igt_assert_f(!pci_device_has_kernel_driver(device.pci_parent),
tests/xe/xe_pm.c igt_main · line 380
Quoted 1 line
tests/xe/xe_pm.c +1
-0+ "pci bridge device does not bind withpcieport driver\n");
tests/xe/xe_pm.c igt_main
Quoted 3 lines
tests/xe/xe_pm.c +1
-0+ }/* Always perform initial once-basic exec checking for health */
Quoted 4 lines
tests/xe/xe_pm.c +0
-1xe_for_each_hw_engine (device.fd_xe, hwe) --2.25.1
Quoted 88 lines
-----Original Message-----
From: Rodrigo Vivi <[email protected]>
Sent: Tuesday, April 25, 2023 8:03 PM
To: Gupta, Anshuman <[email protected]>
Cc: Chehab, Mauro <[email protected]>; intel- [email protected]; Vivi, Rodrigo <[email protected]>
Subject: Re: [Intel-xe] [PATCH i-g-t] test/xe_pm: Assert on unbounded VSPQuoted 30 lines · Anshuman
Quoted 30 lines
-----Original Message-----
From: Rodrigo Vivi <[email protected]>
Sent: Monday, April 24, 2023 5:52 PM
To: Gupta, Anshuman <[email protected]>
Cc: Chehab, Mauro <[email protected]>; intel- [email protected]; Vivi, Rodrigo <[email protected]>
Subject: Re: [Intel-xe] [PATCH i-g-t] test/xe_pm: Assert on unbounded VSPQuoted 18 lines · Anshuman
Quoted 18 lines
-----Original Message-----
From: Rodrigo Vivi <[email protected]>
Sent: Friday, April 21, 2023 7:25 PM
To: Gupta, Anshuman <[email protected]>
Cc: [email protected]; Chehab, Mauro <[email protected]>; Vivi, Rodrigo <[email protected]>
Subject: Re: [Intel-xe] [PATCH i-g-t] test/xe_pm: Assert on unbounded VSPQuoted 6 lines · Anshuman Gupta
Discrete GFX cards gfx may have multiple PCIe endpoints, they connects to root port via pcie upstream switch port(USP) and virtual pcie switch port(VSP), sometimes VSP pcie devices doesn't bind to pcieport driver. Without pcieport driver pcie PM comes without any warranty and with unbounded VSP runtime pm and system wide suspend/resume IGT
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
test
Quoted 1 line
cases may get pass as false positive.
I'm not sure if I'm following here... you mean that in cases like this we cannot suspend/resume at all? What are the false
positive?
Quoted 9 lines
Quoted 9 lines
Quoted 3 lines
Quoted 1 line
I'm not following the whole scenario here...
Recently Linux core kernel revert the L1 substate save/restore feature
from Linux.
Quoted 3 lines
That eventually requires L1 substate to be disable from BIOS, otherwise s2idle fails on a HOST with DG2 card as DG2 was not able to exit
form L1 substate. But due to the unbounded VSP our CI missed to report such issue.
Quoted 7 lines
Quoted 6 lines
Quoted 2 lines
As VSP were unbounded and DG2 Link was not transitioning to low power Link State and our tests were passing instead of failing.
But then on this case we are just avoiding the test now? Why don't we cherry-pick the linux core kernel fix as a temporary topic/core- for-CI instead of blocking the test?
We don't have any fix yet, Atm Linux core Kernel does not support L1
substate during Suspend/Resume.
mit/drivers/pci/pcie/aspm.c?id=a7152be79b627428c628da2a887ca4b2512a78 f
Quoted 5 lines
d
Quoted 3 lines
Or why are we not handling this case in kernel side then? Why block even s3 tests if this is only about the s2idle?
This is about D0/D3 and Link state for our discrete graphics card not directly
related to s2idle/S3.
Quoted 2 lines
Due to unbounded VSP, PM core will always keep the bridge devices in D0, L0 state, There is no point to test D3 and Suspend/Resume with
unbounded VSP.
Quoted 1 line
Unbounded VSP was the one of reason on i915 that we missed runtime pm
wakeref before accessing lmem.
I have 2 problems with this patch:
1. It will fail the PM operations, while the problem is not the PM operations itself.
2. It doesn't protect the PM operations. I'm failing to see any protection in the kernel level.
It will be just errors that will be ignored.
Quoted 5 lines
So, we need:
1. A test that tackles the right issue.
2. A protection at the kernel level. If we cannot do PM operations in this case,
we cannot simply fail in the test and ignore the kernel failure.
Thanks for the review , considering above having a WARN_ON inside Xe driver for unbounded bridge device will be sufficient ? Thanks,
Anshuman Gupta.
Quoted 66 lines
Quoted 29 lines
Br,
Anshuman Gupta.Quoted 24 lines
Quoted 24 lines
Br,
Anshuman Gupta.Quoted 20 lines
Quoted 20 lines
Therefore assert the
xe_pmigt tests on unbounded VSP.Signed-off-by Anshuman Gupta <[email protected]>--- tests/xe/xe_pm.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)tests/xe/xe_pm.c index renamed from tests/xe/xe_pm.c +0
-0
23b8246ed..78d9374cf100644tests/xe/xe_pm.c +1
-0@@ -33,6 +33,7 @@typedef struct {int fd_xe;struct pci_device *pci_xe; +struct pci_device *pci_parent;struct pci_device *pci_root; }device_t ;Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
tests/xe/xe_pm.c igt_main · line 372
Quoted 11 lines
tests/xe/xe_pm.c +1
-0@@ -344,6 +345,7 @@ NULL)); igt_main {struct drm_xe_engine_class_instance *hwe; +struct drm_xe_query_config *config;device_t device;char d3cold_allowed[2 ]; const struct s_state {@@ -369,8 +371,15 @@ igt_main device.fd_xe =drm_open_driver (DRIVER_XE ); device.pci_xe =
igt_device_get_pci_device(device.fd_xe);Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
tests/xe/xe_pm.c igt_main · line 373
Quoted 1 line
tests/xe/xe_pm.c +0
-0device.pci_root =
igt_device_get_pci_root_port(device.fd_xe);tests/xe/xe_pm.c igt_main · line 374
Quoted 1 line
tests/xe/xe_pm.c +1
-0+ device.pci_parent =
pci_device_get_parent_bridge(device.pci_xe);tests/xe/xe_pm.c igt_main
Quoted 5 lines
tests/xe/xe_pm.c +3
-1-xe_device_get (device.fd_xe); + config =xe_device_get (device.fd_xe)->config; + + if (config->info[XE_QUERY_CONFIG_FLAGS] &
XE_QUERY_CONFIG_FLAGS_HAS_VRAM) {Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
tests/xe/xe_pm.c igt_main · line 379
Quoted 2 lines
tests/xe/xe_pm.c +2
-0+igt_assert (device.pci_parent); +igt_assert_f(!pci_device_has_kernel_driver(device.pci_parent),
tests/xe/xe_pm.c igt_main · line 380
Quoted 1 line
tests/xe/xe_pm.c +1
-0+ "pci bridge device does not bindwith
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
pcieport driver\n");
Quoted 4 lines
tests/xe/xe_pm.c +1
-0+ }/* Always perform initial once-basic exec checking for health
*/
Quoted 4 lines
xe_for_each_hw_engine(device.fd_xe, hwe)
--
2.25.1