drm/i915/display: Ignore IGNORE_PSR2_HW_TRACKING for platforms without sel fetch
Subsystems (3)
PATCH 1/4 drm/i915/display: Ignore IGNORE_PSR2_HW_TRACKING for platforms without sel fetch
For platforms without selective fetch this register is reserved so do not write 0 to it.
--- drivers/gpu/drm/i915/display/intel_psr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/display/intel_psr.c +1 -1
@@ -942,7 +942,7 @@ static void intel_psr_enable_source(struct intel_dp *intel_dp,intel_de_write (dev_priv,EXITLINE (cpu_transcoder), val); } -if (HAS_PSR_HW_TRACKING (dev_priv)) +if (HAS_PSR_HW_TRACKING (dev_priv) &&HAS_PSR2_SEL_FETCH (dev_priv))intel_de_rmw (dev_priv,CHICKEN_PAR1_1 ,IGNORE_PSR2_HW_TRACKING , dev_priv->psr.psr2_sel_fetch_enabled ?IGNORE_PSR2_HW_TRACKING :0 );
Signature · 6 lines
2.28.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/4 drm/i915/display: Fix state of PSR2 sub features
In case PSR2 is disabled by debugfs dc3co_enabled and psr2_sel_fetch_enabled were still being set causing some code paths to be executed were it should not.
We have tests for PSR1 and PSR2 so keep those features disabled when PSR1 is active but PSR2 is supported is important.
--- drivers/gpu/drm/i915/display/intel_psr.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/display/intel_psr.c +7 -4
@@ -962,12 +962,14 @@ static void intel_psr_enable_locked(struct drm_i915_private *dev_priv, dev_priv->psr.psr2_enabled =intel_psr2_enabled (dev_priv, crtc_state); dev_priv->psr.busy_frontbuffer_bits =0 ; dev_priv->psr.pipe =to_intel_crtc (crtc_state->uapi.crtc)->pipe; - dev_priv->psr.dc3co_enabled = !!crtc_state->dc3co_exitline; + dev_priv->psr.dc3co_enabled = !!crtc_state->dc3co_exitline && + dev_priv->psr.psr2_enabled; dev_priv->psr.transcoder = crtc_state->cpu_transcoder;/* DC5/DC6 requires at least 6 idle frames */ val =usecs_to_jiffies (intel_get_frame_time_us (crtc_state) *6 ); dev_priv->psr.dc3co_exit_delay = val; - dev_priv->psr.psr2_sel_fetch_enabled = crtc_state->enable_psr2_sel_fetch; + dev_priv->psr.psr2_sel_fetch_enabled = crtc_state->enable_psr2_sel_fetch && + dev_priv->psr.psr2_enabled;/* * If a PSR error happened and the driver is reloaded, the EDP_PSR_IIR
@@ -1178,7 +1180,7 @@ void intel_psr2_program_trans_man_trk_ctl(const struct intel_crtc_state *crtc_ststruct i915_psr *psr = &dev_priv->psr;if (!HAS_PSR2_SEL_FETCH (dev_priv) || - !crtc_state->enable_psr2_sel_fetch) + !dev_priv->psr.psr2_sel_fetch_enabled)return ; intel_de_write(dev_priv, PSR2_MAN_TRK_CTL(psr->transcoder),
@@ -1189,8 +1191,9 @@ void intel_psr2_sel_fetch_update(struct intel_atomic_state *state, struct intel_crtc *crtc) {struct intel_crtc_state *crtc_state =intel_atomic_get_new_crtc_state (state, crtc); +struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); -if (!crtc_state->enable_psr2_sel_fetch) +if (!dev_priv->psr.psr2_sel_fetch_enabled)return ; crtc_state->psr2_man_track_ctl = PSR2_MAN_TRK_CTL_ENABLE |
Signature · 6 lines
2.28.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 2/4] drm/i915/display: Fix state of PSR2 sub features
Quoted 44 lines · José Roberto de Souza
In case PSR2 is disabled by debugfs
dc3co_enabledandpsr2_sel_fetch_enabledwere still being set causing some code paths to be executed were it should not.
We have tests for PSR1 and PSR2 so keep those features disabled when PSR1 is active but PSR2 is supported is important.Cc Gwan-gyeong Mun <[email protected]>Cc Ville Syrjälä <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>--- drivers/gpu/drm/i915/display/intel_psr.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/display/intel_psr.c +5
-3@@ -962,12 +962,14 @@ static void intel_psr_enable_locked(struct drm_i915_private *dev_priv, dev_priv->psr.psr2_enabled =intel_psr2_enabled (dev_priv, crtc_state); dev_priv->psr.busy_frontbuffer_bits =0 ; dev_priv->psr.pipe =to_intel_crtc (crtc_state->uapi.crtc)->pipe; - dev_priv->psr.dc3co_enabled = !!crtc_state->dc3co_exitline; + dev_priv->psr.dc3co_enabled = !!crtc_state->dc3co_exitline && + dev_priv->psr.psr2_enabled; dev_priv->psr.transcoder = crtc_state->cpu_transcoder;/* DC5/DC6 requires at least 6 idle frames */ val =usecs_to_jiffies (intel_get_frame_time_us (crtc_state) *6 ); dev_priv->psr.dc3co_exit_delay = val; - dev_priv->psr.psr2_sel_fetch_enabled = crtc_state->enable_psr2_sel_fetch; + dev_priv->psr.psr2_sel_fetch_enabled = crtc_state->enable_psr2_sel_fetch && + dev_priv->psr.psr2_enabled;/* * If a PSR error happened and the driver is reloaded, the EDP_PSR_IIR @@ -1178,7 +1180,7 @@ void intel_psr2_program_trans_man_trk_ctl(const struct intel_crtc_state *crtc_ststruct i915_psr *psr = &dev_priv->psr;if (!HAS_PSR2_SEL_FETCH (dev_priv) || - !crtc_state->enable_psr2_sel_fetch) + !dev_priv->psr.psr2_sel_fetch_enabled)return ; intel_de_write(dev_priv, PSR2_MAN_TRK_CTL(psr->transcoder),
drivers/gpu/drm/i915/display/intel_psr.c void intel_psr2_sel_fetch_update(struct intel_atomic_state *state, · line 1196
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_psr.c +2
-1@@ -1189,8 +1191,9 @@ void intel_psr2_sel_fetch_update(struct intel_atomic_state *state, struct intel_crtc *crtc) {struct intel_crtc_state *crtc_state =intel_atomic_get_new_crtc_state (state, crtc); +struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); -if (!crtc_state->enable_psr2_sel_fetch) +if (!dev_priv->psr.psr2_sel_fetch_enabled)
This looks rather sketchy. AFAICS this gets called during atomic_check() so looking at stuff outside the crtc state is very suspicious.
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_psr.c +0
-0return ; crtc_state->psr2_man_track_ctl = PSR2_MAN_TRK_CTL_ENABLE |Signature · 1 line
2.28.0
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 2/4] drm/i915/display: Fix state of PSR2 sub features
Quoted 56 lines · Ville Syrjälä
Quoted 55 lines · José Roberto de Souza
In case PSR2 is disabled by debugfs
dc3co_enabledandpsr2_sel_fetch_enabledwere still being set causing some code paths to be executed were it should not.
We have tests for PSR1 and PSR2 so keep those features disabled when PSR1 is active but PSR2 is supported is important.Cc: Gwan-gyeong Mun <
[email protected]Quoted 1 line
Cc: Ville Syrjälä <
[email protected]Quoted 1 line
Signed-off-by: José Roberto de Souza <
[email protected]Quoted 1 line
--- drivers/gpu/drm/i915/display/intel_psr.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/display/intel_psr.c +6
-3@@ -962,12 +962,14 @@ static void intel_psr_enable_locked(struct drm_i915_private *dev_priv, dev_priv->psr.psr2_enabled =intel_psr2_enabled (dev_priv, crtc_state); dev_priv->psr.busy_frontbuffer_bits =0 ; dev_priv->psr.pipe =to_intel_crtc (crtc_state->uapi.crtc)->pipe; - dev_priv->psr.dc3co_enabled = !!crtc_state->dc3co_exitline; + dev_priv->psr.dc3co_enabled = !!crtc_state->dc3co_exitline && + dev_priv->psr.psr2_enabled; dev_priv->psr.transcoder = crtc_state->cpu_transcoder;/* DC5/DC6 requires at least 6 idle frames */ val =usecs_to_jiffies (intel_get_frame_time_us (crtc_state) *6 ); dev_priv->psr.dc3co_exit_delay = val; - dev_priv->psr.psr2_sel_fetch_enabled = crtc_state->enable_psr2_sel_fetch; + dev_priv->psr.psr2_sel_fetch_enabled = crtc_state->enable_psr2_sel_fetch && + dev_priv->psr.psr2_enabled;/* * If a PSR error happened and the driver is reloaded, the EDP_PSR_IIR @@ -1178,7 +1180,7 @@ void intel_psr2_program_trans_man_trk_ctl(const struct intel_crtc_state *crtc_ststruct i915_psr *psr = &dev_priv->psr;if (!HAS_PSR2_SEL_FETCH (dev_priv) || - !crtc_state->enable_psr2_sel_fetch) + !dev_priv->psr.psr2_sel_fetch_enabled)return ; intel_de_write(dev_priv, PSR2_MAN_TRK_CTL(psr->transcoder),@@ -1189,8 +1191,9 @@ void intel_psr2_sel_fetch_update(struct intel_atomic_state *state, struct intel_crtc *crtc) {struct intel_crtc_state *crtc_state =intel_atomic_get_new_crtc_state (state, crtc); +struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev);
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_psr.c void intel_psr2_sel_fetch_update(struct intel_atomic_state *state, · line 1196
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_psr.c +1
-1-if (!crtc_state->enable_psr2_sel_fetch) +if (!dev_priv->psr.psr2_sel_fetch_enabled)This looks rather sketchy. AFAICS this gets called during
atomic_check()so looking at stuff outside the crtc state is very suspicious.
This is called after the functions that change the PSR state so no issues, also we can't really on information in CRTC state, as PSR is only enabled if supported by state, i915 PSR parameter and PSR debug fs value.
Quoted 8 lines
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_psr.c +0
-0return ; crtc_state->psr2_man_track_ctl = PSR2_MAN_TRK_CTL_ENABLE |Signature · 1 line
2.28.0
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 2/4] drm/i915/display: Fix state of PSR2 sub features
Quoted 57 lines · Jose
Quoted 56 lines · Ville Syrjälä
Quoted 55 lines · José Roberto de Souza
In case PSR2 is disabled by debugfs
dc3co_enabledandpsr2_sel_fetch_enabledwere still being set causing some code paths to be executed were it should not.
We have tests for PSR1 and PSR2 so keep those features disabled when PSR1 is active but PSR2 is supported is important.Cc: Gwan-gyeong Mun <
[email protected]Quoted 1 line
Cc: Ville Syrjälä <
[email protected]Quoted 1 line
Signed-off-by: José Roberto de Souza <
[email protected]Quoted 1 line
--- drivers/gpu/drm/i915/display/intel_psr.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/display/intel_psr.c +6
-3@@ -962,12 +962,14 @@ static void intel_psr_enable_locked(struct drm_i915_private *dev_priv, dev_priv->psr.psr2_enabled =intel_psr2_enabled (dev_priv, crtc_state); dev_priv->psr.busy_frontbuffer_bits =0 ; dev_priv->psr.pipe =to_intel_crtc (crtc_state->uapi.crtc)->pipe; - dev_priv->psr.dc3co_enabled = !!crtc_state->dc3co_exitline; + dev_priv->psr.dc3co_enabled = !!crtc_state->dc3co_exitline && + dev_priv->psr.psr2_enabled; dev_priv->psr.transcoder = crtc_state->cpu_transcoder;/* DC5/DC6 requires at least 6 idle frames */ val =usecs_to_jiffies (intel_get_frame_time_us (crtc_state) *6 ); dev_priv->psr.dc3co_exit_delay = val; - dev_priv->psr.psr2_sel_fetch_enabled = crtc_state->enable_psr2_sel_fetch; + dev_priv->psr.psr2_sel_fetch_enabled = crtc_state->enable_psr2_sel_fetch && + dev_priv->psr.psr2_enabled;/* * If a PSR error happened and the driver is reloaded, the EDP_PSR_IIR @@ -1178,7 +1180,7 @@ void intel_psr2_program_trans_man_trk_ctl(const struct intel_crtc_state *crtc_ststruct i915_psr *psr = &dev_priv->psr;if (!HAS_PSR2_SEL_FETCH (dev_priv) || - !crtc_state->enable_psr2_sel_fetch) + !dev_priv->psr.psr2_sel_fetch_enabled)return ; intel_de_write(dev_priv, PSR2_MAN_TRK_CTL(psr->transcoder),@@ -1189,8 +1191,9 @@ void intel_psr2_sel_fetch_update(struct intel_atomic_state *state, struct intel_crtc *crtc) {struct intel_crtc_state *crtc_state =intel_atomic_get_new_crtc_state (state, crtc); +struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev);
Quoted 8 lines
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_psr.c void intel_psr2_sel_fetch_update(struct intel_atomic_state *state, · line 1196
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_psr.c +1
-1-if (!crtc_state->enable_psr2_sel_fetch) +if (!dev_priv->psr.psr2_sel_fetch_enabled)This looks rather sketchy. AFAICS this gets called during
atomic_check()so looking at stuff outside the crtc state is very suspicious.This is called after the functions that change the PSR state so no issues, also we can't really on information in CRTC state, as PSR is only enabled if supported by state, i915 PSR parameter and PSR debug fs value.
I see it getting called from intel_crtc_atomic_check(). Confused. Am I missing some other patches?
Quoted 9 lines
Quoted 9 lines
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_psr.c +0
-0return ; crtc_state->psr2_man_track_ctl = PSR2_MAN_TRK_CTL_ENABLE |Signature · 1 line
2.28.0
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 2/4] drm/i915/display: Fix state of PSR2 sub features
Quoted 67 lines · Ville Syrjälä
Quoted 66 lines · Jose
Quoted 64 lines · Ville Syrjälä
Quoted 53 lines · José Roberto de Souza
In case PSR2 is disabled by debugfs
dc3co_enabledandpsr2_sel_fetch_enabledwere still being set causing some code paths to be executed were it should not.
We have tests for PSR1 and PSR2 so keep those features disabled when PSR1 is active but PSR2 is supported is important.Cc: Gwan-gyeong Mun <
[email protected]Cc: Ville Syrjälä <
[email protected]Signed-off-by: José Roberto de Souza <
[email protected]--- drivers/gpu/drm/i915/display/intel_psr.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/display/intel_psr.c +5
-3@@ -962,12 +962,14 @@ static void intel_psr_enable_locked(struct drm_i915_private *dev_priv, dev_priv->psr.psr2_enabled =intel_psr2_enabled (dev_priv, crtc_state); dev_priv->psr.busy_frontbuffer_bits =0 ; dev_priv->psr.pipe =to_intel_crtc (crtc_state->uapi.crtc)->pipe; - dev_priv->psr.dc3co_enabled = !!crtc_state->dc3co_exitline; + dev_priv->psr.dc3co_enabled = !!crtc_state->dc3co_exitline && + dev_priv->psr.psr2_enabled; dev_priv->psr.transcoder = crtc_state->cpu_transcoder;/* DC5/DC6 requires at least 6 idle frames */ val =usecs_to_jiffies (intel_get_frame_time_us (crtc_state) *6 ); dev_priv->psr.dc3co_exit_delay = val; - dev_priv->psr.psr2_sel_fetch_enabled = crtc_state->enable_psr2_sel_fetch; + dev_priv->psr.psr2_sel_fetch_enabled = crtc_state->enable_psr2_sel_fetch && + dev_priv->psr.psr2_enabled;/* * If a PSR error happened and the driver is reloaded, the EDP_PSR_IIR @@ -1178,7 +1180,7 @@ void intel_psr2_program_trans_man_trk_ctl(const struct intel_crtc_state *crtc_ststruct i915_psr *psr = &dev_priv->psr;if (!HAS_PSR2_SEL_FETCH (dev_priv) || - !crtc_state->enable_psr2_sel_fetch) + !dev_priv->psr.psr2_sel_fetch_enabled)return ; intel_de_write(dev_priv, PSR2_MAN_TRK_CTL(psr->transcoder),drivers/gpu/drm/i915/display/intel_psr.c void intel_psr2_sel_fetch_update(struct intel_atomic_state *state, · line 1196
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_psr.c +2
-1@@ -1189,8 +1191,9 @@ void intel_psr2_sel_fetch_update(struct intel_atomic_state *state, struct intel_crtc *crtc) {struct intel_crtc_state *crtc_state =intel_atomic_get_new_crtc_state (state, crtc); +struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); -if (!crtc_state->enable_psr2_sel_fetch) +if (!dev_priv->psr.psr2_sel_fetch_enabled)This looks rather sketchy. AFAICS this gets called during
atomic_check()so looking at stuff outside the crtc state is very suspicious.
Quoted 5 lines
Quoted 2 lines
This is called after the functions that change the PSR state so no issues, also we can't really on information in CRTC state, as PSR is only enabled if supported by state, i915 PSR parameter and PSR debug fs value.
I see it getting called from
intel_crtc_atomic_check(). Confused. Am I missing some other patches?
It is set from intel_psr_disable(), intel_psr_enable() and intel_psr_update() all executed before intel_psr2_sel_fetch_update()
intel_enable_ddi()
intel_enable_ddi_dp()
intel_psr_enable()
intel_update_crtc() {
if (!modeset) {
intel_encoders_update_pipe()
encoder->update_pipe() / intel_ddi_update_pipe()
intel_ddi_update_pipe_dp()
intel_psr_update()
}
...
skl_update_planes_on_crtc(state, crtc);
intel_update_plane()
plane->update_plane() / skl_update_plane()
skl_program_plane()
intel_psr2_sel_fetch_update()
}Quoted 10 lines
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_psr.c +0
-0return ; crtc_state->psr2_man_track_ctl = PSR2_MAN_TRK_CTL_ENABLE |Signature · 1 line
2.28.0
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 2/4] drm/i915/display: Fix state of PSR2 sub features
Quoted 80 lines · Jose
Quoted 67 lines · Ville Syrjälä
Quoted 66 lines · Jose
Quoted 64 lines · Ville Syrjälä
Quoted 53 lines · José Roberto de Souza
In case PSR2 is disabled by debugfs
dc3co_enabledandpsr2_sel_fetch_enabledwere still being set causing some code paths to be executed were it should not.
We have tests for PSR1 and PSR2 so keep those features disabled when PSR1 is active but PSR2 is supported is important.Cc: Gwan-gyeong Mun <
[email protected]Cc: Ville Syrjälä <
[email protected]Signed-off-by: José Roberto de Souza <
[email protected]--- drivers/gpu/drm/i915/display/intel_psr.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/display/intel_psr.c +5
-3@@ -962,12 +962,14 @@ static void intel_psr_enable_locked(struct drm_i915_private *dev_priv, dev_priv->psr.psr2_enabled =intel_psr2_enabled (dev_priv, crtc_state); dev_priv->psr.busy_frontbuffer_bits =0 ; dev_priv->psr.pipe =to_intel_crtc (crtc_state->uapi.crtc)->pipe; - dev_priv->psr.dc3co_enabled = !!crtc_state->dc3co_exitline; + dev_priv->psr.dc3co_enabled = !!crtc_state->dc3co_exitline && + dev_priv->psr.psr2_enabled; dev_priv->psr.transcoder = crtc_state->cpu_transcoder;/* DC5/DC6 requires at least 6 idle frames */ val =usecs_to_jiffies (intel_get_frame_time_us (crtc_state) *6 ); dev_priv->psr.dc3co_exit_delay = val; - dev_priv->psr.psr2_sel_fetch_enabled = crtc_state->enable_psr2_sel_fetch; + dev_priv->psr.psr2_sel_fetch_enabled = crtc_state->enable_psr2_sel_fetch && + dev_priv->psr.psr2_enabled;/* * If a PSR error happened and the driver is reloaded, the EDP_PSR_IIR @@ -1178,7 +1180,7 @@ void intel_psr2_program_trans_man_trk_ctl(const struct intel_crtc_state *crtc_ststruct i915_psr *psr = &dev_priv->psr;if (!HAS_PSR2_SEL_FETCH (dev_priv) || - !crtc_state->enable_psr2_sel_fetch) + !dev_priv->psr.psr2_sel_fetch_enabled)return ; intel_de_write(dev_priv, PSR2_MAN_TRK_CTL(psr->transcoder),drivers/gpu/drm/i915/display/intel_psr.c void intel_psr2_sel_fetch_update(struct intel_atomic_state *state, · line 1196
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_psr.c +2
-1@@ -1189,8 +1191,9 @@ void intel_psr2_sel_fetch_update(struct intel_atomic_state *state, struct intel_crtc *crtc) {struct intel_crtc_state *crtc_state =intel_atomic_get_new_crtc_state (state, crtc); +struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); -if (!crtc_state->enable_psr2_sel_fetch) +if (!dev_priv->psr.psr2_sel_fetch_enabled)This looks rather sketchy. AFAICS this gets called during
atomic_check()so looking at stuff outside the crtc state is very suspicious.Quoted 5 lines
Quoted 2 lines
This is called after the functions that change the PSR state so no issues, also we can't really on information in CRTC state, as PSR is only enabled if supported by state, i915 PSR parameter and PSR debug fs value.
I see it getting called from
intel_crtc_atomic_check(). Confused. Am I missing some other patches?It is set from
intel_psr_disable(),intel_psr_enable()andintel_psr_update()all executed beforeintel_psr2_sel_fetch_update()
intel_enable_ddi()
intel_enable_ddi_dp()
intel_psr_enable()
Quoted 15 lines
intel_update_crtc() {
if (!modeset) {
intel_encoders_update_pipe()
encoder->update_pipe() / intel_ddi_update_pipe()
intel_ddi_update_pipe_dp()
intel_psr_update()
}
...
skl_update_planes_on_crtc(state, crtc);
intel_update_plane()
plane->update_plane() / skl_update_plane()
skl_program_plane()
intel_psr2_sel_fetch_update()That's not what I see at all. The only caller I see is intel_crtc_atomic_check().
Quoted 7 lines
}
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_psr.c +0
-0return ; crtc_state->psr2_man_track_ctl = PSR2_MAN_TRK_CTL_ENABLE |
And if it would be called from there then this part would be kinda bad. We should not mutate the state during the commit phase.
Quoted 6 lines
Quoted 6 lines
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
Signature · 1 line
2.28.0
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 2/4] drm/i915/display: Fix state of PSR2 sub features
Quoted 94 lines · Ville Syrjälä
Quoted 93 lines · Jose
Quoted 70 lines · Ville Syrjälä
Quoted 69 lines · Jose
Quoted 67 lines · Ville Syrjälä
Quoted 56 lines · José Roberto de Souza
In case PSR2 is disabled by debugfs
dc3co_enabledandpsr2_sel_fetch_enabledwere still being set causing some code paths to be executed were it should not.
We have tests for PSR1 and PSR2 so keep those features disabled when PSR1 is active but PSR2 is supported is important.Cc: Gwan-gyeong Mun <
[email protected]Cc: Ville Syrjälä <
[email protected]Signed-off-by: José Roberto de Souza <
[email protected]--- drivers/gpu/drm/i915/display/intel_psr.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/display/intel_psr.c +5
-3@@ -962,12 +962,14 @@ static void intel_psr_enable_locked(struct drm_i915_private *dev_priv, dev_priv->psr.psr2_enabled =intel_psr2_enabled (dev_priv, crtc_state); dev_priv->psr.busy_frontbuffer_bits =0 ; dev_priv->psr.pipe =to_intel_crtc (crtc_state->uapi.crtc)->pipe; - dev_priv->psr.dc3co_enabled = !!crtc_state->dc3co_exitline; + dev_priv->psr.dc3co_enabled = !!crtc_state->dc3co_exitline && + dev_priv->psr.psr2_enabled; dev_priv->psr.transcoder = crtc_state->cpu_transcoder;/* DC5/DC6 requires at least 6 idle frames */ val =usecs_to_jiffies (intel_get_frame_time_us (crtc_state) *6 ); dev_priv->psr.dc3co_exit_delay = val; - dev_priv->psr.psr2_sel_fetch_enabled = crtc_state->enable_psr2_sel_fetch; + dev_priv->psr.psr2_sel_fetch_enabled = crtc_state->enable_psr2_sel_fetch && + dev_priv->psr.psr2_enabled;/* * If a PSR error happened and the driver is reloaded, the EDP_PSR_IIR @@ -1178,7 +1180,7 @@ void intel_psr2_program_trans_man_trk_ctl(const struct intel_crtc_state *crtc_ststruct i915_psr *psr = &dev_priv->psr;if (!HAS_PSR2_SEL_FETCH (dev_priv) || - !crtc_state->enable_psr2_sel_fetch) + !dev_priv->psr.psr2_sel_fetch_enabled)return ; intel_de_write(dev_priv, PSR2_MAN_TRK_CTL(psr->transcoder),drivers/gpu/drm/i915/display/intel_psr.c void intel_psr2_sel_fetch_update(struct intel_atomic_state *state, · line 1196
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_psr.c +2
-1@@ -1189,8 +1191,9 @@ void intel_psr2_sel_fetch_update(struct intel_atomic_state *state, struct intel_crtc *crtc) {struct intel_crtc_state *crtc_state =intel_atomic_get_new_crtc_state (state, crtc); +struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); -if (!crtc_state->enable_psr2_sel_fetch) +if (!dev_priv->psr.psr2_sel_fetch_enabled)This looks rather sketchy. AFAICS this gets called during
atomic_check()so looking at stuff outside the crtc state is very suspicious.Quoted 5 lines
Quoted 2 lines
This is called after the functions that change the PSR state so no issues, also we can't really on information in CRTC state, as PSR is only enabled if supported by state, i915 PSR parameter and PSR debug fs value.
I see it getting called from
intel_crtc_atomic_check(). Confused. Am I missing some other patches?It is set from
intel_psr_disable(),intel_psr_enable()andintel_psr_update()all executed beforeintel_psr2_sel_fetch_update()
intel_enable_ddi()
intel_enable_ddi_dp()
intel_psr_enable()intel_update_crtc() { if (!modeset) { intel_encoders_update_pipe() encoder->update_pipe() / intel_ddi_update_pipe() intel_ddi_update_pipe_dp() intel_psr_update() } ...
Quoted 8 lines
Quoted 5 lines
skl_update_planes_on_crtc(state, crtc); intel_update_plane() plane->update_plane() / skl_update_plane() skl_program_plane() intel_psr2_sel_fetch_update()That's not what I see at all. The only caller I see is
intel_crtc_atomic_check().
Messed it with program function.
Yeah this will not work, so just fixed the has_psr and has_psr2 to match real state, just sent the new patch.
Thanks for the comments.
Quoted 5 lines
Quoted 5 lines
}
Quoted 15 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_psr.c void intel_psr2_sel_fetch_update(struct intel_atomic_state *state, · line 1199
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_psr.c +0
-0return ; crtc_state->psr2_man_track_ctl = PSR2_MAN_TRK_CTL_ENABLE |And if it would be called from there then this part would be kinda bad. We should not mutate the state during the commit phase.
Quoted 6 lines
Quoted 6 lines
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
Signature · 1 line
2.28.0
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/4 drm/i915/display: Program PSR2 selective fetch registers
In reply to José Roberto de SouzaAnother step towards PSR2 selective fetch, here programming plane selective fetch registers and MAN_TRK_CTL enabling selective fetch but for now it is fetching the whole area of the planes.
The damaged area calculation will come as next and final step.
BSpec: 55229
--- drivers/gpu/drm/i915/display/intel_display.c | 10 +- .../drm/i915/display/intel_display_types.h | 2 + drivers/gpu/drm/i915/display/intel_psr.c | 129 +++++++++++++++++- drivers/gpu/drm/i915/display/intel_psr.h | 10 +- drivers/gpu/drm/i915/display/intel_sprite.c | 3 + 5 files changed, 145 insertions(+), 9 deletions(-)
drivers/gpu/drm/i915/display/intel_display.c +8 -2
@@ -11799,6 +11799,9 @@ static void i9xx_update_cursor(struct intel_plane *plane,if (INTEL_GEN (dev_priv) >=9 )skl_write_cursor_wm (plane, crtc_state); +if (!needs_modeset (crtc_state)) +intel_psr2_program_plane_sel_fetch (plane, crtc_state, plane_state,0 ); +if (plane->cursor.base != base || plane->cursor.size != fbc_ctl || plane->cursor.cntl != cntl) {
@@ -12810,8 +12813,11 @@ static int intel_crtc_atomic_check(struct intel_atomic_state *state, } -if (!mode_changed) -intel_psr2_sel_fetch_update (state, crtc); +if (!mode_changed) { + ret =intel_psr2_sel_fetch_update (state, crtc); +if (ret) +return ret; + }return 0 ; }
drivers/gpu/drm/i915/display/intel_display_types.h +2 -0
@@ -586,6 +586,8 @@ struct intel_plane_state {u32 planar_slave;struct drm_intel_sprite_colorkey ckey; + +struct drm_rect psr2_sel_fetch_area; };struct intel_initial_plane_config {
drivers/gpu/drm/i915/display/intel_psr.c +124 -5
147 lines not on this page · raw message
drivers/gpu/drm/i915/display/intel_psr.h +8 -2
@@ -15,6 +15,8 @@ struct intel_crtc_state;struct intel_dp ;struct intel_crtc ;struct intel_atomic_state ; +struct intel_plane_state ; +struct intel_plane ;#define CAN_PSR (dev_priv) (HAS_PSR(dev_priv) && dev_priv->psr.sink_support)void intel_psr_init_dpcd (struct intel_dp *intel_dp);
@@ -45,8 +47,12 @@ void intel_psr_atomic_check(struct drm_connector *connector,struct drm_connector_state *old_state, struct drm_connector_state *new_state);void intel_psr_set_force_mode_changed (struct intel_dp *intel_dp); -void intel_psr2_sel_fetch_update (struct intel_atomic_state *state, -struct intel_crtc *crtc); +int intel_psr2_sel_fetch_update (struct intel_atomic_state *state, +struct intel_crtc *crtc);void intel_psr2_program_trans_man_trk_ctl (const struct intel_crtc_state *crtc_state); +void intel_psr2_program_plane_sel_fetch (struct intel_plane *plane, +const struct intel_crtc_state *crtc_state, +const struct intel_plane_state *plane_state, +int color_plane);#endif /* __INTEL_PSR_H__ */
drivers/gpu/drm/i915/display/intel_sprite.c +3 -0
@@ -690,6 +690,9 @@ skl_program_plane(struct intel_plane *plane,intel_de_write_fw (dev_priv,PLANE_AUX_OFFSET (pipe, plane_id), (plane_state->color_plane[1 ].y <<16 ) | plane_state->color_plane[1 ].x); +if (!drm_atomic_crtc_needs_modeset (&crtc_state->uapi)) +intel_psr2_program_plane_sel_fetch (plane, crtc_state, plane_state, color_plane); +/* * The control register self-arms if the plane was previously * disabled. Try to make the plane enable atomic by writing
Signature · 6 lines
2.28.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 3/4] drm/i915/display: Program PSR2 selective fetch registers
Quoted 80 lines · José Roberto de Souza
Another step towards PSR2 selective fetch, here programming plane selective fetch registers and
MAN_TRK_CTLenabling selective fetch but for now it is fetching the whole area of the planes.
The damaged area calculation will come as next and final step.BSpec: 55229
Cc Gwan-gyeong Mun <[email protected]>Cc Ville Syrjälä <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>--- drivers/gpu/drm/i915/display/intel_display.c | 10 +- .../drm/i915/display/intel_display_types.h | 2 + drivers/gpu/drm/i915/display/intel_psr.c | 129 +++++++++++++++++- drivers/gpu/drm/i915/display/intel_psr.h | 10 +- drivers/gpu/drm/i915/display/intel_sprite.c | 3 + 5 files changed, 145 insertions(+), 9 deletions(-)drivers/gpu/drm/i915/display/intel_display.c +8
-2@@ -11799,6 +11799,9 @@ static void i9xx_update_cursor(struct intel_plane *plane,if (INTEL_GEN (dev_priv) >=9 )skl_write_cursor_wm (plane, crtc_state); +if (!needs_modeset (crtc_state)) +intel_psr2_program_plane_sel_fetch (plane, crtc_state, plane_state,0 ); +if (plane->cursor.base != base || plane->cursor.size != fbc_ctl || plane->cursor.cntl != cntl) {@@ -12810,8 +12813,11 @@ static int intel_crtc_atomic_check(struct intel_atomic_state *state, } -if (!mode_changed) -intel_psr2_sel_fetch_update (state, crtc); +if (!mode_changed) { + ret =intel_psr2_sel_fetch_update (state, crtc); +if (ret) +return ret; + }return 0 ; }drivers/gpu/drm/i915/display/intel_display_types.h +2
-0@@ -586,6 +586,8 @@ struct intel_plane_state {u32 planar_slave;struct drm_intel_sprite_colorkey ckey; + +struct drm_rect psr2_sel_fetch_area; };struct intel_initial_plane_config {drivers/gpu/drm/i915/display/intel_psr.c +14
-0@@ -1173,6 +1173,46 @@ static void psr_force_hw_tracking_exit(struct drm_i915_private *dev_priv)intel_psr_exit (dev_priv); } +void intel_psr2_program_plane_sel_fetch (struct intel_plane *plane, +const struct intel_crtc_state *crtc_state, +const struct intel_plane_state *plane_state, +int color_plane) +{ +struct drm_i915_private *dev_priv =to_i915 (plane->base.dev); +const struct drm_rect *clip; +enum pipe pipe = plane->pipe; +u32 val; + +if (!plane_state || !dev_priv->psr.psr2_sel_fetch_enabled) +return ; + +/*
drivers/gpu/drm/i915/display/intel_psr.c static void psr_force_hw_tracking_exit(struct drm_i915_private *dev_priv) · line 1199
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_psr.c +10
-0+* skl_plane_ctl_crtc()/i9xx_cursor_ctl_crtc() return 0 for gen11+, so +* plane_state->ctl is the right value +*/ +intel_de_write_fw (dev_priv,PLANE_SEL_FETCH_CTL (pipe, plane->id), plane_state->ctl); +if (!plane_state->ctl || plane->id ==PLANE_CURSOR ) +return ; + + clip = &plane_state->psr2_sel_fetch_area; + + val = (clip->y1 + plane_state->uapi.crtc_y) <<16 ;
crtc_x/y are the raw values usrspace gave us. That is definitely not what we should be looking at.
As the first step I think these functions should just program the registers with *exactly* the same values as we program into the normal plane register. That gets us to the point where we're actually programming something into the register without having to complicate things with calculating the selective fetch area.
Quoted 165 lines
drivers/gpu/drm/i915/display/intel_psr.c +100
-5+ val |= plane_state->uapi.crtc_x; +intel_de_write_fw (dev_priv,PLANE_SEL_FETCH_POS (pipe, plane->id), + val); + + val = (clip->y1 + plane_state->color_plane[color_plane].y) <<16 ; + val |= plane_state->color_plane[color_plane].x; +intel_de_write_fw (dev_priv,PLANE_SEL_FETCH_OFFSET (pipe, plane->id), + val); + +/* Sizes are 0 based */ + val = (drm_rect_height (clip) -1 ) <<16 ; + val |= (drm_rect_width (&plane_state->uapi.src) >>16 ) -1 ; +intel_de_write_fw (dev_priv,PLANE_SEL_FETCH_SIZE (pipe, plane->id), + val); +} +void intel_psr2_program_trans_man_trk_ctl (const struct intel_crtc_state *crtc_state) {struct intel_crtc *crtc =to_intel_crtc (crtc_state->uapi.crtc);@@ -1187,17 +1227,96 @@ void intel_psr2_program_trans_man_trk_ctl(const struct intel_crtc_state *crtc_st crtc_state->psr2_man_track_ctl); } -void intel_psr2_sel_fetch_update (struct intel_atomic_state *state, -struct intel_crtc *crtc) +static void psr2_man_trk_ctl_calc (struct intel_crtc_state *crtc_state, +struct drm_rect *clip,bool full_update) +{ +u32 val =PSR2_MAN_TRK_CTL_ENABLE ; + +if (full_update) { + val |=PSR2_MAN_TRK_CTL_SF_SINGLE_FULL_FRAME ; + goto exit; + } + +drm_WARN_ON_ONCE (crtc_state->uapi.crtc->dev, clip->y1 ==-1 ); + + val |=PSR2_MAN_TRK_CTL_SF_PARTIAL_FRAME_UPDATE ; + val |=PSR2_MAN_TRK_CTL_SU_REGION_START_ADDR (clip->y1 /4 +1 ); + val |=PSR2_MAN_TRK_CTL_SU_REGION_END_ADDR (DIV_ROUND_UP (clip->y2,4 ) +1 ); +exit: + crtc_state->psr2_man_track_ctl = val; +} + +static void clip_area_update (struct drm_rect *overlap_damage_area, +struct drm_rect *damage_area) +{ +if (overlap_damage_area->y1 ==-1 ) { + overlap_damage_area->y1 = damage_area->y1; + overlap_damage_area->y2 = damage_area->y2; +return ; + } + +if (damage_area->y1 < overlap_damage_area->y1) + overlap_damage_area->y1 = damage_area->y1; + +if (damage_area->y2 > overlap_damage_area->y2) + overlap_damage_area->y2 = damage_area->y2; +} + +int intel_psr2_sel_fetch_update (struct intel_atomic_state *state, +struct intel_crtc *crtc) {struct intel_crtc_state *crtc_state =intel_atomic_get_new_crtc_state (state, crtc);struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); +struct intel_plane_state *new_plane_state, *old_plane_state; +struct drm_rect pipe_clip = { .y1 =-1 }; +struct intel_plane *plane; +bool full_update = false; +int i, ret;if (!dev_priv->psr.psr2_sel_fetch_enabled) -return ; +return 0 ; + + ret =drm_atomic_add_affected_planes (&state->base, &crtc->base); +if (ret) +return ret; + +for_each_oldnew_intel_plane_in_state (state, plane, old_plane_state, + new_plane_state, i) { +struct drm_rect *plane_sel_fetch_area, temp; - crtc_state->psr2_man_track_ctl =PSR2_MAN_TRK_CTL_ENABLE | -PSR2_MAN_TRK_CTL_SF_SINGLE_FULL_FRAME ; +if (new_plane_state->uapi.crtc != crtc_state->uapi.crtc) +continue ; + +/* +* TODO: Not clear how to handle planes with negative position, +* also planes are not updated if they have a negative X +* position so for now doing a full update in this cases +*/ +if (new_plane_state->uapi.crtc_y <0 || + new_plane_state->uapi.crtc_x <0 ) { + full_update = true; +break ; + } + +if (!new_plane_state->uapi.visible) +continue ; + +/* +* For now doing a selective fetch in the whole plane area, +* optimizations will come in the future. +*/ + plane_sel_fetch_area = &new_plane_state->psr2_sel_fetch_area; + plane_sel_fetch_area->y1 = new_plane_state->uapi.src.y1 >>16 ; + plane_sel_fetch_area->y2 = new_plane_state->uapi.src.y2 >>16 ; + + temp = *plane_sel_fetch_area; + temp.y1 += new_plane_state->uapi.crtc_y; + temp.y2 += new_plane_state->uapi.crtc_y; +clip_area_update (&pipe_clip, &temp); + } + +psr2_man_trk_ctl_calc (crtc_state, &pipe_clip, full_update); +return 0 ; }/** drivers/gpu/drm/i915/display/intel_psr.h +8
-2@@ -15,6 +15,8 @@ struct intel_crtc_state;struct intel_dp ;struct intel_crtc ;struct intel_atomic_state ; +struct intel_plane_state ; +struct intel_plane ;#define CAN_PSR (dev_priv) (HAS_PSR(dev_priv) && dev_priv->psr.sink_support)void intel_psr_init_dpcd (struct intel_dp *intel_dp);@@ -45,8 +47,12 @@ void intel_psr_atomic_check(struct drm_connector *connector,struct drm_connector_state *old_state, struct drm_connector_state *new_state);void intel_psr_set_force_mode_changed (struct intel_dp *intel_dp); -void intel_psr2_sel_fetch_update (struct intel_atomic_state *state, -struct intel_crtc *crtc); +int intel_psr2_sel_fetch_update (struct intel_atomic_state *state, +struct intel_crtc *crtc);void intel_psr2_program_trans_man_trk_ctl (const struct intel_crtc_state *crtc_state); +void intel_psr2_program_plane_sel_fetch (struct intel_plane *plane, +const struct intel_crtc_state *crtc_state, +const struct intel_plane_state *plane_state, +int color_plane);#endif /* __INTEL_PSR_H__ */ drivers/gpu/drm/i915/display/intel_sprite.c +3
-0@@ -690,6 +690,9 @@ skl_program_plane(struct intel_plane *plane,intel_de_write_fw (dev_priv,PLANE_AUX_OFFSET (pipe, plane_id), (plane_state->color_plane[1 ].y <<16 ) | plane_state->color_plane[1 ].x); +if (!drm_atomic_crtc_needs_modeset (&crtc_state->uapi)) +intel_psr2_program_plane_sel_fetch (plane, crtc_state, plane_state, color_plane); +/* * The control register self-arms if the plane was previously * disabled. Try to make the plane enable atomic by writing Signature · 1 line
2.28.0
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 3/4] drm/i915/display: Program PSR2 selective fetch registers
Quoted 92 lines · Ville Syrjälä
Quoted 91 lines · José Roberto de Souza
Another step towards PSR2 selective fetch, here programming plane selective fetch registers and
MAN_TRK_CTLenabling selective fetch but for now it is fetching the whole area of the planes.
The damaged area calculation will come as next and final step.BSpec: 55229
Cc: Gwan-gyeong Mun <
[email protected]Quoted 1 line
Cc: Ville Syrjälä <
[email protected]Quoted 1 line
Signed-off-by: José Roberto de Souza <
[email protected]Quoted 1 line
--- drivers/gpu/drm/i915/display/intel_display.c | 10 +- .../drm/i915/display/intel_display_types.h | 2 + drivers/gpu/drm/i915/display/intel_psr.c | 129 +++++++++++++++++- drivers/gpu/drm/i915/display/intel_psr.h | 10 +- drivers/gpu/drm/i915/display/intel_sprite.c | 3 + 5 files changed, 145 insertions(+), 9 deletions(-)drivers/gpu/drm/i915/display/intel_display.c +8
-2@@ -11799,6 +11799,9 @@ static void i9xx_update_cursor(struct intel_plane *plane,if (INTEL_GEN (dev_priv) >=9 )skl_write_cursor_wm (plane, crtc_state); +if (!needs_modeset (crtc_state)) +intel_psr2_program_plane_sel_fetch (plane, crtc_state, plane_state,0 ); +if (plane->cursor.base != base || plane->cursor.size != fbc_ctl || plane->cursor.cntl != cntl) {@@ -12810,8 +12813,11 @@ static int intel_crtc_atomic_check(struct intel_atomic_state *state, } -if (!mode_changed) -intel_psr2_sel_fetch_update (state, crtc); +if (!mode_changed) { + ret =intel_psr2_sel_fetch_update (state, crtc); +if (ret) +return ret; + }return 0 ; }drivers/gpu/drm/i915/display/intel_display_types.h +2
-0@@ -586,6 +586,8 @@ struct intel_plane_state {u32 planar_slave;struct drm_intel_sprite_colorkey ckey; + +struct drm_rect psr2_sel_fetch_area; };struct intel_initial_plane_config {drivers/gpu/drm/i915/display/intel_psr.c +19
-0@@ -1173,6 +1173,46 @@ static void psr_force_hw_tracking_exit(struct drm_i915_private *dev_priv)intel_psr_exit (dev_priv); } +void intel_psr2_program_plane_sel_fetch (struct intel_plane *plane, +const struct intel_crtc_state *crtc_state, +const struct intel_plane_state *plane_state, +int color_plane) +{ +struct drm_i915_private *dev_priv =to_i915 (plane->base.dev); +const struct drm_rect *clip; +enum pipe pipe = plane->pipe; +u32 val; + +if (!plane_state || !dev_priv->psr.psr2_sel_fetch_enabled) +return ; + +/* +* skl_plane_ctl_crtc()/i9xx_cursor_ctl_crtc() return 0 for gen11+, so +* plane_state->ctl is the right value +*/ +intel_de_write_fw (dev_priv,PLANE_SEL_FETCH_CTL (pipe, plane->id), plane_state->ctl); +if (!plane_state->ctl || plane->id ==PLANE_CURSOR )
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_psr.c static void psr_force_hw_tracking_exit(struct drm_i915_private *dev_priv) · line 1199
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_psr.c +5
-0+return ; + + clip = &plane_state->psr2_sel_fetch_area; + + val = (clip->y1 + plane_state->uapi.crtc_y) <<16 ;crtc_x/y are the raw values usrspace gave us. That is definitely not what we should be looking at.
plane_state->uapi.dst then? but for what I found crtc_x/y is set from dst.
plane_state->uapi.dst is used in skl_program_plane()
skl_program_plane()
int crtc_x = plane_state->uapi.dst.x1; int crtc_y = plane_state->uapi.dst.y1; ... intel_de_write_fw(dev_priv, PLANE_POS(pipe, plane_id), (crtc_y << 16) | crtc_x);
Quoted 6 lines
As the first step I think these functions should just program the registers with *exactly* the same values as we program into the normal plane register. That gets us to the point where we're actually programming something into the register without having to complicate things with calculating the selective fetch area.
Okay, I can move this to other patch but please check the comment above so we have this agreed for first version of the future patch.
Quoted 158 lines
Quoted 158 lines
drivers/gpu/drm/i915/display/intel_psr.c +100
-5+ val |= plane_state->uapi.crtc_x; +intel_de_write_fw (dev_priv,PLANE_SEL_FETCH_POS (pipe, plane->id), + val); + + val = (clip->y1 + plane_state->color_plane[color_plane].y) <<16 ; + val |= plane_state->color_plane[color_plane].x; +intel_de_write_fw (dev_priv,PLANE_SEL_FETCH_OFFSET (pipe, plane->id), + val); + +/* Sizes are 0 based */ + val = (drm_rect_height (clip) -1 ) <<16 ; + val |= (drm_rect_width (&plane_state->uapi.src) >>16 ) -1 ; +intel_de_write_fw (dev_priv,PLANE_SEL_FETCH_SIZE (pipe, plane->id), + val); +} +void intel_psr2_program_trans_man_trk_ctl (const struct intel_crtc_state *crtc_state) {struct intel_crtc *crtc =to_intel_crtc (crtc_state->uapi.crtc);@@ -1187,17 +1227,96 @@ void intel_psr2_program_trans_man_trk_ctl(const struct intel_crtc_state *crtc_st crtc_state->psr2_man_track_ctl); } -void intel_psr2_sel_fetch_update (struct intel_atomic_state *state, -struct intel_crtc *crtc) +static void psr2_man_trk_ctl_calc (struct intel_crtc_state *crtc_state, +struct drm_rect *clip,bool full_update) +{ +u32 val =PSR2_MAN_TRK_CTL_ENABLE ; + +if (full_update) { + val |=PSR2_MAN_TRK_CTL_SF_SINGLE_FULL_FRAME ; + goto exit; + } + +drm_WARN_ON_ONCE (crtc_state->uapi.crtc->dev, clip->y1 ==-1 ); + + val |=PSR2_MAN_TRK_CTL_SF_PARTIAL_FRAME_UPDATE ; + val |=PSR2_MAN_TRK_CTL_SU_REGION_START_ADDR (clip->y1 /4 +1 ); + val |=PSR2_MAN_TRK_CTL_SU_REGION_END_ADDR (DIV_ROUND_UP (clip->y2,4 ) +1 ); +exit: + crtc_state->psr2_man_track_ctl = val; +} + +static void clip_area_update (struct drm_rect *overlap_damage_area, +struct drm_rect *damage_area) +{ +if (overlap_damage_area->y1 ==-1 ) { + overlap_damage_area->y1 = damage_area->y1; + overlap_damage_area->y2 = damage_area->y2; +return ; + } + +if (damage_area->y1 < overlap_damage_area->y1) + overlap_damage_area->y1 = damage_area->y1; + +if (damage_area->y2 > overlap_damage_area->y2) + overlap_damage_area->y2 = damage_area->y2; +} + +int intel_psr2_sel_fetch_update (struct intel_atomic_state *state, +struct intel_crtc *crtc) {struct intel_crtc_state *crtc_state =intel_atomic_get_new_crtc_state (state, crtc);struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); +struct intel_plane_state *new_plane_state, *old_plane_state; +struct drm_rect pipe_clip = { .y1 =-1 }; +struct intel_plane *plane; +bool full_update = false; +int i, ret;if (!dev_priv->psr.psr2_sel_fetch_enabled) -return ; +return 0 ; + + ret =drm_atomic_add_affected_planes (&state->base, &crtc->base); +if (ret) +return ret; + +for_each_oldnew_intel_plane_in_state (state, plane, old_plane_state, + new_plane_state, i) { +struct drm_rect *plane_sel_fetch_area, temp; - crtc_state->psr2_man_track_ctl =PSR2_MAN_TRK_CTL_ENABLE | -PSR2_MAN_TRK_CTL_SF_SINGLE_FULL_FRAME ; +if (new_plane_state->uapi.crtc != crtc_state->uapi.crtc) +continue ; + +/* +* TODO: Not clear how to handle planes with negative position, +* also planes are not updated if they have a negative X +* position so for now doing a full update in this cases +*/ +if (new_plane_state->uapi.crtc_y <0 || + new_plane_state->uapi.crtc_x <0 ) { + full_update = true; +break ; + } + +if (!new_plane_state->uapi.visible) +continue ; + +/* +* For now doing a selective fetch in the whole plane area, +* optimizations will come in the future. +*/ + plane_sel_fetch_area = &new_plane_state->psr2_sel_fetch_area; + plane_sel_fetch_area->y1 = new_plane_state->uapi.src.y1 >>16 ; + plane_sel_fetch_area->y2 = new_plane_state->uapi.src.y2 >>16 ; + + temp = *plane_sel_fetch_area; + temp.y1 += new_plane_state->uapi.crtc_y; + temp.y2 += new_plane_state->uapi.crtc_y; +clip_area_update (&pipe_clip, &temp); + } + +psr2_man_trk_ctl_calc (crtc_state, &pipe_clip, full_update); +return 0 ; }/** drivers/gpu/drm/i915/display/intel_psr.h +8
-2@@ -15,6 +15,8 @@ struct intel_crtc_state;struct intel_dp ;struct intel_crtc ;struct intel_atomic_state ; +struct intel_plane_state ; +struct intel_plane ;#define CAN_PSR (dev_priv) (HAS_PSR(dev_priv) && dev_priv->psr.sink_support)void intel_psr_init_dpcd (struct intel_dp *intel_dp);@@ -45,8 +47,12 @@ void intel_psr_atomic_check(struct drm_connector *connector,struct drm_connector_state *old_state, struct drm_connector_state *new_state);void intel_psr_set_force_mode_changed (struct intel_dp *intel_dp); -void intel_psr2_sel_fetch_update (struct intel_atomic_state *state, -struct intel_crtc *crtc); +int intel_psr2_sel_fetch_update (struct intel_atomic_state *state, +struct intel_crtc *crtc);void intel_psr2_program_trans_man_trk_ctl (const struct intel_crtc_state *crtc_state); +void intel_psr2_program_plane_sel_fetch (struct intel_plane *plane, +const struct intel_crtc_state *crtc_state, +const struct intel_plane_state *plane_state, +int color_plane);#endif /* __INTEL_PSR_H__ */ drivers/gpu/drm/i915/display/intel_sprite.c +0
-0@@ -690,6 +690,9 @@ skl_program_plane(struct intel_plane *plane,intel_de_write_fw (dev_priv,PLANE_AUX_OFFSET (pipe, plane_id), (plane_state->color_plane[1 ].y <<16 ) | plane_state->color_plane[1 ].x);
Quoted 10 lines
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_sprite.c +3
-0+if (!drm_atomic_crtc_needs_modeset (&crtc_state->uapi)) +intel_psr2_program_plane_sel_fetch (plane, crtc_state, plane_state, color_plane); +/* * The control register self-arms if the plane was previously * disabled. Try to make the plane enable atomic by writing Signature · 1 line
2.28.0
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 3/4] drm/i915/display: Program PSR2 selective fetch registers
Quoted 94 lines · Jose
Quoted 93 lines · Ville Syrjälä
Quoted 91 lines · José Roberto de Souza
Another step towards PSR2 selective fetch, here programming plane selective fetch registers and
MAN_TRK_CTLenabling selective fetch but
for now it is fetching the whole area of the planes. The damaged area calculation will come as next and final step.BSpec: 55229
Cc: Gwan-gyeong Mun <
[email protected]
Cc: Ville Syrjälä <
[email protected]
Signed-off-by: José Roberto de Souza <
[email protected]--- drivers/gpu/drm/i915/display/intel_display.c | 10 +- .../drm/i915/display/intel_display_types.h | 2 + drivers/gpu/drm/i915/display/intel_psr.c | 129 +++++++++++++++++- drivers/gpu/drm/i915/display/intel_psr.h | 10 +- drivers/gpu/drm/i915/display/intel_sprite.c | 3 + 5 files changed, 145 insertions(+), 9 deletions(-)drivers/gpu/drm/i915/display/intel_display.c +3
-0@@ -11799,6 +11799,9 @@ static void i9xx_update_cursor(struct intel_plane *plane, if (INTEL_GEN(dev_priv) >= 9)skl_write_cursor_wm (plane, crtc_state); +if (!needs_modeset (crtc_state)) +intel_psr2_program_plane_sel_fetch (plane, crtc_state, plane_state,0 ); + if (plane->cursor.base != base ||drivers/gpu/drm/i915/display/intel_display.c +5
-2plane->cursor.size != fbc_ctl || plane->cursor.cntl != cntl) {@@ -12810,8 +12813,11 @@ static int intel_crtc_atomic_check(struct intel_atomic_state *state, } -if (!mode_changed) -intel_psr2_sel_fetch_update (state, crtc); +if (!mode_changed) { + ret =intel_psr2_sel_fetch_update (state, crtc); +if (ret) +return ret; + }return 0 ;}
drivers/gpu/drm/i915/display/intel_display_types.h +2
-0@@ -586,6 +586,8 @@ struct intel_plane_state {u32 planar_slave;struct drm_intel_sprite_colorkey ckey; + +struct drm_rect psr2_sel_fetch_area; };struct intel_initial_plane_config {drivers/gpu/drm/i915/display/intel_psr.c +3
-0@@ -1173,6 +1173,46 @@ static void psr_force_hw_tracking_exit(struct drm_i915_private *dev_priv)intel_psr_exit (dev_priv); } +void intel_psr2_program_plane_sel_fetch (struct intel_plane *plane, +const struct intel_crtc_state *crtc_state, + const struct intel_plane_state
*plane_state,drivers/gpu/drm/i915/display/intel_psr.c +7
-0+ int color_plane) +{ +struct drm_i915_private *dev_priv =to_i915 (plane->base.dev); +const struct drm_rect *clip; +enum pipe pipe = plane->pipe; +u32 val; +
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_psr.c static void psr_force_hw_tracking_exit(struct drm_i915_private *dev_priv) · line 1192
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_psr.c +5
-0+if (!plane_state || !dev_priv->psr.psr2_sel_fetch_enabled) +return ; + +/* +* skl_plane_ctl_crtc()/i9xx_cursor_ctl_crtc() return 0 for gen11+, so
drivers/gpu/drm/i915/display/intel_psr.c +2
-0+* plane_state->ctl is the right value +*/
As per Bspec 50420, "SEL_FETCH_PLANE_CTL[31]: Selective Fetch Plane Enable bit" should be set.
And when "PSR2_MAN_TRK_CTL[1] : SF Partial Frame Enable bit" is enabled selective fetch will be applied.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_psr.c +1
-0+ intel_de_write_fw(dev_priv, PLANE_SEL_FETCH_CTL(pipe, plane-Quoted 1 line
id),
plane_state->ctl);
As per
Quoted 42 lines
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_psr.c static void psr_force_hw_tracking_exit(struct drm_i915_private *dev_priv) · line 1199
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_psr.c +6
-0+if (!plane_state->ctl || plane->id ==PLANE_CURSOR ) +return ; + + clip = &plane_state->psr2_sel_fetch_area; + + val = (clip->y1 + plane_state->uapi.crtc_y) <<16 ;crtc_x/y are the raw values usrspace gave us. That is definitely not
what we should be looking at.
plane_state->uapi.dstthen? but for what I found crtc_x/y is set from dst.
plane_state->uapi.dstis used inskl_program_plane()
skl_program_plane()int crtc_x = plane_state->uapi.dst.x1; int crtc_y = plane_state->uapi.dst.y1; ... intel_de_write_fw(dev_priv, PLANE_POS(pipe, plane_id), (crtc_y<< 16) |
crtc_x);Quoted 5 lines
As the first step I think these functions should just program the registers with *exactly* the same values as we program into the normal plane register. That gets us to the point where we're actually programming something into the register without having to complicate things with calculating the selective fetch area.
Okay, I can move this to other patch but please check the comment above so we have this agreed for first version of the future patch.
Quoted 9 lines
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_psr.c +2
-0+ val |= plane_state->uapi.crtc_x; + intel_de_write_fw(dev_priv, PLANE_SEL_FETCH_POS(pipe, plane-Quoted 1 line
id),
drivers/gpu/drm/i915/display/intel_psr.c +3
-0+ val); + + val = (clip->y1 + plane_state->color_plane[color_plane].y) <<16;
drivers/gpu/drm/i915/display/intel_psr.c +2
-0+ val |= plane_state->color_plane[color_plane].x; + intel_de_write_fw(dev_priv, PLANE_SEL_FETCH_OFFSET(pipe, plane-
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_psr.c
Quoted 3 lines
Quoted 1 line
id),
drivers/gpu/drm/i915/display/intel_psr.c +2
-0+ val); +
PLANE_SEL_FETCH_OFFSET values should be considered tiling information. this code does not consider aux surfaces and fb offsets.
Quoted 38 lines
Quoted 38 lines
Quoted 38 lines
drivers/gpu/drm/i915/display/intel_psr.c +4
-0+/* Sizes are 0 based */ + val = (drm_rect_height (clip) -1 ) <<16 ; + val |= (drm_rect_width (&plane_state->uapi.src) >>16 ) -1 ; + intel_de_write_fw(dev_priv, PLANE_SEL_FETCH_SIZE(pipe, plane-Quoted 1 line
id),
drivers/gpu/drm/i915/display/intel_psr.c +3
-0+ val); +} + void intel_psr2_program_trans_man_trk_ctl(const struct
intel_crtc_state*crtc_state)
{drivers/gpu/drm/i915/display/intel_psr.c +0
-0struct intel_crtc *crtc =to_intel_crtc (crtc_state->uapi.crtc);@@ -1187,17 +1227,96 @@ voidintel_psr2_program_trans_man_trk_ctl(const struct
intel_crtc_state*crtc_stdrivers/gpu/drm/i915/display/intel_psr.c +0
-1crtc_state->psr2_man_track_ctl); } -void intel_psr2_sel_fetch_update(struct intel_atomic_state*state,
drivers/gpu/drm/i915/display/intel_psr.c +1
-1- struct intel_crtc *crtc) +static void psr2_man_trk_ctl_calc(struct intel_crtc_state
*crtc_state,drivers/gpu/drm/i915/display/intel_psr.c +1
-0+struct drm_rect *clip, bool
full_update)drivers/gpu/drm/i915/display/intel_psr.c +13
-0+{ +u32 val =PSR2_MAN_TRK_CTL_ENABLE ; + +if (full_update) { + val |=PSR2_MAN_TRK_CTL_SF_SINGLE_FULL_FRAME ; + goto exit; + } + +drm_WARN_ON_ONCE (crtc_state->uapi.crtc->dev, clip->y1 ==-1 ); + + val |=PSR2_MAN_TRK_CTL_SF_PARTIAL_FRAME_UPDATE ; + val |=PSR2_MAN_TRK_CTL_SU_REGION_START_ADDR (clip->y1 /4 +1 ); + val |= PSR2_MAN_TRK_CTL_SU_REGION_END_ADDR(DIV_ROUND_UP(clip-
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
y2, 4) + 1);
As per Bspec 50424, " The frame is divided into blocks of four scan lines each. The blocks are addressed starting from 1 for the first block of the frame and ending with ROUNDUP[(TRANS_VTOTAL Vertical Active + 1) / 4]for the last block of the frame. Software must provide the starting and ending block address of the selective update region. The SU Region Start Address is programmed to the first block of the selective update region. The SU Region End Address is programmed to the final block of the selective update region + 1."
I think it should be like, val |= PSR2_MAN_TRK_CTL_SU_REGION_END_ADDR(DIV_ROUND_UP(clip->y2 +1, 4) + 1);
Quoted 144 lines
Quoted 144 lines
Quoted 144 lines
drivers/gpu/drm/i915/display/intel_psr.c +5
-0+exit: + crtc_state->psr2_man_track_ctl = val; +} + +static void clip_area_update(struct drm_rect
*overlap_damage_area,drivers/gpu/drm/i915/display/intel_psr.c +16
-0+ struct drm_rect *damage_area) +{ +if (overlap_damage_area->y1 ==-1 ) { + overlap_damage_area->y1 = damage_area->y1; + overlap_damage_area->y2 = damage_area->y2; +return ; + } + +if (damage_area->y1 < overlap_damage_area->y1) + overlap_damage_area->y1 = damage_area->y1; + +if (damage_area->y2 > overlap_damage_area->y2) + overlap_damage_area->y2 = damage_area->y2; +} + +int intel_psr2_sel_fetch_update(struct intel_atomic_state*state,
drivers/gpu/drm/i915/display/intel_psr.c +1
-0+ struct intel_crtc *crtc) { struct intel_crtc_state *crtc_state =
intel_atomic_get_new_crtc_state(state, crtc);drivers/gpu/drm/i915/display/intel_psr.c +8
-1struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); +struct intel_plane_state *new_plane_state, *old_plane_state; +struct drm_rect pipe_clip = { .y1 =-1 }; +struct intel_plane *plane; +bool full_update = false; +int i, ret;if (!dev_priv->psr.psr2_sel_fetch_enabled) -return ; +return 0 ; + + ret = drm_atomic_add_affected_planes(&state->base, &crtc-Quoted 1 line
base);
drivers/gpu/drm/i915/display/intel_psr.c +4
-0+if (ret) +return ret; + + for_each_oldnew_intel_plane_in_state(state, plane,
old_plane_state,drivers/gpu/drm/i915/display/intel_psr.c +2
-2+ new_plane_state, i) { +struct drm_rect *plane_sel_fetch_area, temp; - crtc_state->psr2_man_track_ctl =PSR2_MAN_TRK_CTL_ENABLE | -PSR2_MAN_TRK_CTL_SF_SINGLE_FUL
L_FRAME;drivers/gpu/drm/i915/display/intel_psr.c +1
-0+ if (new_plane_state->uapi.crtc != crtc_state-Quoted 1 line
uapi.crtc)
drivers/gpu/drm/i915/display/intel_psr.c +4
-0+continue ; + +/* +* TODO: Not clear how to handle planes with negative position,
drivers/gpu/drm/i915/display/intel_psr.c +1
-0+* also planes are not updated if they have a negative X
drivers/gpu/drm/i915/display/intel_psr.c +1
-0+* position so for now doing a full update in this cases
drivers/gpu/drm/i915/display/intel_psr.c +12
-0+*/ +if (new_plane_state->uapi.crtc_y <0 || + new_plane_state->uapi.crtc_x <0 ) { + full_update = true; +break ; + } + +if (!new_plane_state->uapi.visible) +continue ; + +/* +* For now doing a selective fetch in the whole plane area,
drivers/gpu/drm/i915/display/intel_psr.c +3
-0+* optimizations will come in the future. +*/ + plane_sel_fetch_area = &new_plane_state-Quoted 1 line
psr2_sel_fetch_area;drivers/gpu/drm/i915/display/intel_psr.c +1
-0+ plane_sel_fetch_area->y1 = new_plane_state->uapi.src.y1Quoted 1 line
Quoted 1 line
16;
drivers/gpu/drm/i915/display/intel_psr.c +1
-0+ plane_sel_fetch_area->y2 = new_plane_state->uapi.src.y2Quoted 1 line
Quoted 1 line
16;
drivers/gpu/drm/i915/display/intel_psr.c +9
-0+ + temp = *plane_sel_fetch_area; + temp.y1 += new_plane_state->uapi.crtc_y; + temp.y2 += new_plane_state->uapi.crtc_y; +clip_area_update (&pipe_clip, &temp); + } + +psr2_man_trk_ctl_calc (crtc_state, &pipe_clip, full_update); +return 0 ; }/** drivers/gpu/drm/i915/display/intel_psr.h +2
-0@@ -15,6 +15,8 @@ struct intel_crtc_state;struct intel_dp ;struct intel_crtc ;struct intel_atomic_state ; +struct intel_plane_state ; +struct intel_plane ;#define CAN_PSR (dev_priv) (HAS_PSR(dev_priv) && dev_priv- >psr.sink_support)void
intel_psr_init_dpcd(struct intel_dp *intel_dp);drivers/gpu/drm/i915/display/intel_psr.h +1
-2@@ -45,8 +47,12 @@ void intel_psr_atomic_check(structdrm_connector *connector, struct drm_connector_state *old_state, struct drm_connector_state *new_state);void intel_psr_set_force_mode_changed (struct intel_dp *intel_dp); -void intel_psr2_sel_fetch_update (struct intel_atomic_state *state, -struct intel_crtc *crtc); +int intel_psr2_sel_fetch_update(struct intel_atomic_state*state,
drivers/gpu/drm/i915/display/intel_psr.h +1
-0+ struct intel_crtc *crtc); void intel_psr2_program_trans_man_trk_ctl(const struct
intel_crtc_state*crtc_state);
+void intel_psr2_program_plane_sel_fetch(structintel_plane*plane,drivers/gpu/drm/i915/display/intel_psr.h +1
-0+ const struct intel_crtc_state
*crtc_state,drivers/gpu/drm/i915/display/intel_psr.h +1
-0+ const struct intel_plane_state
*plane_state,drivers/gpu/drm/i915/display/intel_psr.h +1
-0+ int color_plane);#endif /* __INTEL_PSR_H__ */ drivers/gpu/drm/i915/display/intel_sprite.c +0
-0@@ -690,6 +690,9 @@ skl_program_plane(struct intel_plane *plane,intel_de_write_fw (dev_priv,PLANE_AUX_OFFSET (pipe, plane_id), (plane_state->color_plane[1 ].y <<16 ) | plane_state->color_plane[1 ].x);
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_sprite.c +3
-0+if (!drm_atomic_crtc_needs_modeset (&crtc_state->uapi)) +intel_psr2_program_plane_sel_fetch (plane, crtc_state, plane_state, color_plane); +drivers/gpu/drm/i915/display/intel_sprite.c +0
-0/* * The control register self-arms if the plane was previously * disabled. Try to make the plane enable atomic by writing Signature · 1 line
2.28.0
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 3/4] drm/i915/display: Program PSR2 selective fetch registers
Quoted 103 lines · Gwan-gyeong
Quoted 102 lines · Jose
Quoted 101 lines · Ville Syrjälä
Quoted 99 lines · José Roberto de Souza
Another step towards PSR2 selective fetch, here programming plane selective fetch registers and
MAN_TRK_CTLenabling selective fetch but
for now it is fetching the whole area of the planes. The damaged area calculation will come as next and final step.BSpec: 55229
Cc: Gwan-gyeong Mun <
[email protected]Cc: Ville Syrjälä <
[email protected]Signed-off-by: José Roberto de Souza <
[email protected]--- drivers/gpu/drm/i915/display/intel_display.c | 10 +- .../drm/i915/display/intel_display_types.h | 2 + drivers/gpu/drm/i915/display/intel_psr.c | 129 +++++++++++++++++- drivers/gpu/drm/i915/display/intel_psr.h | 10 +- drivers/gpu/drm/i915/display/intel_sprite.c | 3 + 5 files changed, 145 insertions(+), 9 deletions(-)drivers/gpu/drm/i915/display/intel_display.c +3
-0@@ -11799,6 +11799,9 @@ static void i9xx_update_cursor(struct intel_plane *plane, if (INTEL_GEN(dev_priv) >= 9)skl_write_cursor_wm (plane, crtc_state); +if (!needs_modeset (crtc_state)) +intel_psr2_program_plane_sel_fetch (plane, crtc_state, plane_state,0 ); + if (plane->cursor.base != base ||drivers/gpu/drm/i915/display/intel_display.c +5
-2plane->cursor.size != fbc_ctl || plane->cursor.cntl != cntl) {@@ -12810,8 +12813,11 @@ static int intel_crtc_atomic_check(struct intel_atomic_state *state, } -if (!mode_changed) -intel_psr2_sel_fetch_update (state, crtc); +if (!mode_changed) { + ret =intel_psr2_sel_fetch_update (state, crtc); +if (ret) +return ret; + }return 0 ;}
drivers/gpu/drm/i915/display/intel_display_types.h +2
-0@@ -586,6 +586,8 @@ struct intel_plane_state {u32 planar_slave;struct drm_intel_sprite_colorkey ckey; + +struct drm_rect psr2_sel_fetch_area; };struct intel_initial_plane_config {drivers/gpu/drm/i915/display/intel_psr.c +3
-0@@ -1173,6 +1173,46 @@ static void psr_force_hw_tracking_exit(struct drm_i915_private *dev_priv)intel_psr_exit (dev_priv); } +void intel_psr2_program_plane_sel_fetch (struct intel_plane *plane, +const struct intel_crtc_state *crtc_state, + const struct intel_plane_state
*plane_state,drivers/gpu/drm/i915/display/intel_psr.c +12
-0+ int color_plane) +{ +struct drm_i915_private *dev_priv =to_i915 (plane->base.dev); +const struct drm_rect *clip; +enum pipe pipe = plane->pipe; +u32 val; + +if (!plane_state || !dev_priv->psr.psr2_sel_fetch_enabled) +return ; + +/* +* skl_plane_ctl_crtc()/i9xx_cursor_ctl_crtc() return 0 for
Quoted 8 lines
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_psr.c static void psr_force_hw_tracking_exit(struct drm_i915_private *dev_priv) · line 1192
Quoted 3 lines
gen11+, so
drivers/gpu/drm/i915/display/intel_psr.c +2
-0+* plane_state->ctl is the right value +*/ As per Bspec 50420, "SEL_FETCH_PLANE_CTL[31]: Selective Fetch Plane Enable bit" should be set.
And when "PSR2_MAN_TRK_CTL[1] : SF Partial Frame Enable bit" is enabled selective fetch will be applied.
Bit 31 from PLANE_CTL is the enabled bit all the other fields are spare so we can program it without issues.
Quoted 48 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_psr.c +1
-0+ intel_de_write_fw(dev_priv, PLANE_SEL_FETCH_CTL(pipe, plane-Quoted 1 line
id),
plane_state->ctl);As per
Quoted 43 lines
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_psr.c static void psr_force_hw_tracking_exit(struct drm_i915_private *dev_priv) · line 1199
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_psr.c +6
-0+if (!plane_state->ctl || plane->id ==PLANE_CURSOR ) +return ; + + clip = &plane_state->psr2_sel_fetch_area; + + val = (clip->y1 + plane_state->uapi.crtc_y) <<16 ;crtc_x/y are the raw values usrspace gave us. That is definitely not
what we should be looking at.
plane_state->uapi.dstthen? but for what I found crtc_x/y is set from dst.
plane_state->uapi.dstis used inskl_program_plane()
skl_program_plane()int crtc_x = plane_state->uapi.dst.x1; int crtc_y = plane_state->uapi.dst.y1; ... intel_de_write_fw(dev_priv, PLANE_POS(pipe, plane_id), (crtc_y<< 16) |
crtc_x);Quoted 5 lines
As the first step I think these functions should just program the registers with *exactly* the same values as we program into the normal plane register. That gets us to the point where we're actually programming something into the register without having to complicate things with calculating the selective fetch area.
Okay, I can move this to other patch but please check the comment above so we have this agreed for first version of the future patch.
Quoted 10 lines
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_psr.c +2
-0+ val |= plane_state->uapi.crtc_x; + intel_de_write_fw(dev_priv, PLANE_SEL_FETCH_POS(pipe, plane-Quoted 1 line
id),
drivers/gpu/drm/i915/display/intel_psr.c +3
-0+ val); + + val = (clip->y1 + plane_state->color_plane[color_plane].y) <<16;
drivers/gpu/drm/i915/display/intel_psr.c +2
-0+ val |= plane_state->color_plane[color_plane].x; + intel_de_write_fw(dev_priv, PLANE_SEL_FETCH_OFFSET(pipe, plane-
Quoted 7 lines
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_psr.c
Quoted 4 lines
Quoted 1 line
id),
drivers/gpu/drm/i915/display/intel_psr.c +2
-0+ val); +
PLANE_SEL_FETCH_OFFSETvalues should be considered tiling information. this code does not consider aux surfaces and fb offsets.
Not familiar with this, could explain more?
plane_state->color_plane[color_plane].x/y are the ones used to program plane_offset, so some calculation will be needed before sum plane_state-
Quoted 43 lines
color_plane[color_plane].y to
clip->y1?Quoted 39 lines
Quoted 39 lines
Quoted 39 lines
drivers/gpu/drm/i915/display/intel_psr.c +4
-0+/* Sizes are 0 based */ + val = (drm_rect_height (clip) -1 ) <<16 ; + val |= (drm_rect_width (&plane_state->uapi.src) >>16 ) -1 ; + intel_de_write_fw(dev_priv, PLANE_SEL_FETCH_SIZE(pipe, plane-Quoted 1 line
id),
drivers/gpu/drm/i915/display/intel_psr.c +3
-0+ val); +} + void intel_psr2_program_trans_man_trk_ctl(const struct
intel_crtc_state*crtc_state)
{drivers/gpu/drm/i915/display/intel_psr.c +0
-0struct intel_crtc *crtc =to_intel_crtc (crtc_state->uapi.crtc);@@ -1187,17 +1227,96 @@ voidintel_psr2_program_trans_man_trk_ctl(const struct
intel_crtc_state*crtc_stdrivers/gpu/drm/i915/display/intel_psr.c +0
-1crtc_state->psr2_man_track_ctl); } -void intel_psr2_sel_fetch_update(struct intel_atomic_state*state,
drivers/gpu/drm/i915/display/intel_psr.c +1
-1- struct intel_crtc *crtc) +static void psr2_man_trk_ctl_calc(struct intel_crtc_state
*crtc_state,drivers/gpu/drm/i915/display/intel_psr.c +1
-0+struct drm_rect *clip, bool
full_update)drivers/gpu/drm/i915/display/intel_psr.c +13
-0+{ +u32 val =PSR2_MAN_TRK_CTL_ENABLE ; + +if (full_update) { + val |=PSR2_MAN_TRK_CTL_SF_SINGLE_FULL_FRAME ; + goto exit; + } + +drm_WARN_ON_ONCE (crtc_state->uapi.crtc->dev, clip->y1 ==-1 ); + + val |=PSR2_MAN_TRK_CTL_SF_PARTIAL_FRAME_UPDATE ; + val |=PSR2_MAN_TRK_CTL_SU_REGION_START_ADDR (clip->y1 /4 +1 ); + val |= PSR2_MAN_TRK_CTL_SU_REGION_END_ADDR(DIV_ROUND_UP(clip-Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
y2, 4) + 1);
Quoted 10 lines
As per Bspec 50424, " The frame is divided into blocks of four scan lines each. The blocks are addressed starting from 1 for the first block of the frame and ending with ROUNDUP[(TRANS_VTOTAL Vertical Active + 1) / 4]for the last block of the frame. Software must provide the starting and ending block address of the selective update region. The SU Region Start Address is programmed to the first block of the selective update region. The SU Region End Address is programmed to the final block of the selective update region + 1."
I think it should be like, val |=PSR2_MAN_TRK_CTL_SU_REGION_END_ADDR(DIV_ROUND_UP(clip->y2 +1, 4) + 1);
DIV_ROUND_UP(clip->y2 +1, 4) + 1 do not work for numbers that divide by 4. clip->y2 = 1079, will result in 271clip->y2 = 1080, will result in 272, one more block than a 1080 frame have
Quoted 152 lines
Quoted 152 lines
Quoted 152 lines
Quoted 152 lines
drivers/gpu/drm/i915/display/intel_psr.c +5
-0+exit: + crtc_state->psr2_man_track_ctl = val; +} + +static void clip_area_update(struct drm_rect
*overlap_damage_area,drivers/gpu/drm/i915/display/intel_psr.c +16
-0+ struct drm_rect *damage_area) +{ +if (overlap_damage_area->y1 ==-1 ) { + overlap_damage_area->y1 = damage_area->y1; + overlap_damage_area->y2 = damage_area->y2; +return ; + } + +if (damage_area->y1 < overlap_damage_area->y1) + overlap_damage_area->y1 = damage_area->y1; + +if (damage_area->y2 > overlap_damage_area->y2) + overlap_damage_area->y2 = damage_area->y2; +} + +int intel_psr2_sel_fetch_update(struct intel_atomic_state*state,
drivers/gpu/drm/i915/display/intel_psr.c +1
-0+ struct intel_crtc *crtc) { struct intel_crtc_state *crtc_state =
intel_atomic_get_new_crtc_state(state, crtc);drivers/gpu/drm/i915/display/intel_psr.c +8
-1struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); +struct intel_plane_state *new_plane_state, *old_plane_state; +struct drm_rect pipe_clip = { .y1 =-1 }; +struct intel_plane *plane; +bool full_update = false; +int i, ret;if (!dev_priv->psr.psr2_sel_fetch_enabled) -return ; +return 0 ; + + ret = drm_atomic_add_affected_planes(&state->base, &crtc-Quoted 1 line
base);
drivers/gpu/drm/i915/display/intel_psr.c +4
-0+if (ret) +return ret; + + for_each_oldnew_intel_plane_in_state(state, plane,
old_plane_state,drivers/gpu/drm/i915/display/intel_psr.c +2
-2+ new_plane_state, i) { +struct drm_rect *plane_sel_fetch_area, temp; - crtc_state->psr2_man_track_ctl =PSR2_MAN_TRK_CTL_ENABLE | -PSR2_MAN_TRK_CTL_SF_SINGLE_FUL
L_FRAME;drivers/gpu/drm/i915/display/intel_psr.c +1
-0+ if (new_plane_state->uapi.crtc != crtc_state-Quoted 1 line
uapi.crtc)
drivers/gpu/drm/i915/display/intel_psr.c +4
-0+continue ; + +/* +* TODO: Not clear how to handle planes with negative position,
drivers/gpu/drm/i915/display/intel_psr.c +1
-0+* also planes are not updated if they have a negative X
drivers/gpu/drm/i915/display/intel_psr.c +1
-0+* position so for now doing a full update in this cases
drivers/gpu/drm/i915/display/intel_psr.c +12
-0+*/ +if (new_plane_state->uapi.crtc_y <0 || + new_plane_state->uapi.crtc_x <0 ) { + full_update = true; +break ; + } + +if (!new_plane_state->uapi.visible) +continue ; + +/* +* For now doing a selective fetch in the whole plane area,
drivers/gpu/drm/i915/display/intel_psr.c +3
-0+* optimizations will come in the future. +*/ + plane_sel_fetch_area = &new_plane_state-Quoted 1 line
psr2_sel_fetch_area;drivers/gpu/drm/i915/display/intel_psr.c +1
-0+ plane_sel_fetch_area->y1 = new_plane_state->uapi.src.y1Quoted 1 line
Quoted 1 line
16;
drivers/gpu/drm/i915/display/intel_psr.c +1
-0+ plane_sel_fetch_area->y2 = new_plane_state->uapi.src.y2Quoted 1 line
Quoted 1 line
16;
drivers/gpu/drm/i915/display/intel_psr.c +9
-0+ + temp = *plane_sel_fetch_area; + temp.y1 += new_plane_state->uapi.crtc_y; + temp.y2 += new_plane_state->uapi.crtc_y; +clip_area_update (&pipe_clip, &temp); + } + +psr2_man_trk_ctl_calc (crtc_state, &pipe_clip, full_update); +return 0 ; }/** drivers/gpu/drm/i915/display/intel_psr.h +2
-0@@ -15,6 +15,8 @@ struct intel_crtc_state;struct intel_dp ;struct intel_crtc ;struct intel_atomic_state ; +struct intel_plane_state ; +struct intel_plane ;#define CAN_PSR (dev_priv) (HAS_PSR(dev_priv) && dev_priv- > psr.sink_support)void
intel_psr_init_dpcd(struct intel_dp *intel_dp);drivers/gpu/drm/i915/display/intel_psr.h +1
-2@@ -45,8 +47,12 @@ void intel_psr_atomic_check(structdrm_connector *connector, struct drm_connector_state *old_state, struct drm_connector_state *new_state);void intel_psr_set_force_mode_changed (struct intel_dp *intel_dp); -void intel_psr2_sel_fetch_update (struct intel_atomic_state *state, -struct intel_crtc *crtc); +int intel_psr2_sel_fetch_update(struct intel_atomic_state*state,
drivers/gpu/drm/i915/display/intel_psr.h +1
-0+ struct intel_crtc *crtc); void intel_psr2_program_trans_man_trk_ctl(const struct
intel_crtc_state*crtc_state);
+void intel_psr2_program_plane_sel_fetch(structintel_plane*plane,drivers/gpu/drm/i915/display/intel_psr.h +1
-0+ const struct intel_crtc_state
*crtc_state,drivers/gpu/drm/i915/display/intel_psr.h +1
-0+ const struct intel_plane_state
*plane_state,drivers/gpu/drm/i915/display/intel_psr.h +1
-0+ int color_plane);#endif /* __INTEL_PSR_H__ */ drivers/gpu/drm/i915/display/intel_sprite.c +0
-0@@ -690,6 +690,9 @@ skl_program_plane(struct intel_plane *plane,intel_de_write_fw (dev_priv,PLANE_AUX_OFFSET (pipe, plane_id), (plane_state->color_plane[1 ].y <<16 ) > plane_state->color_plane[1 ].x);
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_sprite.c +2
-0+if (!drm_atomic_crtc_needs_modeset (&crtc_state->uapi)) + intel_psr2_program_plane_sel_fetch(plane, crtc_state,
plane_state,color_plane);drivers/gpu/drm/i915/display/intel_sprite.c +1
-0+/* * The control register self-arms if the plane was previously * disabled. Try to make the plane enable atomic by writing Signature · 1 line
2.28.0
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 3/4] drm/i915/display: Program PSR2 selective fetch registers
Quoted 185 lines · Jose
Quoted 107 lines · Gwan-gyeong
Quoted 106 lines · Jose
Quoted 105 lines · Ville Syrjälä
Quoted 103 lines · José Roberto de Souza
Another step towards PSR2 selective fetch, here programming plane
selective fetch registers andMAN_TRK_CTLenabling selective fetch but
for now it is fetching the whole area of the planes. The damaged area calculation will come as next and final step.BSpec: 55229
Cc: Gwan-gyeong Mun <
[email protected]Cc: Ville Syrjälä <
[email protected]Signed-off-by: José Roberto de Souza <
[email protected]--- drivers/gpu/drm/i915/display/intel_display.c | 10 +- .../drm/i915/display/intel_display_types.h | 2 + drivers/gpu/drm/i915/display/intel_psr.c | 129 +++++++++++++++++- drivers/gpu/drm/i915/display/intel_psr.h | 10 +- drivers/gpu/drm/i915/display/intel_sprite.c | 3 + 5 files changed, 145 insertions(+), 9 deletions(-)drivers/gpu/drm/i915/display/intel_display.c +3
-0@@ -11799,6 +11799,9 @@ static void i9xx_update_cursor(struct intel_plane *plane, if (INTEL_GEN(dev_priv) >= 9)skl_write_cursor_wm (plane, crtc_state); +if (!needs_modeset (crtc_state)) +intel_psr2_program_plane_sel_fetch (plane, crtc_state, plane_state,0 ); +drivers/gpu/drm/i915/display/intel_display.c +5
-2if (plane->cursor.base != base || plane->cursor.size != fbc_ctl || plane->cursor.cntl != cntl) {@@ -12810,8 +12813,11 @@ static int intel_crtc_atomic_check(struct intel_atomic_state *state, } -if (!mode_changed) -intel_psr2_sel_fetch_update (state, crtc); +if (!mode_changed) { + ret =intel_psr2_sel_fetch_update (state, crtc); +if (ret) +return ret; + }return 0 ;}
diff --gita/drivers/gpu/drm/i915/display/intel_display_types.hb/drivers/gpu/drm/i915/display/intel_display_types.hindex9349b15afff6..2138bb0f1587100644drivers/gpu/drm/i915/display/intel_display_types.h +2
-0@@ -586,6 +586,8 @@ struct intel_plane_state {u32 planar_slave;struct drm_intel_sprite_colorkey ckey; + +struct drm_rect psr2_sel_fetch_area; };struct intel_initial_plane_config {drivers/gpu/drm/i915/display/intel_psr.c +2
-0@@ -1173,6 +1173,46 @@ static void psr_force_hw_tracking_exit(struct drm_i915_private *dev_priv)intel_psr_exit (dev_priv); } +void intel_psr2_program_plane_sel_fetch(struct intel_plane *plane, + const struct
intel_crtc_state*crtc_state,drivers/gpu/drm/i915/display/intel_psr.c +1
-0+ const struct
intel_plane_state*plane_state,drivers/gpu/drm/i915/display/intel_psr.c +3
-0+ int color_plane) +{ + struct drm_i915_private *dev_priv = to_i915(plane-Quoted 1 line
base.dev);
drivers/gpu/drm/i915/display/intel_psr.c +5
-0+const struct drm_rect *clip; +enum pipe pipe = plane->pipe; +u32 val; + + if (!plane_state || !dev_priv-Quoted 1 line
psr.psr2_sel_fetch_enabled)
Quoted 15 lines
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_psr.c static void psr_force_hw_tracking_exit(struct drm_i915_private *dev_priv) · line 1192
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_psr.c +4
-0+return ; + +/* +* skl_plane_ctl_crtc()/i9xx_cursor_ctl_crtc() return 0 for
gen11+, sodrivers/gpu/drm/i915/display/intel_psr.c +2
-0+* plane_state->ctl is the right value +*/ As per Bspec 50420, "SEL_FETCH_PLANE_CTL[31]: Selective Fetch Plane
Enable bit" should be set.
And when "PSR2_MAN_TRK_CTL[1] : SF Partial Frame Enable bit" is enabled
selective fetch will be applied.Bit 31 from
PLANE_CTLis the enabled bit all the other fields are spare so we can program it without issues.Quoted 58 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_psr.c +1
-0+ intel_de_write_fw(dev_priv, PLANE_SEL_FETCH_CTL(pipe,plane-
Quoted 1 line
id),
plane_state->ctl);As per
Quoted 53 lines
Quoted 11 lines
drivers/gpu/drm/i915/display/intel_psr.c static void psr_force_hw_tracking_exit(struct drm_i915_private *dev_priv) · line 1199
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_psr.c +6
-0+if (!plane_state->ctl || plane->id ==PLANE_CURSOR ) +return ; + + clip = &plane_state->psr2_sel_fetch_area; + + val = (clip->y1 + plane_state->uapi.crtc_y) <<16 ;crtc_x/y are the raw values usrspace gave us. That is definitely
not
what we should be looking at.
plane_state->uapi.dstthen? but for what I found crtc_x/y is set from
dst.
plane_state->uapi.dstis used inskl_program_plane()
skl_program_plane()int crtc_x = plane_state->uapi.dst.x1; int crtc_y = plane_state->uapi.dst.y1; ... intel_de_write_fw(dev_priv, PLANE_POS(pipe, plane_id), (crtc_y<< 16) |
crtc_x);Quoted 7 lines
As the first step I think these functions should just program the
registers with *exactly* the same values as we program into the normal plane register. That gets us to the point where we're actually programming something into the register without having to
complicate things with calculating the selective fetch area.Okay, I can move this to other patch but please check the comment above so we have this agreed for first version of the future patch.
Quoted 15 lines
Quoted 15 lines
drivers/gpu/drm/i915/display/intel_psr.c +2
-0+ val |= plane_state->uapi.crtc_x; + intel_de_write_fw(dev_priv, PLANE_SEL_FETCH_POS(pipe,plane-
Quoted 1 line
id),
drivers/gpu/drm/i915/display/intel_psr.c +3
-0+ val); + + val = (clip->y1 + plane_state-Quoted 1 line
color_plane[color_plane].y) <<
16;
drivers/gpu/drm/i915/display/intel_psr.c +2
-0+ val |= plane_state->color_plane[color_plane].x; + intel_de_write_fw(dev_priv,PLANE_SEL_FETCH_OFFSET(pipe, plane-
Quoted 1 line
id),
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_psr.c
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_psr.c +2
-0+ val); +
PLANE_SEL_FETCH_OFFSETvalues should be considered tiling information.
this code does not consider aux surfaces and fb offsets.Not familiar with this, could explain more?
As per Bspec: 55229,Sel_Fetch Plane Y Offset = Plane Y offset + Update offset the Plane Y offset is calculated with tiling information for non linear surface. (linear surface also needs to calculate with the pitch ...) therefore it seems that we need to separately calculate for Sel_Fetch Plane Y Offset
refer. intel_adjust_aligned_offset()
Quoted 244 lines
plane_state->color_plane[color_plane].x/y are the ones used to program
plane_offset, so some calculation will be needed before sum plane_state-Quoted 49 lines
color_plane[color_plane].y to
clip->y1?Quoted 45 lines
Quoted 45 lines
Quoted 45 lines
drivers/gpu/drm/i915/display/intel_psr.c +3
-0+/* Sizes are 0 based */ + val = (drm_rect_height (clip) -1 ) <<16 ; + val |= (drm_rect_width(&plane_state->uapi.src) >> 16) -1;
drivers/gpu/drm/i915/display/intel_psr.c +1
-0+ intel_de_write_fw(dev_priv, PLANE_SEL_FETCH_SIZE(pipe,plane-
Quoted 1 line
id),
drivers/gpu/drm/i915/display/intel_psr.c +3
-0+ val); +} + void intel_psr2_program_trans_man_trk_ctl(const struct
intel_crtc_state*crtc_state)
{
structintel_crtc*crtc = to_intel_crtc(crtc_state-Quoted 1 line
uapi.crtc);
drivers/gpu/drm/i915/display/intel_psr.c +0
-0@@ -1187,17 +1227,96 @@ voidintel_psr2_program_trans_man_trk_ctl(const struct
intel_crtc_state*crtc_stdrivers/gpu/drm/i915/display/intel_psr.c +0
-1crtc_state->psr2_man_track_ctl); } -void intel_psr2_sel_fetch_update(struct intel_atomic_state*state,
drivers/gpu/drm/i915/display/intel_psr.c +1
-1- struct intel_crtc *crtc) +static void psr2_man_trk_ctl_calc(struct intel_crtc_state
*crtc_state,drivers/gpu/drm/i915/display/intel_psr.c +1
-0+struct drm_rect *clip, bool
full_update)drivers/gpu/drm/i915/display/intel_psr.c +9
-0+{ +u32 val =PSR2_MAN_TRK_CTL_ENABLE ; + +if (full_update) { + val |=PSR2_MAN_TRK_CTL_SF_SINGLE_FULL_FRAME ; + goto exit; + } + + drm_WARN_ON_ONCE(crtc_state->uapi.crtc->dev, clip->y1== -1);
drivers/gpu/drm/i915/display/intel_psr.c +3
-0+ + val |=PSR2_MAN_TRK_CTL_SF_PARTIAL_FRAME_UPDATE ; + val |= PSR2_MAN_TRK_CTL_SU_REGION_START_ADDR(clip->y1 /4 + 1);
drivers/gpu/drm/i915/display/intel_psr.c +1
-0+ val |=PSR2_MAN_TRK_CTL_SU_REGION_END_ADDR(DIV_ROUND_UP(clip-
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
y2, 4) + 1);
Quoted 14 lines
As per Bspec 50424, " The frame is divided into blocks of four scan lines each. The blocks are addressed starting from 1 for the first block of the frame and ending with ROUNDUP[(TRANS_VTOTAL Vertical Active + 1) / 4]for the last block of the frame. Software must provide
the starting and ending block address of the selective update region.
The SU Region Start Address is programmed to the first block of the selective update region. The SU Region End Address is programmed to the
final block of the selective update region + 1."
I think it should be like, val |=PSR2_MAN_TRK_CTL_SU_REGION_END_ADDR(DIV_ROUND_UP(clip->y2 +1, 4) + 1);
DIV_ROUND_UP(clip->y2 +1, 4)+ 1 do not work for numbers that divide by 4.clip->y2= 1079, will result in 271clip->y2= 1080, will result in 272, one more block than a 1080 frame haveQuoted 171 lines
Quoted 171 lines
Quoted 171 lines
Quoted 171 lines
drivers/gpu/drm/i915/display/intel_psr.c +5
-0+exit: + crtc_state->psr2_man_track_ctl = val; +} + +static void clip_area_update(struct drm_rect
*overlap_damage_area,drivers/gpu/drm/i915/display/intel_psr.c +16
-0+ struct drm_rect *damage_area) +{ +if (overlap_damage_area->y1 ==-1 ) { + overlap_damage_area->y1 = damage_area->y1; + overlap_damage_area->y2 = damage_area->y2; +return ; + } + +if (damage_area->y1 < overlap_damage_area->y1) + overlap_damage_area->y1 = damage_area->y1; + +if (damage_area->y2 > overlap_damage_area->y2) + overlap_damage_area->y2 = damage_area->y2; +} + +int intel_psr2_sel_fetch_update(struct intel_atomic_state*state,
drivers/gpu/drm/i915/display/intel_psr.c +1
-0+ struct intel_crtc *crtc) { struct intel_crtc_state *crtc_state =
intel_atomic_get_new_crtc_state(state, crtc);
structdrm_i915_private*dev_priv= to_i915(crtc-Quoted 1 line
base.dev);
drivers/gpu/drm/i915/display/intel_psr.c +1
-0+ struct intel_plane_state *new_plane_state,
*old_plane_state;drivers/gpu/drm/i915/display/intel_psr.c +7
-1+struct drm_rect pipe_clip = { .y1 =-1 }; +struct intel_plane *plane; +bool full_update = false; +int i, ret;if (!dev_priv->psr.psr2_sel_fetch_enabled) -return ; +return 0 ; + + ret = drm_atomic_add_affected_planes(&state->base,&crtc-
Quoted 1 line
base);
drivers/gpu/drm/i915/display/intel_psr.c +4
-0+if (ret) +return ret; + + for_each_oldnew_intel_plane_in_state(state, plane,
old_plane_state,drivers/gpu/drm/i915/display/intel_psr.c +1
-0+ new_plane_state,i) {
drivers/gpu/drm/i915/display/intel_psr.c +1
-1+struct drm_rect *plane_sel_fetch_area, temp; - crtc_state->psr2_man_track_ctl =
PSR2_MAN_TRK_CTL_ENABLE|drivers/gpu/drm/i915/display/intel_psr.c +0
-1-PSR2_MAN_TRK_CTL_SF_SI
NGLE_FULL_FRAME;drivers/gpu/drm/i915/display/intel_psr.c +1
-0+ if (new_plane_state->uapi.crtc != crtc_state-Quoted 1 line
uapi.crtc)
drivers/gpu/drm/i915/display/intel_psr.c +4
-0+continue ; + +/* +* TODO: Not clear how to handle planes with negative
position,drivers/gpu/drm/i915/display/intel_psr.c +1
-0+* also planes are not updated if they have a negative
Xdrivers/gpu/drm/i915/display/intel_psr.c +1
-0+* position so for now doing a full update in this
casesdrivers/gpu/drm/i915/display/intel_psr.c +12
-0+*/ +if (new_plane_state->uapi.crtc_y <0 || + new_plane_state->uapi.crtc_x <0 ) { + full_update = true; +break ; + } + +if (!new_plane_state->uapi.visible) +continue ; + +/* +* For now doing a selective fetch in the whole plane
area,drivers/gpu/drm/i915/display/intel_psr.c +3
-0+* optimizations will come in the future. +*/ + plane_sel_fetch_area = &new_plane_state-Quoted 1 line
psr2_sel_fetch_area;drivers/gpu/drm/i915/display/intel_psr.c +1
-0+ plane_sel_fetch_area->y1 = new_plane_state-Quoted 2 lines
uapi.src.y1
Quoted 1 line
16;
drivers/gpu/drm/i915/display/intel_psr.c +1
-0+ plane_sel_fetch_area->y2 = new_plane_state-Quoted 2 lines
uapi.src.y2
Quoted 1 line
16;
drivers/gpu/drm/i915/display/intel_psr.c +8
-0+ + temp = *plane_sel_fetch_area; + temp.y1 += new_plane_state->uapi.crtc_y; + temp.y2 += new_plane_state->uapi.crtc_y; +clip_area_update (&pipe_clip, &temp); + } + + psr2_man_trk_ctl_calc(crtc_state, &pipe_clip,
full_update);drivers/gpu/drm/i915/display/intel_psr.c +1
-0+return 0 ; }/** drivers/gpu/drm/i915/display/intel_psr.h +2
-0@@ -15,6 +15,8 @@ struct intel_crtc_state;struct intel_dp ;struct intel_crtc ;struct intel_atomic_state ; +struct intel_plane_state ; +struct intel_plane ;#define CAN_PSR (dev_priv) (HAS_PSR(dev_priv) && dev_priv- > psr.sink_support)void
intel_psr_init_dpcd(struct intel_dp *intel_dp);drivers/gpu/drm/i915/display/intel_psr.h +0
-1@@ -45,8 +47,12 @@ void intel_psr_atomic_check(structdrm_connector *connector, struct drm_connector_state *old_state, struct drm_connector_state *new_state);void intel_psr_set_force_mode_changed (struct intel_dp *intel_dp); -void intel_psr2_sel_fetch_update(struct intel_atomic_state*state,
drivers/gpu/drm/i915/display/intel_psr.h +1
-1- struct intel_crtc *crtc); +int intel_psr2_sel_fetch_update(struct intel_atomic_state*state,
drivers/gpu/drm/i915/display/intel_psr.h +1
-0+ struct intel_crtc *crtc); void intel_psr2_program_trans_man_trk_ctl(const struct
intel_crtc_state*crtc_state);
+void intel_psr2_program_plane_sel_fetch(structintel_plane*plane,drivers/gpu/drm/i915/display/intel_psr.h +1
-0+ const struct
intel_crtc_state*crtc_state,drivers/gpu/drm/i915/display/intel_psr.h +1
-0+ const struct
intel_plane_state*plane_state,drivers/gpu/drm/i915/display/intel_psr.h +1
-0+ int color_plane);#endif /* __INTEL_PSR_H__ */ drivers/gpu/drm/i915/display/intel_sprite.c +0
-0@@ -690,6 +690,9 @@ skl_program_plane(struct intel_plane *plane,intel_de_write_fw (dev_priv,PLANE_AUX_OFFSET (pipe, plane_id), (plane_state- >color_plane[1].y << 16)Quoted 1 line
plane_state->color_plane[1].x);
Quoted 12 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_sprite.c +2
-0+if (!drm_atomic_crtc_needs_modeset (&crtc_state->uapi)) + intel_psr2_program_plane_sel_fetch(plane,
crtc_state,plane_state,color_plane);Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_sprite.c +1
-0+/* * The control register self-arms if the plane was previously
* disabled. Try to make the plane enable atomic by
writingSignature · 1 line
2.28.0
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 4/4 HAX/DO_NOT_MERGE_IT: drm/i915/display: Enable PSR2 selective fetch for testing
In reply to José Roberto de SouzaEnabling it to check if it causes regressions in CI but the feature is still not ready to be enabled by default.
--- drivers/gpu/drm/i915/i915_params.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_params.h +1 -1
@@ -54,7 +54,7 @@ struct drm_printer; param(int, enable_fbc, -1, 0600) \ param(int, enable_psr, -1, 0600) \ param(bool, psr_safest_params, false, 0600) \ - param(bool, enable_psr2_sel_fetch, false, 0600) \ + param(bool, enable_psr2_sel_fetch, true, 0600) \ param(int, disable_power_well, -1, 0400) \ param(int, enable_ips, 1, 0600) \param (int, invert_brightness,0 ,0600 ) \
Signature · 6 lines
2.28.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/4] drm/i915/display: Ignore IGNORE_PSR2_HW_TRACKING for platforms without sel fetch
In reply to José Roberto de Souza== Series Details ==
== Series Details ==
Series: series starting with [1/4] drm/i915/display: Ignore IGNORE_PSR2_HW_TRACKING for platforms without sel fetch
URL : https://patchwork.freedesktop.org/series/81201/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_8948 -> Patchwork_18426
====================================================
Summary
-------
**WARNING**
Minor unknown changes coming with Patchwork_18426 need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_18426, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/index.html
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_18426:
### IGT changes ###
#### Warnings ####
* igt@runner@aborted:
- fi-tgl-u2: [FAIL][1] ([i915#2045]) -> [FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8948/fi-tgl-u2/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/fi-tgl-u2/igt@[email protected]
Known issues
------------
Here are the changes found in Patchwork_18426 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_parallel@engines@contexts:
- fi-cfl-8109u: [PASS][3] -> [INCOMPLETE][4] ([i915#2398])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8948/fi-cfl-8109u/igt@gem_exec_parallel@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/fi-cfl-8109u/igt@gem_exec_parallel@[email protected]
- fi-icl-y: [PASS][5] -> [INCOMPLETE][6] ([i915#2398])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8948/fi-icl-y/igt@gem_exec_parallel@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/fi-icl-y/igt@gem_exec_parallel@[email protected]
* igt@i915_selftest@live@execlists:
- fi-icl-y: [PASS][7] -> [INCOMPLETE][8] ([i915#2276])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8948/fi-icl-y/igt@i915_selftest@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/fi-icl-y/igt@i915_selftest@[email protected]
* igt@kms_flip@basic-flip-vs-wf_vblank@c-edp1:
- fi-icl-u2: [PASS][9] -> [DMESG-WARN][10] ([i915#1982]) +1 similar issue
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8948/fi-icl-u2/igt@kms_flip@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/fi-icl-u2/igt@kms_flip@[email protected]
#### Possible fixes ####
* igt@gem_exec_store@basic:
- fi-apl-guc: [TIMEOUT][11] ([i915#1635]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8948/fi-apl-guc/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/fi-apl-guc/igt@[email protected]
* igt@i915_pm_rpm@module-reload:
- {fi-kbl-7560u}: [WARN][13] ([i915#2249]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8948/fi-kbl-7560u/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/fi-kbl-7560u/igt@[email protected]
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
- fi-byt-j1900: [DMESG-WARN][15] ([i915#1982]) -> [PASS][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8948/fi-byt-j1900/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/fi-byt-j1900/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[i915#1635]: https://gitlab.freedesktop.org/drm/intel/issues/1635
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#2045]: https://gitlab.freedesktop.org/drm/intel/issues/2045
[i915#2249]: https://gitlab.freedesktop.org/drm/intel/issues/2249
[i915#2276]: https://gitlab.freedesktop.org/drm/intel/issues/2276
[i915#2398]: https://gitlab.freedesktop.org/drm/intel/issues/2398
Participating hosts (38 -> 33)
------------------------------
Missing (5): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-byt-clapper
Build changes
-------------
* Linux: CI_DRM_8948 -> Patchwork_18426
CI-20190529: 20190529
CI_DRM_8948: 4a551ee5aa0f402a647f797437b69af12ce78642 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5774: 2a5db9f60241383272aeec176e1b97b3f487209f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_18426: 8316e2705e8f88f7a0b59150fe3ce4bb99edc616 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
8316e2705e8f HAX/DO_NOT_MERGE_IT: drm/i915/display: Enable PSR2 selective fetch for testing 0cd1cad6e012 drm/i915/display: Program PSR2 selective fetch registers 394059cffb10 drm/i915/display: Fix state of PSR2 sub features2335d5eca219 drm/i915/display: Ignore IGNORE_PSR2_HW_TRACKING for platforms without sel fetch
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.IGT: failure for series starting with [1/4] drm/i915/display: Ignore IGNORE_PSR2_HW_TRACKING for platforms without sel fetch
In reply to José Roberto de Souza== Series Details ==
== Series Details ==
Series: series starting with [1/4] drm/i915/display: Ignore IGNORE_PSR2_HW_TRACKING for platforms without sel fetch
URL : https://patchwork.freedesktop.org/series/81201/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_8948_full -> Patchwork_18426_full
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_18426_full absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_18426_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_18426_full:
### IGT changes ###
#### Possible regressions ####
* igt@runner@aborted:
- shard-tglb: NOTRUN -> ([FAIL][1], [FAIL][2], [FAIL][3], [FAIL][4], [FAIL][5], [FAIL][6], [FAIL][7], [FAIL][8], [FAIL][9], [FAIL][10], [FAIL][11], [FAIL][12], [FAIL][13], [FAIL][14], [FAIL][15], [FAIL][16], [FAIL][17], [FAIL][18], [FAIL][19], [FAIL][20], [FAIL][21], [FAIL][22], [FAIL][23], [FAIL][24], [FAIL][25])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-tglb8/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-tglb7/igt@[email protected]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-tglb1/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-tglb5/igt@[email protected]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-tglb7/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-tglb3/igt@[email protected]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-tglb8/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-tglb1/igt@[email protected]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-tglb2/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-tglb2/igt@[email protected]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-tglb5/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-tglb2/igt@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-tglb1/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-tglb5/igt@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-tglb3/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-tglb1/igt@[email protected]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-tglb2/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-tglb7/igt@[email protected]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-tglb3/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-tglb3/igt@[email protected]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-tglb5/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-tglb5/igt@[email protected]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-tglb8/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-tglb7/igt@[email protected]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-tglb1/igt@[email protected]
Known issues
------------
Here are the changes found in Patchwork_18426_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_whisper@basic-contexts-all:
- shard-glk: [PASS][26] -> [TIMEOUT][27] ([i915#1958]) +2 similar issues
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8948/shard-glk5/igt@[email protected]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-glk2/igt@[email protected]
* igt@gem_partial_pwrite_pread@reads-display:
- shard-glk: [PASS][28] -> [FAIL][29] ([i915#2261]) +1 similar issue
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8948/shard-glk7/igt@[email protected]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-glk3/igt@[email protected]
* igt@gem_sync@basic-store-all:
- shard-glk: [PASS][30] -> [FAIL][31] ([i915#2356])
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8948/shard-glk8/igt@[email protected]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-glk4/igt@[email protected]
* igt@i915_selftest@mock@contexts:
- shard-apl: [PASS][32] -> [INCOMPLETE][33] ([i915#1635] / [i915#2278])
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8948/shard-apl1/igt@i915_selftest@[email protected]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-apl6/igt@i915_selftest@[email protected]
* igt@kms_big_fb@linear-64bpp-rotate-180:
- shard-glk: [PASS][34] -> [DMESG-FAIL][35] ([i915#118] / [i915#95])
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8948/shard-glk6/igt@[email protected]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-glk8/igt@[email protected]
* igt@kms_color@pipe-c-ctm-0-25:
- shard-skl: [PASS][36] -> [DMESG-WARN][37] ([i915#1982]) +5 similar issues
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8948/shard-skl7/igt@[email protected]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-skl2/igt@[email protected]
* igt@kms_flip@plain-flip-ts-check@a-dp1:
- shard-kbl: [PASS][38] -> [DMESG-WARN][39] ([i915#1982]) +1 similar issue
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8948/shard-kbl2/igt@kms_flip@[email protected]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-kbl1/igt@kms_flip@[email protected]
* igt@kms_frontbuffer_tracking@fbc-suspend:
- shard-kbl: [PASS][40] -> [DMESG-WARN][41] ([i915#180]) +3 similar issues
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8948/shard-kbl2/igt@[email protected]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-kbl7/igt@[email protected]
* igt@kms_hdr@bpc-switch-dpms:
- shard-skl: [PASS][42] -> [FAIL][43] ([i915#1188]) +1 similar issue
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8948/shard-skl6/igt@[email protected]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-skl7/igt@[email protected]
* igt@kms_plane@plane-panning-bottom-right-pipe-a-planes:
- shard-iclb: [PASS][44] -> [FAIL][45] ([i915#1036])
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8948/shard-iclb4/igt@[email protected]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-iclb7/igt@[email protected]
* igt@kms_plane_cursor@pipe-b-primary-size-64:
- shard-apl: [PASS][46] -> [DMESG-WARN][47] ([i915#1635] / [i915#1982])
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8948/shard-apl6/igt@[email protected]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-apl2/igt@[email protected]
* igt@kms_psr@psr2_sprite_mmap_gtt:
- shard-iclb: [PASS][48] -> [SKIP][49] ([fdo#109441]) +1 similar issue
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8948/shard-iclb2/igt@kms_psr@psr2_sprite_mmap_gtt.html
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-iclb5/igt@kms_psr@psr2_sprite_mmap_gtt.html
* igt@kms_setmode@basic:
- shard-kbl: [PASS][50] -> [FAIL][51] ([i915#31])
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8948/shard-kbl1/igt@[email protected]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-kbl7/igt@[email protected]
#### Possible fixes ####
* igt@gem_exec_gttfill@basic:
- shard-glk: [DMESG-WARN][52] ([i915#118] / [i915#95]) -> [PASS][53]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8948/shard-glk4/igt@[email protected]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-glk1/igt@[email protected]
* igt@gem_exec_reloc@basic-concurrent0:
- shard-skl: [TIMEOUT][54] ([i915#1958]) -> [PASS][55]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8948/shard-skl6/igt@[email protected]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-skl5/igt@[email protected]
* igt@gem_exec_whisper@basic-fds-forked-all:
- shard-kbl: [TIMEOUT][56] ([i915#1958]) -> [PASS][57]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8948/shard-kbl1/igt@[email protected]
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-kbl7/igt@[email protected]
* igt@gem_exec_whisper@basic-forked:
- shard-glk: [TIMEOUT][58] ([i915#1958]) -> [PASS][59]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8948/shard-glk5/igt@[email protected]
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-glk9/igt@[email protected]
* igt@gem_exec_whisper@basic-queues-forked:
- shard-skl: [DMESG-WARN][60] ([i915#1982]) -> [PASS][61] +8 similar issues
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8948/shard-skl4/igt@[email protected]
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-skl3/igt@[email protected]
* igt@i915_pm_dc@dc6-psr:
- shard-skl: [FAIL][62] ([i915#454]) -> [PASS][63]
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8948/shard-skl4/igt@[email protected]
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-skl9/igt@[email protected]
* igt@kms_draw_crc@draw-method-rgb565-blt-xtiled:
- shard-apl: [DMESG-WARN][64] ([i915#1635] / [i915#1982]) -> [PASS][65] +1 similar issue
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8948/shard-apl7/igt@[email protected]
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-apl2/igt@[email protected]
* igt@kms_plane@plane-panning-bottom-right-pipe-a-planes:
- shard-glk: [FAIL][66] ([i915#1036]) -> [PASS][67]
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8948/shard-glk3/igt@[email protected]
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-glk6/igt@[email protected]
* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes:
- shard-kbl: [DMESG-WARN][68] ([i915#180]) -> [PASS][69] +2 similar issues
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8948/shard-kbl1/igt@[email protected]
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-kbl7/igt@[email protected]
* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes:
- shard-skl: [INCOMPLETE][70] ([i915#198]) -> [PASS][71]
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8948/shard-skl6/igt@[email protected]
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-skl1/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-a-coverage-7efc:
- shard-skl: [FAIL][72] ([fdo#108145] / [i915#265]) -> [PASS][73]
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8948/shard-skl9/igt@[email protected]
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-skl9/igt@[email protected]
* igt@kms_plane_scaling@pipe-c-scaler-with-clipping-clamping:
- shard-iclb: [DMESG-WARN][74] ([i915#1982]) -> [PASS][75]
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8948/shard-iclb3/igt@[email protected]
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-iclb4/igt@[email protected]
* igt@kms_psr@psr2_cursor_plane_onoff:
- shard-iclb: [SKIP][76] ([fdo#109441]) -> [PASS][77] +1 similar issue
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8948/shard-iclb6/igt@kms_psr@psr2_cursor_plane_onoff.html
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-iclb2/igt@kms_psr@psr2_cursor_plane_onoff.html
#### Warnings ####
* igt@kms_flip@flip-vs-expired-vblank@a-edp1:
- shard-skl: [DMESG-WARN][78] ([i915#1982]) -> [DMESG-FAIL][79] ([i915#1982] / [i915#79])
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8948/shard-skl10/igt@kms_flip@[email protected]
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-skl10/igt@kms_flip@[email protected]
* igt@runner@aborted:
- shard-skl: [FAIL][80] ([i915#1436]) -> ([FAIL][81], [FAIL][82]) ([i915#1436] / [i915#1814] / [i915#2029])
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8948/shard-skl5/igt@[email protected]
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-skl5/igt@[email protected]
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/shard-skl4/igt@[email protected]
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[i915#1036]: https://gitlab.freedesktop.org/drm/intel/issues/1036
[i915#118]: https://gitlab.freedesktop.org/drm/intel/issues/118
[i915#1188]: https://gitlab.freedesktop.org/drm/intel/issues/1188
[i915#1436]: https://gitlab.freedesktop.org/drm/intel/issues/1436
[i915#1635]: https://gitlab.freedesktop.org/drm/intel/issues/1635
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#1814]: https://gitlab.freedesktop.org/drm/intel/issues/1814
[i915#1958]: https://gitlab.freedesktop.org/drm/intel/issues/1958
[i915#198]: https://gitlab.freedesktop.org/drm/intel/issues/198
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#2029]: https://gitlab.freedesktop.org/drm/intel/issues/2029
[i915#2261]: https://gitlab.freedesktop.org/drm/intel/issues/2261
[i915#2278]: https://gitlab.freedesktop.org/drm/intel/issues/2278
[i915#2356]: https://gitlab.freedesktop.org/drm/intel/issues/2356
[i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
[i915#31]: https://gitlab.freedesktop.org/drm/intel/issues/31
[i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
[i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95
Participating hosts (10 -> 10)
------------------------------
No changes in participating hosts
Build changes
-------------
* Linux: CI_DRM_8948 -> Patchwork_18426
CI-20190529: 20190529
CI_DRM_8948: 4a551ee5aa0f402a647f797437b69af12ce78642 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5774: 2a5db9f60241383272aeec176e1b97b3f487209f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_18426: 8316e2705e8f88f7a0b59150fe3ce4bb99edc616 @ 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_18426/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] ✗ Fi.CI.IGT: failure for series starting with [1/4] drm/i915/display: Ignore IGNORE_PSR2_HW_TRACKING for platforms without sel fetch
Quoted 16 lines · Patchwork
Patch Details
Series: series starting with [1/4] drm/i915/display: IgnoreIGNORE_PSR2_HW_TRACKINGfor platforms without sel fetch
URL: https://patchwork.freedesktop.org/series/81201/
State: failure
Details: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18426/index.html
CI Bug Log - changes fromCI_DRM_8948_full->Patchwork_18426_fullSummary
FAILURESerious unknown changes coming with
Patchwork_18426_fullabsolutely need to be verified manually.If you think the reported changes have nothing to do with the changes introduced in
Patchwork_18426_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
Quoted 7 lines
Possible new issues
Here are the unknown changes that may have been introduced inPatchwork_18426_full:IGT changes
Possible regressions
igt@runner@aborted:
shard-tglb: NOTRUN -> (FAIL, FAIL, FAIL, FAIL, FAIL, FAIL, FAIL, FAIL, FAIL, FAIL, FAIL, FAIL, FAIL, FAIL, FAIL, FAIL, FAIL, FAIL, FAIL, FAIL, FAIL, FAIL, FAIL, FAIL, FAIL)
Okay, so it is a valid a state that have CRTC enabled with all planes not visible.Will fix it for next version.
Quoted 94 lines
Known issues
Here are the changes found inPatchwork_18426_fullthat come from known issues:IGT changes
Issues hit
igt@gem_exec_whisper@basic-contexts-all:shard-glk: PASS -> TIMEOUT (i915#1958) +2 similar issues igt@gem_partial_pwrite_pread@reads-display:
shard-glk: PASS -> FAIL (i915#2261) +1 similar issue igt@gem_sync@basic-store-all:
shard-glk: PASS -> FAIL (i915#2356)
igt@i915_selftest@mock@contexts:shard-apl: PASS -> INCOMPLETE (i915#1635 / i915#2278) igt@kms_big_fb@linear-64bpp-rotate-180:
shard-glk: PASS -> DMESG-FAIL (i915#118 / i915#95) igt@kms_color@pipe-c-ctm-0-25:
shard-skl: PASS -> DMESG-WARN (i915#1982) +5 similar issues igt@kms_flip@plain-flip-ts-check@a-dp1:
shard-kbl: PASS -> DMESG-WARN (i915#1982) +1 similar issue igt@kms_frontbuffer_tracking@fbc-suspend:
shard-kbl: PASS -> DMESG-WARN (i915#180) +3 similar issues igt@kms_hdr@bpc-switch-dpms:
shard-skl: PASS -> FAIL (i915#1188) +1 similar issue igt@kms_plane@plane-panning-bottom-right-pipe-a-planes:
shard-iclb: PASS -> FAIL (i915#1036)
igt@kms_plane_cursor@pipe-b-primary-size-64:shard-apl: PASS -> DMESG-WARN (i915#1635 / i915#1982) igt@kms_psr@psr2_sprite_mmap_gtt:
shard-iclb: PASS -> SKIP (fdo#109441) +1 similar issue igt@kms_setmode@basic:
shard-kbl: PASS -> FAIL (i915#31)
Possible fixes
igt@gem_exec_gttfill@basic:shard-glk: DMESG-WARN (i915#118 / i915#95) -> PASS igt@gem_exec_reloc@basic-concurrent0:
shard-skl: TIMEOUT (i915#1958) -> PASS
igt@gem_exec_whisper@basic-fds-forked-all:shard-kbl: TIMEOUT (i915#1958) -> PASS
igt@gem_exec_whisper@basic-forked:shard-glk: TIMEOUT (i915#1958) -> PASS
igt@gem_exec_whisper@basic-queues-forked:shard-skl: DMESG-WARN (i915#1982) -> PASS +8 similar issues igt@i915_pm_dc@dc6-psr:
shard-skl: FAIL (i915#454) -> PASS
igt@kms_draw_crc@draw-method-rgb565-blt-xtiled:shard-apl: DMESG-WARN (i915#1635 / i915#1982) -> PASS +1 similar issue igt@kms_plane@plane-panning-bottom-right-pipe-a-planes:
shard-glk: FAIL (i915#1036) -> PASS igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes:
shard-kbl: DMESG-WARN (i915#180) -> PASS +2 similar issues igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes:
shard-skl: INCOMPLETE (i915#198) -> PASS
igt@kms_plane_alpha_blend@pipe-a-coverage-7efc:shard-skl: FAIL (fdo#108145 / i915#265) -> PASS igt@kms_plane_scaling@pipe-c-scaler-with-clipping-clamping:
shard-iclb: DMESG-WARN (i915#1982) -> PASS
igt@kms_psr@psr2_cursor_plane_onoff:shard-iclb: SKIP (fdo#109441) -> PASS +1 similar issue Warnings igt@kms_flip@flip-vs-expired-vblank@a-edp1:
shard-skl: DMESG-WARN (i915#1982) -> DMESG-FAIL (i915#1982 / i915#79) igt@runner@aborted:
shard-skl: FAIL (i915#1436) -> (FAIL, FAIL) (i915#1436 / i915#1814 / i915#2029) Participating hosts (10 -> 10)
No changes in participating hosts
Quoted 9 lines
Build changes
Linux:CI_DRM_8948->Patchwork_18426
CI-20190529: 20190529CI_DRM_8948:4a551ee5aa0f402a647f797437b69af12ce78642@git://anongit.freedesktop.org/gfx-ci/linuxIGT_5774:2a5db9f60241383272aeec176e1b97b3f487209f@git://anongit.freedesktop.org/xorg/app/intel-gpu-toolsPatchwork_18426:8316e2705e8f88f7a0b59150fe3ce4bb99edc616@git://anongit.freedesktop.org/gfx-ci/linuxpiglit_4509:fdc5a4ca11124ab8413c7988896eec4c97336694@git://anongit.freedesktop.org/piglit
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 6 lines · José Roberto de Souza
For platforms without selective fetch this register is reserved so do not write 0 to it.
Cc Gwan-gyeong Mun <[email protected]>Cc Ville Syrjälä <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>
Quoted 24 lines
--- drivers/gpu/drm/i915/display/intel_psr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/display/intel_psr.c +1
-1@@ -942,7 +942,7 @@ static void intel_psr_enable_source(struct intel_dp *intel_dp,intel_de_write (dev_priv,EXITLINE (cpu_transcoder), val); } -if (HAS_PSR_HW_TRACKING (dev_priv)) +if (HAS_PSR_HW_TRACKING (dev_priv) &&HAS_PSR2_SEL_FETCH (dev_priv))intel_de_rmw (dev_priv,CHICKEN_PAR1_1 ,IGNORE_PSR2_HW_TRACKING , dev_priv->psr.psr2_sel_fetch_enabled ?IGNORE_PSR2_HW_TRACKING :0 );Signature · 6 lines
2.28.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