All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH V2] drm/i915/gt: Hold RPM wakelock during PXP suspend
@ 2021-11-08 10:56 Tejas Upadhyay
  2021-11-08 11:44 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Tejas Upadhyay @ 2021-11-08 10:56 UTC (permalink / raw)
  To: intel-gfx

selftest --r live shows failure in suspend tests when
RPM wakelock is not acquired during suspend.

This changes addresses below error :
<4> [154.177535] RPM wakelock ref not held during HW access
<4> [154.177575] WARNING: CPU: 4 PID: 5772 at
drivers/gpu/drm/i915/intel_runtime_pm.h:113
fwtable_write32+0x240/0x320 [i915]
<4> [154.177974] Modules linked in: i915(+) vgem drm_shmem_helper
fuse snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic
ledtrig_audio mei_hdcp mei_pxp x86_pkg_temp_thermal coretemp
crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_intel_dspcfg
snd_hda_codec snd_hwdep igc snd_hda_core ttm mei_me ptp
snd_pcm prime_numbers mei i2c_i801 pps_core i2c_smbus intel_lpss_pci
btusb btrtl btbcm btintel bluetooth ecdh_generic ecc [last unloaded: i915]
<4> [154.178143] CPU: 4 PID: 5772 Comm: i915_selftest Tainted: G
U            5.15.0-rc6-CI-Patchwork_21432+ #1
<4> [154.178154] Hardware name: ASUS System Product Name/TUF GAMING
Z590-PLUS WIFI, BIOS 0811 04/06/2021
<4> [154.178160] RIP: 0010:fwtable_write32+0x240/0x320 [i915]
<4> [154.178604] Code: 15 7b e1 0f 0b e9 34 fe ff ff 80 3d a9 89 31
00 00 0f 85 31 fe ff ff 48 c7 c7 88 9e 4f a0 c6 05 95 89 31 00 01 e8
c0 15 7b e1 <0f> 0b e9 17 fe ff ff 8b 05 0f 83 58 e2 85 c0 0f 85 8d
00 00 00 48
<4> [154.178614] RSP: 0018:ffffc900016279f0 EFLAGS: 00010286
<4> [154.178626] RAX: 0000000000000000 RBX: ffff888204fe0ee0
RCX: 0000000000000001
<4> [154.178634] RDX: 0000000080000001 RSI: ffffffff823142b5
RDI: 00000000ffffffff
<4> [154.178641] RBP: 00000000000320f0 R08: 0000000000000000
R09: c0000000ffffcd5a
<4> [154.178647] R10: 00000000000f8c90 R11: ffffc90001627808
R12: 0000000000000000
<4> [154.178654] R13: 0000000040000000 R14: ffffffffa04d12e0
R15: 0000000000000000
<4> [154.178660] FS:  00007f7390aa4c00(0000) GS:ffff88844f000000(0000)
knlGS:0000000000000000
<4> [154.178669] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
<4> [154.178675] CR2: 000055bc40595028 CR3: 0000000204474005
CR4: 0000000000770ee0
<4> [154.178682] PKRU: 55555554
<4> [154.178687] Call Trace:
<4> [154.178706]  intel_pxp_fini_hw+0x23/0x30 [i915]
<4> [154.179284]  intel_pxp_suspend+0x1f/0x30 [i915]
<4> [154.179807]  live_gt_resume+0x5b/0x90 [i915]

Changes since V1 :
	- split the HW access parts in gt_suspend_late - Daniele
	- Remove default PXP configs

Signed-off-by: Tejas Upadhyay <tejaskumarx.surendrakumar.upadhyay@intel.com>
---
 drivers/gpu/drm/i915/gt/intel_gt_pm.c   |  7 ++++---
 drivers/gpu/drm/i915/pxp/intel_pxp_pm.c | 15 ++++++++++++---
 drivers/gpu/drm/i915/pxp/intel_pxp_pm.h | 18 ++++++++++++++++--
 3 files changed, 32 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_gt_pm.c b/drivers/gpu/drm/i915/gt/intel_gt_pm.c
index b4a8594bc46c..d4029de1c80d 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt_pm.c
+++ b/drivers/gpu/drm/i915/gt/intel_gt_pm.c
@@ -303,7 +303,7 @@ void intel_gt_suspend_prepare(struct intel_gt *gt)
 	user_forcewake(gt, true);
 	wait_for_suspend(gt);
 
-	intel_pxp_suspend(&gt->pxp, false);
+	intel_pxp_suspend_prepare(&gt->pxp, false);
 }
 
 static suspend_state_t pm_suspend_target(void)
@@ -328,6 +328,7 @@ void intel_gt_suspend_late(struct intel_gt *gt)
 	GEM_BUG_ON(gt->awake);
 
 	intel_uc_suspend(&gt->uc);
+	intel_pxp_suspend(&gt->pxp);
 
 	/*
 	 * On disabling the device, we want to turn off HW access to memory
@@ -355,7 +356,7 @@ void intel_gt_suspend_late(struct intel_gt *gt)
 
 void intel_gt_runtime_suspend(struct intel_gt *gt)
 {
-	intel_pxp_suspend(&gt->pxp, true);
+	intel_pxp_runtime_suspend(&gt->pxp);
 	intel_uc_runtime_suspend(&gt->uc);
 
 	GT_TRACE(gt, "\n");
@@ -373,7 +374,7 @@ int intel_gt_runtime_resume(struct intel_gt *gt)
 	if (ret)
 		return ret;
 
-	intel_pxp_resume(&gt->pxp);
+	intel_pxp_runtime_resume(&gt->pxp);
 
 	return 0;
 }
diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp_pm.c b/drivers/gpu/drm/i915/pxp/intel_pxp_pm.c
index 23fd86de5a24..3f91996dc6be 100644
--- a/drivers/gpu/drm/i915/pxp/intel_pxp_pm.c
+++ b/drivers/gpu/drm/i915/pxp/intel_pxp_pm.c
@@ -7,8 +7,9 @@
 #include "intel_pxp_irq.h"
 #include "intel_pxp_pm.h"
 #include "intel_pxp_session.h"
+#include "i915_drv.h"
 
-void intel_pxp_suspend(struct intel_pxp *pxp, bool runtime)
+void intel_pxp_suspend_prepare(struct intel_pxp *pxp, bool runtime)
 {
 	if (!intel_pxp_is_enabled(pxp))
 		return;
@@ -23,10 +24,18 @@ void intel_pxp_suspend(struct intel_pxp *pxp, bool runtime)
 	 */
 	if (!runtime)
 		intel_pxp_invalidate(pxp);
+}
 
-	intel_pxp_fini_hw(pxp);
+void intel_pxp_suspend(struct intel_pxp *pxp)
+{
+	intel_wakeref_t wakeref;
 
-	pxp->hw_state_invalidated = false;
+	if (!intel_pxp_is_enabled(pxp))
+		return;
+	with_intel_runtime_pm(&pxp_to_gt(pxp)->i915->runtime_pm, wakeref) {
+		intel_pxp_fini_hw(pxp);
+		pxp->hw_state_invalidated = false;
+	}
 }
 
 void intel_pxp_resume(struct intel_pxp *pxp)
diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp_pm.h b/drivers/gpu/drm/i915/pxp/intel_pxp_pm.h
index c89e97a0c3d0..f2cf3117ed93 100644
--- a/drivers/gpu/drm/i915/pxp/intel_pxp_pm.h
+++ b/drivers/gpu/drm/i915/pxp/intel_pxp_pm.h
@@ -9,10 +9,15 @@
 #include "intel_pxp_types.h"
 
 #ifdef CONFIG_DRM_I915_PXP
-void intel_pxp_suspend(struct intel_pxp *pxp, bool runtime);
+void intel_pxp_suspend_prepare(struct intel_pxp *pxp, bool runtime);
+void intel_pxp_suspend(struct intel_pxp *pxp);
 void intel_pxp_resume(struct intel_pxp *pxp);
 #else
-static inline void intel_pxp_suspend(struct intel_pxp *pxp, bool runtime)
+static inline void intel_pxp_suspend_prepare(struct intel_pxp *pxp, bool runtime)
+{
+}
+
+static inline void intel_pxp_suspend(struct intel_pxp *pxp)
 {
 }
 
@@ -20,5 +25,14 @@ static inline void intel_pxp_resume(struct intel_pxp *pxp)
 {
 }
 #endif
+static inline void intel_pxp_runtime_suspend(struct intel_pxp *pxp)
+{
+	intel_pxp_suspend_prepare(pxp, true);
+	intel_pxp_suspend(pxp);
+}
 
+static inline void intel_pxp_runtime_resume(struct intel_pxp *pxp)
+{
+	intel_pxp_resume(pxp);
+}
 #endif /* __INTEL_PXP_PM_H__ */
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/gt: Hold RPM wakelock during PXP suspend
  2021-11-08 10:56 [Intel-gfx] [PATCH V2] drm/i915/gt: Hold RPM wakelock during PXP suspend Tejas Upadhyay
@ 2021-11-08 11:44 ` Patchwork
  2021-11-08 12:56 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
  2021-11-08 19:07 ` [Intel-gfx] [PATCH V2] " Jani Nikula
  2 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2021-11-08 11:44 UTC (permalink / raw)
  To: Tejas Upadhyay; +Cc: intel-gfx

