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
v3: DK
Rename psr2_live_status to psr_source_status
--- drivers/gpu/drm/i915/i915_debugfs.c | 66 +++++++++++++++++++++++-------------- drivers/gpu/drm/i915/i915_reg.h | 1 + 2 files changed, 43 insertions(+), 24 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +42 -24
@@ -2596,25 +2596,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_source_status (u32 val,bool is_psr2_enabled) +{ +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" ; }
@@ -2647,6 +2664,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 ;
@@ -2714,12 +2732,12 @@ 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,"SOURCE_PSR_STATUS: %x[%s]\n" , + psr_status, +psr_source_status (psr_status, dev_priv->psr.psr2_enabled));if (dev_priv->psr.enabled) {struct drm_dp_aux *aux = &dev_priv->psr.enabled->aux;
drivers/gpu/drm/i915/i915_reg.h +1 -0
@@ -4069,6 +4069,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 (rev3)
== Series Details ==
== Series Details ==
Series: drm/i915/psr : Add psr1 live status (rev3)
URL : https://patchwork.freedesktop.org/series/42021/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip 66eb3f2aeb66 drm/i915/psr : Add psr1 live status -:107: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #107: FILE: drivers/gpu/drm/i915/i915_debugfs.c:2739: + seq_printf(m, "SOURCE_PSR_STATUS: %x[%s]\n", + psr_status,
total: 0 errors, 0 warnings, 1 checks, 92 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 (rev3)
In reply to vathsala nagaraju== Series Details ==
== Series Details ==
Series: drm/i915/psr : Add psr1 live status (rev3)
URL : https://patchwork.freedesktop.org/series/42021/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4218 -> Patchwork_9076 =
== Summary - WARNING ==
Minor unknown changes coming with Patchwork_9076 need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_9076, 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/3/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_9076:
=== IGT changes ===
==== Warnings ====
igt@gem_exec_gttfill@basic:
fi-pnv-d510: SKIP -> PASS== Known issues ==
Here are the changes found in Patchwork_9076 that come from known issues:
=== IGT changes ===
==== Possible fixes ====
igt@kms_flip@basic-flip-vs-wf_vblank:
fi-cnl-psr: FAIL (fdo#100368) -> PASS
igt@kms_frontbuffer_tracking@basic:
fi-hsw-peppy: DMESG-FAIL (fdo#106103, fdo#102614) -> PASS fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
fdo#106103 https://bugs.freedesktop.org/show_bug.cgi?id=106103
== Participating hosts (44 -> 39) ==
Missing (5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-skl-6700hq
== Build changes ==
* Linux: CI_DRM_4218 -> Patchwork_9076
CI_DRM_4218: df2fa6a1766287fc138a6088c48c306191edaf01 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4489: d8d5dde407e7f7b17850be71d24a7e679533b03d @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9076: 66eb3f2aeb66300f5586170ae85e2b5d1e46c5ad @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4489: 6ab75f7eb5e1dccbb773e1739beeb2d7cbd6ad0d @ git://anongit.freedesktop.org/piglit
== Linux commits ==
66eb3f2aeb66 drm/i915/psr : Add psr1 live status
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9076/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 (rev3)
In reply to vathsala nagaraju== Series Details ==
== Series Details ==
Series: drm/i915/psr : Add psr1 live status (rev3)
URL : https://patchwork.freedesktop.org/series/42021/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4218_full -> Patchwork_9076_full =
== Summary - WARNING ==
Minor unknown changes coming with Patchwork_9076_full need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_9076_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/3/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_9076_full:
=== IGT changes ===
==== Warnings ====
igt@gem_exec_schedule@deep-vebox:
shard-kbl: SKIP -> PASS
igt@gem_mocs_settings@mocs-rc6-blt:
shard-kbl: PASS -> SKIP +1== Known issues ==
Here are the changes found in Patchwork_9076_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@kms_atomic_transition@1x-modeset-transitions-nonblocking-fencing:
shard-glk: PASS -> FAIL (fdo#105703)
igt@kms_cursor_legacy@2x-long-nonblocking-modeset-vs-cursor-atomic:
shard-glk: PASS -> FAIL (fdo#106509)
igt@kms_flip@2x-plain-flip-fb-recreate-interruptible:
shard-glk: PASS -> FAIL (fdo#100368)
igt@kms_vblank@pipe-c-ts-continuation-idle-hang:
shard-apl: PASS -> DMESG-WARN (fdo#103558, fdo#105602) +10
==== Possible fixes ====
igt@kms_atomic_transition@1x-modeset-transitions-nonblocking:
shard-glk: FAIL (fdo#105703) -> PASS
igt@kms_flip@2x-flip-vs-absolute-wf_vblank-interruptible:
shard-hsw: FAIL (fdo#103928) -> PASS
igt@kms_flip@2x-flip-vs-expired-vblank:
shard-glk: FAIL (fdo#102887) -> PASS
igt@kms_flip@flip-vs-expired-vblank:
shard-glk: FAIL (fdo#105363) -> PASS
igt@kms_flip@plain-flip-ts-check:
shard-hsw: FAIL (fdo#100368) -> PASS
shard-glk: FAIL (fdo#100368) -> PASS +1 fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
fdo#103558 https://bugs.freedesktop.org/show_bug.cgi?id=103558
fdo#103928 https://bugs.freedesktop.org/show_bug.cgi?id=103928
fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
fdo#105602 https://bugs.freedesktop.org/show_bug.cgi?id=105602
fdo#105703 https://bugs.freedesktop.org/show_bug.cgi?id=105703
fdo#106509 https://bugs.freedesktop.org/show_bug.cgi?id=106509
== Participating hosts (9 -> 9) ==
No changes in participating hosts
== Build changes ==
* Linux: CI_DRM_4218 -> Patchwork_9076
CI_DRM_4218: df2fa6a1766287fc138a6088c48c306191edaf01 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4489: d8d5dde407e7f7b17850be71d24a7e679533b03d @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9076: 66eb3f2aeb66300f5586170ae85e2b5d1e46c5ad @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4489: 6ab75f7eb5e1dccbb773e1739beeb2d7cbd6ad0d @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9076/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 49 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.
v2: rebase
v3: DK
Renamepsr2_live_statustopsr_source_statusCc Rodrigo Vivi <[email protected]>Cc Dhinakaran Pandiyan <[email protected]>Signed-off-by Vathsala Nagaraju <[email protected]>---
drivers/gpu/drm/i915/i915_debugfs.c | 66 +++++++++++++++++++++++--
------------
drivers/gpu/drm/i915/i915_reg.h | 1 +2 files changed, 43 insertions(+), 24 deletions(-)drivers/gpu/drm/i915/i915_debugfs.c +0
-0@@ -2596,25 +2596,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 2599
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_source_status (u32 val,bool is_psr2_enabled)
Please change this to psr_source_status(drm_i915_private *dev_priv)
Quoted 5 lines
drivers/gpu/drm/i915/i915_debugfs.c +5
-0+{ +if (is_psr2_enabled) { +static const char *const live_status[] = { +"IDLE" , + "CAPTURE",
drivers/gpu/drm/i915/i915_debugfs.c static int i915_guc_log_relay_release(struct inode *inode, struct file *file) · line 2614
Quoted 10 lines
drivers/gpu/drm/i915/i915_debugfs.c +10
-0+"CAPTURE_FS" , +"SLEEP" , +"BUFON_FW" , +"ML_UP" , +"SU_STANDBY" , +"FAST_SLEEP" , +"DEEP_SLEEP" , +"BUF_ON" , +"TG_ON" + };
With that, you can
live_status = I915_READ(EDP_PSR2_STATUS);
Quoted 5 lines
drivers/gpu/drm/i915/i915_debugfs.c +5
-0+ val = (val &EDP_PSR2_STATUS_STATE_MASK ) >> +EDP_PSR2_STATUS_STATE_SHIFT ; +if (val <ARRAY_SIZE (live_status)) +return live_status[val]; + }else {
drivers/gpu/drm/i915/i915_debugfs.c static int i915_guc_log_relay_release(struct inode *inode, struct file *file) · line 2629
Quoted 10 lines
drivers/gpu/drm/i915/i915_debugfs.c +10
-0+static const char *const live_status[] = { +"IDLE" , +"SRDONACK" , +"SRDENT" , +"BUFOFF" , +"BUFON" , +"AUXACK" , +"SRDOFFACK" , +"SRDENT_ON" , + };
live_status = I915_READ(EDP_PSR_STATUS);
Quoted 31 lines
drivers/gpu/drm/i915/i915_debugfs.c +5
-0+ val = (val &EDP_PSR_STATUS_STATE_MASK ) >> +EDP_PSR_STATUS_STATE_SHIFT ; +if (val <ARRAY_SIZE (live_status)) +return live_status[val]; + }
return "unknown";
}drivers/gpu/drm/i915/i915_debugfs.c +1
-0@@ -2647,6 +2664,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;drivers/gpu/drm/i915/i915_debugfs.c +0
-0@@ -2714,12 +2732,12 @@ 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
Quoted 1 line
R_STATUS);
Please move this inside psr_source_status(), I don't see a point in checking for psr2_enabled here and again in psr_source_status()
drivers/gpu/drm/i915/i915_debugfs.c static int i915_edp_psr_status(struct seq_file *m, void *data) · line 2738
Quoted 1 line
drivers/gpu/drm/i915/i915_debugfs.c +1
-0+ seq_printf(m, "SOURCE_PSR_STATUS: %x[%s]\n",
It's easier on the eyes if these strings are consistent, there is no benefit in writing only this string differently.
Sink status is printed as "Sink PSR status: 0x%x [%s]\n". Please do the same by writing this as "Source PSR status: 0x%x [%s]\n"
Quoted 13 lines
drivers/gpu/drm/i915/i915_debugfs.c +2
-0+ psr_status, + psr_source_status(psr_status, dev_priv-Quoted 1 line
psr.psr2_enabled));
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 4072
Quoted 4 lines
drivers/gpu/drm/i915/i915_reg.h +1
-0@@ -4069,6 +4069,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
You ignored my review from last time, please move this where the mask 'EDP_PSR_STATUS_STATE_MASK' is defined. The rest of the file maintains this consistently and there is no reason to change that.
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 46 lines · Dhinakaran Pandiyan
Quoted 45 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.
v2: rebase
v3: DK
Renamepsr2_live_statustopsr_source_statusCc Rodrigo Vivi <[email protected]>Cc Dhinakaran Pandiyan <[email protected]>Signed-off-by Vathsala Nagaraju <[email protected]>--- drivers/gpu/drm/i915/i915_debugfs.c | 66 +++++++++++++++++++++++-- ------------ drivers/gpu/drm/i915/i915_reg.h | 1 + 2 files changed, 43 insertions(+), 24 deletions(-)drivers/gpu/drm/i915/i915_debugfs.c +0
-14@@ -2596,25 +2596,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"
Quoted 8 lines
drivers/gpu/drm/i915/i915_debugfs.c static int i915_guc_log_relay_release(struct inode *inode, struct file *file) · line 2599
Quoted 7 lines
drivers/gpu/drm/i915/i915_debugfs.c +1
-5- }; - - 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_source_status (u32 val,bool is_psr2_enabled)Please change this to
psr_source_status(drm_i915_private *dev_priv)
to print in format , source psr status %x [%s] , where %x = complete psr source register value(0x6f940) , %s = psr_status_bits [31 :28/29]. if we want handle everything as part of psr_source_status() , then we need to return register value in some pointer. if not then we read the reg and then pass it to psr_source_status which returns live status string.
Quoted 84 lines
Quoted 5 lines
drivers/gpu/drm/i915/i915_debugfs.c +5
-0+{ +if (is_psr2_enabled) { +static const char *const live_status[] = { +"IDLE" , + "CAPTURE",drivers/gpu/drm/i915/i915_debugfs.c static int i915_guc_log_relay_release(struct inode *inode, struct file *file) · line 2614
Quoted 10 lines
drivers/gpu/drm/i915/i915_debugfs.c +10
-0+"CAPTURE_FS" , +"SLEEP" , +"BUFON_FW" , +"ML_UP" , +"SU_STANDBY" , +"FAST_SLEEP" , +"DEEP_SLEEP" , +"BUF_ON" , +"TG_ON" + };With that, you can
live_status = I915_READ(EDP_PSR2_STATUS);Quoted 5 lines
drivers/gpu/drm/i915/i915_debugfs.c +5
-0+ val = (val &EDP_PSR2_STATUS_STATE_MASK ) >> +EDP_PSR2_STATUS_STATE_SHIFT ; +if (val <ARRAY_SIZE (live_status)) +return live_status[val]; + }else {drivers/gpu/drm/i915/i915_debugfs.c static int i915_guc_log_relay_release(struct inode *inode, struct file *file) · line 2629
Quoted 10 lines
drivers/gpu/drm/i915/i915_debugfs.c +10
-0+static const char *const live_status[] = { +"IDLE" , +"SRDONACK" , +"SRDENT" , +"BUFOFF" , +"BUFON" , +"AUXACK" , +"SRDOFFACK" , +"SRDENT_ON" , + };live_status = I915_READ(EDP_PSR_STATUS);Quoted 31 lines
drivers/gpu/drm/i915/i915_debugfs.c +5
-0+ val = (val &EDP_PSR_STATUS_STATE_MASK ) >> +EDP_PSR_STATUS_STATE_SHIFT ; +if (val <ARRAY_SIZE (live_status)) +return live_status[val]; + }return "unknown";
}drivers/gpu/drm/i915/i915_debugfs.c +1
-0@@ -2647,6 +2664,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;drivers/gpu/drm/i915/i915_debugfs.c +1
-5@@ -2714,12 +2732,12 @@ 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):drivers/gpu/drm/i915/i915_debugfs.c +1
-0+ I915_READ(EDP_PSQuoted 1 line
R_STATUS);Please move this inside
psr_source_status(), I don't see a point in checking forpsr2_enabledhere and again inpsr_source_status()drivers/gpu/drm/i915/i915_debugfs.c static int i915_edp_psr_status(struct seq_file *m, void *data) · line 2738
Quoted 1 line
drivers/gpu/drm/i915/i915_debugfs.c +1
-0+ seq_printf(m, "SOURCE_PSR_STATUS: %x[%s]\n",It's easier on the eyes if these strings are consistent, there is no benefit in writing only this string differently.
Sink status is printed as "Sink PSR status: 0x%x [%s]\n". Please do the same by writing this as "Source PSR status: 0x%x [%s]\n"
Quoted 7 lines
drivers/gpu/drm/i915/i915_debugfs.c +2
-0+ psr_status, + psr_source_status(psr_status, dev_priv-Quoted 1 line
psr.psr2_enabled));
if (
dev_priv->psr.enabled) {
structdrm_dp_aux*aux = &dev_priv->psr.enabled-Quoted 1 line
aux;
Quoted 16 lines
drivers/gpu/drm/i915/i915_reg.h enum { · line 4072
Quoted 10 lines
drivers/gpu/drm/i915/i915_reg.h +1
-0@@ -4069,6 +4069,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 29You ignored my review from last time, please move this where the mask '
EDP_PSR_STATUS_STATE_MASK' is defined. The rest of the file maintains this consistently and there is no reason to change that.
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 61 lines · Vathsala
Quoted 51 lines · Dhinakaran Pandiyan
Quoted 49 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.
v2: rebase
v3: DK
Renamepsr2_live_statustopsr_source_statusCc Rodrigo Vivi <[email protected]>Cc Dhinakaran Pandiyan <[email protected]>Signed-off-by Vathsala Nagaraju <[email protected]>---
drivers/gpu/drm/i915/i915_debugfs.c | 66
+++++++++++++++++++++++--
------------
drivers/gpu/drm/i915/i915_reg.h | 1 +2 files changed, 43 insertions(+), 24 deletions(-)drivers/gpu/drm/i915/i915_debugfs.c +0
-0@@ -2596,25 +2596,42 @@ static inti915_guc_log_relay_release(struct
inode *inode, struct file *file)
.release =i915_guc_log_relay_release,
};drivers/gpu/drm/i915/i915_debugfs.c +0
-15-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" - };Quoted 8 lines
Quoted 7 lines
drivers/gpu/drm/i915/i915_debugfs.c +0
-2- - val = (val & EDP_PSR2_STATUS_STATE_MASK) >>
EDP_PSR2_STATUS_STATE_SHIFT;drivers/gpu/drm/i915/i915_debugfs.c +1
-2-if (val <ARRAY_SIZE (live_status)) -return live_status[val]; +static const char *psr_source_status(u32 val, bool
is_psr2_enabled)Please change this to
psr_source_status(drm_i915_private *dev_priv)
Quoted 9 lines
to print in format , source psr status %x [%s] , where %x = complete psr
source register value(0x6f940) , %s =psr_status_bits[31 :28/29]. if we want handle everything as part ofpsr_source_status(), then we
need to return register value in some pointer.
if not then we read the reg and then pass it topsr_source_statuswhich
returns live status string.
Pass struct seq_file *m to psr_source_status() and print the status there.
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx