drm/atmel-hlcdc: use helper to get crtc state
authorAndrzej Hajda <a.hajda@samsung.com>
Tue, 15 Mar 2016 12:46:28 +0000 (13:46 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 15 Mar 2016 13:09:48 +0000 (14:09 +0100)
DRM core provide helper to access crtc state.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1458045988-25246-1-git-send-email-a.hajda@samsung.com
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c

index 1ffe9c329c46df9a7753291861368b67a3764325..d65dcaee38323c19def9c958cb31e6a9617c9c82 100644 (file)
@@ -558,7 +558,7 @@ static int atmel_hlcdc_plane_atomic_check(struct drm_plane *p,
        if (!state->base.crtc || !fb)
                return 0;
 
-       crtc_state = s->state->crtc_states[drm_crtc_index(s->crtc)];
+       crtc_state = drm_atomic_get_existing_crtc_state(s->state, s->crtc);
        mode = &crtc_state->adjusted_mode;
 
        state->src_x = s->src_x;