OSDN Git Service

drm/vmwgfx: Use __drm_atomic_helper_plane_reset instead of copying the logic
authorAlexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
Sat, 4 Aug 2018 16:15:30 +0000 (17:15 +0100)
committerAlexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
Wed, 8 Aug 2018 18:08:17 +0000 (19:08 +0100)
A new helper function(__drm_atomic_helper_plane_reset) has been added
for linking a plane with its state and resetting the core
properties(alpha, rotation, etc.) to their default values.
Use that instead of duplicating the logic.

Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Reviewed-by: Deepak Rawat <drawat@vmware.com>
Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
Acked-by: Sinclair Yeh <syeh@vmware.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180804161530.12275-11-alexandru-cosmin.gheorghe@arm.com
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c

index 4a0f0f4..61824e3 100644 (file)
@@ -720,9 +720,7 @@ void vmw_du_plane_reset(struct drm_plane *plane)
                return;
        }
 
-       plane->state = &vps->base;
-       plane->state->plane = plane;
-       plane->state->rotation = DRM_MODE_ROTATE_0;
+       __drm_atomic_helper_plane_reset(plane, &vps->base);
 }