diff options
author | Jesse Barnes <jbarnes@virtuousgeek.org> | 2012-02-27 15:40:10 -0500 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2012-03-07 13:49:28 -0500 |
commit | ab2f9df10dd955f1fc0a8650e377588c98f1c029 (patch) | |
tree | f57cfa46082264de55d172e4ce026b94d3399837 /drivers | |
parent | 91982b58d35720b75b894c60e1e3133daa455b53 (diff) |
drm/i915: fix color order for BGR formats on SNB
Had the wrong bits and field definitions.
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/i915/i915_reg.h | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_sprite.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 03c53fcf8653..558ac716a328 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h | |||
@@ -2689,7 +2689,7 @@ | |||
2689 | #define DVS_FORMAT_RGBX888 (2<<25) | 2689 | #define DVS_FORMAT_RGBX888 (2<<25) |
2690 | #define DVS_FORMAT_RGBX161616 (3<<25) | 2690 | #define DVS_FORMAT_RGBX161616 (3<<25) |
2691 | #define DVS_SOURCE_KEY (1<<22) | 2691 | #define DVS_SOURCE_KEY (1<<22) |
2692 | #define DVS_RGB_ORDER_RGBX (1<<20) | 2692 | #define DVS_RGB_ORDER_XBGR (1<<20) |
2693 | #define DVS_YUV_BYTE_ORDER_MASK (3<<16) | 2693 | #define DVS_YUV_BYTE_ORDER_MASK (3<<16) |
2694 | #define DVS_YUV_ORDER_YUYV (0<<16) | 2694 | #define DVS_YUV_ORDER_YUYV (0<<16) |
2695 | #define DVS_YUV_ORDER_UYVY (1<<16) | 2695 | #define DVS_YUV_ORDER_UYVY (1<<16) |
diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c index 2288abf88cce..a0835040c86b 100644 --- a/drivers/gpu/drm/i915/intel_sprite.c +++ b/drivers/gpu/drm/i915/intel_sprite.c | |||
@@ -225,16 +225,16 @@ snb_update_plane(struct drm_plane *plane, struct drm_framebuffer *fb, | |||
225 | 225 | ||
226 | /* Mask out pixel format bits in case we change it */ | 226 | /* Mask out pixel format bits in case we change it */ |
227 | dvscntr &= ~DVS_PIXFORMAT_MASK; | 227 | dvscntr &= ~DVS_PIXFORMAT_MASK; |
228 | dvscntr &= ~DVS_RGB_ORDER_RGBX; | 228 | dvscntr &= ~DVS_RGB_ORDER_XBGR; |
229 | dvscntr &= ~DVS_YUV_BYTE_ORDER_MASK; | 229 | dvscntr &= ~DVS_YUV_BYTE_ORDER_MASK; |
230 | 230 | ||
231 | switch (fb->pixel_format) { | 231 | switch (fb->pixel_format) { |
232 | case DRM_FORMAT_XBGR8888: | 232 | case DRM_FORMAT_XBGR8888: |
233 | dvscntr |= DVS_FORMAT_RGBX888; | 233 | dvscntr |= DVS_FORMAT_RGBX888 | DVS_RGB_ORDER_XBGR; |
234 | pixel_size = 4; | 234 | pixel_size = 4; |
235 | break; | 235 | break; |
236 | case DRM_FORMAT_XRGB8888: | 236 | case DRM_FORMAT_XRGB8888: |
237 | dvscntr |= DVS_FORMAT_RGBX888 | DVS_RGB_ORDER_RGBX; | 237 | dvscntr |= DVS_FORMAT_RGBX888; |
238 | pixel_size = 4; | 238 | pixel_size = 4; |
239 | break; | 239 | break; |
240 | case DRM_FORMAT_YUYV: | 240 | case DRM_FORMAT_YUYV: |