summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Widawsky <ben@bwidawsk.net>2012-09-12 17:48:21 -0700
committerBen Widawsky <ben@bwidawsk.net>2012-09-12 17:49:45 -0700
commitefd68f9d64caf7b359df2d7512f89d61c4b6e3ae (patch)
treee7cc5b8b32b1d012c918c4197a3093acbee45b59
parent93e5b4477ffe12f70013da027ecdc086520e027a (diff)
intel_sprite_on: plane needs 16.16 width and height
This only ever worked because we used to have a bug in our driver which was fixed months ago by: commit b4db1e35ac59c144965f517bc575a0d75b60b03f Author: Jesse Barnes <jbarnes@virtuousgeek.org> Date: Tue Mar 20 10:59:09 2012 -0700 drm/i915: treat src w & h as fixed point in sprite handling code Reported-by: Armin Reese <armin.c.reese@intel.com> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
-rw-r--r--demos/intel_sprite_on.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/demos/intel_sprite_on.c b/demos/intel_sprite_on.c
index b338fb7d..62bd98e3 100644
--- a/demos/intel_sprite_on.c
+++ b/demos/intel_sprite_on.c
@@ -819,11 +819,13 @@ static void ricochet(int tiled, int sprite_w, int sprite_h,
// Move the sprite on the screen and flip
// the surface if the index has changed
+ // NB: sprite_w and sprite_h must be 16.16 fixed point, herego << 16
if (drmModeSetPlane(gfx_fd, sprite_plane_id, curr_connector.crtc,
sprite_fb_id[sprite_index], plane_flags,
sprite_x, sprite_y,
out_w, out_h,
- 0, 0, sprite_w, sprite_h))
+ 0, 0,
+ sprite_w << 16, sprite_h << 16))
printf("Failed to enable sprite plane: %s\n", strerror(errno));
// Check if it's time to move the sprite surface