drm/rockchip: vop: use new crtc state on atomic check

That is wrong use old crtc mode on atomic check.

Change-Id: Ie37bd842f8bafca04303d641269a84a6016457f4
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
This commit is contained in:
Mark Yao
2016-07-01 14:25:13 +08:00
committed by Huang, Tao
parent 45079dcfc7
commit 90efdd4531

View File

@@ -616,6 +616,7 @@ static int vop_plane_atomic_check(struct drm_plane *plane,
struct drm_framebuffer *fb = state->fb;
struct vop_win *win = to_vop_win(plane);
struct vop_plane_state *vop_plane_state = to_vop_plane_state(state);
struct drm_crtc_state *crtc_state;
bool visible;
int ret;
struct drm_rect *dest = &vop_plane_state->dest;
@@ -632,6 +633,11 @@ static int vop_plane_atomic_check(struct drm_plane *plane,
*/
if (!crtc || !fb)
goto out_disable;
crtc_state = drm_atomic_get_crtc_state(state->state, crtc);
if (IS_ERR(crtc_state))
return PTR_ERR(crtc_state);
src->x1 = state->src_x;
src->y1 = state->src_y;
src->x2 = state->src_x + state->src_w;
@@ -643,8 +649,8 @@ static int vop_plane_atomic_check(struct drm_plane *plane,
clip.x1 = 0;
clip.y1 = 0;
clip.x2 = crtc->mode.hdisplay;
clip.y2 = crtc->mode.vdisplay;
clip.x2 = crtc_state->mode.hdisplay;
clip.y2 = crtc_state->mode.vdisplay;
ret = drm_plane_helper_check_update(plane, crtc, state->fb,
src, dest, &clip,