Commit a2a330ad authored by Shirish S's avatar Shirish S Committed by Alex Deucher

drm/amd/display: remove need of modeset flag for overlay planes (V2)

This patch is in continuation to the
"843e3c7d drm/amd/display: defer modeset check in dm_update_planes_state"
where we started to eliminate the dependency on
DRM_MODE_ATOMIC_ALLOW_MODESET to be set by the user space,
which as such is not mandatory.

After deferring, this patch eliminates the dependency on the flag
for overlay planes.

This has to be done in stages as its a pretty complex and requires thorough
testing before we free primary planes as well from dependency on modeset
flag.

V2: Simplified the plane type check.
Signed-off-by: default avatarShirish S <shirish.s@amd.com>
Reviewed-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent c430bc97
...@@ -4104,7 +4104,7 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state, ...@@ -4104,7 +4104,7 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
} }
spin_unlock_irqrestore(&crtc->dev->event_lock, flags); spin_unlock_irqrestore(&crtc->dev->event_lock, flags);
if (!pflip_needed) { if (!pflip_needed || plane->type == DRM_PLANE_TYPE_OVERLAY) {
WARN_ON(!dm_new_plane_state->dc_state); WARN_ON(!dm_new_plane_state->dc_state);
plane_states_constructed[planes_count] = dm_new_plane_state->dc_state; plane_states_constructed[planes_count] = dm_new_plane_state->dc_state;
...@@ -4827,7 +4827,8 @@ static int dm_update_planes_state(struct dc *dc, ...@@ -4827,7 +4827,8 @@ static int dm_update_planes_state(struct dc *dc,
/* Remove any changed/removed planes */ /* Remove any changed/removed planes */
if (!enable) { if (!enable) {
if (pflip_needed) if (pflip_needed &&
plane->type != DRM_PLANE_TYPE_OVERLAY)
continue; continue;
if (!old_plane_crtc) if (!old_plane_crtc)
...@@ -4874,7 +4875,8 @@ static int dm_update_planes_state(struct dc *dc, ...@@ -4874,7 +4875,8 @@ static int dm_update_planes_state(struct dc *dc,
if (!dm_new_crtc_state->stream) if (!dm_new_crtc_state->stream)
continue; continue;
if (pflip_needed) if (pflip_needed &&
plane->type != DRM_PLANE_TYPE_OVERLAY)
continue; continue;
WARN_ON(dm_new_plane_state->dc_state); WARN_ON(dm_new_plane_state->dc_state);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment