[PATCH] drm/omapdrm: dispc: Refuse x-decimation above 4 for all but 8-bit formats

Tomi Valkeinen tomi.valkeinen at ti.com
Wed Feb 8 13:51:08 UTC 2017


On 07/02/17 16:41, Jyri Sarha wrote:
> Let's disable all scaling that requires horizontal decimation with
> higher factor than 4, until we have better estimates of what we can
> and can not do. However, 1 byte per pixel color format appear to work
> Ok with all decimation factors.
> 
> When decimating horizontally by more that 4 the dss is not able to
> fetch the data in burst mode. When this happens it is hard to tell if
> there enough bandwidth. Despite what theory says this appears to be
> true also for 16-bit color formats.
> 
> Signed-off-by: Jyri Sarha <jsarha at ti.com>
> ---
>  drivers/gpu/drm/omapdrm/dss/dispc.c | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/drivers/gpu/drm/omapdrm/dss/dispc.c b/drivers/gpu/drm/omapdrm/dss/dispc.c
> index 5554b72..61daef6 100644
> --- a/drivers/gpu/drm/omapdrm/dss/dispc.c
> +++ b/drivers/gpu/drm/omapdrm/dss/dispc.c
> @@ -2506,6 +2506,25 @@ static int dispc_ovl_calc_scaling_44xx(unsigned long pclk, unsigned long lclk,
>  		return -EINVAL;
>  	}
>  
> +	if (*decim_x > 4 && color_mode_to_bpp(color_mode) > 8) {
> +		/*
> +		  Let's disable all scaling that requires horizontal
> +		  decimation with higher factor than 4, until we have
> +		  better estimates of what we can and can not
> +		  do. However, 1 byte per pixel color format appear to
> +		  work Ok with all decimation factors.
> +
> +		  When decimating horizontally by more that 4 the dss
> +		  is not able to fetch the data in burst mode. When
> +		  this happens it is hard to tell if there enough
> +		  bandwidth. Despite what theory says this appears to
> +		  be true also for 16-bit color formats.
> +		*/
> +		DSSERR("Not enough bandwidth (x-decimation factor %d > 4)",
> +			*decim_x);

I think the error message could be improved. A normal user could hit
this when setting up a plane, and I'm quite sure the above doesn't give
any clue to the user what the issue is (too much downscaling).

 Tomi

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20170208/e6be3690/attachment.sig>


More information about the dri-devel mailing list