Re: [PATCH v3 05/13] drm/i915/dsc: move slice height calculation to encoder

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

 



> -----Original Message-----
> From: Jani Nikula <jani.nikula@xxxxxxxxx>
> Sent: Tuesday, November 26, 2019 7:13 PM
> To: intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> Cc: Nikula, Jani <jani.nikula@xxxxxxxxx>; Navare, Manasi D
> <manasi.d.navare@xxxxxxxxx>; Kulkarni, Vandita
> <vandita.kulkarni@xxxxxxxxx>; Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> Subject: [PATCH v3 05/13] drm/i915/dsc: move slice height calculation to
> encoder
> 
> Turns out this isn't compatible with DSI, where we use the value from VBT.
> No functional changes.
> 
> Cc: Manasi Navare <manasi.d.navare@xxxxxxxxx>
> Cc: Vandita Kulkarni <vandita.kulkarni@xxxxxxxxx>
> Cc: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>

Looks good to me.
Reviewed-by: Vandita Kulkarni <vandita.kulkarni@xxxxxxxxx>

Thanks,
Vandita
> ---
>  drivers/gpu/drm/i915/display/intel_dp.c   | 12 ++++++++++++
>  drivers/gpu/drm/i915/display/intel_vdsc.c | 11 -----------
>  2 files changed, 12 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c
> b/drivers/gpu/drm/i915/display/intel_dp.c
> index 506c7d19968b..1199391331c2 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -2060,6 +2060,18 @@ static int intel_dp_dsc_compute_params(struct
> intel_encoder *encoder,
>  	if (ret)
>  		return ret;
> 
> +	/*
> +	 * Slice Height of 8 works for all currently available panels. So start
> +	 * with that if pic_height is an integral multiple of 8. Eventually add
> +	 * logic to try multiple slice heights.
> +	 */
> +	if (vdsc_cfg->pic_height % 8 == 0)
> +		vdsc_cfg->slice_height = 8;
> +	else if (vdsc_cfg->pic_height % 4 == 0)
> +		vdsc_cfg->slice_height = 4;
> +	else
> +		vdsc_cfg->slice_height = 2;
> +
>  	vdsc_cfg->dsc_version_major =
>  		(intel_dp->dsc_dpcd[DP_DSC_REV - DP_DSC_SUPPORT] &
>  		 DP_DSC_MAJOR_MASK) >> DP_DSC_MAJOR_SHIFT; diff --git
> a/drivers/gpu/drm/i915/display/intel_vdsc.c
> b/drivers/gpu/drm/i915/display/intel_vdsc.c
> index 834d665a47d2..c53024dfb1ec 100644
> --- a/drivers/gpu/drm/i915/display/intel_vdsc.c
> +++ b/drivers/gpu/drm/i915/display/intel_vdsc.c
> @@ -345,17 +345,6 @@ int intel_dsc_compute_params(struct intel_encoder
> *encoder,
>  	vdsc_cfg->pic_height = pipe_config-
> >hw.adjusted_mode.crtc_vdisplay;
>  	vdsc_cfg->slice_width = DIV_ROUND_UP(vdsc_cfg->pic_width,
>  					     pipe_config->dsc.slice_count);
> -	/*
> -	 * Slice Height of 8 works for all currently available panels. So start
> -	 * with that if pic_height is an integral multiple of 8.
> -	 * Eventually add logic to try multiple slice heights.
> -	 */
> -	if (vdsc_cfg->pic_height % 8 == 0)
> -		vdsc_cfg->slice_height = 8;
> -	else if (vdsc_cfg->pic_height % 4 == 0)
> -		vdsc_cfg->slice_height = 4;
> -	else
> -		vdsc_cfg->slice_height = 2;
> 
>  	/* Gen 11 does not support YCbCr */
>  	vdsc_cfg->simple_422 = false;
> --
> 2.20.1

_______________________________________________
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