From: Chen-Yu Tsai <wenst@chromium.org>
To: Liu Ying <victor.liu@nxp.com>,
Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>,
Lucas Stach <l.stach@pengutronix.de>,
Chen-Yu Tsai <wens@kernel.org>,
Jernej Skrabec <jernej@kernel.org>,
Samuel Holland <samuel@sholland.org>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>
Cc: Chen-Yu Tsai <wenst@chromium.org>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
linux-sunxi@lists.linux.dev, imx@lists.linux.dev,
dri-devel@lists.freedesktop.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 0/4] drm: Add and use drm_fb_dma_get_gem_clipped_addr() helper
Date: Tue, 8 Sep 2026 17:07:39 +0800 [thread overview]
Message-ID: <20260908090745.1089143-1-wenst@chromium.org> (raw)
Hi,
This series adds a helper to retrieve the buffer starting address of a
"clipped" framebuffer. This contrasts with drm_fb_dma_get_gem_addr(),
which gives the address of the full buffer.
Some drivers program their hardware with clipped dimensions, so they
should be using the clipped buffer address as well, unless the hardware
can advance the scanout directly. (Side note: many drivers still use
the non-clipped dimensions.)
The sun4i driver was recently incorrectly converted to use the unclipped
drm_fb_dma_get_gem_addr() helper. This broke offsets into subsampled
pixel groups, but also exposed the mismatch between the dimensions used
vs the buffer address.
Patch 1 adds the new helper to return the buffer address based on
clipped coordinates.
Patch 2 switches the sun4i driver to the new helper, and fixes the
luma plane buffer address offset for subsampled YUV formats.
Patch 3 converts the imx/dc driver to use the new helper. This fixes a
mismatch between the programmed coordinates and the buffer address.
Patch 4 replaces the open coded buffer address calculation in the
imx/dcss driver with the new helper.
Please have a look.
Thanks
ChenYu
Chen-Yu Tsai (4):
drm/fb-dma-helper: Add drm_fb_dma_get_gem_clipped_addr()
drm/sun4i: layers: Fix VI buffer address for clipped offsets
drm/imx/dc: plane: Switch to drm_fb_dma_get_gem_clipped_addr()
drm/imx/dcss: plane: Switch to drm_fb_dma_get_gem_clipped_addr()
drivers/gpu/drm/drm_fb_dma_helper.c | 63 +++++++++++++++++++-------
drivers/gpu/drm/imx/dc/dc-plane.c | 4 +-
drivers/gpu/drm/imx/dcss/dcss-plane.c | 34 ++++++--------
drivers/gpu/drm/sun4i/sun8i_ui_layer.c | 2 +-
drivers/gpu/drm/sun4i/sun8i_vi_layer.c | 16 ++++++-
include/drm/drm_fb_dma_helper.h | 4 ++
6 files changed, 83 insertions(+), 40 deletions(-)
--
2.55.0.979.g7e5102b832-goog
next reply other threads:[~2026-09-08 9:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-08 9:07 Chen-Yu Tsai [this message]
2026-09-08 9:07 ` [PATCH 1/4] drm/fb-dma-helper: Add drm_fb_dma_get_gem_clipped_addr() Chen-Yu Tsai
2026-09-08 9:41 ` Thomas Zimmermann
2026-09-08 9:07 ` [PATCH 2/4] drm/sun4i: layers: Fix VI buffer address for clipped offsets Chen-Yu Tsai
2026-09-08 9:07 ` [PATCH 3/4] drm/imx/dc: plane: Switch to drm_fb_dma_get_gem_clipped_addr() Chen-Yu Tsai
2026-09-08 9:07 ` [PATCH 4/4] drm/imx/dcss: " Chen-Yu Tsai
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=20260908090745.1089143-1-wenst@chromium.org \
--to=wenst@chromium.org \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=imx@lists.linux.dev \
--cc=jernej@kernel.org \
--cc=l.stach@pengutronix.de \
--cc=laurentiu.palcu@oss.nxp.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=samuel@sholland.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
--cc=victor.liu@nxp.com \
--cc=wens@kernel.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