All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adam Jackson <ajax@redhat.com>
To: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm: parse color format support for digital displays
Date: Fri, 15 Apr 2011 15:13:02 -0400	[thread overview]
Message-ID: <4DA898BE.90506@redhat.com> (raw)
In-Reply-To: <1302892813-4529-1-git-send-email-jbarnes@virtuousgeek.org>

On 4/15/11 2:40 PM, Jesse Barnes wrote:

> @@ -1461,6 +1462,15 @@ static void drm_add_display_info(struct edid *edid,
>   		info->bpp = 0;
>   		break;
>   	}
> +
> +	if (edid->features & DRM_EDID_FEATURE_RGB)
> +		info->color_formats = DRM_COLOR_FORMAT_RGB444;
> +	else if (edid->features & DRM_EDID_FEATURE_RGB_YCRCB444)
> +		info->color_formats = DRM_COLOR_FORMAT_RGB444 |
> +			DRM_COLOR_FORMAT_YCRCB444;
> +	else if (edid->features & DRM_EDID_FEATURE_RGB_YCRCB)
> +		info->color_formats = DRM_COLOR_FORMAT_RGB444 |
> +			DRM_COLOR_FORMAT_YCRCB444 | DRM_COLOR_FORMAT_YCRCB422;

Overcomplicated (RGB is numerically 0, YCRCB is just two other values 
or'd together) and wrong (doesn't handle YCbCr 4:2:2 alone).  You want:

	info->color_formats = DRM_COLOR_FORMAT_RGB444;
	if (edid->features & DRM_EDID_FEATURE_YCRCB444)
		info->color_formats |= DRM_COLOR_FORMAT_YCBCR444;
	if (edid->features & DRM_EDID_FEATURE_YCRCB422)
		info->color_formats |= DRM_COLOR_FORMAT_YCBCR422;

... which is corrected to not include RGB uselessly in the 
DRM_EDID_FEATURE_* tokens.  I should have noticed that in your first 
patch, whoops.

- ajax

  reply	other threads:[~2011-04-15 19:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-15 18:40 [PATCH] drm: parse color format support for digital displays Jesse Barnes
2011-04-15 19:13 ` Adam Jackson [this message]
2011-04-15 19:19   ` Jesse Barnes
2011-04-15 19:27     ` Jesse Barnes
2011-04-15 19:36     ` Adam Jackson
2011-04-15 19:44       ` Jesse Barnes
  -- strict thread matches above, loose matches on Subject: below --
2011-04-15 20:48 Jesse Barnes

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=4DA898BE.90506@redhat.com \
    --to=ajax@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jbarnes@virtuousgeek.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.