drm/i915/psr: Share the computation of idle frames
Subsystems (3)
PATCH 1/3 drm/i915/psr: Share the computation of idle frames
Both activate functions and the dc3co disable function were doing the same thing, so better move to a function and share.
Also while at it adding a WARN_ON to catch invalid values.
--- drivers/gpu/drm/i915/display/intel_psr.c | 43 +++++++++++------------- 1 file changed, 19 insertions(+), 24 deletions(-)
drivers/gpu/drm/i915/display/intel_psr.c +19 -24
@@ -451,22 +451,29 @@ static u32 intel_psr1_get_tp_time(struct intel_dp *intel_dp)return val; } -static void hsw_activate_psr1 (struct intel_dp *intel_dp) +static u8 psr_compute_idle_frames (struct intel_dp *intel_dp) {struct drm_i915_private *dev_priv =dp_to_i915 (intel_dp); -u32 max_sleep_time =0x1f ; -u32 val =EDP_PSR_ENABLE ; +int idle_frames;/* Let's use 6 as the minimum to cover all known cases including the * off-by-one issue that HW has in some cases. */ -int idle_frames =max (6 , dev_priv->vbt.psr.idle_frames); - -/* sink_sync_latency of 8 means source has to wait for more than 8 -* frames, we'll go with 9 frames for now -*/ + idle_frames =max (6 , dev_priv->vbt.psr.idle_frames); idle_frames =max (idle_frames, dev_priv->psr.sink_sync_latency +1 ); - val |= idle_frames <<EDP_PSR_IDLE_FRAME_SHIFT ; + +WARN_ON (idle_frames >0xf ); + +return idle_frames; +} + +static void hsw_activate_psr1 (struct intel_dp *intel_dp) +{ +struct drm_i915_private *dev_priv =dp_to_i915 (intel_dp); +u32 max_sleep_time =0x1f ; +u32 val =EDP_PSR_ENABLE ; + + val |=psr_compute_idle_frames (intel_dp) <<EDP_PSR_IDLE_FRAME_SHIFT ; val |= max_sleep_time <<EDP_PSR_MAX_SLEEP_TIME_SHIFT ;if (IS_HASWELL (dev_priv))
@@ -490,13 +497,7 @@ static void hsw_activate_psr2(struct intel_dp *intel_dp)struct drm_i915_private *dev_priv =dp_to_i915 (intel_dp);u32 val; -/* Let's use 6 as the minimum to cover all known cases including the -* off-by-one issue that HW has in some cases. -*/ -int idle_frames =max (6 , dev_priv->vbt.psr.idle_frames); - - idle_frames =max (idle_frames, dev_priv->psr.sink_sync_latency +1 ); - val = idle_frames <<EDP_PSR2_IDLE_FRAME_SHIFT ; + val =psr_compute_idle_frames (intel_dp) <<EDP_PSR2_IDLE_FRAME_SHIFT ; val |=EDP_PSR2_ENABLE |EDP_SU_TRACK_ENABLE ;if (INTEL_GEN (dev_priv) >=10 ||IS_GEMINILAKE (dev_priv))
@@ -563,16 +564,10 @@ static void tgl_psr2_enable_dc3co(struct drm_i915_private *dev_priv)static void tgl_psr2_disable_dc3co (struct drm_i915_private *dev_priv) { -int idle_frames; +struct intel_dp *intel_dp = dev_priv->psr.dp;intel_display_power_set_target_dc_state (dev_priv,DC_STATE_EN_UPTO_DC6 ); -/* -* Restore PSR2 idle frame let's use 6 as the minimum to cover all known -* cases including the off-by-one issue that HW has in some cases. -*/ - idle_frames =max (6 , dev_priv->vbt.psr.idle_frames); - idle_frames =max (idle_frames, dev_priv->psr.sink_sync_latency +1 ); -psr2_program_idle_frames (dev_priv, idle_frames); +psr2_program_idle_frames (dev_priv,psr_compute_idle_frames (intel_dp)); }static void tgl_dc5_idle_thread (struct work_struct *work)
Signature · 6 lines
2.23.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/3 drm/i915/dc3co: Check for DC3C0 exit state instead of sleep
DC3C0 could have already exit so no need to always sleep, so lets read the register with the state.
--- drivers/gpu/drm/i915/display/intel_display_power.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/display/intel_display_power.c +1 -1
@@ -812,7 +812,7 @@ static void tgl_disable_dc3co(struct drm_i915_private *dev_priv)/* * Delay of 200us DC3CO Exit time B.Spec 49196 */ -usleep_range (200 ,210 ); +intel_de_wait_for_set (dev_priv,DC_STATE_EN ,DC_STATE_DC3CO_STATUS ,1 ); }static void bxt_enable_dc9 (struct drm_i915_private *dev_priv)
Signature · 6 lines
2.23.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/3 drm/i915/dc3co: Avoid full modeset when EXITLINE needs to be changed
In reply to José Roberto de SouzaA recent change in BSpec allow us to change EXTLINE while transcoder is enabled so this allow us to change it even when doing the first fastset after taking over previous hardware state set by BIOS. BIOS don't enable PSR, so if sink supports PSR it will be enabled on the first fastset, so moving the EXTLINE compute and set to PSR flows allow us to simplfy a bunch of code.
This will save a lot of time in all the IGT tests that uses CRC, as when PSR2 is enabled CRCs are not generated, so we switch to PSR1, so the previous code would compute dc3co_exitline=0 causing a full modeset that would shutdown pipe, enable and train link.
BSpec: 49196
--- drivers/gpu/drm/i915/display/intel_ddi.c | 86 -------------------- drivers/gpu/drm/i915/display/intel_display.c | 1 - drivers/gpu/drm/i915/display/intel_psr.c | 47 +++++++++++ 3 files changed, 47 insertions(+), 87 deletions(-)
drivers/gpu/drm/i915/display/intel_ddi.c +0 -86
@@ -3339,86 +3339,6 @@ static void intel_ddi_disable_fec_state(struct intel_encoder *encoder,POSTING_READ (intel_dp->regs.dp_tp_ctl); } -static void -tgl_clear_psr2_transcoder_exitline (const struct intel_crtc_state *cstate) -{ -struct drm_i915_private *dev_priv =to_i915 (cstate->base.crtc->dev); -u32 val; - -if (!cstate->dc3co_exitline) -return ; - - val =I915_READ (EXITLINE (cstate->cpu_transcoder)); - val &= ~(EXITLINE_MASK |EXITLINE_ENABLE ); -I915_WRITE (EXITLINE (cstate->cpu_transcoder), val); -} - -static void -tgl_set_psr2_transcoder_exitline (const struct intel_crtc_state *cstate) -{ -u32 val, exit_scanlines; -struct drm_i915_private *dev_priv =to_i915 (cstate->base.crtc->dev); - -if (!cstate->dc3co_exitline) -return ; - - exit_scanlines = cstate->dc3co_exitline; - exit_scanlines <<=EXITLINE_SHIFT ; - val =I915_READ (EXITLINE (cstate->cpu_transcoder)); - val &= ~(EXITLINE_MASK |EXITLINE_ENABLE ); - val |= exit_scanlines; - val |=EXITLINE_ENABLE ; -I915_WRITE (EXITLINE (cstate->cpu_transcoder), val); -} - -static void tgl_dc3co_exitline_compute_config (struct intel_encoder *encoder, -struct intel_crtc_state *cstate) -{ -u32 exit_scanlines; -struct drm_i915_private *dev_priv =to_i915 (cstate->base.crtc->dev); -u32 crtc_vdisplay = cstate->base.adjusted_mode.crtc_vdisplay; - - cstate->dc3co_exitline =0 ; - -if (!(dev_priv->csr.allowed_dc_mask &DC_STATE_EN_DC3CO )) -return ; - -/* B.Specs:49196 DC3CO only works with pipeA and DDIA.*/ -if (to_intel_crtc (cstate->base.crtc)->pipe !=PIPE_A || - encoder->port !=PORT_A ) -return ; - -if (!cstate->has_psr2 || !cstate->base.active) -return ; - -/* -* DC3CO Exit time 200us B.Spec 49196 -* PSR2 transcoder Early Exit scanlines = ROUNDUP(200 / line time) + 1 -*/ - exit_scanlines = -intel_usecs_to_scanlines (&cstate->base.adjusted_mode,200 ) +1 ; - -if (WARN_ON (exit_scanlines > crtc_vdisplay)) -return ; - - cstate->dc3co_exitline = crtc_vdisplay - exit_scanlines; -DRM_DEBUG_KMS ("DC3CO exit scanlines %d\n" , cstate->dc3co_exitline); -} - -static void tgl_dc3co_exitline_get_config (struct intel_crtc_state *crtc_state) -{ -u32 val; -struct drm_i915_private *dev_priv =to_i915 (crtc_state->base.crtc->dev); - -if (INTEL_GEN (dev_priv) <12 ) -return ; - - val =I915_READ (EXITLINE (crtc_state->cpu_transcoder)); - -if (val &EXITLINE_ENABLE ) - crtc_state->dc3co_exitline = val &EXITLINE_MASK ; -} -static void tgl_ddi_pre_enable_dp (struct intel_encoder *encoder,const struct intel_crtc_state *crtc_state,const struct drm_connector_state *conn_state)
@@ -3431,7 +3351,6 @@ static void tgl_ddi_pre_enable_dp(struct intel_encoder *encoder,int level =intel_ddi_dp_level (intel_dp);enum transcoder transcoder = crtc_state->cpu_transcoder; -tgl_set_psr2_transcoder_exitline (crtc_state);intel_dp_set_link_params (intel_dp, crtc_state->port_clock, crtc_state->lane_count, is_mst);
@@ -3760,7 +3679,6 @@ static void intel_ddi_post_disable_dp(struct intel_encoder *encoder, dig_port->ddi_io_power_domain);intel_ddi_clk_disable (encoder); -tgl_clear_psr2_transcoder_exitline (old_crtc_state); } static void intel_ddi_post_disable_hdmi(struct intel_encoder *encoder,
@@ -4308,9 +4226,6 @@ void intel_ddi_get_config(struct intel_encoder *encoder,break ; } -if (encoder->type ==INTEL_OUTPUT_EDP ) -tgl_dc3co_exitline_get_config (pipe_config); - pipe_config->has_audio =intel_ddi_is_audio_enabled (dev_priv, cpu_transcoder);
@@ -4392,7 +4307,6 @@ static int intel_ddi_compute_config(struct intel_encoder *encoder, ret =intel_hdmi_compute_config (encoder, pipe_config, conn_state); }else { ret =intel_dp_compute_config (encoder, pipe_config, conn_state); -tgl_dc3co_exitline_compute_config (encoder, pipe_config); }if (ret)
drivers/gpu/drm/i915/display/intel_display.c +0 -1
@@ -13091,7 +13091,6 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,PIPE_CONF_CHECK_I (pixel_multiplier);PIPE_CONF_CHECK_I (output_format); -PIPE_CONF_CHECK_I (dc3co_exitline);PIPE_CONF_CHECK_BOOL (has_hdmi_sink);if ((INTEL_GEN (dev_priv) <8 && !IS_HASWELL (dev_priv)) ||IS_VALLEYVIEW (dev_priv) ||IS_CHERRYVIEW (dev_priv))
drivers/gpu/drm/i915/display/intel_psr.c +47 -0
65 lines not on this page · raw message
Signature · 6 lines
2.23.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 3/3] drm/i915/dc3co: Avoid full modeset when EXITLINE needs to be changed
Quoted 7 lines · José Roberto de Souza
A recent change in BSpec allow us to change EXTLINE while transcoder is enabled so this allow us to change it even when doing the first fastset after taking over previous hardware state set by BIOS. BIOS don't enable PSR, so if sink supports PSR it will be enabled on the first fastset, so moving the EXTLINE compute and set to PSR flows allow us to simplfy a bunch of code.
Quoted 6 lines
This will save a lot of time in all the IGT tests that uses CRC, as when PSR2 is enabled CRCs are not generated, so we switch to PSR1, so the previous code would compute dc3co_exitline=0 causing a full modeset that would shutdown pipe, enable and train link.
BSpec: 49196
I am not able to find it explicitly that we can change EXITLINE while transcoder is enabled in index 49196. Which change actually u are referring?
Quoted 221 lines
Cc Imre Deak <[email protected]>Cc Anshuman Gupta <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>--- drivers/gpu/drm/i915/display/intel_ddi.c | 86 -------------------- drivers/gpu/drm/i915/display/intel_display.c | 1 - drivers/gpu/drm/i915/display/intel_psr.c | 47 +++++++++++ 3 files changed, 47 insertions(+), 87 deletions(-)drivers/gpu/drm/i915/display/intel_ddi.c +0
-86@@ -3339,86 +3339,6 @@ static void intel_ddi_disable_fec_state(struct intel_encoder *encoder,POSTING_READ (intel_dp->regs.dp_tp_ctl); } -static void -tgl_clear_psr2_transcoder_exitline (const struct intel_crtc_state *cstate) -{ -struct drm_i915_private *dev_priv =to_i915 (cstate->base.crtc->dev); -u32 val; - -if (!cstate->dc3co_exitline) -return ; - - val =I915_READ (EXITLINE (cstate->cpu_transcoder)); - val &= ~(EXITLINE_MASK |EXITLINE_ENABLE ); -I915_WRITE (EXITLINE (cstate->cpu_transcoder), val); -} - -static void -tgl_set_psr2_transcoder_exitline (const struct intel_crtc_state *cstate) -{ -u32 val, exit_scanlines; -struct drm_i915_private *dev_priv =to_i915 (cstate->base.crtc->dev); - -if (!cstate->dc3co_exitline) -return ; - - exit_scanlines = cstate->dc3co_exitline; - exit_scanlines <<=EXITLINE_SHIFT ; - val =I915_READ (EXITLINE (cstate->cpu_transcoder)); - val &= ~(EXITLINE_MASK |EXITLINE_ENABLE ); - val |= exit_scanlines; - val |=EXITLINE_ENABLE ; -I915_WRITE (EXITLINE (cstate->cpu_transcoder), val); -} - -static void tgl_dc3co_exitline_compute_config (struct intel_encoder *encoder, -struct intel_crtc_state *cstate) -{ -u32 exit_scanlines; -struct drm_i915_private *dev_priv =to_i915 (cstate->base.crtc->dev); -u32 crtc_vdisplay = cstate->base.adjusted_mode.crtc_vdisplay; - - cstate->dc3co_exitline =0 ; - -if (!(dev_priv->csr.allowed_dc_mask &DC_STATE_EN_DC3CO )) -return ; - -/* B.Specs:49196 DC3CO only works with pipeA and DDIA.*/ -if (to_intel_crtc (cstate->base.crtc)->pipe !=PIPE_A || - encoder->port !=PORT_A ) -return ; - -if (!cstate->has_psr2 || !cstate->base.active) -return ; - -/* -* DC3CO Exit time 200us B.Spec 49196 -* PSR2 transcoder Early Exit scanlines = ROUNDUP(200 / line time) + 1 -*/ - exit_scanlines = -intel_usecs_to_scanlines (&cstate->base.adjusted_mode,200 ) +1 ; - -if (WARN_ON (exit_scanlines > crtc_vdisplay)) -return ; - - cstate->dc3co_exitline = crtc_vdisplay - exit_scanlines; -DRM_DEBUG_KMS ("DC3CO exit scanlines %d\n" , cstate->dc3co_exitline); -} - -static void tgl_dc3co_exitline_get_config (struct intel_crtc_state *crtc_state) -{ -u32 val; -struct drm_i915_private *dev_priv =to_i915 (crtc_state->base.crtc->dev); - -if (INTEL_GEN (dev_priv) <12 ) -return ; - - val =I915_READ (EXITLINE (crtc_state->cpu_transcoder)); - -if (val &EXITLINE_ENABLE ) - crtc_state->dc3co_exitline = val &EXITLINE_MASK ; -} -static void tgl_ddi_pre_enable_dp (struct intel_encoder *encoder,const struct intel_crtc_state *crtc_state,const struct drm_connector_state *conn_state)@@ -3431,7 +3351,6 @@ static void tgl_ddi_pre_enable_dp(struct intel_encoder *encoder,int level =intel_ddi_dp_level (intel_dp);enum transcoder transcoder = crtc_state->cpu_transcoder; -tgl_set_psr2_transcoder_exitline (crtc_state);intel_dp_set_link_params (intel_dp, crtc_state->port_clock, crtc_state->lane_count, is_mst);@@ -3760,7 +3679,6 @@ static void intel_ddi_post_disable_dp(struct intel_encoder *encoder, dig_port->ddi_io_power_domain);intel_ddi_clk_disable (encoder); -tgl_clear_psr2_transcoder_exitline (old_crtc_state); } static void intel_ddi_post_disable_hdmi(struct intel_encoder *encoder,@@ -4308,9 +4226,6 @@ void intel_ddi_get_config(struct intel_encoder *encoder,break ; } -if (encoder->type ==INTEL_OUTPUT_EDP ) -tgl_dc3co_exitline_get_config (pipe_config); - pipe_config->has_audio =intel_ddi_is_audio_enabled (dev_priv, cpu_transcoder);@@ -4392,7 +4307,6 @@ static int intel_ddi_compute_config(struct intel_encoder *encoder, ret =intel_hdmi_compute_config (encoder, pipe_config, conn_state); }else { ret =intel_dp_compute_config (encoder, pipe_config, conn_state); -tgl_dc3co_exitline_compute_config (encoder, pipe_config); }if (ret)drivers/gpu/drm/i915/display/intel_display.c +0
-1@@ -13091,7 +13091,6 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,PIPE_CONF_CHECK_I (pixel_multiplier);PIPE_CONF_CHECK_I (output_format); -PIPE_CONF_CHECK_I (dc3co_exitline);PIPE_CONF_CHECK_BOOL (has_hdmi_sink);if ((INTEL_GEN (dev_priv) <8 && !IS_HASWELL (dev_priv)) ||IS_VALLEYVIEW (dev_priv) ||IS_CHERRYVIEW (dev_priv))drivers/gpu/drm/i915/display/intel_psr.c +47
-0@@ -596,6 +596,37 @@ static void tgl_disallow_dc3co_on_psr2_exit(struct drm_i915_private *dev_priv)tgl_psr2_disable_dc3co (dev_priv); } +static void +tgl_dc3co_exitline_compute_config (struct intel_dp *intel_dp, +struct intel_crtc_state *crtc_state) +{ +const u32 crtc_vdisplay = crtc_state->base.adjusted_mode.crtc_vdisplay; +struct intel_digital_port *dig_port =dp_to_dig_port (intel_dp); +struct drm_i915_private *dev_priv =dp_to_i915 (intel_dp); +u32 exit_scanlines; + +if (!(dev_priv->csr.allowed_dc_mask &DC_STATE_EN_DC3CO )) +return ; + +/* B.Specs:49196 DC3CO only works with pipeA and DDIA.*/ +if (to_intel_crtc (crtc_state->base.crtc)->pipe !=PIPE_A || + dig_port->base.port !=PORT_A ) +return ; + +/* +* DC3CO Exit time 200us B.Spec 49196 +* PSR2 transcoder Early Exit scanlines = ROUNDUP(200 / line time) + 1 +*/ + exit_scanlines = +intel_usecs_to_scanlines (&crtc_state->base.adjusted_mode,200 ) +1 ; + +if (WARN_ON (exit_scanlines > crtc_vdisplay)) +return ; + + crtc_state->dc3co_exitline = crtc_vdisplay - exit_scanlines; +DRM_DEBUG_KMS ("DC3CO exit scanlines %d\n" , crtc_state->dc3co_exitline); +} +static bool intel_psr2_config_valid (struct intel_dp *intel_dp,struct intel_crtc_state *crtc_state) {@@ -658,6 +689,7 @@ static bool intel_psr2_config_valid(struct intel_dp *intel_dp,return false; } +tgl_dc3co_exitline_compute_config (intel_dp, crtc_state);return true; }@@ -775,6 +807,21 @@ static void intel_psr_enable_source(struct intel_dp *intel_dp,I915_WRITE (EDP_PSR_DEBUG (dev_priv->psr.transcoder), mask);psr_irq_control (dev_priv); + +if (INTEL_GEN (dev_priv) >=12 && dev_priv->psr.psr2_enabled) { +u32 val; + +/* +* TODO: if future platforms supports DC3CO in more than one +* transcoder, EXITLINE will need to be unset when disabling PSR +*/ + val =I915_READ (EXITLINE (cpu_transcoder)); + val &= ~(EXITLINE_MASK |EXITLINE_ENABLE ); + val |= crtc_state->dc3co_exitline <<EXITLINE_SHIFT ; +if (crtc_state->dc3co_exitline) + val |=EXITLINE_ENABLE ; +I915_WRITE (EXITLINE (cpu_transcoder), val); + } } static void intel_psr_enable_locked(struct drm_i915_private *dev_priv,Signature · 1 line
2.23.0
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 3/3] drm/i915/dc3co: Avoid full modeset when EXITLINE needs to be changed
Quoted 13 lines · Anshuamn Gupta
Quoted 12 lines · José Roberto de Souza
A recent change in BSpec allow us to change EXTLINE while transcoder is enabled so this allow us to change it even when doing the first fastset after taking over previous hardware state set by BIOS. BIOS don't enable PSR, so if sink supports PSR it will be enabled on the first fastset, so moving the EXTLINE compute and set to PSR flows allow us to simplfy a bunch of code.
This will save a lot of time in all the IGT tests that uses CRC, as when PSR2 is enabled CRCs are not generated, so we switch to PSR1, so the previous code would compute dc3co_exitline=0 causing a full modeset that would shutdown pipe, enable and train link.
Quoted 5 lines
Quoted 1 line
BSpec: 49196
I am not able to find it explicitly that we can change EXITLINE while transcoder is enabled in index 49196. Which change actually u are referring?
Looks like a recent change at
https://gfxspecs.intel.com/Predator/Home/Index/50497
explicitly allows programming it anytime before DC3co is enabled.
Quoted 217 lines
Quoted 217 lines
Cc Imre Deak <[email protected]>Cc Anshuman Gupta <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>--- drivers/gpu/drm/i915/display/intel_ddi.c | 86 -------------------- drivers/gpu/drm/i915/display/intel_display.c | 1 - drivers/gpu/drm/i915/display/intel_psr.c | 47 +++++++++++ 3 files changed, 47 insertions(+), 87 deletions(-)drivers/gpu/drm/i915/display/intel_ddi.c +0
-86@@ -3339,86 +3339,6 @@ static void intel_ddi_disable_fec_state(struct intel_encoder *encoder,POSTING_READ (intel_dp->regs.dp_tp_ctl); } -static void -tgl_clear_psr2_transcoder_exitline (const struct intel_crtc_state *cstate) -{ -struct drm_i915_private *dev_priv =to_i915 (cstate->base.crtc->dev); -u32 val; - -if (!cstate->dc3co_exitline) -return ; - - val =I915_READ (EXITLINE (cstate->cpu_transcoder)); - val &= ~(EXITLINE_MASK |EXITLINE_ENABLE ); -I915_WRITE (EXITLINE (cstate->cpu_transcoder), val); -} - -static void -tgl_set_psr2_transcoder_exitline (const struct intel_crtc_state *cstate) -{ -u32 val, exit_scanlines; -struct drm_i915_private *dev_priv =to_i915 (cstate->base.crtc->dev); - -if (!cstate->dc3co_exitline) -return ; - - exit_scanlines = cstate->dc3co_exitline; - exit_scanlines <<=EXITLINE_SHIFT ; - val =I915_READ (EXITLINE (cstate->cpu_transcoder)); - val &= ~(EXITLINE_MASK |EXITLINE_ENABLE ); - val |= exit_scanlines; - val |=EXITLINE_ENABLE ; -I915_WRITE (EXITLINE (cstate->cpu_transcoder), val); -} - -static void tgl_dc3co_exitline_compute_config (struct intel_encoder *encoder, -struct intel_crtc_state *cstate) -{ -u32 exit_scanlines; -struct drm_i915_private *dev_priv =to_i915 (cstate->base.crtc->dev); -u32 crtc_vdisplay = cstate->base.adjusted_mode.crtc_vdisplay; - - cstate->dc3co_exitline =0 ; - -if (!(dev_priv->csr.allowed_dc_mask &DC_STATE_EN_DC3CO )) -return ; - -/* B.Specs:49196 DC3CO only works with pipeA and DDIA.*/ -if (to_intel_crtc (cstate->base.crtc)->pipe !=PIPE_A || - encoder->port !=PORT_A ) -return ; - -if (!cstate->has_psr2 || !cstate->base.active) -return ; - -/* -* DC3CO Exit time 200us B.Spec 49196 -* PSR2 transcoder Early Exit scanlines = ROUNDUP(200 / line time) + 1 -*/ - exit_scanlines = -intel_usecs_to_scanlines (&cstate->base.adjusted_mode,200 ) +1 ; - -if (WARN_ON (exit_scanlines > crtc_vdisplay)) -return ; - - cstate->dc3co_exitline = crtc_vdisplay - exit_scanlines; -DRM_DEBUG_KMS ("DC3CO exit scanlines %d\n" , cstate->dc3co_exitline); -} - -static void tgl_dc3co_exitline_get_config (struct intel_crtc_state *crtc_state) -{ -u32 val; -struct drm_i915_private *dev_priv =to_i915 (crtc_state->base.crtc->dev); - -if (INTEL_GEN (dev_priv) <12 ) -return ; - - val =I915_READ (EXITLINE (crtc_state->cpu_transcoder)); - -if (val &EXITLINE_ENABLE ) - crtc_state->dc3co_exitline = val &EXITLINE_MASK ; -} -static void tgl_ddi_pre_enable_dp (struct intel_encoder *encoder,const struct intel_crtc_state *crtc_state,const struct drm_connector_state *conn_state)@@ -3431,7 +3351,6 @@ static void tgl_ddi_pre_enable_dp(struct intel_encoder *encoder,int level =intel_ddi_dp_level (intel_dp);enum transcoder transcoder = crtc_state->cpu_transcoder; -tgl_set_psr2_transcoder_exitline (crtc_state);intel_dp_set_link_params (intel_dp, crtc_state->port_clock, crtc_state->lane_count, is_mst);@@ -3760,7 +3679,6 @@ static void intel_ddi_post_disable_dp(struct intel_encoder *encoder, dig_port->ddi_io_power_domain);intel_ddi_clk_disable (encoder); -tgl_clear_psr2_transcoder_exitline (old_crtc_state); } static void intel_ddi_post_disable_hdmi(struct intel_encoder *encoder,@@ -4308,9 +4226,6 @@ void intel_ddi_get_config(struct intel_encoder *encoder,break ; } -if (encoder->type ==INTEL_OUTPUT_EDP ) -tgl_dc3co_exitline_get_config (pipe_config); - pipe_config->has_audio =intel_ddi_is_audio_enabled (dev_priv, cpu_transcoder);@@ -4392,7 +4307,6 @@ static int intel_ddi_compute_config(struct intel_encoder *encoder, ret =intel_hdmi_compute_config (encoder, pipe_config, conn_state); }else { ret =intel_dp_compute_config (encoder, pipe_config, conn_state); -tgl_dc3co_exitline_compute_config (encoder, pipe_config); }if (ret)drivers/gpu/drm/i915/display/intel_display.c +0
-1@@ -13091,7 +13091,6 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,PIPE_CONF_CHECK_I (pixel_multiplier);PIPE_CONF_CHECK_I (output_format); -PIPE_CONF_CHECK_I (dc3co_exitline);PIPE_CONF_CHECK_BOOL (has_hdmi_sink);if ((INTEL_GEN (dev_priv) <8 && !IS_HASWELL (dev_priv)) ||IS_VALLEYVIEW (dev_priv) ||IS_CHERRYVIEW (dev_priv))drivers/gpu/drm/i915/display/intel_psr.c +47
-0@@ -596,6 +596,37 @@ static void tgl_disallow_dc3co_on_psr2_exit(struct drm_i915_private *dev_priv)tgl_psr2_disable_dc3co (dev_priv); } +static void +tgl_dc3co_exitline_compute_config (struct intel_dp *intel_dp, +struct intel_crtc_state *crtc_state) +{ +const u32 crtc_vdisplay = crtc_state->base.adjusted_mode.crtc_vdisplay; +struct intel_digital_port *dig_port =dp_to_dig_port (intel_dp); +struct drm_i915_private *dev_priv =dp_to_i915 (intel_dp); +u32 exit_scanlines; + +if (!(dev_priv->csr.allowed_dc_mask &DC_STATE_EN_DC3CO )) +return ; + +/* B.Specs:49196 DC3CO only works with pipeA and DDIA.*/ +if (to_intel_crtc (crtc_state->base.crtc)->pipe !=PIPE_A || + dig_port->base.port !=PORT_A ) +return ; + +/* +* DC3CO Exit time 200us B.Spec 49196 +* PSR2 transcoder Early Exit scanlines = ROUNDUP(200 / line time) + 1 +*/ + exit_scanlines = +intel_usecs_to_scanlines (&crtc_state->base.adjusted_mode,200 ) +1 ; + +if (WARN_ON (exit_scanlines > crtc_vdisplay)) +return ; + + crtc_state->dc3co_exitline = crtc_vdisplay - exit_scanlines; +DRM_DEBUG_KMS ("DC3CO exit scanlines %d\n" , crtc_state->dc3co_exitline); +} +static bool intel_psr2_config_valid (struct intel_dp *intel_dp,struct intel_crtc_state *crtc_state) {@@ -658,6 +689,7 @@ static bool intel_psr2_config_valid(struct intel_dp *intel_dp,return false; } +tgl_dc3co_exitline_compute_config (intel_dp, crtc_state);return true; }@@ -775,6 +807,21 @@ static void intel_psr_enable_source(struct intel_dp *intel_dp,I915_WRITE (EDP_PSR_DEBUG (dev_priv->psr.transcoder), mask);psr_irq_control (dev_priv); + +if (INTEL_GEN (dev_priv) >=12 && dev_priv->psr.psr2_enabled) { +u32 val; + +/* +* TODO: if future platforms supports DC3CO in more than one +* transcoder, EXITLINE will need to be unset when disabling PSR +*/ + val =I915_READ (EXITLINE (cpu_transcoder)); + val &= ~(EXITLINE_MASK |EXITLINE_ENABLE ); + val |= crtc_state->dc3co_exitline <<EXITLINE_SHIFT ; +if (crtc_state->dc3co_exitline) + val |=EXITLINE_ENABLE ; +I915_WRITE (EXITLINE (cpu_transcoder), val); + } }
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_psr.c +0
-0static void intel_psr_enable_locked(struct drm_i915_private *dev_priv,Signature · 1 line
2.23.0
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 3/3] drm/i915/dc3co: Avoid full modeset when EXITLINE needs to be changed
In reply to José Roberto de SouzaQuoted 165 lines · José Roberto de Souza
A recent change in BSpec allow us to change EXTLINE while transcoder is enabled so this allow us to change it even when doing the first fastset after taking over previous hardware state set by BIOS. BIOS don't enable PSR, so if sink supports PSR it will be enabled on the first fastset, so moving the EXTLINE compute and set to PSR flows allow us to simplfy a bunch of code.
This will save a lot of time in all the IGT tests that uses CRC, as when PSR2 is enabled CRCs are not generated, so we switch to PSR1, so the previous code would compute dc3co_exitline=0 causing a full modeset that would shutdown pipe, enable and train link.
BSpec: 49196
Cc Imre Deak <[email protected]>Cc Anshuman Gupta <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>--- drivers/gpu/drm/i915/display/intel_ddi.c | 86 -------------------- drivers/gpu/drm/i915/display/intel_display.c | 1 - drivers/gpu/drm/i915/display/intel_psr.c | 47 +++++++++++ 3 files changed, 47 insertions(+), 87 deletions(-)drivers/gpu/drm/i915/display/intel_ddi.c +0
-86@@ -3339,86 +3339,6 @@ static void intel_ddi_disable_fec_state(struct intel_encoder *encoder,POSTING_READ (intel_dp->regs.dp_tp_ctl); } -static void -tgl_clear_psr2_transcoder_exitline (const struct intel_crtc_state *cstate) -{ -struct drm_i915_private *dev_priv =to_i915 (cstate->base.crtc->dev); -u32 val; - -if (!cstate->dc3co_exitline) -return ; - - val =I915_READ (EXITLINE (cstate->cpu_transcoder)); - val &= ~(EXITLINE_MASK |EXITLINE_ENABLE ); -I915_WRITE (EXITLINE (cstate->cpu_transcoder), val); -} - -static void -tgl_set_psr2_transcoder_exitline (const struct intel_crtc_state *cstate) -{ -u32 val, exit_scanlines; -struct drm_i915_private *dev_priv =to_i915 (cstate->base.crtc->dev); - -if (!cstate->dc3co_exitline) -return ; - - exit_scanlines = cstate->dc3co_exitline; - exit_scanlines <<=EXITLINE_SHIFT ; - val =I915_READ (EXITLINE (cstate->cpu_transcoder)); - val &= ~(EXITLINE_MASK |EXITLINE_ENABLE ); - val |= exit_scanlines; - val |=EXITLINE_ENABLE ; -I915_WRITE (EXITLINE (cstate->cpu_transcoder), val); -} - -static void tgl_dc3co_exitline_compute_config (struct intel_encoder *encoder, -struct intel_crtc_state *cstate) -{ -u32 exit_scanlines; -struct drm_i915_private *dev_priv =to_i915 (cstate->base.crtc->dev); -u32 crtc_vdisplay = cstate->base.adjusted_mode.crtc_vdisplay; - - cstate->dc3co_exitline =0 ; - -if (!(dev_priv->csr.allowed_dc_mask &DC_STATE_EN_DC3CO )) -return ; - -/* B.Specs:49196 DC3CO only works with pipeA and DDIA.*/ -if (to_intel_crtc (cstate->base.crtc)->pipe !=PIPE_A || - encoder->port !=PORT_A ) -return ; - -if (!cstate->has_psr2 || !cstate->base.active) -return ; - -/* -* DC3CO Exit time 200us B.Spec 49196 -* PSR2 transcoder Early Exit scanlines = ROUNDUP(200 / line time) + 1 -*/ - exit_scanlines = -intel_usecs_to_scanlines (&cstate->base.adjusted_mode,200 ) +1 ; - -if (WARN_ON (exit_scanlines > crtc_vdisplay)) -return ; - - cstate->dc3co_exitline = crtc_vdisplay - exit_scanlines; -DRM_DEBUG_KMS ("DC3CO exit scanlines %d\n" , cstate->dc3co_exitline); -} - -static void tgl_dc3co_exitline_get_config (struct intel_crtc_state *crtc_state) -{ -u32 val; -struct drm_i915_private *dev_priv =to_i915 (crtc_state->base.crtc->dev); - -if (INTEL_GEN (dev_priv) <12 ) -return ; - - val =I915_READ (EXITLINE (crtc_state->cpu_transcoder)); - -if (val &EXITLINE_ENABLE ) - crtc_state->dc3co_exitline = val &EXITLINE_MASK ; -} -static void tgl_ddi_pre_enable_dp (struct intel_encoder *encoder,const struct intel_crtc_state *crtc_state,const struct drm_connector_state *conn_state)@@ -3431,7 +3351,6 @@ static void tgl_ddi_pre_enable_dp(struct intel_encoder *encoder,int level =intel_ddi_dp_level (intel_dp);enum transcoder transcoder = crtc_state->cpu_transcoder; -tgl_set_psr2_transcoder_exitline (crtc_state);intel_dp_set_link_params (intel_dp, crtc_state->port_clock, crtc_state->lane_count, is_mst);@@ -3760,7 +3679,6 @@ static void intel_ddi_post_disable_dp(struct intel_encoder *encoder, dig_port->ddi_io_power_domain);intel_ddi_clk_disable (encoder); -tgl_clear_psr2_transcoder_exitline (old_crtc_state); } static void intel_ddi_post_disable_hdmi(struct intel_encoder *encoder,@@ -4308,9 +4226,6 @@ void intel_ddi_get_config(struct intel_encoder *encoder,break ; } -if (encoder->type ==INTEL_OUTPUT_EDP ) -tgl_dc3co_exitline_get_config (pipe_config); - pipe_config->has_audio =intel_ddi_is_audio_enabled (dev_priv, cpu_transcoder);@@ -4392,7 +4307,6 @@ static int intel_ddi_compute_config(struct intel_encoder *encoder, ret =intel_hdmi_compute_config (encoder, pipe_config, conn_state); }else { ret =intel_dp_compute_config (encoder, pipe_config, conn_state); -tgl_dc3co_exitline_compute_config (encoder, pipe_config); }if (ret)drivers/gpu/drm/i915/display/intel_display.c +0
-1@@ -13091,7 +13091,6 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,PIPE_CONF_CHECK_I (pixel_multiplier);PIPE_CONF_CHECK_I (output_format); -PIPE_CONF_CHECK_I (dc3co_exitline);PIPE_CONF_CHECK_BOOL (has_hdmi_sink);if ((INTEL_GEN (dev_priv) <8 && !IS_HASWELL (dev_priv)) ||IS_VALLEYVIEW (dev_priv) ||IS_CHERRYVIEW (dev_priv))drivers/gpu/drm/i915/display/intel_psr.c +0
-0@@ -596,6 +596,37 @@ static void tgl_disallow_dc3co_on_psr2_exit(struct drm_i915_private *dev_priv)tgl_psr2_disable_dc3co (dev_priv);
drivers/gpu/drm/i915/display/intel_psr.c static void tgl_disallow_dc3co_on_psr2_exit(struct drm_i915_private *dev_priv) · line 606
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_psr.c +8
-0} +static void +tgl_dc3co_exitline_compute_config (struct intel_dp *intel_dp, +struct intel_crtc_state *crtc_state) +{ +const u32 crtc_vdisplay = crtc_state->base.adjusted_mode.crtc_vdisplay; +struct intel_digital_port *dig_port =dp_to_dig_port (intel_dp); +struct drm_i915_private *dev_priv =dp_to_i915 (intel_dp); +u32 exit_scanlines;
We wanted to explicitly clear dc3co_exitline in case it is not supported.
Quoted 35 lines
drivers/gpu/drm/i915/display/intel_psr.c +24
-0+ +if (!(dev_priv->csr.allowed_dc_mask &DC_STATE_EN_DC3CO )) +return ; + +/* B.Specs:49196 DC3CO only works with pipeA and DDIA.*/ +if (to_intel_crtc (crtc_state->base.crtc)->pipe !=PIPE_A || + dig_port->base.port !=PORT_A ) +return ; + +/* +* DC3CO Exit time 200us B.Spec 49196 +* PSR2 transcoder Early Exit scanlines = ROUNDUP(200 / line time) + 1 +*/ + exit_scanlines = +intel_usecs_to_scanlines (&crtc_state->base.adjusted_mode,200 ) +1 ; + +if (WARN_ON (exit_scanlines > crtc_vdisplay)) +return ; + + crtc_state->dc3co_exitline = crtc_vdisplay - exit_scanlines; +DRM_DEBUG_KMS ("DC3CO exit scanlines %d\n" , crtc_state->dc3co_exitline); +} +static bool intel_psr2_config_valid (struct intel_dp *intel_dp,struct intel_crtc_state *crtc_state) {@@ -658,6 +689,7 @@ static bool intel_psr2_config_valid(struct intel_dp *intel_dp,return false; } +tgl_dc3co_exitline_compute_config (intel_dp, crtc_state);return true; }
drivers/gpu/drm/i915/display/intel_psr.c static void intel_psr_enable_source(struct intel_dp *intel_dp, · line 811
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_psr.c +2
-0@@ -775,6 +807,21 @@ static void intel_psr_enable_source(struct intel_dp *intel_dp,I915_WRITE (EDP_PSR_DEBUG (dev_priv->psr.transcoder), mask);psr_irq_control (dev_priv); + +if (INTEL_GEN (dev_priv) >=12 && dev_priv->psr.psr2_enabled) {
IMHO we can use dc3co_enabled flag here instead of psr2_enabled, and it would be nice to have a seperate function to set the exitline here.
Thanks,
Anshuman Gupta.
Quoted 19 lines
drivers/gpu/drm/i915/display/intel_psr.c +13
-0+u32 val; + +/* +* TODO: if future platforms supports DC3CO in more than one +* transcoder, EXITLINE will need to be unset when disabling PSR +*/ + val =I915_READ (EXITLINE (cpu_transcoder)); + val &= ~(EXITLINE_MASK |EXITLINE_ENABLE ); + val |= crtc_state->dc3co_exitline <<EXITLINE_SHIFT ; +if (crtc_state->dc3co_exitline) + val |=EXITLINE_ENABLE ; +I915_WRITE (EXITLINE (cpu_transcoder), val); + } } static void intel_psr_enable_locked(struct drm_i915_private *dev_priv,Signature · 1 line
2.23.0
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 3/3] drm/i915/dc3co: Avoid full modeset when EXITLINE needs to be changed
Quoted 207 lines · Anshuamn Gupta
Quoted 206 lines · José Roberto de Souza
A recent change in BSpec allow us to change EXTLINE while transcoder
is enabled so this allow us to change it even when doing the first fastset after taking over previous hardware state set by BIOS. BIOS don't enable PSR, so if sink supports PSR it will be enabled on
the first fastset, so moving the EXTLINE compute and set to PSR flows
allow us to simplfy a bunch of code.This will save a lot of time in all the IGT tests that uses CRC, as when PSR2 is enabled CRCs are not generated, so we switch to PSR1, so
the previous code would compute dc3co_exitline=0 causing a full modeset that would shutdown pipe, enable and train link.BSpec: 49196
Cc Imre Deak <[email protected]>Cc Anshuman Gupta <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>--- drivers/gpu/drm/i915/display/intel_ddi.c | 86 ---------------- ---- drivers/gpu/drm/i915/display/intel_display.c | 1 - drivers/gpu/drm/i915/display/intel_psr.c | 47 +++++++++++ 3 files changed, 47 insertions(+), 87 deletions(-)drivers/gpu/drm/i915/display/intel_ddi.c +0
-16@@ -3339,86 +3339,6 @@ static void intel_ddi_disable_fec_state(struct intel_encoder *encoder, POSTING_READ(intel_dp->regs.dp_tp_ctl); } -static void -tgl_clear_psr2_transcoder_exitline (const struct intel_crtc_state *cstate) -{ -struct drm_i915_private *dev_priv =to_i915 (cstate->base.crtc- >dev); -u32 val; - -if (!cstate->dc3co_exitline) -return ; - - val =I915_READ (EXITLINE (cstate->cpu_transcoder)); - val &= ~(EXITLINE_MASK |EXITLINE_ENABLE ); -I915_WRITE (EXITLINE (cstate->cpu_transcoder), val); -} - -static void -tgl_set_psr2_transcoder_exitline(const struct intel_crtc_state*cstate)
drivers/gpu/drm/i915/display/intel_ddi.c +0
-3-{ -u32 val, exit_scanlines; - struct drm_i915_private *dev_priv = to_i915(cstate->base.crtc-Quoted 1 line
dev);
drivers/gpu/drm/i915/display/intel_ddi.c +0
-14- -if (!cstate->dc3co_exitline) -return ; - - exit_scanlines = cstate->dc3co_exitline; - exit_scanlines <<=EXITLINE_SHIFT ; - val =I915_READ (EXITLINE (cstate->cpu_transcoder)); - val &= ~(EXITLINE_MASK |EXITLINE_ENABLE ); - val |= exit_scanlines; - val |=EXITLINE_ENABLE ; -I915_WRITE (EXITLINE (cstate->cpu_transcoder), val); -} - -static void tgl_dc3co_exitline_compute_config(struct intel_encoder*encoder,
drivers/gpu/drm/i915/display/intel_ddi.c +0
-1-struct intel_crtc_state *cstate)
drivers/gpu/drm/i915/display/intel_ddi.c +0
-3-{ -u32 exit_scanlines; - struct drm_i915_private *dev_priv = to_i915(cstate->base.crtc-Quoted 1 line
dev);
drivers/gpu/drm/i915/display/intel_ddi.c +0
-18-u32 crtc_vdisplay = cstate->base.adjusted_mode.crtc_vdisplay; - - cstate->dc3co_exitline =0 ; - -if (!(dev_priv->csr.allowed_dc_mask &DC_STATE_EN_DC3CO )) -return ; - -/* B.Specs:49196 DC3CO only works with pipeA and DDIA.*/ -if (to_intel_crtc (cstate->base.crtc)->pipe !=PIPE_A || - encoder->port !=PORT_A ) -return ; - -if (!cstate->has_psr2 || !cstate->base.active) -return ; - -/* -* DC3CO Exit time 200us B.Spec 49196 -* PSR2 transcoder Early Exit scanlines = ROUNDUP(200 / line time) + 1
drivers/gpu/drm/i915/display/intel_ddi.c +0
-3-*/ - exit_scanlines = - intel_usecs_to_scanlines(&cstate->base.adjusted_mode,200) + 1;
drivers/gpu/drm/i915/display/intel_ddi.c +0
-6- -if (WARN_ON (exit_scanlines > crtc_vdisplay)) -return ; - - cstate->dc3co_exitline = crtc_vdisplay - exit_scanlines; - DRM_DEBUG_KMS("DC3CO exit scanlines %d\n", cstate-Quoted 1 line
dc3co_exitline);drivers/gpu/drm/i915/display/intel_ddi.c +0
-3-} - -static void tgl_dc3co_exitline_get_config(struct intel_crtc_state
*crtc_state)drivers/gpu/drm/i915/display/intel_ddi.c +0
-3-{ -u32 val; - struct drm_i915_private *dev_priv = to_i915(crtc_state-Quoted 1 line
base.crtc->dev);drivers/gpu/drm/i915/display/intel_ddi.c +0
-10- -if (INTEL_GEN (dev_priv) <12 ) -return ; - - val =I915_READ (EXITLINE (crtc_state->cpu_transcoder)); - -if (val &EXITLINE_ENABLE ) - crtc_state->dc3co_exitline = val &EXITLINE_MASK ; -} -static void tgl_ddi_pre_enable_dp (struct intel_encoder *encoder, const struct intel_crtc_state
*crtc_state,
const structdrm_connector_state*conn_state)drivers/gpu/drm/i915/display/intel_ddi.c +0
-2@@ -3431,7 +3351,6 @@ static void tgl_ddi_pre_enable_dp(structintel_encoder *encoder, int level = intel_ddi_dp_level(intel_dp);enum transcoder transcoder = crtc_state->cpu_transcoder; -tgl_set_psr2_transcoder_exitline (crtc_state);intel_dp_set_link_params (intel_dp, crtc_state->port_clock, crtc_state->lane_count, is_mst);@@ -3760,7 +3679,6 @@ static void intel_ddi_post_disable_dp(struct intel_encoder *encoder, dig_port- >ddi_io_power_domain);intel_ddi_clk_disable (encoder); -tgl_clear_psr2_transcoder_exitline (old_crtc_state); }static void intel_ddi_post_disable_hdmi(struct
intel_encoder
*encoder,drivers/gpu/drm/i915/display/intel_ddi.c +0
-4@@ -4308,9 +4226,6 @@ void intel_ddi_get_config(structintel_encoder *encoder, break; } -if (encoder->type ==INTEL_OUTPUT_EDP ) -tgl_dc3co_exitline_get_config (pipe_config); - pipe_config->has_audio =intel_ddi_is_audio_enabled (dev_priv, cpu_transcoder);@@ -4392,7 +4307,6 @@ static int intel_ddi_compute_config(structintel_encoder *encoder, ret =intel_hdmi_compute_config (encoder, pipe_config, conn_state); }else { ret =intel_dp_compute_config (encoder, pipe_config, conn_state); - tgl_dc3co_exitline_compute_config(encoder,
pipe_config);drivers/gpu/drm/i915/display/intel_ddi.c +0
-0}if (ret)drivers/gpu/drm/i915/display/intel_display.c +0
-1@@ -13091,7 +13091,6 @@ intel_pipe_config_compare(const structintel_crtc_state *current_config,PIPE_CONF_CHECK_I (pixel_multiplier );PIPE_CONF_CHECK_I (output_format); -PIPE_CONF_CHECK_I (dc3co_exitline);PIPE_CONF_CHECK_BOOL (has_hdmi_sink); if ((INTEL_GEN(dev_priv) < 8 && !IS_HASWELL(dev_priv)) ||drivers/gpu/drm/i915/display/intel_display.c +0
-0IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))drivers/gpu/drm/i915/display/intel_psr.c +5
-0@@ -596,6 +596,37 @@ static void tgl_disallow_dc3co_on_psr2_exit(struct drm_i915_private *dev_priv)tgl_psr2_disable_dc3co (dev_priv); } +static void +tgl_dc3co_exitline_compute_config (struct intel_dp *intel_dp, +struct intel_crtc_state *crtc_state) +{ + const u32 crtc_vdisplay = crtc_state-
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_psr.c static void tgl_disallow_dc3co_on_psr2_exit(struct drm_i915_private *dev_priv) · line 606
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_psr.c +3
-0>base.adjusted_mode.crtc_vdisplay; +struct intel_digital_port *dig_port =dp_to_dig_port (intel_dp); +struct drm_i915_private *dev_priv =dp_to_i915 (intel_dp); +u32 exit_scanlines;We wanted to explicitly clear
dc3co_exitlinein case it is not supported.
The whole intel_crtc_state is zeroed before the compute functions are called so no need to set dc3co_exitline to zero.
Quoted 43 lines
Quoted 43 lines
drivers/gpu/drm/i915/display/intel_psr.c +12
-0+ +if (!(dev_priv->csr.allowed_dc_mask &DC_STATE_EN_DC3CO )) +return ; + +/* B.Specs:49196 DC3CO only works with pipeA and DDIA.*/ +if (to_intel_crtc (crtc_state->base.crtc)->pipe !=PIPE_A || + dig_port->base.port !=PORT_A ) +return ; + +/* +* DC3CO Exit time 200us B.Spec 49196 +* PSR2 transcoder Early Exit scanlines = ROUNDUP(200 / line time) + 1
drivers/gpu/drm/i915/display/intel_psr.c +3
-0+*/ + exit_scanlines = + intel_usecs_to_scanlines(&crtc_state-Quoted 1 line
base.adjusted_mode, 200) + 1;
drivers/gpu/drm/i915/display/intel_psr.c +6
-0+ +if (WARN_ON (exit_scanlines > crtc_vdisplay)) +return ; + + crtc_state->dc3co_exitline = crtc_vdisplay - exit_scanlines; + DRM_DEBUG_KMS("DC3CO exit scanlines %d\n", crtc_state-Quoted 1 line
dc3co_exitline);drivers/gpu/drm/i915/display/intel_psr.c +2
-0+} +static bool intel_psr2_config_valid (struct intel_dp *intel_dp, struct intel_crtc_state
*crtc_state)
{drivers/gpu/drm/i915/display/intel_psr.c +1
-0@@ -658,6 +689,7 @@ static bool intel_psr2_config_valid(structintel_dp *intel_dp, return false; } +tgl_dc3co_exitline_compute_config (intel_dp, crtc_state);return true; }@@ -775,6 +807,21 @@ static void intel_psr_enable_source(struct intel_dp *intel_dp,I915_WRITE (EDP_PSR_DEBUG (dev_priv->psr.transcoder), mask);
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_psr.c static void intel_psr_enable_source(struct intel_dp *intel_dp, · line 811
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_psr.c +2
-0psr_irq_control (dev_priv); + +if (INTEL_GEN (dev_priv) >=12 && dev_priv->psr.psr2_enabled) {IMHO we can use
dc3co_enabledflag here instead ofpsr2_enabled, and it would be
nice to have a seperate function to set the exitline here. Thanks,
Anshuman Gupta.
Here it is checking for PSR2 because in case DC3CO is disabled it will set EXITLINE to 0 but we could keep it set too without any drawbacks. Thoughts Imre?
I don't think we need a separated function it is just RMW into one registers.
Quoted 17 lines
Quoted 17 lines
drivers/gpu/drm/i915/display/intel_psr.c +4
-0+u32 val; + +/* +* TODO: if future platforms supports DC3CO in more than one
drivers/gpu/drm/i915/display/intel_psr.c +1
-0+* transcoder, EXITLINE will need to be unset when disabling PSR
drivers/gpu/drm/i915/display/intel_psr.c +8
-0+*/ + val =I915_READ (EXITLINE (cpu_transcoder)); + val &= ~(EXITLINE_MASK |EXITLINE_ENABLE ); + val |= crtc_state->dc3co_exitline <<EXITLINE_SHIFT ; +if (crtc_state->dc3co_exitline) + val |=EXITLINE_ENABLE ; +I915_WRITE (EXITLINE (cpu_transcoder), val); + } }
Quoted 5 lines
Quoted 5 lines
static void intel_psr_enable_locked(struct
drm_i915_private*dev_priv,Signature · 1 line
2.23.0
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 3/3] drm/i915/dc3co: Avoid full modeset when EXITLINE needs to be changedy
Quoted 271 lines · Jose
Quoted 207 lines · Anshuamn Gupta
Quoted 206 lines · José Roberto de Souza
A recent change in BSpec allow us to change EXTLINE while transcoder
is enabled so this allow us to change it even when doing the first fastset after taking over previous hardware state set by BIOS. BIOS don't enable PSR, so if sink supports PSR it will be enabled on
the first fastset, so moving the EXTLINE compute and set to PSR flows
allow us to simplfy a bunch of code.This will save a lot of time in all the IGT tests that uses CRC, as when PSR2 is enabled CRCs are not generated, so we switch to PSR1, so
the previous code would compute dc3co_exitline=0 causing a full modeset that would shutdown pipe, enable and train link.BSpec: 49196
Cc Imre Deak <[email protected]>Cc Anshuman Gupta <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>--- drivers/gpu/drm/i915/display/intel_ddi.c | 86 ---------------- ---- drivers/gpu/drm/i915/display/intel_display.c | 1 - drivers/gpu/drm/i915/display/intel_psr.c | 47 +++++++++++ 3 files changed, 47 insertions(+), 87 deletions(-)drivers/gpu/drm/i915/display/intel_ddi.c +0
-16@@ -3339,86 +3339,6 @@ static void intel_ddi_disable_fec_state(struct intel_encoder *encoder, POSTING_READ(intel_dp->regs.dp_tp_ctl); } -static void -tgl_clear_psr2_transcoder_exitline (const struct intel_crtc_state *cstate) -{ -struct drm_i915_private *dev_priv =to_i915 (cstate->base.crtc- >dev); -u32 val; - -if (!cstate->dc3co_exitline) -return ; - - val =I915_READ (EXITLINE (cstate->cpu_transcoder)); - val &= ~(EXITLINE_MASK |EXITLINE_ENABLE ); -I915_WRITE (EXITLINE (cstate->cpu_transcoder), val); -} - -static void -tgl_set_psr2_transcoder_exitline(const struct intel_crtc_state*cstate)
drivers/gpu/drm/i915/display/intel_ddi.c +0
-3-{ -u32 val, exit_scanlines; - struct drm_i915_private *dev_priv = to_i915(cstate->base.crtc-Quoted 1 line
dev);
drivers/gpu/drm/i915/display/intel_ddi.c +0
-14- -if (!cstate->dc3co_exitline) -return ; - - exit_scanlines = cstate->dc3co_exitline; - exit_scanlines <<=EXITLINE_SHIFT ; - val =I915_READ (EXITLINE (cstate->cpu_transcoder)); - val &= ~(EXITLINE_MASK |EXITLINE_ENABLE ); - val |= exit_scanlines; - val |=EXITLINE_ENABLE ; -I915_WRITE (EXITLINE (cstate->cpu_transcoder), val); -} - -static void tgl_dc3co_exitline_compute_config(struct intel_encoder*encoder,
drivers/gpu/drm/i915/display/intel_ddi.c +0
-1-struct intel_crtc_state *cstate)
drivers/gpu/drm/i915/display/intel_ddi.c +0
-3-{ -u32 exit_scanlines; - struct drm_i915_private *dev_priv = to_i915(cstate->base.crtc-Quoted 1 line
dev);
drivers/gpu/drm/i915/display/intel_ddi.c +0
-18-u32 crtc_vdisplay = cstate->base.adjusted_mode.crtc_vdisplay; - - cstate->dc3co_exitline =0 ; - -if (!(dev_priv->csr.allowed_dc_mask &DC_STATE_EN_DC3CO )) -return ; - -/* B.Specs:49196 DC3CO only works with pipeA and DDIA.*/ -if (to_intel_crtc (cstate->base.crtc)->pipe !=PIPE_A || - encoder->port !=PORT_A ) -return ; - -if (!cstate->has_psr2 || !cstate->base.active) -return ; - -/* -* DC3CO Exit time 200us B.Spec 49196 -* PSR2 transcoder Early Exit scanlines = ROUNDUP(200 / line time) + 1
drivers/gpu/drm/i915/display/intel_ddi.c +0
-3-*/ - exit_scanlines = - intel_usecs_to_scanlines(&cstate->base.adjusted_mode,200) + 1;
drivers/gpu/drm/i915/display/intel_ddi.c +0
-6- -if (WARN_ON (exit_scanlines > crtc_vdisplay)) -return ; - - cstate->dc3co_exitline = crtc_vdisplay - exit_scanlines; - DRM_DEBUG_KMS("DC3CO exit scanlines %d\n", cstate-Quoted 1 line
dc3co_exitline);drivers/gpu/drm/i915/display/intel_ddi.c +0
-3-} - -static void tgl_dc3co_exitline_get_config(struct intel_crtc_state
*crtc_state)drivers/gpu/drm/i915/display/intel_ddi.c +0
-3-{ -u32 val; - struct drm_i915_private *dev_priv = to_i915(crtc_state-Quoted 1 line
base.crtc->dev);drivers/gpu/drm/i915/display/intel_ddi.c +0
-10- -if (INTEL_GEN (dev_priv) <12 ) -return ; - - val =I915_READ (EXITLINE (crtc_state->cpu_transcoder)); - -if (val &EXITLINE_ENABLE ) - crtc_state->dc3co_exitline = val &EXITLINE_MASK ; -} -static void tgl_ddi_pre_enable_dp (struct intel_encoder *encoder, const struct intel_crtc_state
*crtc_state,
const structdrm_connector_state*conn_state)drivers/gpu/drm/i915/display/intel_ddi.c +0
-2@@ -3431,7 +3351,6 @@ static void tgl_ddi_pre_enable_dp(structintel_encoder *encoder, int level = intel_ddi_dp_level(intel_dp);enum transcoder transcoder = crtc_state->cpu_transcoder; -tgl_set_psr2_transcoder_exitline (crtc_state);intel_dp_set_link_params (intel_dp, crtc_state->port_clock, crtc_state->lane_count, is_mst);@@ -3760,7 +3679,6 @@ static void intel_ddi_post_disable_dp(struct intel_encoder *encoder, dig_port- >ddi_io_power_domain);intel_ddi_clk_disable (encoder); -tgl_clear_psr2_transcoder_exitline (old_crtc_state); }static void intel_ddi_post_disable_hdmi(struct
intel_encoder
*encoder,drivers/gpu/drm/i915/display/intel_ddi.c +0
-4@@ -4308,9 +4226,6 @@ void intel_ddi_get_config(structintel_encoder *encoder, break; } -if (encoder->type ==INTEL_OUTPUT_EDP ) -tgl_dc3co_exitline_get_config (pipe_config); - pipe_config->has_audio =intel_ddi_is_audio_enabled (dev_priv, cpu_transcoder);@@ -4392,7 +4307,6 @@ static int intel_ddi_compute_config(structintel_encoder *encoder, ret =intel_hdmi_compute_config (encoder, pipe_config, conn_state); }else { ret =intel_dp_compute_config (encoder, pipe_config, conn_state); - tgl_dc3co_exitline_compute_config(encoder,
pipe_config);drivers/gpu/drm/i915/display/intel_ddi.c +0
-0}if (ret)drivers/gpu/drm/i915/display/intel_display.c +0
-1@@ -13091,7 +13091,6 @@ intel_pipe_config_compare(const structintel_crtc_state *current_config,PIPE_CONF_CHECK_I (pixel_multiplier );PIPE_CONF_CHECK_I (output_format); -PIPE_CONF_CHECK_I (dc3co_exitline);PIPE_CONF_CHECK_BOOL (has_hdmi_sink); if ((INTEL_GEN(dev_priv) < 8 && !IS_HASWELL(dev_priv)) ||drivers/gpu/drm/i915/display/intel_display.c +0
-0IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))drivers/gpu/drm/i915/display/intel_psr.c +5
-0@@ -596,6 +596,37 @@ static void tgl_disallow_dc3co_on_psr2_exit(struct drm_i915_private *dev_priv)tgl_psr2_disable_dc3co (dev_priv); } +static void +tgl_dc3co_exitline_compute_config (struct intel_dp *intel_dp, +struct intel_crtc_state *crtc_state) +{ + const u32 crtc_vdisplay = crtc_state-Quoted 6 lines
drivers/gpu/drm/i915/display/intel_psr.c static void tgl_disallow_dc3co_on_psr2_exit(struct drm_i915_private *dev_priv) · line 606
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_psr.c +3
-0>base.adjusted_mode.crtc_vdisplay; +struct intel_digital_port *dig_port =dp_to_dig_port (intel_dp); +struct drm_i915_private *dev_priv =dp_to_i915 (intel_dp); +u32 exit_scanlines;We wanted to explicitly clear
dc3co_exitlinein case it is not supported.The whole
intel_crtc_stateis zeroed before the compute functions are called so no need to setdc3co_exitlineto zero.Quoted 43 lines
Quoted 43 lines
drivers/gpu/drm/i915/display/intel_psr.c +12
-0+ +if (!(dev_priv->csr.allowed_dc_mask &DC_STATE_EN_DC3CO )) +return ; + +/* B.Specs:49196 DC3CO only works with pipeA and DDIA.*/ +if (to_intel_crtc (crtc_state->base.crtc)->pipe !=PIPE_A || + dig_port->base.port !=PORT_A ) +return ; + +/* +* DC3CO Exit time 200us B.Spec 49196 +* PSR2 transcoder Early Exit scanlines = ROUNDUP(200 / line time) + 1
drivers/gpu/drm/i915/display/intel_psr.c +3
-0+*/ + exit_scanlines = + intel_usecs_to_scanlines(&crtc_state-Quoted 1 line
base.adjusted_mode, 200) + 1;
drivers/gpu/drm/i915/display/intel_psr.c +6
-0+ +if (WARN_ON (exit_scanlines > crtc_vdisplay)) +return ; + + crtc_state->dc3co_exitline = crtc_vdisplay - exit_scanlines; + DRM_DEBUG_KMS("DC3CO exit scanlines %d\n", crtc_state-Quoted 1 line
dc3co_exitline);drivers/gpu/drm/i915/display/intel_psr.c +2
-0+} +static bool intel_psr2_config_valid (struct intel_dp *intel_dp, struct intel_crtc_state
*crtc_state)
{drivers/gpu/drm/i915/display/intel_psr.c +1
-0@@ -658,6 +689,7 @@ static bool intel_psr2_config_valid(structintel_dp *intel_dp, return false; } +tgl_dc3co_exitline_compute_config (intel_dp, crtc_state);return true; }@@ -775,6 +807,21 @@ static void intel_psr_enable_source(struct intel_dp *intel_dp,I915_WRITE (EDP_PSR_DEBUG (dev_priv->psr.transcoder), mask);Quoted 8 lines
drivers/gpu/drm/i915/display/intel_psr.c static void intel_psr_enable_source(struct intel_dp *intel_dp, · line 811
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_psr.c +2
-0psr_irq_control (dev_priv); + +if (INTEL_GEN (dev_priv) >=12 && dev_priv->psr.psr2_enabled) {IMHO we can use
dc3co_enabledflag here instead ofpsr2_enabled, and it would be
nice to have a seperate function to set the exitline here. Thanks,
Anshuman Gupta.
Quoted 2 lines
Here it is checking for PSR2 because in case DC3CO is disabled it will set EXITLINE to 0 but we could keep it set too without any drawbacks.
IMHO EXITLINE is only used to exit the DC3CO until a programmed exit line event, this optimally align the frame update command position within the repeated video frame. so there is no use case of EXITLINE without DC3CO. Thanks ,
Anshuman Gupta.
Quoted 22 lines
Thoughts Imre?
I don't think we need a separated function it is just RMW into one registers.
Quoted 17 lines
Quoted 17 lines
drivers/gpu/drm/i915/display/intel_psr.c +4
-0+u32 val; + +/* +* TODO: if future platforms supports DC3CO in more than one
drivers/gpu/drm/i915/display/intel_psr.c +1
-0+* transcoder, EXITLINE will need to be unset when disabling PSR
drivers/gpu/drm/i915/display/intel_psr.c +8
-0+*/ + val =I915_READ (EXITLINE (cpu_transcoder)); + val &= ~(EXITLINE_MASK |EXITLINE_ENABLE ); + val |= crtc_state->dc3co_exitline <<EXITLINE_SHIFT ; +if (crtc_state->dc3co_exitline) + val |=EXITLINE_ENABLE ; +I915_WRITE (EXITLINE (cpu_transcoder), val); + } }
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
static void intel_psr_enable_locked(struct
drm_i915_private*dev_priv,Signature · 1 line
2.23.0
_______________________________________________
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/3] drm/i915/psr: Share the computation of idle frames
In reply to José Roberto de Souza== Series Details ==
== Series Details ==
Series: series starting with [1/3] drm/i915/psr: Share the computation of idle frames
URL : https://patchwork.freedesktop.org/series/68844/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_7234 -> Patchwork_15097
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/index.html
Known issues
------------
Here are the changes found in Patchwork_15097 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@vgem_basic@second-client:
- fi-icl-u3: [PASS][1] -> [DMESG-WARN][2] ([fdo#107724]) +1 similar issue
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/fi-icl-u3/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/fi-icl-u3/igt@[email protected]
#### Possible fixes ####
* igt@gem_busy@busy-all:
- fi-icl-u3: [DMESG-WARN][3] ([fdo#107724]) -> [PASS][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/fi-icl-u3/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/fi-icl-u3/igt@[email protected]
* igt@gem_flink_basic@basic:
- fi-icl-u3: [DMESG-WARN][5] ([fdo#107724] / [fdo#112052 ]) -> [PASS][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/fi-icl-u3/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/fi-icl-u3/igt@[email protected]
#### Warnings ####
* igt@i915_pm_rpm@module-reload:
- fi-icl-u2: [DMESG-WARN][7] ([fdo#110595]) -> [DMESG-WARN][8] ([fdo#106107] / [fdo#110595])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/fi-icl-u2/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/fi-icl-u2/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#106107]: https://bugs.freedesktop.org/show_bug.cgi?id=106107
[fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
[fdo#110595]: https://bugs.freedesktop.org/show_bug.cgi?id=110595
[fdo#112052 ]: https://bugs.freedesktop.org/show_bug.cgi?id=112052
Participating hosts (52 -> 41)
------------------------------
Missing (11): fi-ilk-m540 fi-bxt-dsi fi-bsw-n3050 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-cfl-8109u fi-pnv-d510 fi-byt-clapper fi-bdw-samus
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_7234 -> Patchwork_15097
CI-20190529: 20190529
CI_DRM_7234: 4163f8c46b6ef75ea32737f08aa3f5fd429a4462 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5255: b21b6a7aaa0db2159f22ee4427804e5a16fe2261 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_15097: 992cc413b400eaaf0373d9eca9e5918f88314f3e @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
992cc413b400 drm/i915/dc3co: Avoid full modeset when EXITLINE needs to be changed b7f54f2ed8c5 drm/i915/dc3co: Check for DC3C0 exit state instead of sleep 3eca46244cc4 drm/i915/psr: Share the computation of idle frames
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/index.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/3] drm/i915/psr: Share the computation of idle frames
In reply to José Roberto de Souza== Series Details ==
== Series Details ==
Series: series starting with [1/3] drm/i915/psr: Share the computation of idle frames
URL : https://patchwork.freedesktop.org/series/68844/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_7234_full -> Patchwork_15097_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_15097_full:
### IGT changes ###
#### Suppressed ####
The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.
* igt@kms_color@pipe-a-gamma:
- {shard-tglb}: [PASS][1] -> [FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-tglb5/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-tglb2/igt@[email protected]
Known issues
------------
Here are the changes found in Patchwork_15097_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_ctx_isolation@vcs1-reset:
- shard-iclb: [PASS][3] -> [SKIP][4] ([fdo#109276] / [fdo#112080]) +1 similar issue
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-iclb2/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-iclb8/igt@[email protected]
* igt@gem_exec_schedule@preempt-queue-bsd1:
- shard-iclb: [PASS][5] -> [SKIP][6] ([fdo#109276]) +8 similar issues
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-iclb1/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-iclb5/igt@[email protected]
* igt@gem_exec_schedule@reorder-wide-bsd:
- shard-iclb: [PASS][7] -> [SKIP][8] ([fdo#112146]) +2 similar issues
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-iclb3/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-iclb2/igt@[email protected]
* igt@gem_persistent_relocs@forked-interruptible-thrashing:
- shard-snb: [PASS][9] -> [FAIL][10] ([fdo#112037])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-snb2/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-snb2/igt@[email protected]
* igt@gem_userptr_blits@sync-unmap:
- shard-snb: [PASS][11] -> [DMESG-WARN][12] ([fdo#111870])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-snb7/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-snb2/igt@[email protected]
* igt@gem_workarounds@suspend-resume-fd:
- shard-kbl: [PASS][13] -> [DMESG-WARN][14] ([fdo#108566]) +2 similar issues
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-kbl2/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-kbl3/igt@[email protected]
* igt@i915_pm_rpm@system-suspend-execbuf:
- shard-skl: [PASS][15] -> [INCOMPLETE][16] ([fdo#104108] / [fdo#107807])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-skl9/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-skl3/igt@[email protected]
* igt@kms_cursor_crc@pipe-a-cursor-128x128-onscreen:
- shard-hsw: [PASS][17] -> [INCOMPLETE][18] ([fdo#103540])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-hsw5/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-hsw2/igt@[email protected]
* igt@kms_cursor_crc@pipe-a-cursor-dpms:
- shard-kbl: [PASS][19] -> [FAIL][20] ([fdo#103232])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-kbl7/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-kbl3/igt@[email protected]
- shard-apl: [PASS][21] -> [FAIL][22] ([fdo#103232])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-apl7/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-apl4/igt@[email protected]
* igt@kms_flip@flip-vs-expired-vblank:
- shard-iclb: [PASS][23] -> [FAIL][24] ([fdo#105363])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-iclb5/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-iclb6/igt@[email protected]
* igt@kms_flip@flip-vs-suspend-interruptible:
- shard-apl: [PASS][25] -> [DMESG-WARN][26] ([fdo#108566]) +3 similar issues
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-apl8/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-apl4/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-blt:
- shard-iclb: [PASS][27] -> [FAIL][28] ([fdo#103167]) +3 similar issues
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-iclb6/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-iclb2/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min:
- shard-skl: [PASS][29] -> [FAIL][30] ([fdo#108145]) +1 similar issue
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-skl1/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-skl1/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
- shard-skl: [PASS][31] -> [FAIL][32] ([fdo#108145] / [fdo#110403])
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-skl3/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-skl3/igt@[email protected]
* igt@kms_psr@psr2_basic:
- shard-iclb: [PASS][33] -> [SKIP][34] ([fdo#109441]) +2 similar issues
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-iclb2/igt@kms_psr@psr2_basic.html
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-iclb1/igt@kms_psr@psr2_basic.html
* igt@kms_setmode@basic:
- shard-apl: [PASS][35] -> [FAIL][36] ([fdo#99912])
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-apl1/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-apl7/igt@[email protected]
* igt@perf_pmu@busy-accuracy-98-vcs1:
- shard-iclb: [PASS][37] -> [SKIP][38] ([fdo#112080]) +5 similar issues
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-iclb1/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-iclb7/igt@[email protected]
#### Possible fixes ####
* {igt@gem_ctx_persistence@vcs1-queued}:
- shard-iclb: [SKIP][39] ([fdo#109276] / [fdo#112080]) -> [PASS][40] +2 similar issues
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-iclb3/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-iclb4/igt@[email protected]
* igt@gem_ctx_shared@q-smoketest-default:
- shard-apl: [INCOMPLETE][41] ([fdo#103927]) -> [PASS][42] +1 similar issue
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-apl1/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-apl1/igt@[email protected]
* igt@gem_ctx_switch@vcs1-heavy:
- shard-iclb: [SKIP][43] ([fdo#112080]) -> [PASS][44] +7 similar issues
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-iclb3/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-iclb2/igt@[email protected]
* igt@gem_exec_create@forked:
- {shard-tglb}: [INCOMPLETE][45] ([fdo#108838] / [fdo#111747]) -> [PASS][46]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-tglb3/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-tglb1/igt@[email protected]
* igt@gem_exec_gttfill@basic:
- {shard-tglb}: [INCOMPLETE][47] ([fdo#111593]) -> [PASS][48]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-tglb6/igt@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-tglb6/igt@[email protected]
* igt@gem_exec_schedule@fifo-bsd1:
- shard-iclb: [SKIP][49] ([fdo#109276]) -> [PASS][50] +4 similar issues
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-iclb6/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-iclb2/igt@[email protected]
* igt@gem_exec_schedule@in-order-bsd:
- shard-iclb: [SKIP][51] ([fdo#112146]) -> [PASS][52] +4 similar issues
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-iclb1/igt@[email protected]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-iclb5/igt@[email protected]
* igt@gem_exec_schedule@preempt-queue-contexts-render:
- {shard-tglb}: [INCOMPLETE][53] ([fdo#111606] / [fdo#111677]) -> [PASS][54]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-tglb6/igt@[email protected]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-tglb3/igt@[email protected]
* igt@gem_sync@basic-all:
- {shard-tglb}: [INCOMPLETE][55] ([fdo#111647]) -> [PASS][56]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-tglb6/igt@[email protected]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-tglb5/igt@[email protected]
* igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy:
- shard-hsw: [DMESG-WARN][57] ([fdo#111870]) -> [PASS][58] +1 similar issue
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-hsw5/igt@[email protected]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-hsw4/igt@[email protected]
* igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy-gup:
- shard-snb: [DMESG-WARN][59] ([fdo#111870]) -> [PASS][60]
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-snb1/igt@[email protected]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-snb4/igt@[email protected]
* {igt@i915_pm_dc@dc6-psr}:
- shard-iclb: [FAIL][61] ([fdo#110548]) -> [PASS][62]
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-iclb6/igt@[email protected]
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-iclb3/igt@[email protected]
* igt@kms_color@pipe-a-ctm-0-25:
- shard-skl: [DMESG-WARN][63] ([fdo#106107]) -> [PASS][64]
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-skl8/igt@[email protected]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-skl6/igt@[email protected]
* igt@kms_cursor_crc@pipe-c-cursor-suspend:
- shard-kbl: [DMESG-WARN][65] ([fdo#108566]) -> [PASS][66] +1 similar issue
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-kbl6/igt@[email protected]
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-kbl7/igt@[email protected]
* igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic:
- shard-glk: [FAIL][67] ([fdo#104873]) -> [PASS][68]
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-glk7/igt@[email protected]
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-glk6/igt@[email protected]
* igt@kms_flip@flip-vs-expired-vblank-interruptible:
- {shard-tglb}: [INCOMPLETE][69] ([fdo#112031]) -> [PASS][70]
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-tglb8/igt@[email protected]
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-tglb2/igt@[email protected]
* igt@kms_flip@flip-vs-suspend:
- shard-apl: [DMESG-WARN][71] ([fdo#108566]) -> [PASS][72]
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-apl2/igt@[email protected]
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-apl1/igt@[email protected]
* igt@kms_flip@flip-vs-suspend-interruptible:
- shard-snb: [INCOMPLETE][73] ([fdo#105411]) -> [PASS][74]
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-snb1/igt@[email protected]
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-snb5/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-pwrite:
- shard-iclb: [FAIL][75] ([fdo#103167]) -> [PASS][76] +5 similar issues
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-iclb2/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-pwrite.html
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-iclb8/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-pwrite.html
* igt@kms_frontbuffer_tracking@fbcpsr-rgb565-draw-mmap-wc:
- {shard-tglb}: [FAIL][77] ([fdo#103167]) -> [PASS][78] +1 similar issue
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-tglb1/igt@[email protected]
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-tglb4/igt@[email protected]
* igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-indfb-draw-blt:
- {shard-tglb}: [INCOMPLETE][79] ([fdo#111747]) -> [PASS][80]
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-tglb8/igt@[email protected]
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-tglb2/igt@[email protected]
* igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-mmap-gtt:
- {shard-tglb}: [INCOMPLETE][81] -> [PASS][82]
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-tglb2/igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-mmap-gtt.html
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-tglb7/igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-mmap-gtt.html
* igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min:
- shard-skl: [FAIL][83] ([fdo#108145]) -> [PASS][84]
[83]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-skl4/igt@[email protected]
[84]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-skl1/igt@[email protected]
* igt@kms_psr@psr2_primary_page_flip:
- shard-iclb: [SKIP][85] ([fdo#109441]) -> [PASS][86] +1 similar issue
[85]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-iclb3/igt@kms_psr@psr2_primary_page_flip.html
[86]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-iclb2/igt@kms_psr@psr2_primary_page_flip.html
* igt@kms_vblank@pipe-c-ts-continuation-dpms-suspend:
- {shard-tglb}: [INCOMPLETE][87] ([fdo#111850]) -> [PASS][88]
[87]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-tglb2/igt@[email protected]
[88]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-tglb1/igt@[email protected]
* igt@prime_vgem@basic-sync-default:
- {shard-tglb}: [INCOMPLETE][89] ([fdo#111930]) -> [PASS][90]
[89]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-tglb4/igt@[email protected]
[90]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-tglb7/igt@[email protected]
#### Warnings ####
* igt@gem_mocs_settings@mocs-rc6-bsd2:
- shard-iclb: [SKIP][91] ([fdo#109276]) -> [FAIL][92] ([fdo#111330])
[91]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-iclb3/igt@[email protected]
[92]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-iclb2/igt@[email protected]
* igt@kms_flip@flip-vs-suspend-interruptible:
- shard-kbl: [DMESG-WARN][93] ([fdo#108566]) -> [DMESG-WARN][94] ([fdo#103313] / [fdo#108566])
[93]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-kbl7/igt@[email protected]
[94]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-kbl3/igt@[email protected]
* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes:
- shard-kbl: [DMESG-WARN][95] ([fdo#108566]) -> [DMESG-WARN][96] ([fdo#103313])
[95]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7234/shard-kbl2/igt@[email protected]
[96]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/shard-kbl3/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103313]: https://bugs.freedesktop.org/show_bug.cgi?id=103313
[fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
[fdo#104873]: https://bugs.freedesktop.org/show_bug.cgi?id=104873
[fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
[fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
[fdo#106107]: https://bugs.freedesktop.org/show_bug.cgi?id=106107
[fdo#107807]: https://bugs.freedesktop.org/show_bug.cgi?id=107807
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#108838]: https://bugs.freedesktop.org/show_bug.cgi?id=108838
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#110403]: https://bugs.freedesktop.org/show_bug.cgi?id=110403
[fdo#110548]: https://bugs.freedesktop.org/show_bug.cgi?id=110548
[fdo#111330]: https://bugs.freedesktop.org/show_bug.cgi?id=111330
[fdo#111593]: https://bugs.freedesktop.org/show_bug.cgi?id=111593
[fdo#111600]: https://bugs.freedesk
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15097/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Looks good to me, there is a minor comment see below.
Quoted 6 lines · José Roberto de Souza
Both activate functions and the dc3co disable function were doing the same thing, so better move to a function and share.
Also while at it adding aWARN_ONto catch invalid values.Cc Anshuman Gupta <[email protected]>Cc Imre Deak <[email protected]>
Quoted 26 lines
Signed-off-by José Roberto de Souza <[email protected]>--- drivers/gpu/drm/i915/display/intel_psr.c | 43 +++++++++++------------- 1 file changed, 19 insertions(+), 24 deletions(-)drivers/gpu/drm/i915/display/intel_psr.c +2
-5@@ -451,22 +451,29 @@ static u32 intel_psr1_get_tp_time(struct intel_dp *intel_dp)return val; } -static void hsw_activate_psr1 (struct intel_dp *intel_dp) +static u8 psr_compute_idle_frames (struct intel_dp *intel_dp) {struct drm_i915_private *dev_priv =dp_to_i915 (intel_dp); -u32 max_sleep_time =0x1f ; -u32 val =EDP_PSR_ENABLE ; +int idle_frames;/* Let's use 6 as the minimum to cover all known cases including the * off-by-one issue that HW has in some cases. */ -int idle_frames =max (6 , dev_priv->vbt.psr.idle_frames); -
drivers/gpu/drm/i915/display/intel_psr.c static u32 intel_psr1_get_tp_time(struct intel_dp *intel_dp) · line 467
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_psr.c +5
-4-/* sink_sync_latency of 8 means source has to wait for more than 8 -* frames, we'll go with 9 frames for now -*/ + idle_frames =max (6 , dev_priv->vbt.psr.idle_frames); idle_frames =max (idle_frames, dev_priv->psr.sink_sync_latency +1 ); - val |= idle_frames <<EDP_PSR_IDLE_FRAME_SHIFT ; + +WARN_ON (idle_frames >0xf ); + +return idle_frames;
there would be return type mismatch warning.
Quoted 49 lines
drivers/gpu/drm/i915/display/intel_psr.c +12
-15+} + +static void hsw_activate_psr1 (struct intel_dp *intel_dp) +{ +struct drm_i915_private *dev_priv =dp_to_i915 (intel_dp); +u32 max_sleep_time =0x1f ; +u32 val =EDP_PSR_ENABLE ; + + val |=psr_compute_idle_frames (intel_dp) <<EDP_PSR_IDLE_FRAME_SHIFT ; val |= max_sleep_time <<EDP_PSR_MAX_SLEEP_TIME_SHIFT ;if (IS_HASWELL (dev_priv))@@ -490,13 +497,7 @@ static void hsw_activate_psr2(struct intel_dp *intel_dp)struct drm_i915_private *dev_priv =dp_to_i915 (intel_dp);u32 val; -/* Let's use 6 as the minimum to cover all known cases including the -* off-by-one issue that HW has in some cases. -*/ -int idle_frames =max (6 , dev_priv->vbt.psr.idle_frames); - - idle_frames =max (idle_frames, dev_priv->psr.sink_sync_latency +1 ); - val = idle_frames <<EDP_PSR2_IDLE_FRAME_SHIFT ; + val =psr_compute_idle_frames (intel_dp) <<EDP_PSR2_IDLE_FRAME_SHIFT ; val |=EDP_PSR2_ENABLE |EDP_SU_TRACK_ENABLE ;if (INTEL_GEN (dev_priv) >=10 ||IS_GEMINILAKE (dev_priv))@@ -563,16 +564,10 @@ static void tgl_psr2_enable_dc3co(struct drm_i915_private *dev_priv)static void tgl_psr2_disable_dc3co (struct drm_i915_private *dev_priv) { -int idle_frames; +struct intel_dp *intel_dp = dev_priv->psr.dp;intel_display_power_set_target_dc_state (dev_priv,DC_STATE_EN_UPTO_DC6 ); -/* -* Restore PSR2 idle frame let's use 6 as the minimum to cover all known -* cases including the off-by-one issue that HW has in some cases. -*/ - idle_frames =max (6 , dev_priv->vbt.psr.idle_frames); - idle_frames =max (idle_frames, dev_priv->psr.sink_sync_latency +1 ); -psr2_program_idle_frames (dev_priv, idle_frames); +psr2_program_idle_frames (dev_priv,psr_compute_idle_frames (intel_dp)); }static void tgl_dc5_idle_thread (struct work_struct *work)Signature · 1 line
2.23.0
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 45 lines · Anshuamn Gupta
Looks good to me, there is a minor comment see below.
Quoted 7 lines · José Roberto de Souza
Both activate functions and the dc3co disable function were doing the
same thing, so better move to a function and share. Also while at it adding aWARN_ONto catch invalid values.Cc Anshuman Gupta <[email protected]>Cc Imre Deak <[email protected]>Acked-by Anshuman Gupta <[email protected]>Quoted 35 lines
Signed-off-by José Roberto de Souza <[email protected]>--- drivers/gpu/drm/i915/display/intel_psr.c | 43 +++++++++++--------- ---- 1 file changed, 19 insertions(+), 24 deletions(-)drivers/gpu/drm/i915/display/intel_psr.c +2
-3@@ -451,22 +451,29 @@ static u32 intel_psr1_get_tp_time(struct intel_dp *intel_dp)return val; } -static void hsw_activate_psr1 (struct intel_dp *intel_dp) +static u8 psr_compute_idle_frames (struct intel_dp *intel_dp) {struct drm_i915_private *dev_priv =dp_to_i915 (intel_dp); -u32 max_sleep_time =0x1f ; -u32 val =EDP_PSR_ENABLE ; +int idle_frames;/* Let's use 6 as the minimum to cover all known cases including the
drivers/gpu/drm/i915/display/intel_psr.c +0
-3* off-by-one issue that HW has in some cases. */ -int idle_frames =max (6 , dev_priv->vbt.psr.idle_frames); - -/* sink_sync_latency of 8 means source has to wait for more than 8
drivers/gpu/drm/i915/display/intel_psr.c +1
-2-* frames, we'll go with 9 frames for now -*/ + idle_frames =max (6 , dev_priv->vbt.psr.idle_frames);
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_psr.c static u32 intel_psr1_get_tp_time(struct intel_dp *intel_dp) · line 467
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_psr.c +5
-1idle_frames =max (idle_frames, dev_priv->psr.sink_sync_latency + 1); - val |= idle_frames << EDP_PSR_IDLE_FRAME_SHIFT; + +WARN_ON (idle_frames >0xf ); + +return idle_frames;there would be return type mismatch warning.
There is not warning, the value will be truncated but if happens we will get the warn_on above.
Quoted 57 lines
Quoted 57 lines
drivers/gpu/drm/i915/display/intel_psr.c +9
-0+} + +static void hsw_activate_psr1 (struct intel_dp *intel_dp) +{ +struct drm_i915_private *dev_priv =dp_to_i915 (intel_dp); +u32 max_sleep_time =0x1f ; +u32 val =EDP_PSR_ENABLE ; + + val |= psr_compute_idle_frames(intel_dp) <<
EDP_PSR_IDLE_FRAME_SHIFT;drivers/gpu/drm/i915/display/intel_psr.c +0
-1val |= max_sleep_time <<EDP_PSR_MAX_SLEEP_TIME_SHIFT ;if (IS_HASWELL (dev_priv))@@ -490,13 +497,7 @@ static void hsw_activate_psr2(struct intel_dp *intel_dp)struct drm_i915_private *dev_priv =dp_to_i915 (intel_dp);u32 val; -/* Let's use 6 as the minimum to cover all known cases including the
drivers/gpu/drm/i915/display/intel_psr.c +2
-6-* off-by-one issue that HW has in some cases. -*/ -int idle_frames =max (6 , dev_priv->vbt.psr.idle_frames); - - idle_frames =max (idle_frames, dev_priv->psr.sink_sync_latency + 1); - val = idle_frames << EDP_PSR2_IDLE_FRAME_SHIFT; + val = psr_compute_idle_frames(intel_dp) <<
EDP_PSR2_IDLE_FRAME_SHIFT;drivers/gpu/drm/i915/display/intel_psr.c +1
-3val |=EDP_PSR2_ENABLE |EDP_SU_TRACK_ENABLE ;if (INTEL_GEN (dev_priv) >=10 ||IS_GEMINILAKE (dev_priv))@@ -563,16 +564,10 @@ static void tgl_psr2_enable_dc3co(struct drm_i915_private *dev_priv)static void tgl_psr2_disable_dc3co (struct drm_i915_private *dev_priv) { -int idle_frames; +struct intel_dp *intel_dp = dev_priv->psr.dp;intel_display_power_set_target_dc_state (dev_priv,DC_STATE_EN_UPTO_DC6 ); -/* -* Restore PSR2 idle frame let's use 6 as the minimum to cover all known
drivers/gpu/drm/i915/display/intel_psr.c +0
-1-* cases including the off-by-one issue that HW has in some cases.
drivers/gpu/drm/i915/display/intel_psr.c +2
-4-*/ - idle_frames =max (6 , dev_priv->vbt.psr.idle_frames); - idle_frames = max(idle_frames, dev_priv->psr.sink_sync_latency + 1); - psr2_program_idle_frames(dev_priv, idle_frames); + psr2_program_idle_frames(dev_priv,
psr_compute_idle_frames(intel_dp));
}
Quoted 4 lines
Quoted 4 lines
static void
tgl_dc5_idle_thread(struct work_struct *work)Signature · 1 line
2.23.0
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Anshuamn Gupta
Reviewed-byQuoted 11 lines · Jose
Quoted 10 lines · Anshuamn Gupta
Looks good to me, there is a minor comment see below.
Quoted 7 lines · José Roberto de Souza
Both activate functions and the dc3co disable function were doing the
same thing, so better move to a function and share. Also while at it adding aWARN_ONto catch invalid values.Cc Anshuman Gupta <[email protected]>Cc Imre Deak <[email protected]>Acked-by Anshuman Gupta <[email protected]>
Quoted 105 lines
Quoted 35 lines
Quoted 35 lines
Signed-off-by José Roberto de Souza <[email protected]>--- drivers/gpu/drm/i915/display/intel_psr.c | 43 +++++++++++--------- ---- 1 file changed, 19 insertions(+), 24 deletions(-)drivers/gpu/drm/i915/display/intel_psr.c +2
-3@@ -451,22 +451,29 @@ static u32 intel_psr1_get_tp_time(struct intel_dp *intel_dp)return val; } -static void hsw_activate_psr1 (struct intel_dp *intel_dp) +static u8 psr_compute_idle_frames (struct intel_dp *intel_dp) {struct drm_i915_private *dev_priv =dp_to_i915 (intel_dp); -u32 max_sleep_time =0x1f ; -u32 val =EDP_PSR_ENABLE ; +int idle_frames;/* Let's use 6 as the minimum to cover all known cases including the
drivers/gpu/drm/i915/display/intel_psr.c +0
-3* off-by-one issue that HW has in some cases. */ -int idle_frames =max (6 , dev_priv->vbt.psr.idle_frames); - -/* sink_sync_latency of 8 means source has to wait for more than 8
drivers/gpu/drm/i915/display/intel_psr.c +1
-2-* frames, we'll go with 9 frames for now -*/ + idle_frames =max (6 , dev_priv->vbt.psr.idle_frames);Quoted 8 lines
drivers/gpu/drm/i915/display/intel_psr.c static u32 intel_psr1_get_tp_time(struct intel_dp *intel_dp) · line 467
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_psr.c +5
-1idle_frames =max (idle_frames, dev_priv->psr.sink_sync_latency + 1); - val |= idle_frames << EDP_PSR_IDLE_FRAME_SHIFT; + +WARN_ON (idle_frames >0xf ); + +return idle_frames;there would be return type mismatch warning.
There is not warning, the value will be truncated but if happens we will get the
warn_onabove.Quoted 57 lines
Quoted 57 lines
drivers/gpu/drm/i915/display/intel_psr.c +9
-0+} + +static void hsw_activate_psr1 (struct intel_dp *intel_dp) +{ +struct drm_i915_private *dev_priv =dp_to_i915 (intel_dp); +u32 max_sleep_time =0x1f ; +u32 val =EDP_PSR_ENABLE ; + + val |= psr_compute_idle_frames(intel_dp) <<
EDP_PSR_IDLE_FRAME_SHIFT;drivers/gpu/drm/i915/display/intel_psr.c +0
-1val |= max_sleep_time <<EDP_PSR_MAX_SLEEP_TIME_SHIFT ;if (IS_HASWELL (dev_priv))@@ -490,13 +497,7 @@ static void hsw_activate_psr2(struct intel_dp *intel_dp)struct drm_i915_private *dev_priv =dp_to_i915 (intel_dp);u32 val; -/* Let's use 6 as the minimum to cover all known cases including the
drivers/gpu/drm/i915/display/intel_psr.c +2
-6-* off-by-one issue that HW has in some cases. -*/ -int idle_frames =max (6 , dev_priv->vbt.psr.idle_frames); - - idle_frames =max (idle_frames, dev_priv->psr.sink_sync_latency + 1); - val = idle_frames << EDP_PSR2_IDLE_FRAME_SHIFT; + val = psr_compute_idle_frames(intel_dp) <<
EDP_PSR2_IDLE_FRAME_SHIFT;drivers/gpu/drm/i915/display/intel_psr.c +1
-3val |=EDP_PSR2_ENABLE |EDP_SU_TRACK_ENABLE ;if (INTEL_GEN (dev_priv) >=10 ||IS_GEMINILAKE (dev_priv))@@ -563,16 +564,10 @@ static void tgl_psr2_enable_dc3co(struct drm_i915_private *dev_priv)static void tgl_psr2_disable_dc3co (struct drm_i915_private *dev_priv) { -int idle_frames; +struct intel_dp *intel_dp = dev_priv->psr.dp;intel_display_power_set_target_dc_state (dev_priv,DC_STATE_EN_UPTO_DC6 ); -/* -* Restore PSR2 idle frame let's use 6 as the minimum to cover all known
drivers/gpu/drm/i915/display/intel_psr.c +0
-1-* cases including the off-by-one issue that HW has in some cases.
drivers/gpu/drm/i915/display/intel_psr.c +2
-4-*/ - idle_frames =max (6 , dev_priv->vbt.psr.idle_frames); - idle_frames = max(idle_frames, dev_priv->psr.sink_sync_latency + 1); - psr2_program_idle_frames(dev_priv, idle_frames); + psr2_program_idle_frames(dev_priv,
psr_compute_idle_frames(intel_dp));
}
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
static void
tgl_dc5_idle_thread(struct work_struct *work)Signature · 1 line
2.23.0
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx