drm/i915/psr : Add psr1 live status
Subsystems (2)
PATCH 1/1 drm/i915/psr : Add psr1 live status
From: Vathsala Nagaraju <[email protected]>
Prints live state of psr1.Extending the existing
PSR2 live state function to cover psr1.
Tested on KBL with psr2 and psr1 panel.
v2: rebase
--- drivers/gpu/drm/i915/i915_debugfs.c | 67 ++++++++++++++++++++++++------------- drivers/gpu/drm/i915/i915_reg.h | 1 + 2 files changed, 44 insertions(+), 24 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +43 -24
@@ -2580,25 +2580,42 @@ static int i915_guc_log_relay_release(struct inode *inode, struct file *file) .release = i915_guc_log_relay_release, }; -static const char *psr2_live_status (u32 val) -{ -static const char *const live_status[] = { -"IDLE" , -"CAPTURE" , -"CAPTURE_FS" , -"SLEEP" , -"BUFON_FW" , -"ML_UP" , -"SU_STANDBY" , -"FAST_SLEEP" , -"DEEP_SLEEP" , -"BUF_ON" , -"TG_ON" - }; - - val = (val &EDP_PSR2_STATUS_STATE_MASK ) >>EDP_PSR2_STATUS_STATE_SHIFT ; -if (val <ARRAY_SIZE (live_status)) -return live_status[val]; +static const char *psr_live_status (bool is_psr2_enabled,u32 val) +{ +if (is_psr2_enabled) { +static const char *const live_status[] = { +"IDLE" , +"CAPTURE" , +"CAPTURE_FS" , +"SLEEP" , +"BUFON_FW" , +"ML_UP" , +"SU_STANDBY" , +"FAST_SLEEP" , +"DEEP_SLEEP" , +"BUF_ON" , +"TG_ON" + }; + val = (val &EDP_PSR2_STATUS_STATE_MASK ) >> +EDP_PSR2_STATUS_STATE_SHIFT ; +if (val <ARRAY_SIZE (live_status)) +return live_status[val]; + }else { +static const char *const live_status[] = { +"IDLE" , +"SRDONACK" , +"SRDENT" , +"BUFOFF" , +"BUFON" , +"AUXACK" , +"SRDOFFACK" , +"SRDENT_ON" , + }; + val = (val &EDP_PSR_STATUS_STATE_MASK ) >> +EDP_PSR_STATUS_STATE_SHIFT ; +if (val <ARRAY_SIZE (live_status)) +return live_status[val]; + }return "unknown" ; }
@@ -2631,6 +2648,7 @@ static int i915_edp_psr_status(struct seq_file *m, void *data)enum pipe pipe;bool enabled = false;bool sink_support; +u32 psr_status;if (!HAS_PSR (dev_priv))return -ENODEV ;
@@ -2698,12 +2716,13 @@ static int i915_edp_psr_status(struct seq_file *m, void *data)seq_printf (m,"Performance_Counter: %u\n" , psrperf); } -if (dev_priv->psr.psr2_enabled) { -u32 psr2 =I915_READ (EDP_PSR2_STATUS ); -seq_printf (m,"EDP_PSR2_STATUS: %x [%s]\n" , - psr2,psr2_live_status (psr2)); - } + psr_status = (dev_priv->psr.psr2_enabled) ?I915_READ (EDP_PSR2_STATUS ) : +I915_READ (EDP_PSR_STATUS ); +seq_printf (m,"EDP_SOURCE_PSR%s_STATUS: %x [%s]\n" , + dev_priv->psr.psr2_enabled ?"2" :"1" , + psr_status, +psr_live_status (dev_priv->psr.psr2_enabled, psr_status));if (dev_priv->psr.enabled) {struct drm_dp_aux *aux = &dev_priv->psr.enabled->aux;
drivers/gpu/drm/i915/i915_reg.h +1 -0
@@ -4065,6 +4065,7 @@ enum {#define EDP_PSR_STATUS_SENDING_TP2_TP3 (1<<8)#define EDP_PSR_STATUS_SENDING_TP1 (1<<4)#define EDP_PSR_STATUS_IDLE_MASK 0xf +#define EDP_PSR_STATUS_STATE_SHIFT 29#define EDP_PSR_PERF_CNT _MMIO(dev_priv->psr_mmio_base + 0x44)#define EDP_PSR_PERF_CNT_MASK 0xffffff
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.CHECKPATCH: warning for drm/i915/psr : Add psr1 live status (rev2)
== Series Details ==
== Series Details ==
Series: drm/i915/psr : Add psr1 live status (rev2)
URL : https://patchwork.freedesktop.org/series/42021/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip f386581d5e6f drm/i915/psr : Add psr1 live status -:105: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #105: FILE: drivers/gpu/drm/i915/i915_debugfs.c:2723: + seq_printf(m, "EDP_SOURCE_PSR%s_STATUS: %x [%s]\n", + dev_priv->psr.psr2_enabled ? "2" : "1",
total: 0 errors, 0 warnings, 1 checks, 93 lines checked
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915/psr : Add psr1 live status (rev2)
In reply to vathsala nagaraju== Series Details ==
== Series Details ==
Series: drm/i915/psr : Add psr1 live status (rev2)
URL : https://patchwork.freedesktop.org/series/42021/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4107 -> Patchwork_8821 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/42021/revisions/2/mbox/
== Known issues ==
Here are the changes found in Patchwork_8821 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@kms_frontbuffer_tracking@basic:
fi-cnl-y3: PASS -> FAIL (fdo#103167)
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
fi-snb-2520m: PASS -> INCOMPLETE (fdo#103713)
igt@prime_vgem@basic-fence-flip:
fi-ilk-650: PASS -> FAIL (fdo#104008)
==== Possible fixes ====
igt@gem_exec_suspend@basic-s3:
fi-ivb-3520m: DMESG-WARN (fdo#106084) -> PASS
igt@kms_busy@basic-flip-c:
fi-bxt-dsi: INCOMPLETE (fdo#103927) -> PASS
igt@kms_flip@basic-flip-vs-wf_vblank:
fi-cnl-psr: FAIL (fdo#100368) -> PASS
igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a-frame-sequence:
fi-cnl-psr: FAIL (fdo#103481) -> PASS fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103481 https://bugs.freedesktop.org/show_bug.cgi?id=103481
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
fdo#104008 https://bugs.freedesktop.org/show_bug.cgi?id=104008
fdo#106084 https://bugs.freedesktop.org/show_bug.cgi?id=106084
== Participating hosts (39 -> 35) ==
Missing (4): fi-ctg-p8600 fi-ilk-m540 fi-bwr-2160 fi-skl-6700hq
== Build changes ==
* Linux: CI_DRM_4107 -> Patchwork_8821
CI_DRM_4107: f711c0b36f2382983c964bd69d6c477482e604f1 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4450: 0350f0e7f6a0e07281445fc3082aa70419f4aac7 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_8821: f386581d5e6f236c5db6af327218bf874def0dac @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4450: b57600ba58ae0cdbad86826fd653aa0191212f27 @ git://anongit.freedesktop.org/piglit
== Linux commits ==
f386581d5e6f drm/i915/psr : Add psr1 live status
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8821/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for drm/i915/psr : Add psr1 live status (rev2)
In reply to vathsala nagaraju== Series Details ==
== Series Details ==
Series: drm/i915/psr : Add psr1 live status (rev2)
URL : https://patchwork.freedesktop.org/series/42021/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4107_full -> Patchwork_8821_full =
== Summary - WARNING ==
Minor unknown changes coming with Patchwork_8821_full need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_8821_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://patchwork.freedesktop.org/api/1.0/series/42021/revisions/2/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_8821_full:
=== IGT changes ===
==== Warnings ====
igt@kms_vblank@pipe-a-wait-forked-busy-hang:
shard-snb: PASS -> SKIP +1== Known issues ==
Here are the changes found in Patchwork_8821_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@kms_flip@2x-plain-flip-fb-recreate-interruptible:
shard-hsw: PASS -> FAIL (fdo#100368)
igt@kms_flip@modeset-vs-vblank-race:
shard-hsw: PASS -> FAIL (fdo#103060)
igt@kms_flip@plain-flip-fb-recreate-interruptible:
shard-glk: PASS -> FAIL (fdo#100368)
igt@kms_frontbuffer_tracking@fbc-rgb565-draw-pwrite:
shard-kbl: PASS -> DMESG-WARN (fdo#106247)
igt@perf_pmu@interrupts-sync:
shard-apl: PASS -> FAIL (fdo#104485)
==== Possible fixes ====
igt@kms_cursor_legacy@2x-long-cursor-vs-flip-atomic:
shard-hsw: FAIL (fdo#105767) -> PASS
igt@kms_flip@2x-plain-flip-ts-check:
shard-hsw: FAIL (fdo#100368) -> PASS
igt@kms_flip@blocking-wf_vblank:
shard-hsw: FAIL (fdo#103928) -> PASS
igt@kms_flip@flip-vs-expired-vblank-interruptible:
shard-hsw: FAIL (fdo#105707) -> PASS
igt@kms_sysfs_edid_timing:
shard-apl: WARN (fdo#100047) -> PASS fdo#100047 https://bugs.freedesktop.org/show_bug.cgi?id=100047
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
fdo#103928 https://bugs.freedesktop.org/show_bug.cgi?id=103928
fdo#104485 https://bugs.freedesktop.org/show_bug.cgi?id=104485
fdo#105707 https://bugs.freedesktop.org/show_bug.cgi?id=105707
fdo#105767 https://bugs.freedesktop.org/show_bug.cgi?id=105767
fdo#106247 https://bugs.freedesktop.org/show_bug.cgi?id=106247
== Participating hosts (9 -> 8) ==
Missing (1): shard-glkb
== Build changes ==
* Linux: CI_DRM_4107 -> Patchwork_8821
CI_DRM_4107: f711c0b36f2382983c964bd69d6c477482e604f1 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4450: 0350f0e7f6a0e07281445fc3082aa70419f4aac7 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_8821: f386581d5e6f236c5db6af327218bf874def0dac @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4450: b57600ba58ae0cdbad86826fd653aa0191212f27 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8821/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 6 lines · vathsala nagaraju
From: Vathsala Nagaraju <[email protected]>
Prints live state of psr1.Extending the existing
PSR2 live state function to cover psr1.Tested on KBL with psr2 and psr1 panel.
Thanks for the patch, please see comments below.
Quoted 41 lines
v2: rebase
Cc Rodrigo Vivi <[email protected]>Cc Dhinakaran Pandiyan <[email protected]>Signed-off-by Vathsala Nagaraju <[email protected]>---
drivers/gpu/drm/i915/i915_debugfs.c | 67 ++++++++++++++++++++++++---
----------
drivers/gpu/drm/i915/i915_reg.h | 1 +2 files changed, 44 insertions(+), 24 deletions(-)drivers/gpu/drm/i915/i915_debugfs.c +0
-0@@ -2580,25 +2580,42 @@ static int i915_guc_log_relay_release(struct inode *inode, struct file *file) .release = i915_guc_log_relay_release, };drivers/gpu/drm/i915/i915_debugfs.c +0
-17-static const char *psr2_live_status (u32 val) -{ -static const char *const live_status[] = { -"IDLE" , -"CAPTURE" , -"CAPTURE_FS" , -"SLEEP" , -"BUFON_FW" , -"ML_UP" , -"SU_STANDBY" , -"FAST_SLEEP" , -"DEEP_SLEEP" , -"BUF_ON" , -"TG_ON" - }; - - val = (val & EDP_PSR2_STATUS_STATE_MASK) >>
EDP_PSR2_STATUS_STATE_SHIFT;
drivers/gpu/drm/i915/i915_debugfs.c static int i915_guc_log_relay_release(struct inode *inode, struct file *file) · line 2583
Quoted 3 lines
drivers/gpu/drm/i915/i915_debugfs.c +1
-2-if (val <ARRAY_SIZE (live_status)) -return live_status[val]; +static const char *psr_live_status (bool is_psr2_enabled,u32 val)
I thought you'd agreed to change the function name to psr_source_status in v2.
If you change the signature to
static void psr_source_status(struct drm_i915_private *dev_priv,
struct seq_file *m)
drivers/gpu/drm/i915/i915_debugfs.c static int i915_guc_log_relay_release(struct inode *inode, struct file *file) · line 2585
Quoted 2 lines
drivers/gpu/drm/i915/i915_debugfs.c +2
-0+{ +if (is_psr2_enabled) {
if (dev_priv->psr.psr2_enabled) {
status = I915_READ(EDP_PSR2_STATUS);Quoted 7 lines
drivers/gpu/drm/i915/i915_debugfs.c +7
-0+static const char *const live_status[] = { +"IDLE" , +"CAPTURE" , +"CAPTURE_FS" , +"SLEEP" , +"BUFON_FW" , +"ML_UP" ,
drivers/gpu/drm/i915/i915_debugfs.c static int i915_guc_log_relay_release(struct inode *inode, struct file *file) · line 2602
Quoted 10 lines
drivers/gpu/drm/i915/i915_debugfs.c +10
-0+"SU_STANDBY" , +"FAST_SLEEP" , +"DEEP_SLEEP" , +"BUF_ON" , + "TG_ON" + }; + val = (val &EDP_PSR2_STATUS_STATE_MASK ) >> +EDP_PSR2_STATUS_STATE_SHIFT ; +if (val <ARRAY_SIZE (live_status)) +return live_status[val];
seq_printf(m, "Source status: %x [%s]", status,
live_status[index]);
Quoted 1 line
drivers/gpu/drm/i915/i915_debugfs.c +1
-0+ }else {
<snip>
Quoted 15 lines
drivers/gpu/drm/i915/i915_debugfs.c +0
-0@@ -2698,12 +2716,13 @@ static int i915_edp_psr_status(struct seq_file *m, void *data)
seq_printf(m, "Performance_Counter: %u\n", psrperf); }drivers/gpu/drm/i915/i915_debugfs.c +0
-2-if (dev_priv->psr.psr2_enabled) { -u32 psr2 =I915_READ (EDP_PSR2_STATUS );drivers/gpu/drm/i915/i915_debugfs.c +1
-3-seq_printf (m,"EDP_PSR2_STATUS: %x [%s]\n" , - psr2, psr2_live_status(psr2)); - } + psr_status = (dev_priv->psr.psr2_enabled) ?
I915_READ(EDP_PSR2_STATUS):drivers/gpu/drm/i915/i915_debugfs.c +1
-0+ I915_READ(EDP_PS
R_STATUS);
drivers/gpu/drm/i915/i915_debugfs.c static int i915_edp_psr_status(struct seq_file *m, void *data) · line 2723
Quoted 2 lines
drivers/gpu/drm/i915/i915_debugfs.c +2
-0+ seq_printf(m, "EDP_SOURCE_PSR%s_STATUS: %x [%s]\n", + dev_priv->psr.psr2_enabled ? "2" : "1",
you can avoid these extra branches on psr2_enabled. And there is also too much going on in i915_edp_psr_status() .
Quoted 13 lines
drivers/gpu/drm/i915/i915_debugfs.c +2
-0+ psr_status, + psr_live_status(dev_priv->psr.psr2_enabled,
psr_status));
if (dev_priv->psr.enabled) {
structdrm_dp_aux*aux = &dev_priv->psr.enabled-Quoted 1 line
aux;
drivers/gpu/drm/i915/i915_reg.h +0
-0
drivers/gpu/drm/i915/i915_reg.h enum { · line 4068
Quoted 4 lines
drivers/gpu/drm/i915/i915_reg.h +1
-0@@ -4065,6 +4065,7 @@ enum { #define EDP_PSR_STATUS_SENDING_TP2_TP3 (1<<8) #define EDP_PSR_STATUS_SENDING_TP1 (1<<4) #define EDP_PSR_STATUS_IDLE_MASK 0xf +#define EDP_PSR_STATUS_STATE_SHIFT 29
Please move this below EDP_PSR_STATUS_STATE_MASK
Quoted 4 lines
#defineEDP_PSR_PERF_CNT_MMIO(dev_priv-Quoted 1 line
psr_mmio_base+0x44)#define EDP_PSR_PERF_CNT_MASK
0xffffff
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx