Skip to content

Commit 1dc6076

Browse files
committed
drm/i915: clean up pipe's ddb usage in intel_crtc_disable_noatomic()
Update the ddb tracking information when we disable a pipe during sanitization. Avoids leaving stale junk in the states. Currently this doesn't do anything as we haven't read out this state yet when we do the sanitization, but that will change soon. Reviewed-by: Vinod Govindapillai <[email protected]> Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent d66fbd6 commit 1dc6076

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

drivers/gpu/drm/i915/display/skl_watermark.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3848,6 +3848,8 @@ static void skl_wm_get_hw_state_and_sanitize(struct drm_i915_private *i915)
38483848
void skl_wm_crtc_disable_noatomic(struct intel_crtc *crtc)
38493849
{
38503850
struct intel_display *display = to_intel_display(crtc);
3851+
struct intel_crtc_state *crtc_state =
3852+
to_intel_crtc_state(crtc->base.state);
38513853
struct intel_dbuf_state *dbuf_state =
38523854
to_intel_dbuf_state(display->dbuf.obj.state);
38533855
enum pipe pipe = crtc->pipe;
@@ -3856,6 +3858,13 @@ void skl_wm_crtc_disable_noatomic(struct intel_crtc *crtc)
38563858
return;
38573859

38583860
dbuf_state->active_pipes &= ~BIT(pipe);
3861+
3862+
dbuf_state->weight[pipe] = 0;
3863+
dbuf_state->slices[pipe] = 0;
3864+
3865+
memset(&dbuf_state->ddb[pipe], 0, sizeof(dbuf_state->ddb[pipe]));
3866+
3867+
memset(&crtc_state->wm.skl.ddb, 0, sizeof(crtc_state->wm.skl.ddb));
38593868
}
38603869

38613870
void intel_wm_state_verify(struct intel_atomic_state *state,

0 commit comments

Comments
 (0)