drm/nouveau/kms/nv50-: use __drm_atomic_helper_plane_reset()
authorBen Skeggs <bskeggs@redhat.com>
Tue, 11 Jun 2019 08:04:42 +0000 (18:04 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 23 Aug 2019 02:55:33 +0000 (12:55 +1000)
We have some of this open-coded already, use the helper to prevent problems
when adding (for example) support for the alpha property.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/dispnv50/wndw.c

index c8d0786297222e1eec86962dcfb34bec8f0f561f..f671fea8b26d00f558e98f0af22af1518113f520 100644 (file)
@@ -538,9 +538,8 @@ nv50_wndw_reset(struct drm_plane *plane)
 
        if (plane->state)
                plane->funcs->atomic_destroy_state(plane, plane->state);
-       plane->state = &asyw->state;
-       plane->state->plane = plane;
-       plane->state->rotation = DRM_MODE_ROTATE_0;
+
+       __drm_atomic_helper_plane_reset(plane, &asyw->state);
 }
 
 static void