Commit 7ddaef96 authored by Nicholas Kazlauskas's avatar Nicholas Kazlauskas Committed by Alex Deucher

drm/amd/display: Use drm helper for resetting plane state

[Why]
To help prevent plane state not being set to the correct default
value if any new properties are added in the future.

[How]
Use the drm helper - which seems to be the common solution among other
DRM drivers.
Signed-off-by: default avatarNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: default avatarSun peng Li <Sunpeng.Li@amd.com>
Acked-by: default avatarBhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 335d5d7b
...@@ -3657,13 +3657,8 @@ static void dm_drm_plane_reset(struct drm_plane *plane) ...@@ -3657,13 +3657,8 @@ static void dm_drm_plane_reset(struct drm_plane *plane)
amdgpu_state = kzalloc(sizeof(*amdgpu_state), GFP_KERNEL); amdgpu_state = kzalloc(sizeof(*amdgpu_state), GFP_KERNEL);
WARN_ON(amdgpu_state == NULL); WARN_ON(amdgpu_state == NULL);
if (amdgpu_state) { if (amdgpu_state)
plane->state = &amdgpu_state->base; __drm_atomic_helper_plane_reset(plane, &amdgpu_state->base);
plane->state->plane = plane;
plane->state->rotation = DRM_MODE_ROTATE_0;
plane->state->alpha = DRM_BLEND_ALPHA_OPAQUE;
plane->state->pixel_blend_mode = DRM_MODE_BLEND_PREMULTI;
}
} }
static struct drm_plane_state * static struct drm_plane_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