Skip to content

Commit 45e0334

Browse files
lumaggregkh
authored andcommitted
drm/msm/dpu: don't use active in atomic_check()
[ Upstream commit 25b4614 ] The driver isn't supposed to consult crtc_state->active/active_check for resource allocation. Instead all resources should be allocated if crtc_state->enabled is set. Stop consulting active / active_changed in order to determine whether the hardware resources should be (re)allocated. Fixes: ccc862b ("drm/msm/dpu: Fix reservation failures in modeset") Reported-by: Simona Vetter <simona.vetter@ffwll.ch> Closes: https://lore.kernel.org/dri-devel/ZtW_S0j5AEr4g0QW@phenom.ffwll.local/ Reviewed-by: Simona Vetter <simona.vetter@ffwll.ch> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/633393/ Link: https://lore.kernel.org/r/20250123-drm-dirty-modeset-v2-1-bbfd3a6cd1a4@linaro.org Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 8b930dd commit 45e0334

2 files changed

Lines changed: 1 addition & 6 deletions

File tree

drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1210,10 +1210,6 @@ static int dpu_crtc_atomic_check(struct drm_crtc *crtc,
12101210

12111211
DRM_DEBUG_ATOMIC("%s: check\n", dpu_crtc->name);
12121212

1213-
/* force a full mode set if active state changed */
1214-
if (crtc_state->active_changed)
1215-
crtc_state->mode_changed = true;
1216-
12171213
if (cstate->num_mixers) {
12181214
rc = _dpu_crtc_check_and_setup_lm_bounds(crtc, crtc_state);
12191215
if (rc)

drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -669,12 +669,11 @@ static int dpu_encoder_virt_atomic_check(
669669

670670
/*
671671
* Release and Allocate resources on every modeset
672-
* Dont allocate when active is false.
673672
*/
674673
if (drm_atomic_crtc_needs_modeset(crtc_state)) {
675674
dpu_rm_release(global_state, drm_enc);
676675

677-
if (!crtc_state->active_changed || crtc_state->enable)
676+
if (crtc_state->enable)
678677
ret = dpu_rm_reserve(&dpu_kms->rm, global_state,
679678
drm_enc, crtc_state, topology);
680679
}

0 commit comments

Comments
 (0)