[Intel-gfx] [PATCH 10/20] drm/i915: add config function for YCBCR420 outputs

Ville Syrjälä ville.syrjala at linux.intel.com
Thu Jul 13 14:10:09 UTC 2017


On Thu, Jul 13, 2017 at 07:05:12PM +0530, Sharma, Shashank wrote:
> On 7/13/2017 6:56 PM, Ville Syrjälä wrote:
> 
> > We don't want breaks in the loop. It's meant to go through all the
> > connectors for the crtc. Granted on modern platforms there can only be
> > one, but IMO assuming that just makes the whole thing look confusing.
> > It's much clearer IMO if we do
> >
> > if (420) {
> > 	check 420 dc modes;
> > } else {
> > 	check 444 dc modes;
> > }
> I dint want to add another loop for the 420 stuff, hence was reusing the 
> existing loop.

What I mean is

 for_each() {
 	...
+	if (420) {
+		if (!420_dc)
+			return false;
+	} else {
		if (!444_dc)
			return false;
+	}
 }

> Now, my steps were:
> - If there is a CRTC match, I got the right CRTC.
> - On this CRTC, if YCBCR420 output is enabled, I should just check 
> DRM_EDID_YCBCR420_DC_36
>     for 420_12BPC, so if it supports DRM_EDID_YCBCR420_DC_36 say yes, 
> else no.
> - But I also want to go through the WAR condition below, added for GLK. 
> So I can't return from here.
> 
> Do you prefer me adding another loop just for YCBCR420 ?
> 
> - Shashank

-- 
Ville Syrjälä
Intel OTC


More information about the Intel-gfx mailing list