All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vijay Purushothaman <vijay.a.purushothaman@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2] drm/i915: fix color order for BGR formats on IVB
Date: Thu, 23 Aug 2012 11:24:31 +0530	[thread overview]
Message-ID: <5035C597.2020703@intel.com> (raw)
In-Reply-To: <5034D7DB.8020903@linux.intel.com>

On 8/22/2012 6:30 PM, Antti Koskipää wrote:
> Hi,
>
> On 08/22/12 12:17, Vijay Purushothaman wrote:
>> This is already fixed for ILK and SNB in the below commit but somehow
>> IVB is missed.
>>
>> commit ab2f9df10dd955f1fc0a8650e377588c98f1c029
>> Author: Jesse Barnes <jbarnes@virtuousgeek.org>
>> Date:   Mon Feb 27 12:40:10 2012 -0800
>>
>>      drm/i915: fix color order for BGR formats on SNB
>>
>> Had the wrong bits and field definitions.
>>
>> Signed-off-by: Vijay Purushothaman <vijay.a.purushothaman@intel.com>
>> Signed-off-by: Ben Lin <ben.y.lin@intel.com>
>> ---
>>   drivers/gpu/drm/i915/intel_sprite.c |    6 +++---
>>   1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
>> index cc8df4d..6045a01 100644
>> --- a/drivers/gpu/drm/i915/intel_sprite.c
>> +++ b/drivers/gpu/drm/i915/intel_sprite.c
>> @@ -54,17 +54,17 @@ ivb_update_plane(struct drm_plane *plane, struct drm_framebuffer *fb,
>>
>>   	/* Mask out pixel format bits in case we change it */
>>   	sprctl &= ~SPRITE_PIXFORMAT_MASK;
>> -	sprctl &= ~SPRITE_RGB_ORDER_RGBX;
>> +	sprctl &= ~SPRITE_RGB_ORDER_XBGR;
> Are you sure about this? Where is the #define for _XBGR?
>

Thanks for the catch. I assumed SPRITE_RGB_ORDER_XBGR as defined similar 
to DVS_RGB_ORDER_XBGR for SNB. The original code snippet is correct.

>>   	sprctl &= ~SPRITE_YUV_BYTE_ORDER_MASK;
>>   	sprctl &= ~SPRITE_TILED;
>>
>>   	switch (fb->pixel_format) {
>>   	case DRM_FORMAT_XBGR8888:
>> -		sprctl |= SPRITE_FORMAT_RGBX888;
>> +		sprctl |= SPRITE_FORMAT_RGBX888 | SPRITE_RGB_ORDER_RGBX;
>>   		pixel_size = 4;
>>   		break;
>>   	case DRM_FORMAT_XRGB8888:
>> -		sprctl |= SPRITE_FORMAT_RGBX888 | SPRITE_RGB_ORDER_RGBX;
>> +		sprctl |= SPRITE_FORMAT_RGBX888;
>>   		pixel_size = 4;
>>   		break;
>>   	case DRM_FORMAT_YUYV:
>

      reply	other threads:[~2012-08-23  5:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-22  9:17 [PATCH v2] drm/i915: fix color order for BGR formats on IVB Vijay Purushothaman
2012-08-22 13:00 ` Antti Koskipää
2012-08-23  5:54   ` Vijay Purushothaman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5035C597.2020703@intel.com \
    --to=vijay.a.purushothaman@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.