drm/i915/psr: Share PSR and PSR2 exit mask
Subsystems (2)
PATCH 1/8 drm/i915/psr: Share PSR and PSR2 exit mask
Now both PSR and PSR2 have the same exit mask, so let's share then instead of have the same code 2 times.
--- drivers/gpu/drm/i915/intel_psr.c | 34 ++++++++++++-------------------- 1 file changed, 13 insertions(+), 21 deletions(-)
drivers/gpu/drm/i915/intel_psr.c +13 -21
@@ -575,28 +575,20 @@ static void intel_psr_enable_source(struct intel_dp *intel_dp,else chicken &= ~VSC_DATA_SEL_SOFTWARE_CONTROL ;I915_WRITE (CHICKEN_TRANS (cpu_transcoder), chicken); - -I915_WRITE (EDP_PSR_DEBUG , -EDP_PSR_DEBUG_MASK_MEMUP | -EDP_PSR_DEBUG_MASK_HPD | -EDP_PSR_DEBUG_MASK_LPSP | -EDP_PSR_DEBUG_MASK_MAX_SLEEP | -EDP_PSR_DEBUG_MASK_DISP_REG_WRITE ); - }else { -/* -* Per Spec: Avoid continuous PSR exit by masking MEMUP -* and HPD. also mask LPSP to avoid dependency on other -* drivers that might block runtime_pm besides -* preventing other hw tracking issues now we can rely -* on frontbuffer tracking. -*/ -I915_WRITE (EDP_PSR_DEBUG , -EDP_PSR_DEBUG_MASK_MEMUP | -EDP_PSR_DEBUG_MASK_HPD | -EDP_PSR_DEBUG_MASK_LPSP | -EDP_PSR_DEBUG_MASK_DISP_REG_WRITE | -EDP_PSR_DEBUG_MASK_MAX_SLEEP ); } + +/* +* Per Spec: Avoid continuous PSR exit by masking MEMUP and HPD also +* mask LPSP to avoid dependency on other drivers that might block +* runtime_pm besides preventing other hw tracking issues now we +* can rely on frontbuffer tracking. +*/ +I915_WRITE (EDP_PSR_DEBUG , +EDP_PSR_DEBUG_MASK_MEMUP | +EDP_PSR_DEBUG_MASK_HPD | +EDP_PSR_DEBUG_MASK_LPSP | +EDP_PSR_DEBUG_MASK_DISP_REG_WRITE | +EDP_PSR_DEBUG_MASK_MAX_SLEEP ); } static void intel_psr_enable_locked(struct drm_i915_private *dev_priv,
Signature · 6 lines
2.19.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/8 drm/i915/psr: Do not set MASK_DISP_REG_WRITE in ICL
ICL spec states that this bit is now reserved.
Spec: 7722
--- drivers/gpu/drm/i915/i915_reg.h | 4 ++-- drivers/gpu/drm/i915/intel_psr.c | 17 +++++++++++------ 2 files changed, 13 insertions(+), 8 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +2 -2
@@ -4195,7 +4195,7 @@ enum {#define EDP_PSR_DEBUG_MASK_LPSP (1 << 27)#define EDP_PSR_DEBUG_MASK_MEMUP (1 << 26)#define EDP_PSR_DEBUG_MASK_HPD (1 << 25) -#define EDP_PSR_DEBUG_MASK_DISP_REG_WRITE (1 << 16) +#define EDP_PSR_DEBUG_MASK_DISP_REG_WRITE (1 << 16)/* Reserved in ICL+ */ #define EDP_PSR_DEBUG_EXIT_ON_PIXEL_UNDERRUN (1 << 15)/* SKL+ */ #define EDP_PSR2_CTL _MMIO(0x6f900)
@@ -4232,7 +4232,7 @@ enum {#define PSR_EVENT_FRONT_BUFFER_MODIFY (1 << 9)#define PSR_EVENT_WD_TIMER_EXPIRE (1 << 8)#define PSR_EVENT_PIPE_REGISTERS_UPDATE (1 << 6) -#define PSR_EVENT_REGISTER_UPDATE (1 << 5) +#define PSR_EVENT_REGISTER_UPDATE (1 << 5)/* Reserved in ICL+ */ #define PSR_EVENT_HDCP_ENABLE (1 << 4)#define PSR_EVENT_KVMR_SESSION_ENABLE (1 << 3)#define PSR_EVENT_VBI_ENABLE (1 << 2)
drivers/gpu/drm/i915/intel_psr.c +11 -6
@@ -558,6 +558,7 @@ static void intel_psr_enable_source(struct intel_dp *intel_dp, {struct drm_i915_private *dev_priv =dp_to_i915 (intel_dp);enum transcoder cpu_transcoder = crtc_state->cpu_transcoder; +u32 mask;/* Only HSW and BDW have PSR AUX registers that need to be setup. SKL+ * use hardcoded values PSR AUX transactions
@@ -583,12 +584,16 @@ static void intel_psr_enable_source(struct intel_dp *intel_dp,* runtime_pm besides preventing other hw tracking issues now we * can rely on frontbuffer tracking. */ -I915_WRITE (EDP_PSR_DEBUG , -EDP_PSR_DEBUG_MASK_MEMUP | -EDP_PSR_DEBUG_MASK_HPD | -EDP_PSR_DEBUG_MASK_LPSP | -EDP_PSR_DEBUG_MASK_DISP_REG_WRITE | -EDP_PSR_DEBUG_MASK_MAX_SLEEP ); + mask =EDP_PSR_DEBUG_MASK_MEMUP | +EDP_PSR_DEBUG_MASK_HPD | +EDP_PSR_DEBUG_MASK_LPSP | +EDP_PSR_DEBUG_MASK_DISP_REG_WRITE | +EDP_PSR_DEBUG_MASK_MAX_SLEEP ; + +if (INTEL_GEN (dev_priv) >=11 ) + mask &= ~EDP_PSR_DEBUG_MASK_DISP_REG_WRITE ; + +I915_WRITE (EDP_PSR_DEBUG , mask); } static void intel_psr_enable_locked(struct drm_i915_private *dev_priv,
Signature · 6 lines
2.19.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/8] drm/i915/psr: Do not set MASK_DISP_REG_WRITE in ICL
Quoted 1 line · PDT José Roberto de Souza
ICL spec states that this bit is now reserved.
It reads better if you state the bit name and register in the commit message. With this nit addressed,
Quoted 2 lines
Spec: 7722
Change this to Bspec: 7722 to be clear? But, I don't know if there is a tag that we consistently use for citing bspec.
Quoted 55 lines
Cc Dhinakaran Pandiyan <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>--- drivers/gpu/drm/i915/i915_reg.h | 4 ++-- drivers/gpu/drm/i915/intel_psr.c | 17 +++++++++++------ 2 files changed, 13 insertions(+), 8 deletions(-)(quoted diff) +0
-0
b/drivers/gpu/drm/i915/i915_reg.hindex4948b352bf4c..4dd5290a3b95100644drivers/gpu/drm/i915/i915_reg.h +1
-1@@ -4195,7 +4195,7 @@ enum {#define EDP_PSR_DEBUG_MASK_LPSP (1 << 27)#define EDP_PSR_DEBUG_MASK_MEMUP (1 << 26)#define EDP_PSR_DEBUG_MASK_HPD (1 << 25) -#define EDP_PSR_DEBUG_MASK_DISP_REG_WRITE (1 << 16) +#define EDP_PSR_DEBUG_MASK_DISP_REG_WRITE (1 << 16)/* Reserved in ICL+ */ #define
EDP_PSR_DEBUG_EXIT_ON_PIXEL_UNDERRUN(1 << 15) /* SKL+ */#define
EDP_PSR2_CTL_MMIO(0x6f900)drivers/gpu/drm/i915/i915_reg.h +1
-1@@ -4232,7 +4232,7 @@ enum {#define PSR_EVENT_FRONT_BUFFER_MODIFY (1 << 9)#define PSR_EVENT_WD_TIMER_EXPIRE (1 << 8)#define PSR_EVENT_PIPE_REGISTERS_UPDATE (1 << 6) -#define PSR_EVENT_REGISTER_UPDATE (1 << 5) +#define PSR_EVENT_REGISTER_UPDATE (1 << 5)/* Reserved in ICL+ */ #define PSR_EVENT_HDCP_ENABLE (1 << 4)#define PSR_EVENT_KVMR_SESSION_ENABLE (1 << 3)#define PSR_EVENT_VBI_ENABLE (1 << 2)(quoted diff) +0
-0
b/drivers/gpu/drm/i915/intel_psr.cindex358bbcd3b5f3..6f3c6f0c539f100644drivers/gpu/drm/i915/intel_psr.c +4
-6@@ -558,6 +558,7 @@ static void intel_psr_enable_source(struct intel_dp *intel_dp, {struct drm_i915_private *dev_priv =dp_to_i915 (intel_dp);enum transcoder cpu_transcoder = crtc_state->cpu_transcoder; +u32 mask;/* Only HSW and BDW have PSR AUX registers that need to be setup. SKL+ * use hardcoded values PSR AUX transactions @@ -583,12 +584,16 @@ static void intel_psr_enable_source(struct intel_dp*intel_dp, * runtime_pm besides preventing other hw tracking issues now we * can rely on frontbuffer tracking. */ -I915_WRITE (EDP_PSR_DEBUG , -EDP_PSR_DEBUG_MASK_MEMUP | -EDP_PSR_DEBUG_MASK_HPD | -EDP_PSR_DEBUG_MASK_LPSP | -EDP_PSR_DEBUG_MASK_DISP_REG_WRITE | -EDP_PSR_DEBUG_MASK_MAX_SLEEP ); + mask =EDP_PSR_DEBUG_MASK_MEMUP | +EDP_PSR_DEBUG_MASK_HPD | + EDP_PSR_DEBUG_MASK_LPSP |
drivers/gpu/drm/i915/intel_psr.c static void intel_psr_enable_source(struct intel_dp · line 599
Quoted 10 lines
drivers/gpu/drm/i915/intel_psr.c +7
-0+EDP_PSR_DEBUG_MASK_DISP_REG_WRITE | +EDP_PSR_DEBUG_MASK_MAX_SLEEP ; + +if (INTEL_GEN (dev_priv) >=11 ) + mask &= ~EDP_PSR_DEBUG_MASK_DISP_REG_WRITE ; + +I915_WRITE (EDP_PSR_DEBUG , mask); } static void intel_psr_enable_locked(struct drm_i915_private *dev_priv,
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula
maintainerRe: [PATCH 2/8] drm/i915/psr: Do not set MASK_DISP_REG_WRITE in ICL
In reply to José Roberto de SouzaQuoted 53 lines · José Roberto de Souza
ICL spec states that this bit is now reserved.
Spec: 7722
Cc Dhinakaran Pandiyan <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>--- drivers/gpu/drm/i915/i915_reg.h | 4 ++-- drivers/gpu/drm/i915/intel_psr.c | 17 +++++++++++------ 2 files changed, 13 insertions(+), 8 deletions(-)drivers/gpu/drm/i915/i915_reg.h +2
-2@@ -4195,7 +4195,7 @@ enum {#define EDP_PSR_DEBUG_MASK_LPSP (1 << 27)#define EDP_PSR_DEBUG_MASK_MEMUP (1 << 26)#define EDP_PSR_DEBUG_MASK_HPD (1 << 25) -#define EDP_PSR_DEBUG_MASK_DISP_REG_WRITE (1 << 16) +#define EDP_PSR_DEBUG_MASK_DISP_REG_WRITE (1 << 16)/* Reserved in ICL+ */ #define EDP_PSR_DEBUG_EXIT_ON_PIXEL_UNDERRUN (1 << 15)/* SKL+ */ #define EDP_PSR2_CTL _MMIO(0x6f900)@@ -4232,7 +4232,7 @@ enum {#define PSR_EVENT_FRONT_BUFFER_MODIFY (1 << 9)#define PSR_EVENT_WD_TIMER_EXPIRE (1 << 8)#define PSR_EVENT_PIPE_REGISTERS_UPDATE (1 << 6) -#define PSR_EVENT_REGISTER_UPDATE (1 << 5) +#define PSR_EVENT_REGISTER_UPDATE (1 << 5)/* Reserved in ICL+ */ #define PSR_EVENT_HDCP_ENABLE (1 << 4)#define PSR_EVENT_KVMR_SESSION_ENABLE (1 << 3)#define PSR_EVENT_VBI_ENABLE (1 << 2)drivers/gpu/drm/i915/intel_psr.c +1
-4@@ -558,6 +558,7 @@ static void intel_psr_enable_source(struct intel_dp *intel_dp, {struct drm_i915_private *dev_priv =dp_to_i915 (intel_dp);enum transcoder cpu_transcoder = crtc_state->cpu_transcoder; +u32 mask;/* Only HSW and BDW have PSR AUX registers that need to be setup. SKL+ * use hardcoded values PSR AUX transactions @@ -583,12 +584,16 @@ static void intel_psr_enable_source(struct intel_dp *intel_dp,* runtime_pm besides preventing other hw tracking issues now we * can rely on frontbuffer tracking. */ - I915_WRITE(EDP_PSR_DEBUG, - EDP_PSR_DEBUG_MASK_MEMUP | - EDP_PSR_DEBUG_MASK_HPD | - EDP_PSR_DEBUG_MASK_LPSP |
drivers/gpu/drm/i915/intel_psr.c static void intel_psr_enable_source(struct intel_dp *intel_dp, · line 594
Quoted 10 lines
drivers/gpu/drm/i915/intel_psr.c +8
-2-EDP_PSR_DEBUG_MASK_DISP_REG_WRITE | - EDP_PSR_DEBUG_MASK_MAX_SLEEP); + mask =EDP_PSR_DEBUG_MASK_MEMUP | +EDP_PSR_DEBUG_MASK_HPD | +EDP_PSR_DEBUG_MASK_LPSP | +EDP_PSR_DEBUG_MASK_DISP_REG_WRITE | +EDP_PSR_DEBUG_MASK_MAX_SLEEP ; + +if (INTEL_GEN (dev_priv) >=11 ) + mask &= ~EDP_PSR_DEBUG_MASK_DISP_REG_WRITE ;
Seems better to |= this on gen < 11 rather than &= ~ on gen >= 11.
BR,
Jani.
Quoted 5 lines
drivers/gpu/drm/i915/intel_psr.c +2
-0+ +I915_WRITE (EDP_PSR_DEBUG , mask); } static void intel_psr_enable_locked(struct drm_i915_private *dev_priv,
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/8 drm/i915/psr: Enable sink to trigger a interruption on PSR2 CRC mismatch
In reply to José Roberto de SouzaeDP spec states 2 different bits to enable sink to trigger a interruption when there is a CRC mismatch. DP_PSR_CRC_VERIFICATION is for PSR only and DP_PSR_IRQ_HPD_WITH_CRC_ERRORS is for PSR2 only.
--- drivers/gpu/drm/i915/intel_psr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_psr.c +1 -1
@@ -340,7 +340,7 @@ static void intel_psr_enable_sink(struct intel_dp *intel_dp)if (dev_priv->psr.psr2_enabled) {drm_dp_dpcd_writeb (&intel_dp->aux,DP_RECEIVER_ALPM_CONFIG ,DP_ALPM_ENABLE ); - dpcd_val |=DP_PSR_ENABLE_PSR2 ; + dpcd_val |=DP_PSR_ENABLE_PSR2 |DP_PSR_IRQ_HPD_WITH_CRC_ERRORS ; }if (dev_priv->psr.link_standby)
Signature · 6 lines
2.19.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 3/8] drm/i915/psr: Enable sink to trigger a interruption on PSR2 CRC mismatch
Quoted 25 lines · José Roberto de Souza
eDP spec states 2 different bits to enable sink to trigger a interruption when there is a CRC mismatch.
DP_PSR_CRC_VERIFICATIONis for PSR only andDP_PSR_IRQ_HPD_WITH_CRC_ERRORSis for PSR2 only.Cc Dhinakaran Pandiyan <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>--- drivers/gpu/drm/i915/intel_psr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/intel_psr.c +1
-1@@ -340,7 +340,7 @@ static void intel_psr_enable_sink(struct intel_dp *intel_dp)if (dev_priv->psr.psr2_enabled) {drm_dp_dpcd_writeb (&intel_dp->aux,DP_RECEIVER_ALPM_CONFIG ,DP_ALPM_ENABLE ); - dpcd_val |=DP_PSR_ENABLE_PSR2 ; + dpcd_val |=DP_PSR_ENABLE_PSR2 |DP_PSR_IRQ_HPD_WITH_CRC_ERRORS ;
Quoted 1 line
}
} else if (INTEL_GEN(dev_priv) >=8) {
dpcd_val |= DP_PSR_CRC_VERIFICATION;
}How about doing this for clarity?
Quoted 2 lines
if (
dev_priv->psr.link_standby)
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 3/8] drm/i915/psr: Enable sink to trigger a interruption on PSR2 CRC mismatch
Quoted 5 lines · Dhinakaran
Quoted 4 lines · José Roberto de Souza
eDP spec states 2 different bits to enable sink to trigger a interruption when there is a CRC mismatch.
DP_PSR_CRC_VERIFICATIONis for PSR only andDP_PSR_IRQ_HPD_WITH_CRC_ERRORSis for PSR2 only.
Do you have a system that triggers a short pulse for this? If yes, do we end up calling the PSR error interrupt handler at all?
intel_dp_short_pulse()
... if intel_dp_needs_link_retrain() return intel_psr_short_pulse()
Quoted 34 lines
Quoted 21 lines
Cc Dhinakaran Pandiyan <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>--- drivers/gpu/drm/i915/intel_psr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/intel_psr.c +0
-0@@ -340,7 +340,7 @@ static void intel_psr_enable_sink(struct
intel_dp*intel_dp)drivers/gpu/drm/i915/intel_psr.c +0
-0if (dev_priv->psr.psr2_enabled) { drm_dp_dpcd_writeb(&intel_dp->aux,
DP_RECEIVER_ALPM_CONFIG,drivers/gpu/drm/i915/intel_psr.c +1
-1DP_ALPM_ENABLE); - dpcd_val |=DP_PSR_ENABLE_PSR2 ; + dpcd_val |= DP_PSR_ENABLE_PSR2 |Quoted 2 lines
DP_PSR_IRQ_HPD_WITH_CRC_ERRORS;
}} else if (INTEL_GEN(dev_priv) >=8) { dpcd_val |= DP_PSR_CRC_VERIFICATION; }How about doing this for clarity?
Quoted 1 line
Quoted 7 lines
Quoted 1 line
if (
dev_priv->psr.link_standby)_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 4/8 drm/i915/psr: Remove PSR2 TODO error handling
In reply to José Roberto de SouzaWe are already handling all PSR2 errors, so we can drop this TODO.
--- drivers/gpu/drm/i915/intel_psr.c | 2 -- 1 file changed, 2 deletions(-)
drivers/gpu/drm/i915/intel_psr.c +0 -2
@@ -1127,8 +1127,6 @@ void intel_psr_short_pulse(struct intel_dp *intel_dp)intel_psr_disable_locked (intel_dp);/* clear status register */ drm_dp_dpcd_writeb (&intel_dp->aux,DP_PSR_ERROR_STATUS , val); - -/* TODO: handle PSR2 errors */ exit:mutex_unlock (&psr->lock); }
Signature · 6 lines
2.19.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 4/8] drm/i915/psr: Remove PSR2 TODO error handling
Quoted 1 line · José Roberto de Souza
We are already handling all PSR2 errors, so we can drop this TODO.
Yes, we can remove it to thanks to all the work you have been doing.
Quoted 21 lines
Cc Dhinakaran Pandiyan <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>--- drivers/gpu/drm/i915/intel_psr.c | 2 -- 1 file changed, 2 deletions(-)drivers/gpu/drm/i915/intel_psr.c +0
-2@@ -1127,8 +1127,6 @@ void intel_psr_short_pulse(struct intel_dp *intel_dp)intel_psr_disable_locked (intel_dp);/* clear status register */ drm_dp_dpcd_writeb (&intel_dp->aux,DP_PSR_ERROR_STATUS , val); - -/* TODO: handle PSR2 errors */ exit:
Quoted 2 lines
mutex_unlock(&psr->lock);
}
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 5/8 drm/i915/psr: Do not enable PSR2 if sink requires selective update X granularity
In reply to José Roberto de SouzaAccording to eDP spec, sink could required a granularity in the start of x coordinate or in the width of the selective update region. As it is not supported by hardware, lets not enable PSR2 in sinks that requires it.
--- drivers/gpu/drm/i915/intel_psr.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_psr.c +4 -1
@@ -243,6 +243,8 @@ void intel_psr_init_dpcd(struct intel_dp *intel_dp)bool y_req = intel_dp->psr_dpcd[1 ] &DP_PSR2_SU_Y_COORDINATE_REQUIRED ;bool alpm =intel_dp_get_alpm_status (intel_dp); +bool granularity_req = (intel_dp->psr_dpcd[1 ] & +DP_PSR2_SU_GRANULARITY_REQUIRED );/* * All panels that supports PSR version 03h (PSR2 +
@@ -255,7 +257,8 @@ void intel_psr_init_dpcd(struct intel_dp *intel_dp)* Y-coordinate requirement panels we would need to enable * GTC first. */ - dev_priv->psr.sink_psr2_support = y_req && alpm; + dev_priv->psr.sink_psr2_support = y_req && alpm && + !granularity_req;DRM_DEBUG_KMS ("PSR2 %ssupported\n" , dev_priv->psr.sink_psr2_support ?"" :"not " );
Signature · 6 lines
2.19.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 5/8] drm/i915/psr: Do not enable PSR2 if sink requires selective update X granularity
Quoted 3 lines · José Roberto de Souza
According to eDP spec, sink could required a granularity in the start of x coordinate or in the width of the selective update region. As it is not supported by hardware,
I think this warrants an explanation, what is not supported in hardware? A certain granularity that a specific sink expects?
Even if the sink does not require a specific granularity, the source has to support the standard granularity values (x%16 = w%4 = y%1 = 0). Another sink can have these standard values, supported by hardware, as a requirement and your patch will disable PSR2 on it.
-DK
Quoted 36 lines
lets not enable PSR2 in sinks
that requires it.Cc Dhinakaran Pandiyan <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>--- drivers/gpu/drm/i915/intel_psr.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_psr.c +2
-0@@ -243,6 +243,8 @@ void intel_psr_init_dpcd(struct intel_dp *intel_dp)bool y_req = intel_dp->psr_dpcd[1 ] &DP_PSR2_SU_Y_COORDINATE_REQUIRED ;bool alpm =intel_dp_get_alpm_status (intel_dp); +bool granularity_req = (intel_dp->psr_dpcd[1 ] & +DP_PSR2_SU_GRANULARITY_REQUI RED);drivers/gpu/drm/i915/intel_psr.c +0
-0/* * All panels that supports PSR version 03h (PSR2 + @@ -255,7 +257,8 @@ void intel_psr_init_dpcd(struct intel_dp *intel_dp) * Y-coordinate requirement panels we would need toenable
drivers/gpu/drm/i915/intel_psr.c +2
-1* GTC first. */ - dev_priv->psr.sink_psr2_support = y_req && alpm; + dev_priv->psr.sink_psr2_support = y_req && alpm && + !granularity_req; DRM_DEBUG_KMS("PSR2 %ssupported\n", dev_priv->psr.sink_psr2_support ? "" :
Quoted 2 lines
"not ");
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 5/8] drm/i915/psr: Do not enable PSR2 if sink requires selective update X granularity
Quoted 9 lines · On Mon, 2018-09-24 at 23:23 -0700, [email protected] wrote:
Quoted 4 lines · José Roberto de Souza
According to eDP spec, sink could required a granularity in the start of x coordinate or in the width of the selective update region.
As it is not supported by hardware,I think this warrants an explanation, what is not supported in hardware? A certain granularity that a specific sink expects?
Quoted 6 lines
Even if the sink does not require a specific granularity, the source has to support the standard granularity values (x%16 = w%4 = y%1 = 0).
Another sink can have these standard values, supported by hardware, as
a requirement and your patch will disable PSR2 on it.
I add this to the commit message but source supports the standard granularity but if sink requires a different one(checking it by reading this bit), source should read 2 other registers with x and width granularity send selective update respecting it.
Quoted 27 lines
-DK
Quoted 23 lines
lets not enable PSR2 in sinks
that requires it.Cc Dhinakaran Pandiyan <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>--- drivers/gpu/drm/i915/intel_psr.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_psr.c +2
-0@@ -243,6 +243,8 @@ void intel_psr_init_dpcd(struct intel_dp *intel_dp)bool y_req = intel_dp->psr_dpcd[1 ] &DP_PSR2_SU_Y_COORDINATE_REQUIRED ;bool alpm =intel_dp_get_alpm_status (intel_dp); +bool granularity_req = (intel_dp->psr_dpcd[1 ] & +DP_PSR2_SU_GRANULARITY_REQUI RED);
Quoted 15 lines
Quoted 13 lines
drivers/gpu/drm/i915/intel_psr.c +0
-0/* * All panels that supports PSR version 03h (PSR2 + @@ -255,7 +257,8 @@ void intel_psr_init_dpcd(struct intel_dp *intel_dp) * Y-coordinate requirement panels we would need toenable
drivers/gpu/drm/i915/intel_psr.c +2
-1* GTC first. */ - dev_priv->psr.sink_psr2_support = y_req && alpm; + dev_priv->psr.sink_psr2_support = y_req && alpm && + !granularity_req; DRM_DEBUG_KMS("PSR2 %ssupported\n", dev_priv->psr.sink_psr2_support ? "" :Quoted 2 lines
"not ");
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 6/8 drm/i915/psr: Use WA to force HW tracking to exit PSR2
In reply to José Roberto de SouzaThis WA also works fine for PSR2, triggering a selective update when possible.
--- drivers/gpu/drm/i915/intel_psr.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-)
drivers/gpu/drm/i915/intel_psr.c +10 -14
@@ -1026,20 +1026,16 @@ void intel_psr_flush(struct drm_i915_private *dev_priv,/* By definition flush = invalidate + flush */ if (frontbuffer_bits) { -if (dev_priv->psr.psr2_enabled) { -intel_psr_exit (dev_priv); - }else { -/* -* Display WA #0884: all -* This documented WA for bxt can be safely applied -* broadly so we can force HW tracking to exit PSR -* instead of disabling and re-enabling. -* Workaround tells us to write 0 to CUR_SURFLIVE_A, -* but it makes more sense write to the current active -* pipe. -*/ -I915_WRITE (CURSURFLIVE (pipe),0 ); - } +/* +* Display WA #0884: all +* This documented WA for bxt can be safely applied +* broadly so we can force HW tracking to exit PSR +* instead of disabling and re-enabling. +* Workaround tells us to write 0 to CUR_SURFLIVE_A, +* but it makes more sense write to the current active +* pipe. +*/ +I915_WRITE (CURSURFLIVE (pipe),0 ); }if (!dev_priv->psr.active && !dev_priv->psr.busy_frontbuffer_bits)
Signature · 6 lines
2.19.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 6/8] drm/i915/psr: Use WA to force HW tracking to exit PSR2
Quoted 2 lines · José Roberto de Souza
This WA also works fine for PSR2, triggering a selective update when possible.
Oh! really?! It didn't work when I chacked on my CNL, but we probably had other bugs back there...
Thanks for finding this
Quoted 46 lines
Cc Dhinakaran Pandiyan <[email protected]>Cc Rodrigo Vivi <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>--- drivers/gpu/drm/i915/intel_psr.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-)drivers/gpu/drm/i915/intel_psr.c +10
-14@@ -1026,20 +1026,16 @@ void intel_psr_flush(struct drm_i915_private *dev_priv,/* By definition flush = invalidate + flush */ if (frontbuffer_bits) { -if (dev_priv->psr.psr2_enabled) { -intel_psr_exit (dev_priv); - }else { -/* -* Display WA #0884: all -* This documented WA for bxt can be safely applied -* broadly so we can force HW tracking to exit PSR -* instead of disabling and re-enabling. -* Workaround tells us to write 0 to CUR_SURFLIVE_A, -* but it makes more sense write to the current active -* pipe. -*/ -I915_WRITE (CURSURFLIVE (pipe),0 ); - } +/* +* Display WA #0884: all +* This documented WA for bxt can be safely applied +* broadly so we can force HW tracking to exit PSR +* instead of disabling and re-enabling. +* Workaround tells us to write 0 to CUR_SURFLIVE_A, +* but it makes more sense write to the current active +* pipe. +*/ +I915_WRITE (CURSURFLIVE (pipe),0 ); }if (!dev_priv->psr.active && !dev_priv->psr.busy_frontbuffer_bits)Signature · 1 line
2.19.0
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 6/8] drm/i915/psr: Use WA to force HW tracking to exit PSR2
Quoted 8 lines · Rodrigo Vivi
Quoted 3 lines · José Roberto de Souza
This WA also works fine for PSR2, triggering a selective update when
possible.Oh! really?! It didn't work when I chacked on my CNL, but we probably had other bugs back there...
Tested in WHL and ICL, I will give a try in CNL.
Quoted 61 lines
Thanks for finding this
Reviewed-by Rodrigo Vivi <[email protected]>Quoted 53 lines
Cc Dhinakaran Pandiyan <[email protected]>Cc Rodrigo Vivi <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>--- drivers/gpu/drm/i915/intel_psr.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-)drivers/gpu/drm/i915/intel_psr.c +0
-6@@ -1026,20 +1026,16 @@ void intel_psr_flush(struct drm_i915_private *dev_priv, /* By definition flush = invalidate + flush */ if (frontbuffer_bits) { - if (dev_priv->psr.psr2_enabled) { -intel_psr_exit (dev_priv ); - } else { -/* -* Display WA #0884: all -* This documented WA for bxt can be safely applied
drivers/gpu/drm/i915/intel_psr.c +0
-1-* broadly so we can force HW tracking to exit PSR
drivers/gpu/drm/i915/intel_psr.c +0
-2-* instead of disabling and re-enabling. -* Workaround tells us to write 0 to
CUR_SURFLIVE_A,drivers/gpu/drm/i915/intel_psr.c +0
-1-* but it makes more sense write to the current active
drivers/gpu/drm/i915/intel_psr.c +10
-4-* pipe. -*/ -I915_WRITE (CURSURFLIVE (pipe),0 ); - } +/* +* Display WA #0884: all +* This documented WA for bxt can be safely applied +* broadly so we can force HW tracking to exit PSR +* instead of disabling and re-enabling. +* Workaround tells us to write 0 to CUR_SURFLIVE_A, +* but it makes more sense write to the current active +* pipe. +*/ +I915_WRITE (CURSURFLIVE (pipe),0 ); } if (!dev_priv->psr.active && !dev_priv-Quoted 1 line
psr.busy_frontbuffer_bits)
Signature · 1 line
2.19.0
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[email protected]
Acked-by Dhinakaran PandiyanRe: [PATCH 6/8] drm/i915/psr: Use WA to force HW tracking to exit PSR2
Quoted 17 lines · Jose
Quoted 8 lines · Rodrigo Vivi
Quoted 3 lines · José Roberto de Souza
This WA also works fine for PSR2, triggering a selective update when
possible.Oh! really?! It didn't work when I chacked on my CNL, but we probably had other bugs back there...
Tested in WHL and ICL, I will give a try in CNL.
Quoted 5 lines
Thanks for finding this
Reviewed-by Rodrigo Vivi <[email protected]>
I haven't checked myself but from what I understand it should work
Quoted 61 lines
Quoted 61 lines
Quoted 61 lines
Cc Dhinakaran Pandiyan <[email protected]>Cc Rodrigo Vivi <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>--- drivers/gpu/drm/i915/intel_psr.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-)drivers/gpu/drm/i915/intel_psr.c +0
-6@@ -1026,20 +1026,16 @@ void intel_psr_flush(struct drm_i915_private *dev_priv, /* By definition flush = invalidate + flush */ if (frontbuffer_bits) { - if (dev_priv->psr.psr2_enabled) { -intel_psr_exit (dev_priv ); - } else { -/* -* Display WA #0884: all -* This documented WA for bxt can be safely
applieddrivers/gpu/drm/i915/intel_psr.c +0
-1-* broadly so we can force HW tracking to exit
PSRdrivers/gpu/drm/i915/intel_psr.c +0
-2-* instead of disabling and re-enabling. -* Workaround tells us to write 0 to
CUR_SURFLIVE_A,drivers/gpu/drm/i915/intel_psr.c +0
-1-* but it makes more sense write to the current
activedrivers/gpu/drm/i915/intel_psr.c +3
-4-* pipe. -*/ -I915_WRITE (CURSURFLIVE (pipe),0 ); - } +/* +* Display WA #0884: all +* This documented WA for bxt can be safely applied
drivers/gpu/drm/i915/intel_psr.c +1
-0+* broadly so we can force HW tracking to exit PSR
drivers/gpu/drm/i915/intel_psr.c +2
-0+* instead of disabling and re-enabling. +* Workaround tells us to write 0 to
CUR_SURFLIVE_A,drivers/gpu/drm/i915/intel_psr.c +1
-0+* but it makes more sense write to the current active
drivers/gpu/drm/i915/intel_psr.c +3
-0+* pipe. +*/ +I915_WRITE (CURSURFLIVE (pipe),0 ); } if (!dev_priv->psr.active && !dev_priv-Quoted 1 line
psr.busy_frontbuffer_bits)
Quoted 8 lines
Quoted 3 lines
Quoted 3 lines
Signature · 1 line
2.19.0_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 7/8 drm/i915/psr: Don't tell sink that main link will be active in PSR2
In reply to José Roberto de SouzaFor PSR2 we don't have the option to keep main link enabled while PSR2 is active, so don't configure sink DPCD with a wrong value.
--- drivers/gpu/drm/i915/intel_psr.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/intel_psr.c +5 -4
@@ -344,12 +344,13 @@ static void intel_psr_enable_sink(struct intel_dp *intel_dp)drm_dp_dpcd_writeb (&intel_dp->aux,DP_RECEIVER_ALPM_CONFIG ,DP_ALPM_ENABLE ); dpcd_val |=DP_PSR_ENABLE_PSR2 |DP_PSR_IRQ_HPD_WITH_CRC_ERRORS ; + }else { +if (dev_priv->psr.link_standby) + dpcd_val |=DP_PSR_MAIN_LINK_ACTIVE ; +if (INTEL_GEN (dev_priv) >=8 ) + dpcd_val |=DP_PSR_CRC_VERIFICATION ; } -if (dev_priv->psr.link_standby) - dpcd_val |=DP_PSR_MAIN_LINK_ACTIVE ; -if (!dev_priv->psr.psr2_enabled &&INTEL_GEN (dev_priv) >=8 ) - dpcd_val |=DP_PSR_CRC_VERIFICATION ;drm_dp_dpcd_writeb (&intel_dp->aux,DP_PSR_EN_CFG , dpcd_val);drm_dp_dpcd_writeb (&intel_dp->aux,DP_SET_POWER ,DP_SET_POWER_D0 );
Signature · 6 lines
2.19.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 7/8] drm/i915/psr: Don't tell sink that main link will be active in PSR2
Quoted 2 lines · José Roberto de Souza
For PSR2 we don't have the option to keep main link enabled while PSR2 is active, so don't configure sink DPCD with a wrong value.
Is this what the DP spec says or an Intel HW restriction?
-DK
Quoted 33 lines
Cc Dhinakaran Pandiyan <[email protected]>sSigned-off-by José Roberto de Souza <[email protected]>--- drivers/gpu/drm/i915/intel_psr.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/intel_psr.c +5
-4@@ -344,12 +344,13 @@ static void intel_psr_enable_sink(struct intel_dp *intel_dp) drm_dp_dpcd_writeb(&intel_dp->aux,DP_RECEIVER_ALPM_CONFIG , DP_ALPM_ENABLE); dpcd_val |=DP_PSR_ENABLE_PSR2 |DP_PSR_IRQ_HPD_WITH_CRC_ERRORS ; + }else { +if (dev_priv->psr.link_standby) + dpcd_val |=DP_PSR_MAIN_LINK_ACTIVE ; +if (INTEL_GEN (dev_priv) >=8 ) + dpcd_val |=DP_PSR_CRC_VERIFICATION ; } -if (dev_priv->psr.link_standby) - dpcd_val |=DP_PSR_MAIN_LINK_ACTIVE ; -if (!dev_priv->psr.psr2_enabled &&INTEL_GEN (dev_priv) >=8 ) - dpcd_val |=DP_PSR_CRC_VERIFICATION ;drivers/gpu/drm/i915/intel_psr.c +0
-0drm_dp_dpcd_writeb (&intel_dp->aux,DP_PSR_EN_CFG , dpcd_val); drm_dp_dpcd_writeb(&intel_dp->aux, DP_SET_POWER,
Quoted 1 line
DP_SET_POWER_D0);
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 7/8] drm/i915/psr: Don't tell sink that main link will be active in PSR2
Quoted 5 lines · On Mon, 2018-09-24 at 23:02 -0700, [email protected] wrote:
Quoted 2 lines · José Roberto de Souza
For PSR2 we don't have the option to keep main link enabled while PSR2 is active, so don't configure sink DPCD with a wrong value.
Is this what the DP spec says or an Intel HW restriction?
This is Intel HW restriction as there is no register in PSR2 CTL to keep link in standby, DP spec states that link can be kept on or off while PSR2 is active, there is just a new timming restriction to turn link off.
Quoted 29 lines
-DK
Quoted 26 lines
Cc Dhinakaran Pandiyan <[email protected]>sSigned-off-by José Roberto de Souza <[email protected]>--- drivers/gpu/drm/i915/intel_psr.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/intel_psr.c +5
-0@@ -344,12 +344,13 @@ static void intel_psr_enable_sink(struct intel_dp *intel_dp) drm_dp_dpcd_writeb(&intel_dp->aux,DP_RECEIVER_ALPM_CONFIG , DP_ALPM_ENABLE); dpcd_val |=DP_PSR_ENABLE_PSR2 |DP_PSR_IRQ_HPD_WITH_CRC_ERRORS ; + }else { +if (dev_priv->psr.link_standby) + dpcd_val |=DP_PSR_MAIN_LINK_ACTIVE ; +if (INTEL_GEN (dev_priv) >=8 ) + dpcd_val |=DP_PSR_CRC_VERIFICATION ; }
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/i915/intel_psr.c +0
-4-if (dev_priv->psr.link_standby) - dpcd_val |=DP_PSR_MAIN_LINK_ACTIVE ; -if (!dev_priv->psr.psr2_enabled &&INTEL_GEN (dev_priv) >=8 ) - dpcd_val |=DP_PSR_CRC_VERIFICATION ;drivers/gpu/drm/i915/intel_psr.c +0
-0drm_dp_dpcd_writeb (&intel_dp->aux,DP_PSR_EN_CFG , dpcd_val); drm_dp_dpcd_writeb(&intel_dp->aux, DP_SET_POWER,
DP_SET_POWER_D0);
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 7/8] drm/i915/psr: Don't tell sink that main link will be active in PSR2
Quoted 6 lines · Jose
Quoted 4 lines · On Mon, 2018-09-24 at 23:02 -0700, [email protected] wrote:
Quoted 2 lines · José Roberto de Souza
For PSR2 we don't have the option to keep main link enabled while PSR2 is active, so don't configure sink DPCD with a wrong value.
Quoted 6 lines
Quoted 1 line
Is this what the DP spec says or an Intel HW restriction?
This is Intel HW restriction as there is no register in PSR2 CTL to keep link in standby, DP spec states that link can be kept on or off while PSR2 is active, there is just a new timming restriction to turn link off.
I will update the commit message to make it clear:
For PSR2 there is no register to tell HW to keep main link enabled while PSR2 is active, so don't configure sink DPCD with a wrong value.
Quoted 36 lines
Quoted 36 lines
-DK
Quoted 32 lines
Cc Dhinakaran Pandiyan <[email protected]>sSigned-off-by José Roberto de Souza <[email protected]>--- drivers/gpu/drm/i915/intel_psr.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/intel_psr.c +5
-4@@ -344,12 +344,13 @@ static void intel_psr_enable_sink(struct intel_dp *intel_dp) drm_dp_dpcd_writeb(&intel_dp->aux,DP_RECEIVER_ALPM_CONFIG , DP_ALPM_ENABLE); dpcd_val |=DP_PSR_ENABLE_PSR2 |DP_PSR_IRQ_HPD_WITH_CRC_ERRORS ; + }else { +if (dev_priv->psr.link_standby) + dpcd_val |=DP_PSR_MAIN_LINK_ACTIVE ; +if (INTEL_GEN (dev_priv) >=8 ) + dpcd_val |=DP_PSR_CRC_VERIFICATION ; } -if (dev_priv->psr.link_standby) - dpcd_val |=DP_PSR_MAIN_LINK_ACTIVE ; -if (!dev_priv->psr.psr2_enabled &&INTEL_GEN (dev_priv) >=8 ) - dpcd_val |=DP_PSR_CRC_VERIFICATION ;
drm_dp_dpcd_writeb(&intel_dp->aux, DP_PSR_EN_CFG, dpcd_val);
Quoted 7 lines
Quoted 2 lines
Quoted 2 lines
drm_dp_dpcd_writeb(&intel_dp->aux,
DP_SET_POWER,DP_SET_POWER_D0);_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 8/8 drm/i915/psr: Remove alpm from i915_psr
In reply to José Roberto de SouzaALPM is a requirement and we don't need to keep it's cached, what were done in commit 97c9de66ca80
("drm/i915/psr: Fix ALPM cap check for PSR2") but the alpm was not removed from i915_psr.
--- drivers/gpu/drm/i915/i915_drv.h | 1 - 1 file changed, 1 deletion(-)
drivers/gpu/drm/i915/i915_drv.h +0 -1
@@ -630,7 +630,6 @@ struct i915_psr {bool sink_psr2_support;bool link_standby;bool colorimetry_support; -bool alpm;bool psr2_enabled;u8 sink_sync_latency;ktime_t last_entry_attempt;
Signature · 6 lines
2.19.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 8/8] drm/i915/psr: Remove alpm from i915_psr
Quoted 4 lines · José Roberto de Souza
ALPM is a requirement and we don't need to keep it's cached, what were done in commit
97c9de66ca80
("drm/i915/psr: Fix ALPM cap check for PSR2") but the alpm was not removed fromi915_psr.:
You're right.
drivers/gpu/drm/i915/i915_drv.h struct i915_psr {
Quoted 13 lines
Cc Dhinakaran Pandiyan <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>--- drivers/gpu/drm/i915/i915_drv.h | 1 - 1 file changed, 1 deletion(-)drivers/gpu/drm/i915/i915_drv.h +0
-0@@ -630,7 +630,6 @@ struct i915_psr {
We should rename this intel_psr and move it to the same file where struct intel_dp lives.
drivers/gpu/drm/i915/i915_drv.h struct i915_psr { · line 633
Quoted 5 lines
drivers/gpu/drm/i915/i915_drv.h +0
-1bool sink_psr2_support;bool link_standby;bool colorimetry_support; -bool alpm;bool psr2_enabled;
And rename this too? The bool is set to enable_psr2 and does not mean PSR2 is enabled.
drivers/gpu/drm/i915/i915_drv.h struct i915_psr { · line 635
Quoted 2 lines
drivers/gpu/drm/i915/i915_drv.h +0
-0u8 sink_sync_latency;ktime_t last_entry_attempt;
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 8/8] drm/i915/psr: Remove alpm from i915_psr
Quoted 17 lines · On Mon, 2018-09-24 at 23:08 -0700, [email protected] wrote:
Quoted 4 lines · José Roberto de Souza
ALPM is a requirement and we don't need to keep it's cached, what were done in commit
97c9de66ca80
("drm/i915/psr: Fix ALPM cap check for PSR2") but the alpm was not removed fromi915_psr.:You're right.
Reviewed-by Dhinakaran Pandiyan <[email protected]>Quoted 7 lines
Cc Dhinakaran Pandiyan <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>--- drivers/gpu/drm/i915/i915_drv.h | 1 - 1 file changed, 1 deletion(-)
Quoted 9 lines
drivers/gpu/drm/i915/i915_drv.h struct i915_psr {
Quoted 6 lines
drivers/gpu/drm/i915/i915_drv.h +0
-0@@ -630,7 +630,6 @@ struct i915_psr {We should rename this
intel_psrand move it to the same file where structintel_dplives.
Sounds a better place indeed but it would just cost more memory as we don't enable PSR in regular DP ports also it would cause conflicts in most of the PSR patches that we have pending, maybe we can think about it after enable PSR by default?
Quoted 11 lines
drivers/gpu/drm/i915/i915_drv.h struct i915_psr { · line 633
Quoted 7 lines
drivers/gpu/drm/i915/i915_drv.h +0
-1bool sink_psr2_support;bool link_standby;bool colorimetry_support; -bool alpm;bool psr2_enabled;And rename this too? The bool is set to
enable_psr2and does not mean
PSR2 is enabled.
It have the same meaning as 'enabled', it means that sink is configured to PSR2 and source have PSR2 hardware enabled but it do not mean that is active at the moment.
Quoted 4 lines
drivers/gpu/drm/i915/i915_drv.h struct i915_psr { · line 635
Quoted 4 lines
drivers/gpu/drm/i915/i915_drv.h +0
-0u8 sink_sync_latency;ktime_t last_entry_attempt;
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.SPARSE: warning for series starting with [1/8] drm/i915/psr: Share PSR and PSR2 exit mask
In reply to José Roberto de Souza== Series Details ==
== Series Details ==
Series: series starting with [1/8] drm/i915/psr: Share PSR and PSR2 exit mask
URL : https://patchwork.freedesktop.org/series/49993/
State : warning
== Summary ==
$ dim sparse origin/drm-tip Commit: drm/i915/psr: Share PSR and PSR2 exit mask Okay!
Commit: drm/i915/psr: Do not set MASK_DISP_REG_WRITE in ICL Okay!
Commit: drm/i915/psr: Enable sink to trigger a interruption on PSR2 CRC mismatch Okay!
Commit: drm/i915/psr: Remove PSR2 TODO error handling Okay!
Commit: drm/i915/psr: Do not enable PSR2 if sink requires selective update X granularity Okay!
Commit: drm/i915/psr: Use WA to force HW tracking to exit PSR2 Okay!
Commit: drm/i915/psr: Don't tell sink that main link will be active in PSR2 Okay!
Commit: drm/i915/psr: Remove alpm from i915_psr -drivers/gpu/drm/i915/selftests/../i915_drv.h:3718:16: warning: expression using sizeof(void) +drivers/gpu/drm/i915/selftests/../i915_drv.h:3717:16: warning: expression using sizeof(void)
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for series starting with [1/8] drm/i915/psr: Share PSR and PSR2 exit mask
In reply to José Roberto de Souza== Series Details ==
== Series Details ==
Series: series starting with [1/8] drm/i915/psr: Share PSR and PSR2 exit mask
URL : https://patchwork.freedesktop.org/series/49993/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4854 -> Patchwork_10246 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/49993/revisions/1/mbox/
== Known issues ==
Here are the changes found in Patchwork_10246 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@drm_mm@insert:
{fi-skl-caroline}: NOTRUN -> INCOMPLETE (fdo#108003)
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
fi-byt-clapper: PASS -> FAIL (fdo#107362, fdo#103191)
fi-bdw-samus: NOTRUN -> INCOMPLETE (fdo#107773)
igt@kms_psr@primary_page_flip:
fi-icl-u: PASS -> FAIL (fdo#107336)
fi-cnl-u: PASS -> FAIL (fdo#107336)
fi-kbl-r: PASS -> FAIL (fdo#107336)
==== Possible fixes ====
igt@drv_selftest@live_hugepages:
fi-kbl-7560u: INCOMPLETE -> PASS
igt@gem_exec_suspend@basic-s3:
fi-bdw-samus: INCOMPLETE (fdo#107773) -> PASS
igt@kms_flip@basic-flip-vs-modeset:
fi-skl-6700hq: DMESG-WARN (fdo#105998) -> PASS
igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b:
fi-byt-clapper: FAIL (fdo#107362) -> PASS
igt@kms_psr@primary_page_flip:
fi-kbl-7560u: FAIL (fdo#107336) -> PASS
fi-cfl-s3: FAIL (fdo#107336) -> PASS {name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#105998 https://bugs.freedesktop.org/show_bug.cgi?id=105998
fdo#107336 https://bugs.freedesktop.org/show_bug.cgi?id=107336
fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
fdo#107773 https://bugs.freedesktop.org/show_bug.cgi?id=107773
fdo#108003 https://bugs.freedesktop.org/show_bug.cgi?id=108003
== Participating hosts (52 -> 48) ==
Additional (1): fi-skl-caroline
Missing (5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u
== Build changes ==
* Linux: CI_DRM_4854 -> Patchwork_10246
CI_DRM_4854: 78a6bcff149f370d58fe0bf51c29cbe62d8bc27c @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4647: ae8187922d8de2bc739519da3bd40cf5f03f5e4f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10246: 2325a088dbf665a85474f22d50b1c54e8930db09 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
2325a088dbf6 drm/i915/psr: Remove alpm from i915_psre8974aa38bea drm/i915/psr: Don't tell sink that main link will be active in PSR2 8bae5f0d8246 drm/i915/psr: Use WA to force HW tracking to exit PSR2 dc6f8bb9a85a drm/i915/psr: Do not enable PSR2 if sink requires selective update X granularity 4ae52440e0c5 drm/i915/psr: Remove PSR2 TODO error handling99fae4c917bd drm/i915/psr: Enable sink to trigger a interruption on PSR2 CRC mismatch 588709076949 drm/i915/psr: Do not set MASK_DISP_REG_WRITE in ICL87d6ea8a6245 drm/i915/psr: Share PSR and PSR2 exit mask
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10246/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for series starting with [1/8] drm/i915/psr: Share PSR and PSR2 exit mask
In reply to José Roberto de Souza== Series Details ==
== Series Details ==
Series: series starting with [1/8] drm/i915/psr: Share PSR and PSR2 exit mask
URL : https://patchwork.freedesktop.org/series/49993/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4854_full -> Patchwork_10246_full =
== Summary - WARNING ==
Minor unknown changes coming with Patchwork_10246_full need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_10246_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_10246_full:
=== IGT changes ===
==== Warnings ====
igt@perf_pmu@rc6:
shard-kbl: PASS -> SKIP== Known issues ==
Here are the changes found in Patchwork_10246_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@kms_busy@extended-modeset-hang-newfb-render-a:
shard-snb: NOTRUN -> DMESG-WARN (fdo#107956)
igt@kms_busy@extended-pageflip-hang-newfb-render-a:
shard-apl: PASS -> DMESG-WARN (fdo#107956)
==== Possible fixes ====
igt@gem_eio@in-flight-1us:
shard-glk: FAIL (fdo#105957) -> PASS
igt@gem_exec_await@wide-contexts:
shard-apl: FAIL (fdo#106680) -> PASS
igt@gem_ppgtt@blt-vs-render-ctxn:
shard-kbl: INCOMPLETE (fdo#103665, fdo#106023) -> PASS
igt@kms_available_modes_crc@available_mode_test_crc:
shard-hsw: FAIL (fdo#106641) -> PASS
igt@kms_cursor_legacy@cursora-vs-flipa-toggle:
shard-glk: DMESG-WARN (fdo#106538, fdo#105763) -> PASS
igt@kms_setmode@basic:
shard-kbl: FAIL (fdo#99912) -> PASS fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#105763 https://bugs.freedesktop.org/show_bug.cgi?id=105763
fdo#105957 https://bugs.freedesktop.org/show_bug.cgi?id=105957
fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
fdo#106538 https://bugs.freedesktop.org/show_bug.cgi?id=106538
fdo#106641 https://bugs.freedesktop.org/show_bug.cgi?id=106641
fdo#106680 https://bugs.freedesktop.org/show_bug.cgi?id=106680
fdo#107956 https://bugs.freedesktop.org/show_bug.cgi?id=107956
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
== Participating hosts (5 -> 5) ==
No changes in participating hosts
== Build changes ==
* Linux: CI_DRM_4854 -> Patchwork_10246
CI_DRM_4854: 78a6bcff149f370d58fe0bf51c29cbe62d8bc27c @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4647: ae8187922d8de2bc739519da3bd40cf5f03f5e4f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10246: 2325a088dbf665a85474f22d50b1c54e8930db09 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10246/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 36 lines · PDT José Roberto de Souza
Now both PSR and PSR2 have the same exit mask, so let's share then instead of have the same code 2 times.
Cc Dhinakaran Pandiyan <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>--- drivers/gpu/drm/i915/intel_psr.c | 34 ++++++++++++-------------------- 1 file changed, 13 insertions(+), 21 deletions(-)(quoted diff) +0
-0
b/drivers/gpu/drm/i915/intel_psr.cindexb6838b525502..358bbcd3b5f3100644drivers/gpu/drm/i915/intel_psr.c +0
-19@@ -575,28 +575,20 @@ static void intel_psr_enable_source(struct intel_dp *intel_dp, else chicken &= ~VSC_DATA_SEL_SOFTWARE_CONTROL ;I915_WRITE (CHICKEN_TRANS (cpu_transcoder), chicken); - -I915_WRITE (EDP_PSR_DEBUG , -EDP_PSR_DEBUG_MASK_MEMUP | -EDP_PSR_DEBUG_MASK_HPD | -EDP_PSR_DEBUG_MASK_LPSP | -EDP_PSR_DEBUG_MASK_MAX_SLEEP | -EDP_PSR_DEBUG_MASK_DISP_REG_WRITE ); - }else { -/* -* Per Spec: Avoid continuous PSR exit by masking MEMUP -* and HPD. also mask LPSP to avoid dependency on other -* drivers that might block runtime_pm besides -* preventing other hw tracking issues now we can rely -* on frontbuffer tracking. -*/ - I915_WRITE(EDP_PSR_DEBUG, - EDP_PSR_DEBUG_MASK_MEMUP | - EDP_PSR_DEBUG_MASK_HPD | - EDP_PSR_DEBUG_MASK_LPSP |
drivers/gpu/drm/i915/intel_psr.c static void intel_psr_enable_source(struct intel_dp · line 585
Quoted 10 lines
drivers/gpu/drm/i915/intel_psr.c +7
-2-EDP_PSR_DEBUG_MASK_DISP_REG_WRITE | - EDP_PSR_DEBUG_MASK_MAX_SLEEP); } + +/* +* Per Spec: Avoid continuous PSR exit by masking MEMUP and HPD also +* mask LPSP to avoid dependency on other drivers that might block +* runtime_pm besides preventing other hw tracking issues now we +* can rely on frontbuffer tracking. +*/
Hmm.. I don't think I understand this comment completely and we should update it. This patch however looks correct,
drivers/gpu/drm/i915/intel_psr.c static void intel_psr_enable_source(struct intel_dp *intel_dp, · line 594
Quoted 9 lines
drivers/gpu/drm/i915/intel_psr.c +6
-0+I915_WRITE (EDP_PSR_DEBUG , +EDP_PSR_DEBUG_MASK_MEMUP | +EDP_PSR_DEBUG_MASK_HPD | +EDP_PSR_DEBUG_MASK_LPSP | +EDP_PSR_DEBUG_MASK_DISP_REG_WRITE | +EDP_PSR_DEBUG_MASK_MAX_SLEEP ); } static void intel_psr_enable_locked(struct drm_i915_private *dev_priv,
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx