Re: [PATCH] drm: parse color format support for digital displays

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 15 Apr 2011 15:13:02 -0400
Adam Jackson <ajax@xxxxxxxxxx> wrote:

> 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:

Arg, of course I have to mask out the value first, I'll fix that (my
current test display conveniently sets RGB_YCRCB so I missed this in
testing).

> 
> 	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.

I don't think EDID supports that?  The docs I have here imply that
either RGB, RGB + YCrCb444 or RGB + YCrCb444 + YCrCb422 are the only
things we can report.

Or is there a CEA block extension that allows for more granularity?

-- 
Jesse Barnes, Intel Open Source Technology Center
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux