Re: [PATCH 2/6] drm/i915: Move has_hdmi_sink check into intel_hdmi_bpc_possible()

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

 



On Tue, 2021-05-11 at 19:05 +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> 
> We wish intel_hdmi_bpc_possible() to consider whether the sink
> supports HDMI or just DVI when checking whether it'll support
> HDMI deep color or not. This also takes care of the "force DVI"
> property.

Reviewed-by: José Roberto de Souza <jose.souza@xxxxxxxxx>

> 
> Cc: Werner Sembach <wse@xxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/display/intel_hdmi.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
> index 3dec3307c2b5..e696766f2b4b 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
> @@ -1870,11 +1870,17 @@ static bool intel_hdmi_bpc_possible(struct drm_connector *connector,
>  
>  	switch (bpc) {
>  	case 12:
> +		if (!has_hdmi_sink)
> +			return false;
> +
>  		if (ycbcr420_output)
>  			return hdmi->y420_dc_modes & DRM_EDID_YCBCR420_DC_36;
>  		else
>  			return info->edid_hdmi_dc_modes & DRM_EDID_HDMI_DC_36;
>  	case 10:
> +		if (!has_hdmi_sink)
> +			return false;
> +
>  		if (ycbcr420_output)
>  			return hdmi->y420_dc_modes & DRM_EDID_YCBCR420_DC_30;
>  		else
> @@ -1972,9 +1978,6 @@ bool intel_hdmi_deep_color_possible(const struct intel_crtc_state *crtc_state,
>  	if (crtc_state->pipe_bpp < bpc * 3)
>  		return false;
>  
> -	if (!has_hdmi_sink)
> -		return false;
> -
>  	for_each_new_connector_in_state(state, connector, connector_state, i) {
>  		if (connector_state->crtc != crtc_state->uapi.crtc)
>  			continue;

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux