drm/i915: fix color order for BGR formats on SNB
authorJesse Barnes <jbarnes@virtuousgeek.org>
Mon, 27 Feb 2012 20:40:10 +0000 (12:40 -0800)
committerKeith Packard <keithp@keithp.com>
Wed, 7 Mar 2012 18:49:28 +0000 (10:49 -0800)
Had the wrong bits and field definitions.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_sprite.c

index 03c53fcf86536ba110033931b8b979f3e4fd35f0..558ac716a3283140fe756e1990a4e275d2ee47c5 100644 (file)
 #define   DVS_FORMAT_RGBX888   (2<<25)
 #define   DVS_FORMAT_RGBX161616        (3<<25)
 #define   DVS_SOURCE_KEY       (1<<22)
-#define   DVS_RGB_ORDER_RGBX   (1<<20)
+#define   DVS_RGB_ORDER_XBGR   (1<<20)
 #define   DVS_YUV_BYTE_ORDER_MASK (3<<16)
 #define   DVS_YUV_ORDER_YUYV   (0<<16)
 #define   DVS_YUV_ORDER_UYVY   (1<<16)
index 2288abf88cce4e3420bbedc379747480aa8843e8..a0835040c86b8a803108e078662b73b5d87093b5 100644 (file)
@@ -225,16 +225,16 @@ snb_update_plane(struct drm_plane *plane, struct drm_framebuffer *fb,
 
        /* Mask out pixel format bits in case we change it */
        dvscntr &= ~DVS_PIXFORMAT_MASK;
-       dvscntr &= ~DVS_RGB_ORDER_RGBX;
+       dvscntr &= ~DVS_RGB_ORDER_XBGR;
        dvscntr &= ~DVS_YUV_BYTE_ORDER_MASK;
 
        switch (fb->pixel_format) {
        case DRM_FORMAT_XBGR8888:
-               dvscntr |= DVS_FORMAT_RGBX888;
+               dvscntr |= DVS_FORMAT_RGBX888 | DVS_RGB_ORDER_XBGR;
                pixel_size = 4;
                break;
        case DRM_FORMAT_XRGB8888:
-               dvscntr |= DVS_FORMAT_RGBX888 | DVS_RGB_ORDER_RGBX;
+               dvscntr |= DVS_FORMAT_RGBX888;
                pixel_size = 4;
                break;
        case DRM_FORMAT_YUYV: