summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Foreman <derek.foreman@collabora.co.uk>2012-01-10 21:31:51 (GMT)
committerDerek Foreman <derek.foreman@collabora.co.uk>2012-01-10 21:31:51 (GMT)
commit1cf24be744ff07e0a9490c94e1d8484e1eaee482 (patch)
treea5398883b909713d59130bfbb53f142ce821f8cf
parent7ecee61933f6e28ac814da0fa9e2d70541609800 (diff)
downloadxf86-video-ti81xx-1cf24be744ff07e0a9490c94e1d8484e1eaee482.tar.gz
xf86-video-ti81xx-1cf24be744ff07e0a9490c94e1d8484e1eaee482.tar.xz
fix corruption when both heads are rotated
-rw-r--r--src/xv.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/xv.c b/src/xv.c
index b4da3cd..5befd23 100644
--- a/src/xv.c
+++ b/src/xv.c
@@ -809,6 +809,8 @@ ti81xx_video_image_put_gem(ScrnInfoPtr xf86_screen,
box_dst.x2 = x_dst + width_dst;
box_dst.y2 = y_dst + height_dst;
for (c = 0; c < xf86_config->num_crtc; c++) {
+ short c_xsrc = x_src, c_ysrc = y_src;
+ short c_hsrc = height_src, c_wsrc = width_src;
INT32 xa = 0, xb = width_src_image, ya = 0, yb = height_src_image;
BoxPtr box;
RegionRec clist;
@@ -855,8 +857,8 @@ ti81xx_video_image_put_gem(ScrnInfoPtr xf86_screen,
clip.x1 = 0;
clip.y1 = 0;
- clip.x2 = width_src;
- clip.y2 = height_src;
+ clip.x2 = c_wsrc;
+ clip.y2 = c_hsrc;
drmModeDirtyFB(screen_priv->fd, buf_dst->fb_id, &clip, 1);
setfb_id = buf_dst->fb_id;
} else {
@@ -885,9 +887,9 @@ ti81xx_video_image_put_gem(ScrnInfoPtr xf86_screen,
rotation_helper_src(crtc_priv->degrees, xa >> 16, ya >> 16,
xb >> 16, yb >> 16, 0, 0,
width_src_image, height_src_image,
- &x_src, &y_src, &width_src, &height_src);
+ &c_xsrc, &c_ysrc, &c_wsrc, &c_hsrc);
- ret = validate_video_params(xf86_screen, width_dst, width_src, FOURCC_NV12);
+ ret = validate_video_params(xf86_screen, width_dst, c_wsrc, FOURCC_NV12);
if (ret != Success) {
return ret;
}
@@ -895,7 +897,7 @@ ti81xx_video_image_put_gem(ScrnInfoPtr xf86_screen,
ret = drmModeSetPlane(screen_priv->fd, crtc_priv->plane_id,
crtc_priv->drm_crtc->crtc_id, setfb_id,
x, y, w, h,
- x_src, y_src, width_src, height_src);
+ c_xsrc, c_ysrc, c_wsrc, c_hsrc);
if (ret != 0)
return BadMatch;