[Intel-gfx] [PATCH 4/4] drm/i915/dp: Limit max_requested_bpc based on src DSC bpc limits

Ville Syrjälä ville.syrjala at linux.intel.com
Wed Oct 25 12:50:25 UTC 2023


On Wed, Oct 25, 2023 at 05:43:18PM +0530, Ankit Nautiyal wrote:
> At the moment the max requested bpc is limited to 6 to 10/12.
> For platforms that support DSC, min and max src bpc with DSC are
> different.
> 
> Account for DSC bpc limitations, when setting min and max value for
> max_requested_bpc property.

NAK. DSC capabiliies change dynamically, the property does not.

> 
> Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal at intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dp.c | 13 +++++++++++--
>  1 file changed, 11 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index abc718f1a878..1935b9014b12 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -5907,8 +5907,17 @@ intel_dp_add_properties(struct intel_dp *intel_dp, struct drm_connector *connect
>  	intel_attach_broadcast_rgb_property(connector);
>  	if (HAS_GMCH(dev_priv))
>  		drm_connector_attach_max_bpc_property(connector, 6, 10);
> -	else if (DISPLAY_VER(dev_priv) >= 5)
> -		drm_connector_attach_max_bpc_property(connector, 6, 12);
> +	else if (DISPLAY_VER(dev_priv) >= 5) {
> +		int min_bpc = 6, max_bpc = 12;
> +		struct intel_connector *intel_connector = to_intel_connector(connector);
> +
> +		if (HAS_DSC(dev_priv) && drm_dp_sink_supports_dsc(intel_connector->dp.dsc_dpcd)) {
> +			min_bpc = intel_dp_dsc_min_src_input_bpc(dev_priv);
> +			max_bpc = intel_dp_dsc_max_src_input_bpc(dev_priv);
> +		}
> +
> +		drm_connector_attach_max_bpc_property(connector, min_bpc, max_bpc);
> +	}
>  
>  	/* Register HDMI colorspace for case of lspcon */
>  	if (intel_bios_encoder_is_lspcon(dp_to_dig_port(intel_dp)->base.devdata)) {
> -- 
> 2.40.1

-- 
Ville Syrjälä
Intel


More information about the Intel-gfx mailing list