mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "CK Hu (胡俊光)" <ck.hu@mediatek.com>
To: "chunkuang.hu@kernel.org" <chunkuang.hu@kernel.org>,
	"simona@ffwll.ch" <simona@ffwll.ch>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	"airlied@gmail.com" <airlied@gmail.com>,
	"greenjustin@chromium.org" <greenjustin@chromium.org>,
	"p.zabel@pengutronix.de" <p.zabel@pengutronix.de>,
	"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
	Nicolas Prado <nfraprado@collabora.com>
Cc: "Ariel D'Alessandro" <ariel.dalessandro@collabora.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"Nancy Lin (林欣螢)" <Nancy.Lin@mediatek.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Jason-JH Lin (林睿祥)" <Jason-JH.Lin@mediatek.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"Daniel Stone" <daniels@collabora.com>,
	"linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>,
	"kernel@collabora.com" <kernel@collabora.com>
Subject: Re: [PATCH RFC 6/6] drm/mediatek: Re-enable AFBC support on MediaTek DRM driver
Date: Tue, 3 Feb 2026 02:50:50 +0000	[thread overview]
Message-ID: <16f5f6c7abb387a611f358cecd12cea3057d8a84.camel@mediatek.com> (raw)
In-Reply-To: <20251230-mtk-afbc-fixes-v1-6-6c0247b66e32@collabora.com>

On Tue, 2025-12-30 at 11:03 -0300, Nícolas F. R. A. Prado wrote:
> Commit 9882a4064003 ("drm/mediatek: Disable AFBC support on Mediatek DRM
> driver") disabled AFBC support on the MediaTek DRM driver since it was
> broken.
> 
> With the bugs in the AFBC support now fixed, re-enable the support.
> 

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

> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
> ---
>  drivers/gpu/drm/mediatek/mtk_plane.c | 24 +++++++++++++++++++++++-
>  1 file changed, 23 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/mediatek/mtk_plane.c b/drivers/gpu/drm/mediatek/mtk_plane.c
> index 8fb08768e8ce..38dd94cdd665 100644
> --- a/drivers/gpu/drm/mediatek/mtk_plane.c
> +++ b/drivers/gpu/drm/mediatek/mtk_plane.c
> @@ -22,6 +22,9 @@
>  
>  static const u64 modifiers[] = {
>  	DRM_FORMAT_MOD_LINEAR,
> +	DRM_FORMAT_MOD_ARM_AFBC(AFBC_FORMAT_MOD_BLOCK_SIZE_32x8 |
> +				AFBC_FORMAT_MOD_SPLIT |
> +				AFBC_FORMAT_MOD_SPARSE),
>  	DRM_FORMAT_MOD_INVALID,
>  };
>  
> @@ -69,7 +72,26 @@ static bool mtk_plane_format_mod_supported(struct drm_plane *plane,
>  					   uint32_t format,
>  					   uint64_t modifier)
>  {
> -	return modifier == DRM_FORMAT_MOD_LINEAR;
> +	if (modifier == DRM_FORMAT_MOD_LINEAR)
> +		return true;
> +
> +	if (modifier != DRM_FORMAT_MOD_ARM_AFBC(
> +				AFBC_FORMAT_MOD_BLOCK_SIZE_32x8 |
> +				AFBC_FORMAT_MOD_SPLIT |
> +				AFBC_FORMAT_MOD_SPARSE))
> +		return false;
> +
> +	if (format != DRM_FORMAT_XRGB8888 &&
> +	    format != DRM_FORMAT_ARGB8888 &&
> +	    format != DRM_FORMAT_BGRX8888 &&
> +	    format != DRM_FORMAT_BGRA8888 &&
> +	    format != DRM_FORMAT_ABGR8888 &&
> +	    format != DRM_FORMAT_XBGR8888 &&
> +	    format != DRM_FORMAT_RGB888 &&
> +	    format != DRM_FORMAT_BGR888)
> +		return false;
> +
> +	return true;
>  }
>  
>  static void mtk_plane_destroy_state(struct drm_plane *plane,
> 


  reply	other threads:[~2026-02-03  2:51 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-30 14:03 [PATCH RFC 0/6] AFBC fixes for MediaTek DRM Nícolas F. R. A. Prado
2025-12-30 14:03 ` [PATCH RFC 1/6] drm/mediatek: plane: Remove extra block from AFBC data payload offset Nícolas F. R. A. Prado
2026-02-02  6:26   ` CK Hu (胡俊光)
2025-12-30 14:03 ` [PATCH RFC 2/6] drm/mediatek: plane: Correct AFBC alignment definition to 128 Nícolas F. R. A. Prado
2026-02-02  6:28   ` CK Hu (胡俊光)
2025-12-30 14:03 ` [PATCH RFC 3/6] drm/mediatek: ovl: Fix misaligned layer source size on AFBC mode Nícolas F. R. A. Prado
2026-02-02  8:46   ` CK Hu (胡俊光)
2026-02-05 18:46     ` Nícolas F. R. A. Prado
2026-02-03  2:01   ` CK Hu (胡俊光)
2026-02-05 19:13     ` Nícolas F. R. A. Prado
2026-02-12  1:54       ` CK Hu (胡俊光)
2026-02-12  7:10         ` CK Hu (胡俊光)
2025-12-30 14:03 ` [PATCH RFC 4/6] drm/mediatek: ovl: Disallow AFBC buffers with width over 1920 Nícolas F. R. A. Prado
2026-02-03  2:21   ` CK Hu (胡俊光)
2025-12-30 14:03 ` [PATCH RFC 5/6] drm/mediatek: ovl: Disable AFBC on MT8188 Nícolas F. R. A. Prado
2026-02-03  2:41   ` CK Hu (胡俊光)
2025-12-30 14:03 ` [PATCH RFC 6/6] drm/mediatek: Re-enable AFBC support on MediaTek DRM driver Nícolas F. R. A. Prado
2026-02-03  2:50   ` CK Hu (胡俊光) [this message]
2026-01-09 18:27 ` [PATCH RFC 0/6] AFBC fixes for MediaTek DRM Nícolas F. R. A. Prado

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16f5f6c7abb387a611f358cecd12cea3057d8a84.camel@mediatek.com \
    --to=ck.hu@mediatek.com \
    --cc=Jason-JH.Lin@mediatek.com \
    --cc=Nancy.Lin@mediatek.com \
    --cc=airlied@gmail.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=ariel.dalessandro@collabora.com \
    --cc=chunkuang.hu@kernel.org \
    --cc=daniels@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=greenjustin@chromium.org \
    --cc=kernel@collabora.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=nfraprado@collabora.com \
    --cc=p.zabel@pengutronix.de \
    --cc=simona@ffwll.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®