Skip to content

Commit

Permalink
drm/rockchip: vop: Fix window dest start point
Browse files Browse the repository at this point in the history
Dest start point use crtc_x/y is wrong, crtc_x/y is not equal
to dest.x1/y1 at plane scale.

Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
  • Loading branch information
Mark Yao committed Aug 26, 2015
1 parent f1c79ab commit acf8c3e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/gpu/drm/rockchip/rockchip_drm_vop.c
Original file line number Diff line number Diff line change
Expand Up @@ -657,11 +657,9 @@ static int vop_update_plane_event(struct drm_plane *plane,

actual_w = (src.x2 - src.x1) >> 16;
actual_h = (src.y2 - src.y1) >> 16;
crtc_x = max(0, crtc_x);
crtc_y = max(0, crtc_y);

dsp_stx = crtc_x + crtc->mode.htotal - crtc->mode.hsync_start;
dsp_sty = crtc_y + crtc->mode.vtotal - crtc->mode.vsync_start;
dsp_stx = dest.x1 + crtc->mode.htotal - crtc->mode.hsync_start;
dsp_sty = dest.y1 + crtc->mode.vtotal - crtc->mode.vsync_start;

offset = (src.x1 >> 16) * (fb->bits_per_pixel >> 3);
offset += (src.y1 >> 16) * fb->pitches[0];
Expand Down

0 comments on commit acf8c3e

Please sign in to comment.