[-- Attachment #1: Type: text/plain, Size: 2647 bytes --]

== Series Details ==

Series: drm/i915/gt: Hold RPM wakelock during PXP suspend
URL   : https://patchwork.freedesktop.org/series/96658/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_10853 -> Patchwork_21532
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/index.html

Participating hosts (41 -> 35)
------------------------------

  Additional (1): fi-bdw-samus 
  Missing    (7): fi-kbl-soraka bat-dg1-6 fi-bsw-n3050 bat-dg1-5 fi-bsw-cyan bat-adlp-4 fi-ctg-p8600 

Known issues
------------

  Here are the changes found in Patchwork_21532 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_suspend@basic-s3:
    - fi-bdw-5557u:       [PASS][1] -> [INCOMPLETE][2] ([i915#146])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/fi-bdw-5557u/igt@gem_exec_suspend@basic-s3.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/fi-bdw-5557u/igt@gem_exec_suspend@basic-s3.html

  * igt@kms_chamelium@hdmi-edid-read:
    - fi-bdw-samus:       NOTRUN -> [SKIP][3] ([fdo#109271] / [fdo#111827]) +8 similar issues
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/fi-bdw-samus/igt@kms_chamelium@hdmi-edid-read.html

  * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d:
    - fi-bdw-samus:       NOTRUN -> [SKIP][4] ([fdo#109271]) +29 similar issues
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/fi-bdw-samus/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [i915#146]: https://gitlab.freedesktop.org/drm/intel/issues/146
  [i915#4290]: https://gitlab.freedesktop.org/drm/intel/issues/4290


Build changes
-------------

  * Linux: CI_DRM_10853 -> Patchwork_21532

  CI-20190529: 20190529
  CI_DRM_10853: 215295e7b0a3deb2015c6d6b343b319e4f6d9a1d @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_6274: 569de51145fba197a8d93b2417348d47507bf485 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_21532: 82a6a906546f42485b0774d07b7e0cb86c231de7 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

82a6a906546f drm/i915/gt: Hold RPM wakelock during PXP suspend

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/index.html

[-- Attachment #2: Type: text/html, Size: 3316 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/gt: Hold RPM wakelock during PXP suspend
  2021-11-08 10:56 [Intel-gfx] [PATCH V2] drm/i915/gt: Hold RPM wakelock during PXP suspend Tejas Upadhyay
  2021-11-08 11:44 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
@ 2021-11-08 12:56 ` Patchwork
  2021-11-08 19:07 ` [Intel-gfx] [PATCH V2] " Jani Nikula
  2 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2021-11-08 12:56 UTC (permalink / raw)
  To: Tejas Upadhyay; +Cc: intel-gfx

[-- Attachment #1: Type: text/plain, Size: 30272 bytes --]

== Series Details ==

Series: drm/i915/gt: Hold RPM wakelock during PXP suspend
URL   : https://patchwork.freedesktop.org/series/96658/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_10853_full -> Patchwork_21532_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  

Participating hosts (11 -> 11)
------------------------------

  No changes in participating hosts

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in Patchwork_21532_full:

### IGT changes ###

#### Suppressed ####

  The following results come from untrusted machines, tests, or statuses.
  They do not affect the overall result.

  * igt@kms_mmap_write_crc@main:
    - {shard-rkl}:        NOTRUN -> [SKIP][1]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-rkl-2/igt@kms_mmap_write_crc@main.html

  * igt@prime_mmap_kms@buffer-sharing:
    - {shard-rkl}:        [PASS][2] -> [SKIP][3]
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-rkl-6/igt@prime_mmap_kms@buffer-sharing.html
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-rkl-2/igt@prime_mmap_kms@buffer-sharing.html

  
Known issues
------------

  Here are the changes found in Patchwork_21532_full that come from known issues:

### CI changes ###

#### Issues hit ####

  * boot:
    - shard-glk:          ([PASS][4], [PASS][5], [PASS][6], [PASS][7], [PASS][8], [PASS][9], [PASS][10], [PASS][11], [PASS][12], [PASS][13], [PASS][14], [PASS][15], [PASS][16], [PASS][17], [PASS][18], [PASS][19], [PASS][20], [PASS][21], [PASS][22], [PASS][23], [PASS][24], [PASS][25], [PASS][26], [PASS][27], [PASS][28]) -> ([PASS][29], [PASS][30], [PASS][31], [PASS][32], [PASS][33], [FAIL][34], [PASS][35], [PASS][36], [PASS][37], [PASS][38], [PASS][39], [PASS][40], [PASS][41], [PASS][42], [PASS][43], [PASS][44], [PASS][45], [PASS][46], [PASS][47], [PASS][48], [PASS][49], [PASS][50], [PASS][51], [PASS][52], [PASS][53]) ([i915#4392])
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-glk2/boot.html
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-glk9/boot.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-glk9/boot.html
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-glk9/boot.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-glk8/boot.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-glk8/boot.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-glk7/boot.html
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-glk7/boot.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-glk7/boot.html
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-glk6/boot.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-glk6/boot.html
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-glk6/boot.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-glk5/boot.html
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-glk5/boot.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-glk5/boot.html
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-glk4/boot.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-glk4/boot.html
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-glk4/boot.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-glk3/boot.html
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-glk3/boot.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-glk3/boot.html
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-glk2/boot.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-glk2/boot.html
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-glk1/boot.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-glk1/boot.html
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-glk9/boot.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-glk9/boot.html
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-glk9/boot.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-glk8/boot.html
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-glk8/boot.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-glk8/boot.html
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-glk8/boot.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-glk7/boot.html
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-glk7/boot.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-glk7/boot.html
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-glk6/boot.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-glk6/boot.html
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-glk6/boot.html
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-glk5/boot.html
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-glk5/boot.html
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-glk5/boot.html
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-glk4/boot.html
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-glk4/boot.html
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-glk3/boot.html
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-glk3/boot.html
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-glk2/boot.html
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-glk2/boot.html
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-glk2/boot.html
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-glk1/boot.html
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-glk1/boot.html

  

### IGT changes ###

#### Issues hit ####

  * igt@feature_discovery@display-2x:
    - shard-iclb:         NOTRUN -> [SKIP][54] ([i915#1839])
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-iclb3/igt@feature_discovery@display-2x.html

  * igt@gem_eio@in-flight-contexts-10ms:
    - shard-snb:          [PASS][55] -> [FAIL][56] ([i915#4409])
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-snb5/igt@gem_eio@in-flight-contexts-10ms.html
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-snb4/igt@gem_eio@in-flight-contexts-10ms.html

  * igt@gem_exec_fair@basic-none-rrul@rcs0:
    - shard-glk:          [PASS][57] -> [FAIL][58] ([i915#2842]) +1 similar issue
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-glk5/igt@gem_exec_fair@basic-none-rrul@rcs0.html
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-glk9/igt@gem_exec_fair@basic-none-rrul@rcs0.html

  * igt@gem_exec_fair@basic-none@vecs0:
    - shard-apl:          [PASS][59] -> [FAIL][60] ([i915#2842] / [i915#3468])
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-apl2/igt@gem_exec_fair@basic-none@vecs0.html
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-apl7/igt@gem_exec_fair@basic-none@vecs0.html

  * igt@gem_exec_fair@basic-pace-solo@rcs0:
    - shard-iclb:         [PASS][61] -> [FAIL][62] ([i915#2842]) +2 similar issues
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-iclb1/igt@gem_exec_fair@basic-pace-solo@rcs0.html
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-iclb3/igt@gem_exec_fair@basic-pace-solo@rcs0.html

  * igt@gem_exec_fair@basic-throttle@rcs0:
    - shard-tglb:         NOTRUN -> [FAIL][63] ([i915#2842])
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-tglb8/igt@gem_exec_fair@basic-throttle@rcs0.html

  * igt@gem_softpin@noreloc-s3:
    - shard-apl:          NOTRUN -> [DMESG-WARN][64] ([i915#180])
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-apl3/igt@gem_softpin@noreloc-s3.html

  * igt@gem_userptr_blits@input-checking:
    - shard-kbl:          NOTRUN -> [DMESG-WARN][65] ([i915#3002])
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-kbl1/igt@gem_userptr_blits@input-checking.html

  * igt@gem_userptr_blits@unsync-unmap-cycles:
    - shard-tglb:         NOTRUN -> [SKIP][66] ([i915#3297])
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-tglb8/igt@gem_userptr_blits@unsync-unmap-cycles.html

  * igt@gen7_exec_parse@load-register-reg:
    - shard-iclb:         NOTRUN -> [SKIP][67] ([fdo#109289])
   [67]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-iclb8/igt@gen7_exec_parse@load-register-reg.html

  * igt@gen9_exec_parse@allowed-all:
    - shard-kbl:          [PASS][68] -> [DMESG-WARN][69] ([i915#1436] / [i915#716])
   [68]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-kbl1/igt@gen9_exec_parse@allowed-all.html
   [69]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-kbl1/igt@gen9_exec_parse@allowed-all.html

  * igt@gen9_exec_parse@allowed-single:
    - shard-skl:          [PASS][70] -> [DMESG-WARN][71] ([i915#1436] / [i915#716])
   [70]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-skl8/igt@gen9_exec_parse@allowed-single.html
   [71]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-skl3/igt@gen9_exec_parse@allowed-single.html

  * igt@i915_pm_dc@dc6-psr:
    - shard-iclb:         [PASS][72] -> [FAIL][73] ([i915#454])
   [72]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-iclb2/igt@i915_pm_dc@dc6-psr.html
   [73]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-iclb4/igt@i915_pm_dc@dc6-psr.html

  * igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-dp:
    - shard-apl:          NOTRUN -> [SKIP][74] ([fdo#109271] / [i915#1937])
   [74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-apl3/igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-dp.html

  * igt@i915_pm_sseu@full-enable:
    - shard-iclb:         NOTRUN -> [SKIP][75] ([i915#4387])
   [75]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-iclb8/igt@i915_pm_sseu@full-enable.html

  * igt@i915_suspend@fence-restore-untiled:
    - shard-tglb:         [PASS][76] -> [INCOMPLETE][77] ([i915#456])
   [76]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-tglb3/igt@i915_suspend@fence-restore-untiled.html
   [77]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-tglb7/igt@i915_suspend@fence-restore-untiled.html

  * igt@i915_suspend@forcewake:
    - shard-skl:          [PASS][78] -> [INCOMPLETE][79] ([i915#636])
   [78]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-skl9/igt@i915_suspend@forcewake.html
   [79]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-skl1/igt@i915_suspend@forcewake.html

  * igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-0-hflip:
    - shard-kbl:          NOTRUN -> [SKIP][80] ([fdo#109271] / [i915#3777])
   [80]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-kbl4/igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-0-hflip.html

  * igt@kms_ccs@pipe-a-missing-ccs-buffer-y_tiled_gen12_rc_ccs_cc:
    - shard-apl:          NOTRUN -> [SKIP][81] ([fdo#109271] / [i915#3886]) +4 similar issues
   [81]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-apl3/igt@kms_ccs@pipe-a-missing-ccs-buffer-y_tiled_gen12_rc_ccs_cc.html

  * igt@kms_ccs@pipe-b-random-ccs-data-y_tiled_gen12_mc_ccs:
    - shard-kbl:          NOTRUN -> [SKIP][82] ([fdo#109271] / [i915#3886]) +3 similar issues
   [82]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-kbl1/igt@kms_ccs@pipe-b-random-ccs-data-y_tiled_gen12_mc_ccs.html

  * igt@kms_ccs@pipe-d-bad-pixel-format-y_tiled_ccs:
    - shard-tglb:         NOTRUN -> [SKIP][83] ([i915#3689])
   [83]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-tglb8/igt@kms_ccs@pipe-d-bad-pixel-format-y_tiled_ccs.html

  * igt@kms_ccs@pipe-d-random-ccs-data-yf_tiled_ccs:
    - shard-iclb:         NOTRUN -> [SKIP][84] ([fdo#109278]) +2 similar issues
   [84]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-iclb8/igt@kms_ccs@pipe-d-random-ccs-data-yf_tiled_ccs.html

  * igt@kms_chamelium@vga-hpd-for-each-pipe:
    - shard-kbl:          NOTRUN -> [SKIP][85] ([fdo#109271] / [fdo#111827]) +4 similar issues
   [85]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-kbl1/igt@kms_chamelium@vga-hpd-for-each-pipe.html

  * igt@kms_color@pipe-c-ctm-blue-to-red:
    - shard-skl:          [PASS][86] -> [DMESG-WARN][87] ([i915#1982])
   [86]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-skl3/igt@kms_color@pipe-c-ctm-blue-to-red.html
   [87]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-skl10/igt@kms_color@pipe-c-ctm-blue-to-red.html

  * igt@kms_color_chamelium@pipe-a-ctm-blue-to-red:
    - shard-iclb:         NOTRUN -> [SKIP][88] ([fdo#109284] / [fdo#111827])
   [88]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-iclb8/igt@kms_color_chamelium@pipe-a-ctm-blue-to-red.html

  * igt@kms_color_chamelium@pipe-d-ctm-limited-range:
    - shard-apl:          NOTRUN -> [SKIP][89] ([fdo#109271] / [fdo#111827]) +3 similar issues
   [89]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-apl3/igt@kms_color_chamelium@pipe-d-ctm-limited-range.html

  * igt@kms_content_protection@atomic:
    - shard-kbl:          NOTRUN -> [TIMEOUT][90] ([i915#1319]) +1 similar issue
   [90]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-kbl1/igt@kms_content_protection@atomic.html

  * igt@kms_cursor_crc@pipe-a-cursor-512x512-random:
    - shard-tglb:         NOTRUN -> [SKIP][91] ([fdo#109279] / [i915#3359]) +1 similar issue
   [91]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-tglb2/igt@kms_cursor_crc@pipe-a-cursor-512x512-random.html

  * igt@kms_cursor_crc@pipe-a-cursor-suspend:
    - shard-tglb:         [PASS][92] -> [INCOMPLETE][93] ([i915#2411] / [i915#2828] / [i915#456])
   [92]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-tglb8/igt@kms_cursor_crc@pipe-a-cursor-suspend.html
   [93]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-tglb7/igt@kms_cursor_crc@pipe-a-cursor-suspend.html

  * igt@kms_cursor_crc@pipe-b-cursor-max-size-sliding:
    - shard-tglb:         NOTRUN -> [SKIP][94] ([i915#3359])
   [94]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-tglb2/igt@kms_cursor_crc@pipe-b-cursor-max-size-sliding.html

  * igt@kms_cursor_crc@pipe-b-cursor-suspend:
    - shard-apl:          [PASS][95] -> [DMESG-WARN][96] ([i915#180]) +1 similar issue
   [95]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-apl1/igt@kms_cursor_crc@pipe-b-cursor-suspend.html
   [96]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-apl8/igt@kms_cursor_crc@pipe-b-cursor-suspend.html

  * igt@kms_cursor_crc@pipe-c-cursor-512x512-onscreen:
    - shard-iclb:         NOTRUN -> [SKIP][97] ([fdo#109278] / [fdo#109279])
   [97]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-iclb3/igt@kms_cursor_crc@pipe-c-cursor-512x512-onscreen.html

  * igt@kms_cursor_crc@pipe-d-cursor-128x128-random:
    - shard-skl:          NOTRUN -> [SKIP][98] ([fdo#109271])
   [98]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-skl1/igt@kms_cursor_crc@pipe-d-cursor-128x128-random.html

  * igt@kms_cursor_legacy@cursora-vs-flipb-varying-size:
    - shard-tglb:         NOTRUN -> [SKIP][99] ([fdo#111825]) +2 similar issues
   [99]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-tglb8/igt@kms_cursor_legacy@cursora-vs-flipb-varying-size.html

  * igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size:
    - shard-skl:          [PASS][100] -> [FAIL][101] ([i915#2346] / [i915#533])
   [100]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-skl3/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html
   [101]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-skl3/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html

  * igt@kms_cursor_legacy@pipe-d-single-bo:
    - shard-apl:          NOTRUN -> [SKIP][102] ([fdo#109271] / [i915#533])
   [102]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-apl4/igt@kms_cursor_legacy@pipe-d-single-bo.html

  * igt@kms_flip@flip-vs-expired-vblank@b-hdmi-a1:
    - shard-glk:          [PASS][103] -> [FAIL][104] ([i915#79])
   [103]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-glk6/igt@kms_flip@flip-vs-expired-vblank@b-hdmi-a1.html
   [104]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-glk3/igt@kms_flip@flip-vs-expired-vblank@b-hdmi-a1.html

  * igt@kms_flip@plain-flip-fb-recreate@a-edp1:
    - shard-skl:          [PASS][105] -> [FAIL][106] ([i915#2122])
   [105]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-skl3/igt@kms_flip@plain-flip-fb-recreate@a-edp1.html
   [106]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-skl10/igt@kms_flip@plain-flip-fb-recreate@a-edp1.html

  * igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytileccs:
    - shard-iclb:         [PASS][107] -> [SKIP][108] ([i915#3701])
   [107]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-iclb4/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytileccs.html
   [108]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-iclb2/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytileccs.html

  * igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-shrfb-draw-mmap-cpu:
    - shard-apl:          NOTRUN -> [SKIP][109] ([fdo#109271]) +28 similar issues
   [109]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-apl3/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-shrfb-draw-mmap-cpu.html

  * igt@kms_frontbuffer_tracking@fbc-suspend:
    - shard-kbl:          [PASS][110] -> [DMESG-WARN][111] ([i915#180]) +3 similar issues
   [110]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-kbl6/igt@kms_frontbuffer_tracking@fbc-suspend.html
   [111]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-kbl1/igt@kms_frontbuffer_tracking@fbc-suspend.html

  * igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-cur-indfb-draw-mmap-wc:
    - shard-kbl:          NOTRUN -> [SKIP][112] ([fdo#109271]) +61 similar issues
   [112]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-kbl4/igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-cur-indfb-draw-mmap-wc.html

  * igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-pri-shrfb-draw-render:
    - shard-iclb:         NOTRUN -> [SKIP][113] ([fdo#109280]) +3 similar issues
   [113]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-iclb3/igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-pri-shrfb-draw-render.html

  * igt@kms_hdr@bpc-switch:
    - shard-skl:          [PASS][114] -> [FAIL][115] ([i915#1188])
   [114]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-skl9/igt@kms_hdr@bpc-switch.html
   [115]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-skl10/igt@kms_hdr@bpc-switch.html

  * igt@kms_plane@plane-panning-bottom-right-suspend@pipe-a-planes:
    - shard-tglb:         [PASS][116] -> [INCOMPLETE][117] ([i915#4182])
   [116]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-tglb1/igt@kms_plane@plane-panning-bottom-right-suspend@pipe-a-planes.html
   [117]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-tglb7/igt@kms_plane@plane-panning-bottom-right-suspend@pipe-a-planes.html

  * igt@kms_plane_alpha_blend@pipe-b-constant-alpha-min:
    - shard-skl:          [PASS][118] -> [FAIL][119] ([fdo#108145] / [i915#265])
   [118]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-skl3/igt@kms_plane_alpha_blend@pipe-b-constant-alpha-min.html
   [119]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-skl3/igt@kms_plane_alpha_blend@pipe-b-constant-alpha-min.html

  * igt@kms_plane_alpha_blend@pipe-c-alpha-7efc:
    - shard-kbl:          NOTRUN -> [FAIL][120] ([fdo#108145] / [i915#265]) +1 similar issue
   [120]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-kbl1/igt@kms_plane_alpha_blend@pipe-c-alpha-7efc.html

  * igt@kms_psr@psr2_cursor_render:
    - shard-iclb:         [PASS][121] -> [SKIP][122] ([fdo#109441]) +2 similar issues
   [121]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-iclb2/igt@kms_psr@psr2_cursor_render.html
   [122]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-iclb6/igt@kms_psr@psr2_cursor_render.html

  * igt@nouveau_crc@pipe-a-source-outp-inactive:
    - shard-tglb:         NOTRUN -> [SKIP][123] ([i915#2530])
   [123]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-tglb8/igt@nouveau_crc@pipe-a-source-outp-inactive.html

  * igt@perf@polling:
    - shard-skl:          [PASS][124] -> [FAIL][125] ([i915#1542]) +1 similar issue
   [124]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-skl7/igt@perf@polling.html
   [125]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-skl1/igt@perf@polling.html

  * igt@prime_nv_test@nv_write_i915_gtt_mmap_read:
    - shard-iclb:         NOTRUN -> [SKIP][126] ([fdo#109291])
   [126]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-iclb3/igt@prime_nv_test@nv_write_i915_gtt_mmap_read.html

  * igt@sysfs_clients@sema-50:
    - shard-kbl:          NOTRUN -> [SKIP][127] ([fdo#109271] / [i915#2994])
   [127]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-kbl1/igt@sysfs_clients@sema-50.html

  
#### Possible fixes ####

  * igt@feature_discovery@psr2:
    - shard-iclb:         [SKIP][128] ([i915#658]) -> [PASS][129]
   [128]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-iclb4/igt@feature_discovery@psr2.html
   [129]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-iclb2/igt@feature_discovery@psr2.html

  * igt@gem_exec_fair@basic-none-solo@rcs0:
    - shard-kbl:          [FAIL][130] ([i915#2842]) -> [PASS][131]
   [130]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-kbl7/igt@gem_exec_fair@basic-none-solo@rcs0.html
   [131]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-kbl7/igt@gem_exec_fair@basic-none-solo@rcs0.html

  * igt@gem_exec_fair@basic-none@rcs0:
    - shard-glk:          [FAIL][132] ([i915#2842]) -> [PASS][133]
   [132]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-glk1/igt@gem_exec_fair@basic-none@rcs0.html
   [133]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-glk7/igt@gem_exec_fair@basic-none@rcs0.html

  * igt@gem_exec_fair@basic-pace@rcs0:
    - shard-tglb:         [FAIL][134] ([i915#2842]) -> [PASS][135] +1 similar issue
   [134]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-tglb2/igt@gem_exec_fair@basic-pace@rcs0.html
   [135]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-tglb3/igt@gem_exec_fair@basic-pace@rcs0.html

  * igt@gem_mmap_wc@set-cache-level:
    - {shard-rkl}:        [SKIP][136] ([i915#1850]) -> [PASS][137]
   [136]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-rkl-2/igt@gem_mmap_wc@set-cache-level.html
   [137]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-rkl-6/igt@gem_mmap_wc@set-cache-level.html

  * igt@i915_pm_backlight@fade_with_suspend:
    - shard-tglb:         [INCOMPLETE][138] ([i915#456]) -> [PASS][139]
   [138]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-tglb7/igt@i915_pm_backlight@fade_with_suspend.html
   [139]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-tglb8/igt@i915_pm_backlight@fade_with_suspend.html

  * igt@kms_big_fb@linear-max-hw-stride-32bpp-rotate-0:
    - {shard-rkl}:        [SKIP][140] ([i915#1845]) -> [PASS][141] +6 similar issues
   [140]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-rkl-2/igt@kms_big_fb@linear-max-hw-stride-32bpp-rotate-0.html
   [141]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-rkl-6/igt@kms_big_fb@linear-max-hw-stride-32bpp-rotate-0.html

  * igt@kms_cursor_crc@pipe-b-cursor-256x256-offscreen:
    - {shard-rkl}:        [SKIP][142] ([fdo#112022] / [i915#4070]) -> [PASS][143] +2 similar issues
   [142]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-rkl-2/igt@kms_cursor_crc@pipe-b-cursor-256x256-offscreen.html
   [143]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-rkl-6/igt@kms_cursor_crc@pipe-b-cursor-256x256-offscreen.html

  * igt@kms_cursor_legacy@cursora-vs-flipa-atomic-transitions:
    - {shard-rkl}:        [SKIP][144] ([fdo#111825] / [i915#4070]) -> [PASS][145]
   [144]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-rkl-2/igt@kms_cursor_legacy@cursora-vs-flipa-atomic-transitions.html
   [145]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-rkl-6/igt@kms_cursor_legacy@cursora-vs-flipa-atomic-transitions.html

  * igt@kms_draw_crc@draw-method-rgb565-mmap-cpu-ytiled:
    - {shard-rkl}:        [SKIP][146] ([fdo#111314]) -> [PASS][147] +1 similar issue
   [146]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-rkl-2/igt@kms_draw_crc@draw-method-rgb565-mmap-cpu-ytiled.html
   [147]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-rkl-6/igt@kms_draw_crc@draw-method-rgb565-mmap-cpu-ytiled.html

  * igt@kms_fbcon_fbt@fbc-suspend:
    - shard-kbl:          [INCOMPLETE][148] ([i915#180] / [i915#636]) -> [PASS][149]
   [148]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-kbl3/igt@kms_fbcon_fbt@fbc-suspend.html
   [149]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-kbl2/igt@kms_fbcon_fbt@fbc-suspend.html

  * igt@kms_flip@flip-vs-expired-vblank-interruptible@b-edp1:
    - shard-skl:          [FAIL][150] ([i915#79]) -> [PASS][151] +1 similar issue
   [150]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-skl1/igt@kms_flip@flip-vs-expired-vblank-interruptible@b-edp1.html
   [151]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-skl4/igt@kms_flip@flip-vs-expired-vblank-interruptible@b-edp1.html

  * igt@kms_flip@flip-vs-suspend-interruptible@d-edp1:
    - shard-tglb:         [DMESG-WARN][152] ([i915#2411] / [i915#2867]) -> [PASS][153]
   [152]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-tglb6/igt@kms_flip@flip-vs-suspend-interruptible@d-edp1.html
   [153]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-tglb5/igt@kms_flip@flip-vs-suspend-interruptible@d-edp1.html

  * igt@kms_flip@plain-flip-fb-recreate-interruptible@b-edp1:
    - shard-skl:          [FAIL][154] ([i915#2122]) -> [PASS][155] +3 similar issues
   [154]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-skl9/igt@kms_flip@plain-flip-fb-recreate-interruptible@b-edp1.html
   [155]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-skl10/igt@kms_flip@plain-flip-fb-recreate-interruptible@b-edp1.html

  * igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-64bpp-ytile:
    - shard-iclb:         [SKIP][156] ([i915#3701]) -> [PASS][157]
   [156]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-iclb2/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-64bpp-ytile.html
   [157]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-iclb6/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-64bpp-ytile.html

  * igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-indfb-draw-render:
    - {shard-rkl}:        [SKIP][158] ([i915#1849]) -> [PASS][159] +10 similar issues
   [158]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-rkl-2/igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-indfb-draw-render.html
   [159]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-rkl-6/igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-indfb-draw-render.html

  * igt@kms_hdr@bpc-switch-suspend:
    - shard-apl:          [DMESG-WARN][160] ([i915#180]) -> [PASS][161] +1 similar issue
   [160]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-apl7/igt@kms_hdr@bpc-switch-suspend.html
   [161]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-apl3/igt@kms_hdr@bpc-switch-suspend.html

  * igt@kms_invalid_mode@bad-htotal:
    - {shard-rkl}:        [SKIP][162] ([i915#4278]) -> [PASS][163]
   [162]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-rkl-2/igt@kms_invalid_mode@bad-htotal.html
   [163]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-rkl-6/igt@kms_invalid_mode@bad-htotal.html

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
    - shard-kbl:          [DMESG-WARN][164] ([i915#180]) -> [PASS][165] +2 similar issues
   [164]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-kbl7/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html
   [165]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-kbl4/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html

  * igt@kms_plane@plane-panning-bottom-right-suspend@pipe-b-planes:
    - {shard-rkl}:        [SKIP][166] ([i915#3558]) -> [PASS][167] +3 similar issues
   [166]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-rkl-2/igt@kms_plane@plane-panning-bottom-right-suspend@pipe-b-planes.html
   [167]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-rkl-6/igt@kms_plane@plane-panning-bottom-right-suspend@pipe-b-planes.html

  * igt@kms_plane_alpha_blend@pipe-a-alpha-7efc:
    - {shard-rkl}:        [SKIP][168] ([i915#1849] / [i915#4070]) -> [PASS][169] +2 similar issues
   [168]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10853/shard-rkl-2/igt@kms_plane_alpha_blend@pipe-a-alpha-7efc.html
   [169]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/shard-rkl

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21532/index.html

[-- Attachment #2: Type: text/html, Size: 33304 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Intel-gfx] [PATCH V2] drm/i915/gt: Hold RPM wakelock during PXP suspend
  2021-11-08 10:56 [Intel-gfx] [PATCH V2] drm/i915/gt: Hold RPM wakelock during PXP suspend Tejas Upadhyay
  2021-11-08 11:44 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
  2021-11-08 12:56 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
@ 2021-11-08 19:07 ` Jani Nikula
  2021-11-09  5:48   ` Surendrakumar Upadhyay, TejaskumarX
  2 siblings, 1 reply; 9+ messages in thread
From: Jani Nikula @ 2021-11-08 19:07 UTC (permalink / raw)
  To: Tejas Upadhyay, intel-gfx

On Mon, 08 Nov 2021, Tejas Upadhyay <tejaskumarx.surendrakumar.upadhyay@intel.com> wrote:
> selftest --r live shows failure in suspend tests when
> RPM wakelock is not acquired during suspend.
>
> This changes addresses below error :
> <4> [154.177535] RPM wakelock ref not held during HW access
> <4> [154.177575] WARNING: CPU: 4 PID: 5772 at
> drivers/gpu/drm/i915/intel_runtime_pm.h:113
> fwtable_write32+0x240/0x320 [i915]
> <4> [154.177974] Modules linked in: i915(+) vgem drm_shmem_helper
> fuse snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic
> ledtrig_audio mei_hdcp mei_pxp x86_pkg_temp_thermal coretemp
> crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_intel_dspcfg
> snd_hda_codec snd_hwdep igc snd_hda_core ttm mei_me ptp
> snd_pcm prime_numbers mei i2c_i801 pps_core i2c_smbus intel_lpss_pci
> btusb btrtl btbcm btintel bluetooth ecdh_generic ecc [last unloaded: i915]
> <4> [154.178143] CPU: 4 PID: 5772 Comm: i915_selftest Tainted: G
> U            5.15.0-rc6-CI-Patchwork_21432+ #1
> <4> [154.178154] Hardware name: ASUS System Product Name/TUF GAMING
> Z590-PLUS WIFI, BIOS 0811 04/06/2021
> <4> [154.178160] RIP: 0010:fwtable_write32+0x240/0x320 [i915]
> <4> [154.178604] Code: 15 7b e1 0f 0b e9 34 fe ff ff 80 3d a9 89 31
> 00 00 0f 85 31 fe ff ff 48 c7 c7 88 9e 4f a0 c6 05 95 89 31 00 01 e8
> c0 15 7b e1 <0f> 0b e9 17 fe ff ff 8b 05 0f 83 58 e2 85 c0 0f 85 8d
> 00 00 00 48
> <4> [154.178614] RSP: 0018:ffffc900016279f0 EFLAGS: 00010286
> <4> [154.178626] RAX: 0000000000000000 RBX: ffff888204fe0ee0
> RCX: 0000000000000001
> <4> [154.178634] RDX: 0000000080000001 RSI: ffffffff823142b5
> RDI: 00000000ffffffff
> <4> [154.178641] RBP: 00000000000320f0 R08: 0000000000000000
> R09: c0000000ffffcd5a
> <4> [154.178647] R10: 00000000000f8c90 R11: ffffc90001627808
> R12: 0000000000000000
> <4> [154.178654] R13: 0000000040000000 R14: ffffffffa04d12e0
> R15: 0000000000000000
> <4> [154.178660] FS:  00007f7390aa4c00(0000) GS:ffff88844f000000(0000)
> knlGS:0000000000000000
> <4> [154.178669] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> <4> [154.178675] CR2: 000055bc40595028 CR3: 0000000204474005
> CR4: 0000000000770ee0
> <4> [154.178682] PKRU: 55555554
> <4> [154.178687] Call Trace:
> <4> [154.178706]  intel_pxp_fini_hw+0x23/0x30 [i915]
> <4> [154.179284]  intel_pxp_suspend+0x1f/0x30 [i915]
> <4> [154.179807]  live_gt_resume+0x5b/0x90 [i915]
>
> Changes since V1 :
> 	- split the HW access parts in gt_suspend_late - Daniele
> 	- Remove default PXP configs
>
> Signed-off-by: Tejas Upadhyay <tejaskumarx.surendrakumar.upadhyay@intel.com>
> ---
>  drivers/gpu/drm/i915/gt/intel_gt_pm.c   |  7 ++++---
>  drivers/gpu/drm/i915/pxp/intel_pxp_pm.c | 15 ++++++++++++---
>  drivers/gpu/drm/i915/pxp/intel_pxp_pm.h | 18 ++++++++++++++++--
>  3 files changed, 32 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_gt_pm.c b/drivers/gpu/drm/i915/gt/intel_gt_pm.c
> index b4a8594bc46c..d4029de1c80d 100644
> --- a/drivers/gpu/drm/i915/gt/intel_gt_pm.c
> +++ b/drivers/gpu/drm/i915/gt/intel_gt_pm.c
> @@ -303,7 +303,7 @@ void intel_gt_suspend_prepare(struct intel_gt *gt)
>  	user_forcewake(gt, true);
>  	wait_for_suspend(gt);
>  
> -	intel_pxp_suspend(&gt->pxp, false);
> +	intel_pxp_suspend_prepare(&gt->pxp, false);
>  }
>  
>  static suspend_state_t pm_suspend_target(void)
> @@ -328,6 +328,7 @@ void intel_gt_suspend_late(struct intel_gt *gt)
>  	GEM_BUG_ON(gt->awake);
>  
>  	intel_uc_suspend(&gt->uc);
> +	intel_pxp_suspend(&gt->pxp);
>  
>  	/*
>  	 * On disabling the device, we want to turn off HW access to memory
> @@ -355,7 +356,7 @@ void intel_gt_suspend_late(struct intel_gt *gt)
>  
>  void intel_gt_runtime_suspend(struct intel_gt *gt)
>  {
> -	intel_pxp_suspend(&gt->pxp, true);
> +	intel_pxp_runtime_suspend(&gt->pxp);
>  	intel_uc_runtime_suspend(&gt->uc);
>  
>  	GT_TRACE(gt, "\n");
> @@ -373,7 +374,7 @@ int intel_gt_runtime_resume(struct intel_gt *gt)
>  	if (ret)
>  		return ret;
>  
> -	intel_pxp_resume(&gt->pxp);
> +	intel_pxp_runtime_resume(&gt->pxp);
>  
>  	return 0;
>  }
> diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp_pm.c b/drivers/gpu/drm/i915/pxp/intel_pxp_pm.c
> index 23fd86de5a24..3f91996dc6be 100644
> --- a/drivers/gpu/drm/i915/pxp/intel_pxp_pm.c
> +++ b/drivers/gpu/drm/i915/pxp/intel_pxp_pm.c
> @@ -7,8 +7,9 @@
>  #include "intel_pxp_irq.h"
>  #include "intel_pxp_pm.h"
>  #include "intel_pxp_session.h"
> +#include "i915_drv.h"
>  
> -void intel_pxp_suspend(struct intel_pxp *pxp, bool runtime)
> +void intel_pxp_suspend_prepare(struct intel_pxp *pxp, bool runtime)
>  {
>  	if (!intel_pxp_is_enabled(pxp))
>  		return;
> @@ -23,10 +24,18 @@ void intel_pxp_suspend(struct intel_pxp *pxp, bool runtime)
>  	 */
>  	if (!runtime)
>  		intel_pxp_invalidate(pxp);
> +}
>  
> -	intel_pxp_fini_hw(pxp);
> +void intel_pxp_suspend(struct intel_pxp *pxp)
> +{
> +	intel_wakeref_t wakeref;
>  
> -	pxp->hw_state_invalidated = false;
> +	if (!intel_pxp_is_enabled(pxp))
> +		return;
> +	with_intel_runtime_pm(&pxp_to_gt(pxp)->i915->runtime_pm, wakeref) {
> +		intel_pxp_fini_hw(pxp);
> +		pxp->hw_state_invalidated = false;
> +	}
>  }
>  
>  void intel_pxp_resume(struct intel_pxp *pxp)
> diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp_pm.h b/drivers/gpu/drm/i915/pxp/intel_pxp_pm.h
> index c89e97a0c3d0..f2cf3117ed93 100644
> --- a/drivers/gpu/drm/i915/pxp/intel_pxp_pm.h
> +++ b/drivers/gpu/drm/i915/pxp/intel_pxp_pm.h
> @@ -9,10 +9,15 @@
>  #include "intel_pxp_types.h"
>  
>  #ifdef CONFIG_DRM_I915_PXP
> -void intel_pxp_suspend(struct intel_pxp *pxp, bool runtime);
> +void intel_pxp_suspend_prepare(struct intel_pxp *pxp, bool runtime);
> +void intel_pxp_suspend(struct intel_pxp *pxp);
>  void intel_pxp_resume(struct intel_pxp *pxp);
>  #else
> -static inline void intel_pxp_suspend(struct intel_pxp *pxp, bool runtime)
> +static inline void intel_pxp_suspend_prepare(struct intel_pxp *pxp, bool runtime)
> +{
> +}
> +
> +static inline void intel_pxp_suspend(struct intel_pxp *pxp)
>  {
>  }
>  
> @@ -20,5 +25,14 @@ static inline void intel_pxp_resume(struct intel_pxp *pxp)
>  {
>  }
>  #endif
> +static inline void intel_pxp_runtime_suspend(struct intel_pxp *pxp)
> +{
> +	intel_pxp_suspend_prepare(pxp, true);
> +	intel_pxp_suspend(pxp);
> +}
>  
> +static inline void intel_pxp_runtime_resume(struct intel_pxp *pxp)
> +{
> +	intel_pxp_resume(pxp);
> +}

For the casual reader, the pxp suspend/resume functions have become an
impossible interface to use correctly without digging into the source
code.

Separate runtime suspend/resume calls *and* a suspend function with
runtime parameter?!?

BR,
Jani.

>  #endif /* __INTEL_PXP_PM_H__ */

-- 
Jani Nikula, Intel Open Source Graphics Center

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Intel-gfx] [PATCH V2] drm/i915/gt: Hold RPM wakelock during PXP suspend
  2021-11-08 19:07 ` [Intel-gfx] [PATCH V2] " Jani Nikula
@ 2021-11-09  5:48   ` Surendrakumar Upadhyay, TejaskumarX
  2021-11-09  6:32     ` Jani Nikula
  0 siblings, 1 reply; 9+ messages in thread
From: Surendrakumar Upadhyay, TejaskumarX @ 2021-11-09  5:48 UTC (permalink / raw)
  To: Ceraolo Spurio, Daniele; +Cc: intel-gfx



> -----Original Message-----
> From: Jani Nikula <jani.nikula@linux.intel.com>
> Sent: 09 November 2021 00:37
> To: Surendrakumar Upadhyay, TejaskumarX
> <tejaskumarx.surendrakumar.upadhyay@intel.com>; intel-
> gfx@lists.freedesktop.org
> Subject: Re: [Intel-gfx] [PATCH V2] drm/i915/gt: Hold RPM wakelock during
> PXP suspend
> 
> On Mon, 08 Nov 2021, Tejas Upadhyay
> <tejaskumarx.surendrakumar.upadhyay@intel.com> wrote:
> > selftest --r live shows failure in suspend tests when RPM wakelock is
> > not acquired during suspend.
> >
> > This changes addresses below error :
> > <4> [154.177535] RPM wakelock ref not held during HW access <4>
> > [154.177575] WARNING: CPU: 4 PID: 5772 at
> > drivers/gpu/drm/i915/intel_runtime_pm.h:113
> > fwtable_write32+0x240/0x320 [i915]
> > <4> [154.177974] Modules linked in: i915(+) vgem drm_shmem_helper fuse
> > snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic
> > ledtrig_audio mei_hdcp mei_pxp x86_pkg_temp_thermal coretemp
> > crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_intel_dspcfg
> > snd_hda_codec snd_hwdep igc snd_hda_core ttm mei_me ptp snd_pcm
> > prime_numbers mei i2c_i801 pps_core i2c_smbus intel_lpss_pci btusb
> > btrtl btbcm btintel bluetooth ecdh_generic ecc [last unloaded: i915]
> > <4> [154.178143] CPU: 4 PID: 5772 Comm: i915_selftest Tainted: G
> > U            5.15.0-rc6-CI-Patchwork_21432+ #1
> > <4> [154.178154] Hardware name: ASUS System Product Name/TUF
> GAMING
> > Z590-PLUS WIFI, BIOS 0811 04/06/2021 <4> [154.178160] RIP:
> > 0010:fwtable_write32+0x240/0x320 [i915] <4> [154.178604] Code: 15 7b
> > e1 0f 0b e9 34 fe ff ff 80 3d a9 89 31
> > 00 00 0f 85 31 fe ff ff 48 c7 c7 88 9e 4f a0 c6 05 95 89 31 00 01 e8
> > c0 15 7b e1 <0f> 0b e9 17 fe ff ff 8b 05 0f 83 58 e2 85 c0 0f 85 8d
> > 00 00 00 48
> > <4> [154.178614] RSP: 0018:ffffc900016279f0 EFLAGS: 00010286 <4>
> > [154.178626] RAX: 0000000000000000 RBX: ffff888204fe0ee0
> > RCX: 0000000000000001
> > <4> [154.178634] RDX: 0000000080000001 RSI: ffffffff823142b5
> > RDI: 00000000ffffffff
> > <4> [154.178641] RBP: 00000000000320f0 R08: 0000000000000000
> > R09: c0000000ffffcd5a
> > <4> [154.178647] R10: 00000000000f8c90 R11: ffffc90001627808
> > R12: 0000000000000000
> > <4> [154.178654] R13: 0000000040000000 R14: ffffffffa04d12e0
> > R15: 0000000000000000
> > <4> [154.178660] FS:  00007f7390aa4c00(0000) GS:ffff88844f000000(0000)
> > knlGS:0000000000000000
> > <4> [154.178669] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033 <4>
> > [154.178675] CR2: 000055bc40595028 CR3: 0000000204474005
> > CR4: 0000000000770ee0
> > <4> [154.178682] PKRU: 55555554
> > <4> [154.178687] Call Trace:
> > <4> [154.178706]  intel_pxp_fini_hw+0x23/0x30 [i915] <4> [154.179284]
> > intel_pxp_suspend+0x1f/0x30 [i915] <4> [154.179807]
> > live_gt_resume+0x5b/0x90 [i915]
> >
> > Changes since V1 :
> > 	- split the HW access parts in gt_suspend_late - Daniele
> > 	- Remove default PXP configs
> >
> > Signed-off-by: Tejas Upadhyay
> > <tejaskumarx.surendrakumar.upadhyay@intel.com>
> > ---
> >  drivers/gpu/drm/i915/gt/intel_gt_pm.c   |  7 ++++---
> >  drivers/gpu/drm/i915/pxp/intel_pxp_pm.c | 15 ++++++++++++---
> > drivers/gpu/drm/i915/pxp/intel_pxp_pm.h | 18 ++++++++++++++++--
> >  3 files changed, 32 insertions(+), 8 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/gt/intel_gt_pm.c
> > b/drivers/gpu/drm/i915/gt/intel_gt_pm.c
> > index b4a8594bc46c..d4029de1c80d 100644
> > --- a/drivers/gpu/drm/i915/gt/intel_gt_pm.c
> > +++ b/drivers/gpu/drm/i915/gt/intel_gt_pm.c
> > @@ -303,7 +303,7 @@ void intel_gt_suspend_prepare(struct intel_gt *gt)
> >  	user_forcewake(gt, true);
> >  	wait_for_suspend(gt);
> >
> > -	intel_pxp_suspend(&gt->pxp, false);
> > +	intel_pxp_suspend_prepare(&gt->pxp, false);
> >  }
> >
> >  static suspend_state_t pm_suspend_target(void) @@ -328,6 +328,7 @@
> > void intel_gt_suspend_late(struct intel_gt *gt)
> >  	GEM_BUG_ON(gt->awake);
> >
> >  	intel_uc_suspend(&gt->uc);
> > +	intel_pxp_suspend(&gt->pxp);
> >
> >  	/*
> >  	 * On disabling the device, we want to turn off HW access to memory
> > @@ -355,7 +356,7 @@ void intel_gt_suspend_late(struct intel_gt *gt)
> >
> >  void intel_gt_runtime_suspend(struct intel_gt *gt)  {
> > -	intel_pxp_suspend(&gt->pxp, true);
> > +	intel_pxp_runtime_suspend(&gt->pxp);
> >  	intel_uc_runtime_suspend(&gt->uc);
> >
> >  	GT_TRACE(gt, "\n");
> > @@ -373,7 +374,7 @@ int intel_gt_runtime_resume(struct intel_gt *gt)
> >  	if (ret)
> >  		return ret;
> >
> > -	intel_pxp_resume(&gt->pxp);
> > +	intel_pxp_runtime_resume(&gt->pxp);
> >
> >  	return 0;
> >  }
> > diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp_pm.c
> > b/drivers/gpu/drm/i915/pxp/intel_pxp_pm.c
> > index 23fd86de5a24..3f91996dc6be 100644
> > --- a/drivers/gpu/drm/i915/pxp/intel_pxp_pm.c
> > +++ b/drivers/gpu/drm/i915/pxp/intel_pxp_pm.c
> > @@ -7,8 +7,9 @@
> >  #include "intel_pxp_irq.h"
> >  #include "intel_pxp_pm.h"
> >  #include "intel_pxp_session.h"
> > +#include "i915_drv.h"
> >
> > -void intel_pxp_suspend(struct intel_pxp *pxp, bool runtime)
> > +void intel_pxp_suspend_prepare(struct intel_pxp *pxp, bool runtime)
> >  {
> >  	if (!intel_pxp_is_enabled(pxp))
> >  		return;
> > @@ -23,10 +24,18 @@ void intel_pxp_suspend(struct intel_pxp *pxp, bool
> runtime)
> >  	 */
> >  	if (!runtime)
> >  		intel_pxp_invalidate(pxp);
> > +}
> >
> > -	intel_pxp_fini_hw(pxp);
> > +void intel_pxp_suspend(struct intel_pxp *pxp) {
> > +	intel_wakeref_t wakeref;
> >
> > -	pxp->hw_state_invalidated = false;
> > +	if (!intel_pxp_is_enabled(pxp))
> > +		return;
> > +	with_intel_runtime_pm(&pxp_to_gt(pxp)->i915->runtime_pm,
> wakeref) {
> > +		intel_pxp_fini_hw(pxp);
> > +		pxp->hw_state_invalidated = false;
> > +	}
> >  }
> >
> >  void intel_pxp_resume(struct intel_pxp *pxp) diff --git
> > a/drivers/gpu/drm/i915/pxp/intel_pxp_pm.h
> > b/drivers/gpu/drm/i915/pxp/intel_pxp_pm.h
> > index c89e97a0c3d0..f2cf3117ed93 100644
> > --- a/drivers/gpu/drm/i915/pxp/intel_pxp_pm.h
> > +++ b/drivers/gpu/drm/i915/pxp/intel_pxp_pm.h
> > @@ -9,10 +9,15 @@
> >  #include "intel_pxp_types.h"
> >
> >  #ifdef CONFIG_DRM_I915_PXP
> > -void intel_pxp_suspend(struct intel_pxp *pxp, bool runtime);
> > +void intel_pxp_suspend_prepare(struct intel_pxp *pxp, bool runtime);
> > +void intel_pxp_suspend(struct intel_pxp *pxp);
> >  void intel_pxp_resume(struct intel_pxp *pxp);  #else -static inline
> > void intel_pxp_suspend(struct intel_pxp *pxp, bool runtime)
> > +static inline void intel_pxp_suspend_prepare(struct intel_pxp *pxp,
> > +bool runtime) { }
> > +
> > +static inline void intel_pxp_suspend(struct intel_pxp *pxp)
> >  {
> >  }
> >
> > @@ -20,5 +25,14 @@ static inline void intel_pxp_resume(struct
> > intel_pxp *pxp)  {  }  #endif
> > +static inline void intel_pxp_runtime_suspend(struct intel_pxp *pxp) {
> > +	intel_pxp_suspend_prepare(pxp, true);
> > +	intel_pxp_suspend(pxp);
> > +}
> >
> > +static inline void intel_pxp_runtime_resume(struct intel_pxp *pxp) {
> > +	intel_pxp_resume(pxp);
> > +}
> 
> For the casual reader, the pxp suspend/resume functions have become an
> impossible interface to use correctly without digging into the source code.
> 
> Separate runtime suspend/resume calls *and* a suspend function with
> runtime parameter?!?

Hi Daniele, would you be ok if I add runtime arg? Please let me know what do you think.

Thanks,
Tejas
> 
> BR,
> Jani.
> 
> >  #endif /* __INTEL_PXP_PM_H__ */
> 
> --
> Jani Nikula, Intel Open Source Graphics Center

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Intel-gfx] [PATCH V2] drm/i915/gt: Hold RPM wakelock during PXP suspend
  2021-11-09  5:48   ` Surendrakumar Upadhyay, TejaskumarX
@ 2021-11-09  6:32     ` Jani Nikula
  2021-11-09 21:35       ` Daniele Ceraolo Spurio
  0 siblings, 1 reply; 9+ messages in thread
From: Jani Nikula @ 2021-11-09  6:32 UTC (permalink / raw)
  To: Surendrakumar Upadhyay, TejaskumarX, Ceraolo Spurio, Daniele; +Cc: intel-gfx

On Tue, 09 Nov 2021, "Surendrakumar Upadhyay, TejaskumarX"	<tejaskumarx.surendrakumar.upadhyay@intel.com> wrote:
>> -----Original Message-----
>> From: Jani Nikula <jani.nikula@linux.intel.com>
>> Sent: 09 November 2021 00:37
>> To: Surendrakumar Upadhyay, TejaskumarX
>> <tejaskumarx.surendrakumar.upadhyay@intel.com>; intel-
>> gfx@lists.freedesktop.org
>> Subject: Re: [Intel-gfx] [PATCH V2] drm/i915/gt: Hold RPM wakelock during
>> PXP suspend
>> 
>> On Mon, 08 Nov 2021, Tejas Upadhyay
>> <tejaskumarx.surendrakumar.upadhyay@intel.com> wrote:
>> > selftest --r live shows failure in suspend tests when RPM wakelock is
>> > not acquired during suspend.
>> >
>> > This changes addresses below error :
>> > <4> [154.177535] RPM wakelock ref not held during HW access <4>
>> > [154.177575] WARNING: CPU: 4 PID: 5772 at
>> > drivers/gpu/drm/i915/intel_runtime_pm.h:113
>> > fwtable_write32+0x240/0x320 [i915]
>> > <4> [154.177974] Modules linked in: i915(+) vgem drm_shmem_helper fuse
>> > snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic
>> > ledtrig_audio mei_hdcp mei_pxp x86_pkg_temp_thermal coretemp
>> > crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_intel_dspcfg
>> > snd_hda_codec snd_hwdep igc snd_hda_core ttm mei_me ptp snd_pcm
>> > prime_numbers mei i2c_i801 pps_core i2c_smbus intel_lpss_pci btusb
>> > btrtl btbcm btintel bluetooth ecdh_generic ecc [last unloaded: i915]
>> > <4> [154.178143] CPU: 4 PID: 5772 Comm: i915_selftest Tainted: G
>> > U            5.15.0-rc6-CI-Patchwork_21432+ #1
>> > <4> [154.178154] Hardware name: ASUS System Product Name/TUF
>> GAMING
>> > Z590-PLUS WIFI, BIOS 0811 04/06/2021 <4> [154.178160] RIP:
>> > 0010:fwtable_write32+0x240/0x320 [i915] <4> [154.178604] Code: 15 7b
>> > e1 0f 0b e9 34 fe ff ff 80 3d a9 89 31
>> > 00 00 0f 85 31 fe ff ff 48 c7 c7 88 9e 4f a0 c6 05 95 89 31 00 01 e8
>> > c0 15 7b e1 <0f> 0b e9 17 fe ff ff 8b 05 0f 83 58 e2 85 c0 0f 85 8d
>> > 00 00 00 48
>> > <4> [154.178614] RSP: 0018:ffffc900016279f0 EFLAGS: 00010286 <4>
>> > [154.178626] RAX: 0000000000000000 RBX: ffff888204fe0ee0
>> > RCX: 0000000000000001
>> > <4> [154.178634] RDX: 0000000080000001 RSI: ffffffff823142b5
>> > RDI: 00000000ffffffff
>> > <4> [154.178641] RBP: 00000000000320f0 R08: 0000000000000000
>> > R09: c0000000ffffcd5a
>> > <4> [154.178647] R10: 00000000000f8c90 R11: ffffc90001627808
>> > R12: 0000000000000000
>> > <4> [154.178654] R13: 0000000040000000 R14: ffffffffa04d12e0
>> > R15: 0000000000000000
>> > <4> [154.178660] FS:  00007f7390aa4c00(0000) GS:ffff88844f000000(0000)
>> > knlGS:0000000000000000
>> > <4> [154.178669] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033 <4>
>> > [154.178675] CR2: 000055bc40595028 CR3: 0000000204474005
>> > CR4: 0000000000770ee0
>> > <4> [154.178682] PKRU: 55555554
>> > <4> [154.178687] Call Trace:
>> > <4> [154.178706]  intel_pxp_fini_hw+0x23/0x30 [i915] <4> [154.179284]
>> > intel_pxp_suspend+0x1f/0x30 [i915] <4> [154.179807]
>> > live_gt_resume+0x5b/0x90 [i915]
>> >
>> > Changes since V1 :
>> > 	- split the HW access parts in gt_suspend_late - Daniele
>> > 	- Remove default PXP configs
>> >
>> > Signed-off-by: Tejas Upadhyay
>> > <tejaskumarx.surendrakumar.upadhyay@intel.com>
>> > ---
>> >  drivers/gpu/drm/i915/gt/intel_gt_pm.c   |  7 ++++---
>> >  drivers/gpu/drm/i915/pxp/intel_pxp_pm.c | 15 ++++++++++++---
>> > drivers/gpu/drm/i915/pxp/intel_pxp_pm.h | 18 ++++++++++++++++--
>> >  3 files changed, 32 insertions(+), 8 deletions(-)
>> >
>> > diff --git a/drivers/gpu/drm/i915/gt/intel_gt_pm.c
>> > b/drivers/gpu/drm/i915/gt/intel_gt_pm.c
>> > index b4a8594bc46c..d4029de1c80d 100644
>> > --- a/drivers/gpu/drm/i915/gt/intel_gt_pm.c
>> > +++ b/drivers/gpu/drm/i915/gt/intel_gt_pm.c
>> > @@ -303,7 +303,7 @@ void intel_gt_suspend_prepare(struct intel_gt *gt)
>> >  	user_forcewake(gt, true);
>> >  	wait_for_suspend(gt);
>> >
>> > -	intel_pxp_suspend(&gt->pxp, false);
>> > +	intel_pxp_suspend_prepare(&gt->pxp, false);
>> >  }
>> >
>> >  static suspend_state_t pm_suspend_target(void) @@ -328,6 +328,7 @@
>> > void intel_gt_suspend_late(struct intel_gt *gt)
>> >  	GEM_BUG_ON(gt->awake);
>> >
>> >  	intel_uc_suspend(&gt->uc);
>> > +	intel_pxp_suspend(&gt->pxp);
>> >
>> >  	/*
>> >  	 * On disabling the device, we want to turn off HW access to memory
>> > @@ -355,7 +356,7 @@ void intel_gt_suspend_late(struct intel_gt *gt)
>> >
>> >  void intel_gt_runtime_suspend(struct intel_gt *gt)  {
>> > -	intel_pxp_suspend(&gt->pxp, true);
>> > +	intel_pxp_runtime_suspend(&gt->pxp);
>> >  	intel_uc_runtime_suspend(&gt->uc);
>> >
>> >  	GT_TRACE(gt, "\n");
>> > @@ -373,7 +374,7 @@ int intel_gt_runtime_resume(struct intel_gt *gt)
>> >  	if (ret)
>> >  		return ret;
>> >
>> > -	intel_pxp_resume(&gt->pxp);
>> > +	intel_pxp_runtime_resume(&gt->pxp);
>> >
>> >  	return 0;
>> >  }
>> > diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp_pm.c
>> > b/drivers/gpu/drm/i915/pxp/intel_pxp_pm.c
>> > index 23fd86de5a24..3f91996dc6be 100644
>> > --- a/drivers/gpu/drm/i915/pxp/intel_pxp_pm.c
>> > +++ b/drivers/gpu/drm/i915/pxp/intel_pxp_pm.c
>> > @@ -7,8 +7,9 @@
>> >  #include "intel_pxp_irq.h"
>> >  #include "intel_pxp_pm.h"
>> >  #include "intel_pxp_session.h"
>> > +#include "i915_drv.h"
>> >
>> > -void intel_pxp_suspend(struct intel_pxp *pxp, bool runtime)
>> > +void intel_pxp_suspend_prepare(struct intel_pxp *pxp, bool runtime)
>> >  {
>> >  	if (!intel_pxp_is_enabled(pxp))
>> >  		return;
>> > @@ -23,10 +24,18 @@ void intel_pxp_suspend(struct intel_pxp *pxp, bool
>> runtime)
>> >  	 */
>> >  	if (!runtime)
>> >  		intel_pxp_invalidate(pxp);
>> > +}
>> >
>> > -	intel_pxp_fini_hw(pxp);
>> > +void intel_pxp_suspend(struct intel_pxp *pxp) {
>> > +	intel_wakeref_t wakeref;
>> >
>> > -	pxp->hw_state_invalidated = false;
>> > +	if (!intel_pxp_is_enabled(pxp))
>> > +		return;
>> > +	with_intel_runtime_pm(&pxp_to_gt(pxp)->i915->runtime_pm,
>> wakeref) {
>> > +		intel_pxp_fini_hw(pxp);
>> > +		pxp->hw_state_invalidated = false;
>> > +	}
>> >  }
>> >
>> >  void intel_pxp_resume(struct intel_pxp *pxp) diff --git
>> > a/drivers/gpu/drm/i915/pxp/intel_pxp_pm.h
>> > b/drivers/gpu/drm/i915/pxp/intel_pxp_pm.h
>> > index c89e97a0c3d0..f2cf3117ed93 100644
>> > --- a/drivers/gpu/drm/i915/pxp/intel_pxp_pm.h
>> > +++ b/drivers/gpu/drm/i915/pxp/intel_pxp_pm.h
>> > @@ -9,10 +9,15 @@
>> >  #include "intel_pxp_types.h"
>> >
>> >  #ifdef CONFIG_DRM_I915_PXP
>> > -void intel_pxp_suspend(struct intel_pxp *pxp, bool runtime);
>> > +void intel_pxp_suspend_prepare(struct intel_pxp *pxp, bool runtime);
>> > +void intel_pxp_suspend(struct intel_pxp *pxp);
>> >  void intel_pxp_resume(struct intel_pxp *pxp);  #else -static inline
>> > void intel_pxp_suspend(struct intel_pxp *pxp, bool runtime)
>> > +static inline void intel_pxp_suspend_prepare(struct intel_pxp *pxp,
>> > +bool runtime) { }
>> > +
>> > +static inline void intel_pxp_suspend(struct intel_pxp *pxp)
>> >  {
>> >  }
>> >
>> > @@ -20,5 +25,14 @@ static inline void intel_pxp_resume(struct
>> > intel_pxp *pxp)  {  }  #endif
>> > +static inline void intel_pxp_runtime_suspend(struct intel_pxp *pxp) {
>> > +	intel_pxp_suspend_prepare(pxp, true);
>> > +	intel_pxp_suspend(pxp);
>> > +}
>> >
>> > +static inline void intel_pxp_runtime_resume(struct intel_pxp *pxp) {
>> > +	intel_pxp_resume(pxp);
>> > +}
>> 
>> For the casual reader, the pxp suspend/resume functions have become an
>> impossible interface to use correctly without digging into the source code.
>> 
>> Separate runtime suspend/resume calls *and* a suspend function with
>> runtime parameter?!?
>
> Hi Daniele, would you be ok if I add runtime arg? Please let me know what do you think.

Err, please *avoid* having runtime as parameter.

BR,
Jani.


>
> Thanks,
> Tejas
>> 
>> BR,
>> Jani.
>> 
>> >  #endif /* __INTEL_PXP_PM_H__ */
>> 
>> --
>> Jani Nikula, Intel Open Source Graphics Center

-- 
Jani Nikula, Intel Open Source Graphics Center

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Intel-gfx] [PATCH V2] drm/i915/gt: Hold RPM wakelock during PXP suspend
  2021-11-09  6:32     ` Jani Nikula
@ 2021-11-09 21:35       ` Daniele Ceraolo Spurio
  2021-11-10 13:33         ` Surendrakumar Upadhyay, TejaskumarX
  0 siblings, 1 reply; 9+ messages in thread
From: Daniele Ceraolo Spurio @ 2021-11-09 21:35 UTC (permalink / raw)
  To: Jani Nikula, Surendrakumar Upadhyay, TejaskumarX; +Cc: intel-gfx



On 11/8/2021 10:32 PM, Jani Nikula wrote:
> On Tue, 09 Nov 2021, "Surendrakumar Upadhyay, TejaskumarX"	<tejaskumarx.surendrakumar.upadhyay@intel.com> wrote:
>>> -----Original Message-----
>>> From: Jani Nikula <jani.nikula@linux.intel.com>
>>> Sent: 09 November 2021 00:37
>>> To: Surendrakumar Upadhyay, TejaskumarX
>>> <tejaskumarx.surendrakumar.upadhyay@intel.com>; intel-
>>> gfx@lists.freedesktop.org
>>> Subject: Re: [Intel-gfx] [PATCH V2] drm/i915/gt: Hold RPM wakelock during
>>> PXP suspend
>>>
>>> On Mon, 08 Nov 2021, Tejas Upadhyay
>>> <tejaskumarx.surendrakumar.upadhyay@intel.com> wrote:
>>>> selftest --r live shows failure in suspend tests when RPM wakelock is
>>>> not acquired during suspend.
>>>>
>>>> This changes addresses below error :
>>>> <4> [154.177535] RPM wakelock ref not held during HW access <4>
>>>> [154.177575] WARNING: CPU: 4 PID: 5772 at
>>>> drivers/gpu/drm/i915/intel_runtime_pm.h:113
>>>> fwtable_write32+0x240/0x320 [i915]
>>>> <4> [154.177974] Modules linked in: i915(+) vgem drm_shmem_helper fuse
>>>> snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic
>>>> ledtrig_audio mei_hdcp mei_pxp x86_pkg_temp_thermal coretemp
>>>> crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_intel_dspcfg
>>>> snd_hda_codec snd_hwdep igc snd_hda_core ttm mei_me ptp snd_pcm
>>>> prime_numbers mei i2c_i801 pps_core i2c_smbus intel_lpss_pci btusb
>>>> btrtl btbcm btintel bluetooth ecdh_generic ecc [last unloaded: i915]
>>>> <4> [154.178143] CPU: 4 PID: 5772 Comm: i915_selftest Tainted: G
>>>> U            5.15.0-rc6-CI-Patchwork_21432+ #1
>>>> <4> [154.178154] Hardware name: ASUS System Product Name/TUF
>>> GAMING
>>>> Z590-PLUS WIFI, BIOS 0811 04/06/2021 <4> [154.178160] RIP:
>>>> 0010:fwtable_write32+0x240/0x320 [i915] <4> [154.178604] Code: 15 7b
>>>> e1 0f 0b e9 34 fe ff ff 80 3d a9 89 31
>>>> 00 00 0f 85 31 fe ff ff 48 c7 c7 88 9e 4f a0 c6 05 95 89 31 00 01 e8
>>>> c0 15 7b e1 <0f> 0b e9 17 fe ff ff 8b 05 0f 83 58 e2 85 c0 0f 85 8d
>>>> 00 00 00 48
>>>> <4> [154.178614] RSP: 0018:ffffc900016279f0 EFLAGS: 00010286 <4>
>>>> [154.178626] RAX: 0000000000000000 RBX: ffff888204fe0ee0
>>>> RCX: 0000000000000001
>>>> <4> [154.178634] RDX: 0000000080000001 RSI: ffffffff823142b5
>>>> RDI: 00000000ffffffff
>>>> <4> [154.178641] RBP: 00000000000320f0 R08: 0000000000000000
>>>> R09: c0000000ffffcd5a
>>>> <4> [154.178647] R10: 00000000000f8c90 R11: ffffc90001627808
>>>> R12: 0000000000000000
>>>> <4> [154.178654] R13: 0000000040000000 R14: ffffffffa04d12e0
>>>> R15: 0000000000000000
>>>> <4> [154.178660] FS:  00007f7390aa4c00(0000) GS:ffff88844f000000(0000)
>>>> knlGS:0000000000000000
>>>> <4> [154.178669] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033 <4>
>>>> [154.178675] CR2: 000055bc40595028 CR3: 0000000204474005
>>>> CR4: 0000000000770ee0
>>>> <4> [154.178682] PKRU: 55555554
>>>> <4> [154.178687] Call Trace:
>>>> <4> [154.178706]  intel_pxp_fini_hw+0x23/0x30 [i915] <4> [154.179284]
>>>> intel_pxp_suspend+0x1f/0x30 [i915] <4> [154.179807]
>>>> live_gt_resume+0x5b/0x90 [i915]
>>>>
>>>> Changes since V1 :
>>>> 	- split the HW access parts in gt_suspend_late - Daniele
>>>> 	- Remove default PXP configs
>>>>
>>>> Signed-off-by: Tejas Upadhyay
>>>> <tejaskumarx.surendrakumar.upadhyay@intel.com>
>>>> ---
>>>>   drivers/gpu/drm/i915/gt/intel_gt_pm.c   |  7 ++++---
>>>>   drivers/gpu/drm/i915/pxp/intel_pxp_pm.c | 15 ++++++++++++---
>>>> drivers/gpu/drm/i915/pxp/intel_pxp_pm.h | 18 ++++++++++++++++--
>>>>   3 files changed, 32 insertions(+), 8 deletions(-)
>>>>
>>>> diff --git a/drivers/gpu/drm/i915/gt/intel_gt_pm.c
>>>> b/drivers/gpu/drm/i915/gt/intel_gt_pm.c
>>>> index b4a8594bc46c..d4029de1c80d 100644
>>>> --- a/drivers/gpu/drm/i915/gt/intel_gt_pm.c
>>>> +++ b/drivers/gpu/drm/i915/gt/intel_gt_pm.c
>>>> @@ -303,7 +303,7 @@ void intel_gt_suspend_prepare(struct intel_gt *gt)
>>>>   	user_forcewake(gt, true);
>>>>   	wait_for_suspend(gt);
>>>>
>>>> -	intel_pxp_suspend(&gt->pxp, false);
>>>> +	intel_pxp_suspend_prepare(&gt->pxp, false);
>>>>   }
>>>>
>>>>   static suspend_state_t pm_suspend_target(void) @@ -328,6 +328,7 @@
>>>> void intel_gt_suspend_late(struct intel_gt *gt)
>>>>   	GEM_BUG_ON(gt->awake);
>>>>
>>>>   	intel_uc_suspend(&gt->uc);
>>>> +	intel_pxp_suspend(&gt->pxp);
>>>>
>>>>   	/*
>>>>   	 * On disabling the device, we want to turn off HW access to memory
>>>> @@ -355,7 +356,7 @@ void intel_gt_suspend_late(struct intel_gt *gt)
>>>>
>>>>   void intel_gt_runtime_suspend(struct intel_gt *gt)  {
>>>> -	intel_pxp_suspend(&gt->pxp, true);
>>>> +	intel_pxp_runtime_suspend(&gt->pxp);
>>>>   	intel_uc_runtime_suspend(&gt->uc);
>>>>
>>>>   	GT_TRACE(gt, "\n");
>>>> @@ -373,7 +374,7 @@ int intel_gt_runtime_resume(struct intel_gt *gt)
>>>>   	if (ret)
>>>>   		return ret;
>>>>
>>>> -	intel_pxp_resume(&gt->pxp);
>>>> +	intel_pxp_runtime_resume(&gt->pxp);
>>>>
>>>>   	return 0;
>>>>   }
>>>> diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp_pm.c
>>>> b/drivers/gpu/drm/i915/pxp/intel_pxp_pm.c
>>>> index 23fd86de5a24..3f91996dc6be 100644
>>>> --- a/drivers/gpu/drm/i915/pxp/intel_pxp_pm.c
>>>> +++ b/drivers/gpu/drm/i915/pxp/intel_pxp_pm.c
>>>> @@ -7,8 +7,9 @@
>>>>   #include "intel_pxp_irq.h"
>>>>   #include "intel_pxp_pm.h"
>>>>   #include "intel_pxp_session.h"
>>>> +#include "i915_drv.h"
>>>>
>>>> -void intel_pxp_suspend(struct intel_pxp *pxp, bool runtime)
>>>> +void intel_pxp_suspend_prepare(struct intel_pxp *pxp, bool runtime)
>>>>   {
>>>>   	if (!intel_pxp_is_enabled(pxp))
>>>>   		return;
>>>> @@ -23,10 +24,18 @@ void intel_pxp_suspend(struct intel_pxp *pxp, bool
>>> runtime)
>>>>   	 */
>>>>   	if (!runtime)
>>>>   		intel_pxp_invalidate(pxp);
>>>> +}
>>>>
>>>> -	intel_pxp_fini_hw(pxp);
>>>> +void intel_pxp_suspend(struct intel_pxp *pxp) {
>>>> +	intel_wakeref_t wakeref;
>>>>
>>>> -	pxp->hw_state_invalidated = false;
>>>> +	if (!intel_pxp_is_enabled(pxp))
>>>> +		return;
>>>> +	with_intel_runtime_pm(&pxp_to_gt(pxp)->i915->runtime_pm,
>>> wakeref) {
>>>> +		intel_pxp_fini_hw(pxp);
>>>> +		pxp->hw_state_invalidated = false;
>>>> +	}
>>>>   }
>>>>
>>>>   void intel_pxp_resume(struct intel_pxp *pxp) diff --git
>>>> a/drivers/gpu/drm/i915/pxp/intel_pxp_pm.h
>>>> b/drivers/gpu/drm/i915/pxp/intel_pxp_pm.h
>>>> index c89e97a0c3d0..f2cf3117ed93 100644
>>>> --- a/drivers/gpu/drm/i915/pxp/intel_pxp_pm.h
>>>> +++ b/drivers/gpu/drm/i915/pxp/intel_pxp_pm.h
>>>> @@ -9,10 +9,15 @@
>>>>   #include "intel_pxp_types.h"
>>>>
>>>>   #ifdef CONFIG_DRM_I915_PXP
>>>> -void intel_pxp_suspend(struct intel_pxp *pxp, bool runtime);
>>>> +void intel_pxp_suspend_prepare(struct intel_pxp *pxp, bool runtime);
>>>> +void intel_pxp_suspend(struct intel_pxp *pxp);
>>>>   void intel_pxp_resume(struct intel_pxp *pxp);  #else -static inline
>>>> void intel_pxp_suspend(struct intel_pxp *pxp, bool runtime)
>>>> +static inline void intel_pxp_suspend_prepare(struct intel_pxp *pxp,
>>>> +bool runtime) { }
>>>> +
>>>> +static inline void intel_pxp_suspend(struct intel_pxp *pxp)
>>>>   {
>>>>   }
>>>>
>>>> @@ -20,5 +25,14 @@ static inline void intel_pxp_resume(struct
>>>> intel_pxp *pxp)  {  }  #endif
>>>> +static inline void intel_pxp_runtime_suspend(struct intel_pxp *pxp) {
>>>> +	intel_pxp_suspend_prepare(pxp, true);
>>>> +	intel_pxp_suspend(pxp);
>>>> +}
>>>>
>>>> +static inline void intel_pxp_runtime_resume(struct intel_pxp *pxp) {
>>>> +	intel_pxp_resume(pxp);
>>>> +}
>>> For the casual reader, the pxp suspend/resume functions have become an
>>> impossible interface to use correctly without digging into the source code.
>>>
>>> Separate runtime suspend/resume calls *and* a suspend function with
>>> runtime parameter?!?
>> Hi Daniele, would you be ok if I add runtime arg? Please let me know what do you think.
> Err, please *avoid* having runtime as parameter.
>
> BR,
> Jani.

Might be better to just open-code the runtime_suspend function, i.e.:

void intel_pxp_runtime_suspend(struct intel_pxp *pxp)
{
	if (!intel_pxp_is_enabled(pxp))
		return;

	pxp->arb_is_valid = false;
	pxp->hw_state_invalidated = false;

	intel_pxp_fini_hw(pxp);
}


And remove the bool param from suspend_prepare. No changes required for 
the resume.
Note that the change above requires the function to be moved to the C 
file, with an empty implementation to be added in the header for when 
the PXP config is not set (basically the same thing we do for the 
pxp_suspend function).

Daniele

>
>> Thanks,
>> Tejas
>>> BR,
>>> Jani.
>>>
>>>>   #endif /* __INTEL_PXP_PM_H__ */
>>> --
>>> Jani Nikula, Intel Open Source Graphics Center


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Intel-gfx] [PATCH V2] drm/i915/gt: Hold RPM wakelock during PXP suspend
  2021-11-09 21:35       ` Daniele Ceraolo Spurio
@ 2021-11-10 13:33         ` Surendrakumar Upadhyay, TejaskumarX
  2021-11-10 16:07           ` Daniele Ceraolo Spurio
  0 siblings, 1 reply; 9+ messages in thread
From: Surendrakumar Upadhyay, TejaskumarX @ 2021-11-10 13:33 UTC (permalink / raw)
  To: Ceraolo Spurio, Daniele, Jani Nikula; +Cc: intel-gfx



> -----Original Message-----
> From: Ceraolo Spurio, Daniele <daniele.ceraolospurio@intel.com>
> Sent: 10 November 2021 03:05
> To: Jani Nikula <jani.nikula@linux.intel.com>; Surendrakumar Upadhyay,
> TejaskumarX <tejaskumarx.surendrakumar.upadhyay@intel.com>
> Cc: intel-gfx@lists.freedesktop.org
> Subject: Re: [Intel-gfx] [PATCH V2] drm/i915/gt: Hold RPM wakelock during
> PXP suspend
> 
> 
> 
> On 11/8/2021 10:32 PM, Jani Nikula wrote:
> > On Tue, 09 Nov 2021, "Surendrakumar Upadhyay, TejaskumarX"
> 	<tejaskumarx.surendrakumar.upadhyay@intel.com> wrote:
> >>> -----Original Message-----
> >>> From: Jani Nikula <jani.nikula@linux.intel.com>
> >>> Sent: 09 November 2021 00:37
> >>> To: Surendrakumar Upadhyay, TejaskumarX
> >>> <tejaskumarx.surendrakumar.upadhyay@intel.com>; intel-
> >>> gfx@lists.freedesktop.org
> >>> Subject: Re: [Intel-gfx] [PATCH V2] drm/i915/gt: Hold RPM wakelock
> >>> during PXP suspend
> >>>
> >>> On Mon, 08 Nov 2021, Tejas Upadhyay
> >>> <tejaskumarx.surendrakumar.upadhyay@intel.com> wrote:
> >>>> selftest --r live shows failure in suspend tests when RPM wakelock
> >>>> is not acquired during suspend.
> >>>>
> >>>> This changes addresses below error :
> >>>> <4> [154.177535] RPM wakelock ref not held during HW access <4>
> >>>> [154.177575] WARNING: CPU: 4 PID: 5772 at
> >>>> drivers/gpu/drm/i915/intel_runtime_pm.h:113
> >>>> fwtable_write32+0x240/0x320 [i915]
> >>>> <4> [154.177974] Modules linked in: i915(+) vgem drm_shmem_helper
> >>>> fuse snd_hda_codec_hdmi snd_hda_codec_realtek
> snd_hda_codec_generic
> >>>> ledtrig_audio mei_hdcp mei_pxp x86_pkg_temp_thermal coretemp
> >>>> crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_intel_dspcfg
> >>>> snd_hda_codec snd_hwdep igc snd_hda_core ttm mei_me ptp
> snd_pcm
> >>>> prime_numbers mei i2c_i801 pps_core i2c_smbus intel_lpss_pci btusb
> >>>> btrtl btbcm btintel bluetooth ecdh_generic ecc [last unloaded:
> >>>> i915] <4> [154.178143] CPU: 4 PID: 5772 Comm: i915_selftest Tainted: G
> >>>> U            5.15.0-rc6-CI-Patchwork_21432+ #1
> >>>> <4> [154.178154] Hardware name: ASUS System Product Name/TUF
> >>> GAMING
> >>>> Z590-PLUS WIFI, BIOS 0811 04/06/2021 <4> [154.178160] RIP:
> >>>> 0010:fwtable_write32+0x240/0x320 [i915] <4> [154.178604] Code: 15
> >>>> 7b
> >>>> e1 0f 0b e9 34 fe ff ff 80 3d a9 89 31
> >>>> 00 00 0f 85 31 fe ff ff 48 c7 c7 88 9e 4f a0 c6 05 95 89 31 00 01
> >>>> e8
> >>>> c0 15 7b e1 <0f> 0b e9 17 fe ff ff 8b 05 0f 83 58 e2 85 c0 0f 85 8d
> >>>> 00 00 00 48
> >>>> <4> [154.178614] RSP: 0018:ffffc900016279f0 EFLAGS: 00010286 <4>
> >>>> [154.178626] RAX: 0000000000000000 RBX: ffff888204fe0ee0
> >>>> RCX: 0000000000000001
> >>>> <4> [154.178634] RDX: 0000000080000001 RSI: ffffffff823142b5
> >>>> RDI: 00000000ffffffff
> >>>> <4> [154.178641] RBP: 00000000000320f0 R08: 0000000000000000
> >>>> R09: c0000000ffffcd5a
> >>>> <4> [154.178647] R10: 00000000000f8c90 R11: ffffc90001627808
> >>>> R12: 0000000000000000
> >>>> <4> [154.178654] R13: 0000000040000000 R14: ffffffffa04d12e0
> >>>> R15: 0000000000000000
> >>>> <4> [154.178660] FS:  00007f7390aa4c00(0000)
> >>>> GS:ffff88844f000000(0000)
> >>>> knlGS:0000000000000000
> >>>> <4> [154.178669] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> >>>> <4> [154.178675] CR2: 000055bc40595028 CR3: 0000000204474005
> >>>> CR4: 0000000000770ee0
> >>>> <4> [154.178682] PKRU: 55555554
> >>>> <4> [154.178687] Call Trace:
> >>>> <4> [154.178706]  intel_pxp_fini_hw+0x23/0x30 [i915] <4>
> >>>> [154.179284]
> >>>> intel_pxp_suspend+0x1f/0x30 [i915] <4> [154.179807]
> >>>> live_gt_resume+0x5b/0x90 [i915]
> >>>>
> >>>> Changes since V1 :
> >>>> 	- split the HW access parts in gt_suspend_late - Daniele
> >>>> 	- Remove default PXP configs
> >>>>
> >>>> Signed-off-by: Tejas Upadhyay
> >>>> <tejaskumarx.surendrakumar.upadhyay@intel.com>
> >>>> ---
> >>>>   drivers/gpu/drm/i915/gt/intel_gt_pm.c   |  7 ++++---
> >>>>   drivers/gpu/drm/i915/pxp/intel_pxp_pm.c | 15 ++++++++++++---
> >>>> drivers/gpu/drm/i915/pxp/intel_pxp_pm.h | 18 ++++++++++++++++--
> >>>>   3 files changed, 32 insertions(+), 8 deletions(-)
> >>>>
> >>>> diff --git a/drivers/gpu/drm/i915/gt/intel_gt_pm.c
> >>>> b/drivers/gpu/drm/i915/gt/intel_gt_pm.c
> >>>> index b4a8594bc46c..d4029de1c80d 100644
> >>>> --- a/drivers/gpu/drm/i915/gt/intel_gt_pm.c
> >>>> +++ b/drivers/gpu/drm/i915/gt/intel_gt_pm.c
> >>>> @@ -303,7 +303,7 @@ void intel_gt_suspend_prepare(struct intel_gt
> *gt)
> >>>>   	user_forcewake(gt, true);
> >>>>   	wait_for_suspend(gt);
> >>>>
> >>>> -	intel_pxp_suspend(&gt->pxp, false);
> >>>> +	intel_pxp_suspend_prepare(&gt->pxp, false);
> >>>>   }
> >>>>
> >>>>   static suspend_state_t pm_suspend_target(void) @@ -328,6 +328,7
> >>>> @@ void intel_gt_suspend_late(struct intel_gt *gt)
> >>>>   	GEM_BUG_ON(gt->awake);
> >>>>
> >>>>   	intel_uc_suspend(&gt->uc);
> >>>> +	intel_pxp_suspend(&gt->pxp);
> >>>>
> >>>>   	/*
> >>>>   	 * On disabling the device, we want to turn off HW access to
> >>>> memory @@ -355,7 +356,7 @@ void intel_gt_suspend_late(struct
> >>>> intel_gt *gt)
> >>>>
> >>>>   void intel_gt_runtime_suspend(struct intel_gt *gt)  {
> >>>> -	intel_pxp_suspend(&gt->pxp, true);
> >>>> +	intel_pxp_runtime_suspend(&gt->pxp);
> >>>>   	intel_uc_runtime_suspend(&gt->uc);
> >>>>
> >>>>   	GT_TRACE(gt, "\n");
> >>>> @@ -373,7 +374,7 @@ int intel_gt_runtime_resume(struct intel_gt *gt)
> >>>>   	if (ret)
> >>>>   		return ret;
> >>>>
> >>>> -	intel_pxp_resume(&gt->pxp);
> >>>> +	intel_pxp_runtime_resume(&gt->pxp);
> >>>>
> >>>>   	return 0;
> >>>>   }
> >>>> diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp_pm.c
> >>>> b/drivers/gpu/drm/i915/pxp/intel_pxp_pm.c
> >>>> index 23fd86de5a24..3f91996dc6be 100644
> >>>> --- a/drivers/gpu/drm/i915/pxp/intel_pxp_pm.c
> >>>> +++ b/drivers/gpu/drm/i915/pxp/intel_pxp_pm.c
> >>>> @@ -7,8 +7,9 @@
> >>>>   #include "intel_pxp_irq.h"
> >>>>   #include "intel_pxp_pm.h"
> >>>>   #include "intel_pxp_session.h"
> >>>> +#include "i915_drv.h"
> >>>>
> >>>> -void intel_pxp_suspend(struct intel_pxp *pxp, bool runtime)
> >>>> +void intel_pxp_suspend_prepare(struct intel_pxp *pxp, bool
> >>>> +runtime)
> >>>>   {
> >>>>   	if (!intel_pxp_is_enabled(pxp))
> >>>>   		return;
> >>>> @@ -23,10 +24,18 @@ void intel_pxp_suspend(struct intel_pxp *pxp,
> >>>> bool
> >>> runtime)
> >>>>   	 */
> >>>>   	if (!runtime)
> >>>>   		intel_pxp_invalidate(pxp);
> >>>> +}
> >>>>
> >>>> -	intel_pxp_fini_hw(pxp);
> >>>> +void intel_pxp_suspend(struct intel_pxp *pxp) {
> >>>> +	intel_wakeref_t wakeref;
> >>>>
> >>>> -	pxp->hw_state_invalidated = false;
> >>>> +	if (!intel_pxp_is_enabled(pxp))
> >>>> +		return;
> >>>> +	with_intel_runtime_pm(&pxp_to_gt(pxp)->i915->runtime_pm,
> >>> wakeref) {
> >>>> +		intel_pxp_fini_hw(pxp);
> >>>> +		pxp->hw_state_invalidated = false;
> >>>> +	}
> >>>>   }
> >>>>
> >>>>   void intel_pxp_resume(struct intel_pxp *pxp) diff --git
> >>>> a/drivers/gpu/drm/i915/pxp/intel_pxp_pm.h
> >>>> b/drivers/gpu/drm/i915/pxp/intel_pxp_pm.h
> >>>> index c89e97a0c3d0..f2cf3117ed93 100644
> >>>> --- a/drivers/gpu/drm/i915/pxp/intel_pxp_pm.h
> >>>> +++ b/drivers/gpu/drm/i915/pxp/intel_pxp_pm.h
> >>>> @@ -9,10 +9,15 @@
> >>>>   #include "intel_pxp_types.h"
> >>>>
> >>>>   #ifdef CONFIG_DRM_I915_PXP
> >>>> -void intel_pxp_suspend(struct intel_pxp *pxp, bool runtime);
> >>>> +void intel_pxp_suspend_prepare(struct intel_pxp *pxp, bool
> >>>> +runtime); void intel_pxp_suspend(struct intel_pxp *pxp);
> >>>>   void intel_pxp_resume(struct intel_pxp *pxp);  #else -static
> >>>> inline void intel_pxp_suspend(struct intel_pxp *pxp, bool runtime)
> >>>> +static inline void intel_pxp_suspend_prepare(struct intel_pxp
> >>>> +*pxp, bool runtime) { }
> >>>> +
> >>>> +static inline void intel_pxp_suspend(struct intel_pxp *pxp)
> >>>>   {
> >>>>   }
> >>>>
> >>>> @@ -20,5 +25,14 @@ static inline void intel_pxp_resume(struct
> >>>> intel_pxp *pxp)  {  }  #endif
> >>>> +static inline void intel_pxp_runtime_suspend(struct intel_pxp *pxp) {
> >>>> +	intel_pxp_suspend_prepare(pxp, true);
> >>>> +	intel_pxp_suspend(pxp);
> >>>> +}
> >>>>
> >>>> +static inline void intel_pxp_runtime_resume(struct intel_pxp *pxp) {
> >>>> +	intel_pxp_resume(pxp);
> >>>> +}
> >>> For the casual reader, the pxp suspend/resume functions have become
> >>> an impossible interface to use correctly without digging into the source
> code.
> >>>
> >>> Separate runtime suspend/resume calls *and* a suspend function with
> >>> runtime parameter?!?
> >> Hi Daniele, would you be ok if I add runtime arg? Please let me know what
> do you think.
> > Err, please *avoid* having runtime as parameter.
> >
> > BR,
> > Jani.
> 
> Might be better to just open-code the runtime_suspend function, i.e.:
> 
> void intel_pxp_runtime_suspend(struct intel_pxp *pxp) {
> 	if (!intel_pxp_is_enabled(pxp))
> 		return;
> 
> 	pxp->arb_is_valid = false;
> 	pxp->hw_state_invalidated = false;
> 
> 	intel_pxp_fini_hw(pxp);
> }
> 
> 
> And remove the bool param from suspend_prepare. No changes required
> for the resume.
> Note that the change above requires the function to be moved to the C file,
> with an empty implementation to be added in the header for when the PXP
> config is not set (basically the same thing we do for the pxp_suspend
> function).
> 
> Daniele

/*
         * Contexts using protected objects keep a runtime PM reference, so we
         * can only runtime suspend when all of them have been either closed
         * or banned. Therefore, there is no need to invalidate in that
         * scenario.
         */
        if (!runtime)
                intel_pxp_invalidate(pxp);

This needs boolean in suspend_preapre.

Thanks,
Tejas
> 
> >
> >> Thanks,
> >> Tejas
> >>> BR,
> >>> Jani.
> >>>
> >>>>   #endif /* __INTEL_PXP_PM_H__ */
> >>> --
> >>> Jani Nikula, Intel Open Source Graphics Center


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Intel-gfx] [PATCH V2] drm/i915/gt: Hold RPM wakelock during PXP suspend
  2021-11-10 13:33         ` Surendrakumar Upadhyay, TejaskumarX
@ 2021-11-10 16:07           ` Daniele Ceraolo Spurio
  0 siblings, 0 replies; 9+ messages in thread
From: Daniele Ceraolo Spurio @ 2021-11-10 16:07 UTC (permalink / raw)
  To: Surendrakumar Upadhyay, TejaskumarX, Jani Nikula; +Cc: intel-gfx



On 11/10/2021 5:33 AM, Surendrakumar Upadhyay, TejaskumarX wrote:
>
>> -----Original Message-----
>> From: Ceraolo Spurio, Daniele <daniele.ceraolospurio@intel.com>
>> Sent: 10 November 2021 03:05
>> To: Jani Nikula <jani.nikula@linux.intel.com>; Surendrakumar Upadhyay,
>> TejaskumarX <tejaskumarx.surendrakumar.upadhyay@intel.com>
>> Cc: intel-gfx@lists.freedesktop.org
>> Subject: Re: [Intel-gfx] [PATCH V2] drm/i915/gt: Hold RPM wakelock during
>> PXP suspend
>>
>>
>>
>> On 11/8/2021 10:32 PM, Jani Nikula wrote:
>>> On Tue, 09 Nov 2021, "Surendrakumar Upadhyay, TejaskumarX"
>> 	<tejaskumarx.surendrakumar.upadhyay@intel.com> wrote:
>>>>> -----Original Message-----
>>>>> From: Jani Nikula <jani.nikula@linux.intel.com>
>>>>> Sent: 09 November 2021 00:37
>>>>> To: Surendrakumar Upadhyay, TejaskumarX
>>>>> <tejaskumarx.surendrakumar.upadhyay@intel.com>; intel-
>>>>> gfx@lists.freedesktop.org
>>>>> Subject: Re: [Intel-gfx] [PATCH V2] drm/i915/gt: Hold RPM wakelock
>>>>> during PXP suspend
>>>>>
>>>>> On Mon, 08 Nov 2021, Tejas Upadhyay
>>>>> <tejaskumarx.surendrakumar.upadhyay@intel.com> wrote:
>>>>>> selftest --r live shows failure in suspend tests when RPM wakelock
>>>>>> is not acquired during suspend.
>>>>>>
>>>>>> This changes addresses below error :
>>>>>> <4> [154.177535] RPM wakelock ref not held during HW access <4>
>>>>>> [154.177575] WARNING: CPU: 4 PID: 5772 at
>>>>>> drivers/gpu/drm/i915/intel_runtime_pm.h:113
>>>>>> fwtable_write32+0x240/0x320 [i915]
>>>>>> <4> [154.177974] Modules linked in: i915(+) vgem drm_shmem_helper
>>>>>> fuse snd_hda_codec_hdmi snd_hda_codec_realtek
>> snd_hda_codec_generic
>>>>>> ledtrig_audio mei_hdcp mei_pxp x86_pkg_temp_thermal coretemp
>>>>>> crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_intel_dspcfg
>>>>>> snd_hda_codec snd_hwdep igc snd_hda_core ttm mei_me ptp
>> snd_pcm
>>>>>> prime_numbers mei i2c_i801 pps_core i2c_smbus intel_lpss_pci btusb
>>>>>> btrtl btbcm btintel bluetooth ecdh_generic ecc [last unloaded:
>>>>>> i915] <4> [154.178143] CPU: 4 PID: 5772 Comm: i915_selftest Tainted: G
>>>>>> U            5.15.0-rc6-CI-Patchwork_21432+ #1
>>>>>> <4> [154.178154] Hardware name: ASUS System Product Name/TUF
>>>>> GAMING
>>>>>> Z590-PLUS WIFI, BIOS 0811 04/06/2021 <4> [154.178160] RIP:
>>>>>> 0010:fwtable_write32+0x240/0x320 [i915] <4> [154.178604] Code: 15
>>>>>> 7b
>>>>>> e1 0f 0b e9 34 fe ff ff 80 3d a9 89 31
>>>>>> 00 00 0f 85 31 fe ff ff 48 c7 c7 88 9e 4f a0 c6 05 95 89 31 00 01
>>>>>> e8
>>>>>> c0 15 7b e1 <0f> 0b e9 17 fe ff ff 8b 05 0f 83 58 e2 85 c0 0f 85 8d
>>>>>> 00 00 00 48
>>>>>> <4> [154.178614] RSP: 0018:ffffc900016279f0 EFLAGS: 00010286 <4>
>>>>>> [154.178626] RAX: 0000000000000000 RBX: ffff888204fe0ee0
>>>>>> RCX: 0000000000000001
>>>>>> <4> [154.178634] RDX: 0000000080000001 RSI: ffffffff823142b5
>>>>>> RDI: 00000000ffffffff
>>>>>> <4> [154.178641] RBP: 00000000000320f0 R08: 0000000000000000
>>>>>> R09: c0000000ffffcd5a
>>>>>> <4> [154.178647] R10: 00000000000f8c90 R11: ffffc90001627808
>>>>>> R12: 0000000000000000
>>>>>> <4> [154.178654] R13: 0000000040000000 R14: ffffffffa04d12e0
>>>>>> R15: 0000000000000000
>>>>>> <4> [154.178660] FS:  00007f7390aa4c00(0000)
>>>>>> GS:ffff88844f000000(0000)
>>>>>> knlGS:0000000000000000
>>>>>> <4> [154.178669] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
>>>>>> <4> [154.178675] CR2: 000055bc40595028 CR3: 0000000204474005
>>>>>> CR4: 0000000000770ee0
>>>>>> <4> [154.178682] PKRU: 55555554
>>>>>> <4> [154.178687] Call Trace:
>>>>>> <4> [154.178706]  intel_pxp_fini_hw+0x23/0x30 [i915] <4>
>>>>>> [154.179284]
>>>>>> intel_pxp_suspend+0x1f/0x30 [i915] <4> [154.179807]
>>>>>> live_gt_resume+0x5b/0x90 [i915]
>>>>>>
>>>>>> Changes since V1 :
>>>>>> 	- split the HW access parts in gt_suspend_late - Daniele
>>>>>> 	- Remove default PXP configs
>>>>>>
>>>>>> Signed-off-by: Tejas Upadhyay
>>>>>> <tejaskumarx.surendrakumar.upadhyay@intel.com>
>>>>>> ---
>>>>>>    drivers/gpu/drm/i915/gt/intel_gt_pm.c   |  7 ++++---
>>>>>>    drivers/gpu/drm/i915/pxp/intel_pxp_pm.c | 15 ++++++++++++---
>>>>>> drivers/gpu/drm/i915/pxp/intel_pxp_pm.h | 18 ++++++++++++++++--
>>>>>>    3 files changed, 32 insertions(+), 8 deletions(-)
>>>>>>
>>>>>> diff --git a/drivers/gpu/drm/i915/gt/intel_gt_pm.c
>>>>>> b/drivers/gpu/drm/i915/gt/intel_gt_pm.c
>>>>>> index b4a8594bc46c..d4029de1c80d 100644
>>>>>> --- a/drivers/gpu/drm/i915/gt/intel_gt_pm.c
>>>>>> +++ b/drivers/gpu/drm/i915/gt/intel_gt_pm.c
>>>>>> @@ -303,7 +303,7 @@ void intel_gt_suspend_prepare(struct intel_gt
>> *gt)
>>>>>>    	user_forcewake(gt, true);
>>>>>>    	wait_for_suspend(gt);
>>>>>>
>>>>>> -	intel_pxp_suspend(&gt->pxp, false);
>>>>>> +	intel_pxp_suspend_prepare(&gt->pxp, false);
>>>>>>    }
>>>>>>
>>>>>>    static suspend_state_t pm_suspend_target(void) @@ -328,6 +328,7
>>>>>> @@ void intel_gt_suspend_late(struct intel_gt *gt)
>>>>>>    	GEM_BUG_ON(gt->awake);
>>>>>>
>>>>>>    	intel_uc_suspend(&gt->uc);
>>>>>> +	intel_pxp_suspend(&gt->pxp);
>>>>>>
>>>>>>    	/*
>>>>>>    	 * On disabling the device, we want to turn off HW access to
>>>>>> memory @@ -355,7 +356,7 @@ void intel_gt_suspend_late(struct
>>>>>> intel_gt *gt)
>>>>>>
>>>>>>    void intel_gt_runtime_suspend(struct intel_gt *gt)  {
>>>>>> -	intel_pxp_suspend(&gt->pxp, true);
>>>>>> +	intel_pxp_runtime_suspend(&gt->pxp);
>>>>>>    	intel_uc_runtime_suspend(&gt->uc);
>>>>>>
>>>>>>    	GT_TRACE(gt, "\n");
>>>>>> @@ -373,7 +374,7 @@ int intel_gt_runtime_resume(struct intel_gt *gt)
>>>>>>    	if (ret)
>>>>>>    		return ret;
>>>>>>
>>>>>> -	intel_pxp_resume(&gt->pxp);
>>>>>> +	intel_pxp_runtime_resume(&gt->pxp);
>>>>>>
>>>>>>    	return 0;
>>>>>>    }
>>>>>> diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp_pm.c
>>>>>> b/drivers/gpu/drm/i915/pxp/intel_pxp_pm.c
>>>>>> index 23fd86de5a24..3f91996dc6be 100644
>>>>>> --- a/drivers/gpu/drm/i915/pxp/intel_pxp_pm.c
>>>>>> +++ b/drivers/gpu/drm/i915/pxp/intel_pxp_pm.c
>>>>>> @@ -7,8 +7,9 @@
>>>>>>    #include "intel_pxp_irq.h"
>>>>>>    #include "intel_pxp_pm.h"
>>>>>>    #include "intel_pxp_session.h"
>>>>>> +#include "i915_drv.h"
>>>>>>
>>>>>> -void intel_pxp_suspend(struct intel_pxp *pxp, bool runtime)
>>>>>> +void intel_pxp_suspend_prepare(struct intel_pxp *pxp, bool
>>>>>> +runtime)
>>>>>>    {
>>>>>>    	if (!intel_pxp_is_enabled(pxp))
>>>>>>    		return;
>>>>>> @@ -23,10 +24,18 @@ void intel_pxp_suspend(struct intel_pxp *pxp,
>>>>>> bool
>>>>> runtime)
>>>>>>    	 */
>>>>>>    	if (!runtime)
>>>>>>    		intel_pxp_invalidate(pxp);
>>>>>> +}
>>>>>>
>>>>>> -	intel_pxp_fini_hw(pxp);
>>>>>> +void intel_pxp_suspend(struct intel_pxp *pxp) {
>>>>>> +	intel_wakeref_t wakeref;
>>>>>>
>>>>>> -	pxp->hw_state_invalidated = false;
>>>>>> +	if (!intel_pxp_is_enabled(pxp))
>>>>>> +		return;
>>>>>> +	with_intel_runtime_pm(&pxp_to_gt(pxp)->i915->runtime_pm,
>>>>> wakeref) {
>>>>>> +		intel_pxp_fini_hw(pxp);
>>>>>> +		pxp->hw_state_invalidated = false;
>>>>>> +	}
>>>>>>    }
>>>>>>
>>>>>>    void intel_pxp_resume(struct intel_pxp *pxp) diff --git
>>>>>> a/drivers/gpu/drm/i915/pxp/intel_pxp_pm.h
>>>>>> b/drivers/gpu/drm/i915/pxp/intel_pxp_pm.h
>>>>>> index c89e97a0c3d0..f2cf3117ed93 100644
>>>>>> --- a/drivers/gpu/drm/i915/pxp/intel_pxp_pm.h
>>>>>> +++ b/drivers/gpu/drm/i915/pxp/intel_pxp_pm.h
>>>>>> @@ -9,10 +9,15 @@
>>>>>>    #include "intel_pxp_types.h"
>>>>>>
>>>>>>    #ifdef CONFIG_DRM_I915_PXP
>>>>>> -void intel_pxp_suspend(struct intel_pxp *pxp, bool runtime);
>>>>>> +void intel_pxp_suspend_prepare(struct intel_pxp *pxp, bool
>>>>>> +runtime); void intel_pxp_suspend(struct intel_pxp *pxp);
>>>>>>    void intel_pxp_resume(struct intel_pxp *pxp);  #else -static
>>>>>> inline void intel_pxp_suspend(struct intel_pxp *pxp, bool runtime)
>>>>>> +static inline void intel_pxp_suspend_prepare(struct intel_pxp
>>>>>> +*pxp, bool runtime) { }
>>>>>> +
>>>>>> +static inline void intel_pxp_suspend(struct intel_pxp *pxp)
>>>>>>    {
>>>>>>    }
>>>>>>
>>>>>> @@ -20,5 +25,14 @@ static inline void intel_pxp_resume(struct
>>>>>> intel_pxp *pxp)  {  }  #endif
>>>>>> +static inline void intel_pxp_runtime_suspend(struct intel_pxp *pxp) {
>>>>>> +	intel_pxp_suspend_prepare(pxp, true);
>>>>>> +	intel_pxp_suspend(pxp);
>>>>>> +}
>>>>>>
>>>>>> +static inline void intel_pxp_runtime_resume(struct intel_pxp *pxp) {
>>>>>> +	intel_pxp_resume(pxp);
>>>>>> +}
>>>>> For the casual reader, the pxp suspend/resume functions have become
>>>>> an impossible interface to use correctly without digging into the source
>> code.
>>>>> Separate runtime suspend/resume calls *and* a suspend function with
>>>>> runtime parameter?!?
>>>> Hi Daniele, would you be ok if I add runtime arg? Please let me know what
>> do you think.
>>> Err, please *avoid* having runtime as parameter.
>>>
>>> BR,
>>> Jani.
>> Might be better to just open-code the runtime_suspend function, i.e.:
>>
>> void intel_pxp_runtime_suspend(struct intel_pxp *pxp) {
>> 	if (!intel_pxp_is_enabled(pxp))
>> 		return;
>>
>> 	pxp->arb_is_valid = false;
>> 	pxp->hw_state_invalidated = false;
>>
>> 	intel_pxp_fini_hw(pxp);
>> }
>>
>>
>> And remove the bool param from suspend_prepare. No changes required
>> for the resume.
>> Note that the change above requires the function to be moved to the C file,
>> with an empty implementation to be added in the header for when the PXP
>> config is not set (basically the same thing we do for the pxp_suspend
>> function).
>>
>> Daniele
> /*
>           * Contexts using protected objects keep a runtime PM reference, so we
>           * can only runtime suspend when all of them have been either closed
>           * or banned. Therefore, there is no need to invalidate in that
>           * scenario.
>           */
>          if (!runtime)
>                  intel_pxp_invalidate(pxp);
>
> This needs boolean in suspend_preapre.

If you're open-coding runtime_suspend, there is only one user left of 
suspend_prepare (the one with runtime = false), so we don't need the 
boolean anymore, just always call intel_pxp_invalidate unconditionally 
and get rid of the comment above it.

Daniele

>
> Thanks,
> Tejas
>>>> Thanks,
>>>> Tejas
>>>>> BR,
>>>>> Jani.
>>>>>
>>>>>>    #endif /* __INTEL_PXP_PM_H__ */
>>>>> --
>>>>> Jani Nikula, Intel Open Source Graphics Center


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-11-10 16:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-08 10:56 [Intel-gfx] [PATCH V2] drm/i915/gt: Hold RPM wakelock during PXP suspend Tejas Upadhyay
2021-11-08 11:44 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2021-11-08 12:56 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2021-11-08 19:07 ` [Intel-gfx] [PATCH V2] " Jani Nikula
2021-11-09  5:48   ` Surendrakumar Upadhyay, TejaskumarX
2021-11-09  6:32     ` Jani Nikula
2021-11-09 21:35       ` Daniele Ceraolo Spurio
2021-11-10 13:33         ` Surendrakumar Upadhyay, TejaskumarX
2021-11-10 16:07           ` Daniele Ceraolo Spurio

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.