lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <22c471af2206bbef5715a28b735a05dbd95bced0.camel@mediatek.com>
Date: Tue, 3 Feb 2026 02:21:10 +0000
From: CK Hu (胡俊光) <ck.hu@...iatek.com>
To: "chunkuang.hu@...nel.org" <chunkuang.hu@...nel.org>, "simona@...ll.ch"
	<simona@...ll.ch>, AngeloGioacchino Del Regno
	<angelogioacchino.delregno@...labora.com>, "airlied@...il.com"
	<airlied@...il.com>, "greenjustin@...omium.org" <greenjustin@...omium.org>,
	"p.zabel@...gutronix.de" <p.zabel@...gutronix.de>, "matthias.bgg@...il.com"
	<matthias.bgg@...il.com>, Nicolas Prado <nfraprado@...labora.com>
CC: Ariel D'Alessandro <ariel.dalessandro@...labora.com>,
	"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
	Nancy Lin (林欣螢) <Nancy.Lin@...iatek.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Jason-JH Lin (林睿祥) <Jason-JH.Lin@...iatek.com>,
	"linux-arm-kernel@...ts.infradead.org"
	<linux-arm-kernel@...ts.infradead.org>, Daniel Stone <daniels@...labora.com>,
	"linux-mediatek@...ts.infradead.org" <linux-mediatek@...ts.infradead.org>,
	"kernel@...labora.com" <kernel@...labora.com>
Subject: Re: [PATCH RFC 4/6] drm/mediatek: ovl: Disallow AFBC buffers with
 width over 1920

On Tue, 2025-12-30 at 11:03 -0300, Nícolas F. R. A. Prado wrote:
> AFBC buffers with width over 1920 are not supported by OVL. If
> attempted, the image displayed contains many artifacts.
> 
> Add this restriction to the layer check callback so such configurations
> are not allowed.
> 
> NOTE: This doesn't seem to be a good way to handle this restriction, as
> when tested with Weston, it simply fails to render, rather than fallback
> to not using the modifier:
> 
> [19:09:03.857] atomic: couldn't commit new state: Invalid argument
> [19:09:03.857] repaint-flush failed: Invalid argument

Reviewed-by: CK Hu <ck.hu@...iatek.com>

> 
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@...labora.com>
> ---
>  drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
> index c6a00c2256dd..196b874057ba 100644
> --- a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
> +++ b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
> @@ -368,6 +368,13 @@ int mtk_ovl_layer_check(struct device *dev, unsigned int idx,
>  	if (state->fb->format->is_yuv && (state->rotation & ~DRM_MODE_ROTATE_0))
>  		return -EINVAL;
>  
> +	/*
> +	 * AFBC buffers with width > 1920 are not supported and produce
> +	 * artifacts, so should be disabled.
> +	 */
> +	if (state->fb->modifier != DRM_FORMAT_MOD_LINEAR && state->fb->width > 1920)
> +		return -EINVAL;
> +
>  	return 0;
>  }
>  
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