From: Nicholas Kazlauskas Date: Thu, 28 Feb 2019 18:38:13 +0000 (-0500) Subject: drm/amd/display: Use drm helper for resetting plane state X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=7ddaef96cd30c340839926e8ad4f755a1864e338;p=openwrt%2Fstaging%2Fblogic.git 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: Nicholas Kazlauskas Reviewed-by: Sun peng Li Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 3769e0598130..322216d7ccfe 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -3657,13 +3657,8 @@ static void dm_drm_plane_reset(struct drm_plane *plane) amdgpu_state = kzalloc(sizeof(*amdgpu_state), GFP_KERNEL); WARN_ON(amdgpu_state == NULL); - if (amdgpu_state) { - plane->state = &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; - } + if (amdgpu_state) + __drm_atomic_helper_plane_reset(plane, &amdgpu_state->base); } static struct drm_plane_state *