diff options
Diffstat (limited to 'drivers/gpu/drm/vkms/vkms_plane.c')
-rw-r--r-- | drivers/gpu/drm/vkms/vkms_plane.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/gpu/drm/vkms/vkms_plane.c b/drivers/gpu/drm/vkms/vkms_plane.c index b79ca2c3fb06..94d5fbc33178 100644 --- a/drivers/gpu/drm/vkms/vkms_plane.c +++ b/drivers/gpu/drm/vkms/vkms_plane.c @@ -95,18 +95,19 @@ static const struct drm_plane_funcs vkms_plane_funcs = { static void vkms_plane_atomic_update(struct drm_plane *plane, struct drm_plane_state *old_state) { + struct drm_plane_state *new_state = plane->state; struct vkms_plane_state *vkms_plane_state; - struct drm_framebuffer *fb = plane->state->fb; + struct drm_framebuffer *fb = new_state->fb; struct vkms_composer *composer; - if (!plane->state->crtc || !fb) + if (!new_state->crtc || !fb) return; - vkms_plane_state = to_vkms_plane_state(plane->state); + vkms_plane_state = to_vkms_plane_state(new_state); composer = vkms_plane_state->composer; - memcpy(&composer->src, &plane->state->src, sizeof(struct drm_rect)); - memcpy(&composer->dst, &plane->state->dst, sizeof(struct drm_rect)); + memcpy(&composer->src, &new_state->src, sizeof(struct drm_rect)); + memcpy(&composer->dst, &new_state->dst, sizeof(struct drm_rect)); memcpy(&composer->fb, fb, sizeof(struct drm_framebuffer)); drm_framebuffer_get(&composer->fb); composer->offset = fb->offsets[0]; |