xf86-video-intel: src/sna/sna_video_sprite.c

Chris Wilson ickle at kemper.freedesktop.org
Tue Aug 27 11:00:37 PDT 2013


 src/sna/sna_video_sprite.c |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

New commits:
commit feae741b38445f323cc1ae08f290192c7033f0f0
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Tue Aug 27 18:57:54 2013 +0100

    sna/video: Update sprite destination colorkey command
    
    The final version that was upstreamed differed from the original version
    we implemented. The final version allows for both destination/source
    colorkeying, but left the ddx out of date.
    
    Reported-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_video_sprite.c b/src/sna/sna_video_sprite.c
index 22b5e08..54a70f7 100644
--- a/src/sna/sna_video_sprite.c
+++ b/src/sna/sna_video_sprite.c
@@ -213,21 +213,23 @@ sna_video_sprite_show(struct sna *sna,
 		frame->height = tmp;
 	}
 
-#if defined(DRM_I915_SET_SPRITE_DESTKEY)
+#if defined(DRM_I915_SET_SPRITE_COLORKEY)
 	if (video->color_key_changed || video->plane != s.plane_id) {
-		struct drm_intel_set_sprite_destkey set;
+		struct drm_intel_sprite_colorkey set;
 
 		DBG(("%s: updating color key: %x\n",
 		     __FUNCTION__, video->color_key));
 
 		set.plane_id = s.plane_id;
-		set.value = video->color_key;
+		set.min_value = video->color_key;
+		set.max_value = video->color_key; /* not used for destkey */
+		set.channel_mask = 0x7 << 24 | 0xff << 16 | 0xff << 8 | 0xff << 0;
 		set.flags = 0;
 		if (!video->AlwaysOnTop)
 			set.flags = I915_SET_COLORKEY_DESTINATION;
 
 		if (drmIoctl(sna->kgem.fd,
-			     DRM_IOCTL_I915_SET_SPRITE_DESTKEY,
+			     DRM_IOCTL_I915_SET_SPRITE_COLORKEY,
 			     &set))
 			xf86DrvMsg(sna->scrn->scrnIndex, X_ERROR,
 				   "failed to update color key\n");


More information about the xorg-commit mailing list