Skip to content

Commit 47a0250

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 <[email protected]> Closes: https://lore.kernel.org/dri-devel/[email protected]/ Reviewed-by: Simona Vetter <[email protected]> Reviewed-by: Abhinav Kumar <[email protected]> Signed-off-by: Dmitry Baryshkov <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/633393/ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sasha Levin <[email protected]>
1 parent a99219b commit 47a0250

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

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

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

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

1194-
/* force a full mode set if active state changed */
1195-
if (crtc_state->active_changed)
1196-
crtc_state->mode_changed = true;
1197-
11981194
if (cstate->num_mixers) {
11991195
rc = _dpu_crtc_check_and_setup_lm_bounds(crtc, crtc_state);
12001196
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
@@ -718,12 +718,11 @@ static int dpu_encoder_virt_atomic_check(
718718
crtc_state->mode_changed = true;
719719
/*
720720
* Release and Allocate resources on every modeset
721-
* Dont allocate when active is false.
722721
*/
723722
if (drm_atomic_crtc_needs_modeset(crtc_state)) {
724723
dpu_rm_release(global_state, drm_enc);
725724

726-
if (!crtc_state->active_changed || crtc_state->enable)
725+
if (crtc_state->enable)
727726
ret = dpu_rm_reserve(&dpu_kms->rm, global_state,
728727
drm_enc, crtc_state, topology);
729728
if (!ret)

0 commit comments

Comments
 (0)