Subject: Re: [PATCH v13 11/27] drm/i915/hdmi: Add YCBCR444 handling for sink formats

From: Ville Syrjälä <[email-masked]>
Date: Mon, 13 Apr 2026 22:04:07 +0300

On Mon, Apr 13, 2026 at 09:58:22PM +0300, Ville Syrjälä wrote:
> On Mon, Apr 13, 2026 at 12:07:25PM +0200, Nicolas Frattaroli wrote:
> > In anticipation of userspace being able to explicitly select supported
> > sink formats, add handling of the YCBCR444 sink format. The AUTO path
> > does not choose this format, but with explicit format selection added to
> > the driver, it becomes a possibility.
> > 
> > Check for YCBCR444 support on the sink in both sink_bpc_possible, and
> > sink_format_valid.
> > 
> > Signed-off-by: Nicolas Frattaroli <[email-masked]>
> > ---
> >  drivers/gpu/drm/i915/display/intel_hdmi.c | 9 +++++++++
> >  1 file changed, 9 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
> > index 874076a29da4..5ab5b5f85cde 100644
> > --- a/drivers/gpu/drm/i915/display/intel_hdmi.c
> > +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
> > @@ -1966,6 +1966,8 @@ static bool intel_hdmi_sink_bpc_possible(struct drm_connector *_connector,
> >  
> >  		if (sink_format == INTEL_OUTPUT_FORMAT_YCBCR420)
> >  			return hdmi->y420_dc_modes & DRM_EDID_YCBCR420_DC_36;
> > +		else if (sink_format == INTEL_OUTPUT_FORMAT_YCBCR444)
> > +			return info->edid_hdmi_ycbcr444_dc_modes & DRM_EDID_HDMI_DC_36;
> >  		else
> >  			return info->edid_hdmi_rgb444_dc_modes & DRM_EDID_HDMI_DC_36;
> >  	case 10:
> > @@ -1974,6 +1976,8 @@ static bool intel_hdmi_sink_bpc_possible(struct drm_connector *_connector,
> >  
> >  		if (sink_format == INTEL_OUTPUT_FORMAT_YCBCR420)
> >  			return hdmi->y420_dc_modes & DRM_EDID_YCBCR420_DC_30;
> > +		else if (sink_format == INTEL_OUTPUT_FORMAT_YCBCR444)
> > +			return info->edid_hdmi_ycbcr444_dc_modes & DRM_EDID_HDMI_DC_30;
> >  		else
> >  			return info->edid_hdmi_rgb444_dc_modes & DRM_EDID_HDMI_DC_30;
> >  	case 8:
> > @@ -2038,6 +2042,11 @@ intel_hdmi_sink_format_valid(struct intel_connector *connector,
> >  
> >  		return MODE_OK;
> >  	case INTEL_OUTPUT_FORMAT_RGB:
> > +		return MODE_OK;
> > +	case INTEL_OUTPUT_FORMAT_YCBCR444:
> 
> We'll also want the !has_hdmi_sink check here like for 4:2:0.
> 
> And I think we also want something to mirror the ycbcr_420_allowed
> flag. I guess you could just make it something like:
> 
> intel_hdmi_ycbcr_444_allowed(display)
> {
> 	return DISPLAY_VER(display) >= 5 && !HAS_GMCH(display);

Actually the display version check is redundant there.
!HAS_GMCH alone is sufficient.

> }
> 
> That can also be reused when setting up the allowed property values.
> 
> > +		if (!(info->color_formats & BIT(DRM_OUTPUT_COLOR_FORMAT_YCBCR444)))
> > +			return MODE_BAD;
> > +
> >  		return MODE_OK;
> >  	default:
> >  		MISSING_CASE(sink_format);
> > 
> > -- 
> > 2.53.0
> 
> -- 
> Ville Syrjälä
> Intel

-- 
Ville Syrjälä
Intel