Linux-mediatek Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: zoan37 <agentzoan@gmail.com>
To: "Nícolas F. R. A. Prado" <nfraprado@collabora.com>
Cc: Ariel D'Alessandro <ariel.dalessandro@collabora.com>,
	CK Hu <ck.hu@mediatek.com>, Chen-Yu Tsai <wenst@chromium.org>,
	Chun-Kuang Hu <chunkuang.hu@kernel.org>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	dri-devel@lists.freedesktop.org,
	linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH RFC 0/6] AFBC fixes for MediaTek DRM
Date: Mon, 12 Oct 2026 22:32:22 -0400	[thread overview]
Message-ID: <20261013023224.2195490-1-agentzoan@gmail.com> (raw)
In-Reply-To: <cc128facb246d89408cf46aa7c9e250c56900940.camel@collabora.com>

Hi Nícolas,

On Fri, Jan 9, 2026, Nícolas F. R. A. Prado wrote:
> I received a suggestion that the Lx_2ND_SUBBUF bit in OVL is not needed
> when cropping is not enabled, and that removing it should fix the extra
> pixels after the image described in 2.a., and perhaps even fix AFBC not
> working with MT8188, though I haven't had time to test it.

I tried this on an MT8189 Chromebook (Lenovo IdeaPad Slim 3 Chromebook,
board "quigon" of the skywalker family), and the suggestion holds there.

Setup: next-20261008 with the posted MT8189 display series and this
board's DT, plus patches 1-4 and 6 of this RFC (5 is MT8188-only; the
MT8189 OVL uses the MT8195 data). AFBC announced on OVL0 only, which
drives the internal 1920x1200 eDP panel. Mesa 26.2.4 Panfrost
(Mali-G57), Hyprland. The compositor picked AFBC 32x8|SPLIT|SPARSE for
both the 1920x1200 primary plane and the 512x512 cursor plane.

With the series as posted, I see what you list as 2.a: the top 4 rows
are missing, and stray pixels show up after the image (here right below
the cursor, on the cursor plane). On top of that, the IOMMU reports read
faults from the display side while AFBC layers are on:

  mtk-iommu 1e802000.iommu: fault type=0x5 iova=0xfad06000 pa=0x0 master=0x21810410(larb=1 port=4) layer=1 read

(always larb 1 port 4, two different iovas, presumably one per plane)

With OVL_PITCH_MSB_2ND_SUBBUF left out of DISP_REG_OVL_PITCH_MSB for
these layers, the picture is correct (nothing missing at the top, no
stray pixels) and there are no faults. I made the bit switchable at
runtime to check that it is the cause: with the bit off, 0 faults in
30 s; set again, 20 faults in the next 10 s and the artifacts are back;
off again, the faults stop once both planes have been updated.

What I run now sets it only when the layer is cropped, going by the
suggestion:

	bool cropped = pending->clip_left || pending->clip_right ||
		       pending->clip_top || pending->clip_bottom;

	mtk_ddp_write_relaxed(cmdq_pkt,
			      (cropped ? OVL_PITCH_MSB_2ND_SUBBUF : 0) | pitch_msb,
			      &ovl->cmdq_reg, ovl->regs, DISP_REG_OVL_PITCH_MSB(idx));

I haven't been able to exercise a cropped AFBC layer here (the
compositor only uses full-screen and cursor planes), so I can't say
whether the bit is right in that case. I also haven't tried the
resolutions from 2.b/2.c or the external pipeline (OVL1).

I can test a v2 on MT8189. The board's patches and notes are at
https://github.com/zoan37/lenovo-slim3-chromebook-omarchy

The testing was done with help from an AI assistant (Claude).

Thanks,
zoan37


      reply	other threads:[~2026-10-13  2:32 UTC|newest]

Thread overview: 20+ 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 (胡俊光)
2026-01-09 18:27 ` [PATCH RFC 0/6] AFBC fixes for MediaTek DRM Nícolas F. R. A. Prado
2026-10-13  2:32   ` zoan37 [this message]

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=20261013023224.2195490-1-agentzoan@gmail.com \
    --to=agentzoan@gmail.com \
    --cc=airlied@gmail.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=ariel.dalessandro@collabora.com \
    --cc=chunkuang.hu@kernel.org \
    --cc=ck.hu@mediatek.com \
    --cc=dri-devel@lists.freedesktop.org \
    --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 \
    --cc=wenst@chromium.org \
    /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