summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/vkms/vkms_crtc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/vkms/vkms_crtc.c')
-rw-r--r--drivers/gpu/drm/vkms/vkms_crtc.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/gpu/drm/vkms/vkms_crtc.c b/drivers/gpu/drm/vkms/vkms_crtc.c
index e43e4e1b268a..6a49e70bdf18 100644
--- a/drivers/gpu/drm/vkms/vkms_crtc.c
+++ b/drivers/gpu/drm/vkms/vkms_crtc.c
@@ -168,9 +168,11 @@ static const struct drm_crtc_funcs vkms_crtc_funcs = {
};
static int vkms_crtc_atomic_check(struct drm_crtc *crtc,
- struct drm_crtc_state *state)
+ struct drm_atomic_state *state)
{
- struct vkms_crtc_state *vkms_state = to_vkms_crtc_state(state);
+ struct drm_crtc_state *crtc_state = drm_atomic_get_new_crtc_state(state,
+ crtc);
+ struct vkms_crtc_state *vkms_state = to_vkms_crtc_state(crtc_state);
struct drm_plane *plane;
struct drm_plane_state *plane_state;
int i = 0, ret;
@@ -178,12 +180,12 @@ static int vkms_crtc_atomic_check(struct drm_crtc *crtc,
if (vkms_state->active_planes)
return 0;
- ret = drm_atomic_add_affected_planes(state->state, crtc);
+ ret = drm_atomic_add_affected_planes(crtc_state->state, crtc);
if (ret < 0)
return ret;
- drm_for_each_plane_mask(plane, crtc->dev, state->plane_mask) {
- plane_state = drm_atomic_get_existing_plane_state(state->state,
+ drm_for_each_plane_mask(plane, crtc->dev, crtc_state->plane_mask) {
+ plane_state = drm_atomic_get_existing_plane_state(crtc_state->state,
plane);
WARN_ON(!plane_state);
@@ -199,8 +201,8 @@ static int vkms_crtc_atomic_check(struct drm_crtc *crtc,
vkms_state->num_active_planes = i;
i = 0;
- drm_for_each_plane_mask(plane, crtc->dev, state->plane_mask) {
- plane_state = drm_atomic_get_existing_plane_state(state->state,
+ drm_for_each_plane_mask(plane, crtc->dev, crtc_state->plane_mask) {
+ plane_state = drm_atomic_get_existing_plane_state(crtc_state->state,
plane);
if (!plane_state->visible)