From: Tobias Johansson <tobias.johansson@axis.com>
To: "Alex Lanzano" <lanzano.alex@gmail.com>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Dmitry Baryshkov" <lumag@kernel.org>,
"Mehdi Djait" <mehdi.djait@bootlin.com>,
"Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
Cc: <dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>,
"Tobias Johansson" <tobias.johansson@axis.com>, <kernel@axis.com>
Subject: [PATCH RESEND 1/2] drm/tiny: sharp-memory: fix line address assignment on partial update
Date: Tue, 1 Sep 2026 13:53:23 +0200 [thread overview]
Message-ID: <20260901-flickering-v1-1-eaf7bbf9c000@axis.com> (raw)
In-Reply-To: <20260901-flickering-v1-0-eaf7bbf9c000@axis.com>
When only a subset of lines is dirty, the TX buffer sent to the
panel contains incorrect line addresses, resulting in visible
flickering on the display.
sharp_memory_set_tx_buffer_addresses() iterates from line 0 to the
last damaged line, assigning addresses sequentially from 1. When
only lines 10-20 are dirty, line 10's pixel data is written to the
slot with address 1 instead of address 11, corrupting the address-
to-data mapping.
Fix sharp_memory_set_tx_buffer_addresses() to iterate over only the
damaged line count and offset assigned addresses by the clip start,
so that addresses match the pixel data that follows.
Fixes: b8f9f21716fec ("drm/tiny: Add driver for Sharp Memory LCD")
Signed-off-by: Tobias Johansson <tobias.johansson@axis.com>
---
drivers/gpu/drm/tiny/sharp-memory.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/tiny/sharp-memory.c b/drivers/gpu/drm/tiny/sharp-memory.c
index cbf69460ebf3..595926ed660e 100644
--- a/drivers/gpu/drm/tiny/sharp-memory.c
+++ b/drivers/gpu/drm/tiny/sharp-memory.c
@@ -120,8 +120,8 @@ static inline void sharp_memory_set_tx_buffer_addresses(u8 *buffer,
struct drm_rect clip,
u32 pitch)
{
- for (u32 line = 0; line < clip.y2; ++line)
- buffer[line * pitch] = line + 1;
+ for (u32 line = 0; line < drm_rect_height(&clip); ++line)
+ buffer[line * pitch] = clip.y1 + line + 1;
}
static void sharp_memory_set_tx_buffer_data(u8 *buffer,
--
2.43.0
next prev parent reply other threads:[~2026-09-03 7:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-01 11:53 [PATCH RESEND 0/2] drm/tiny: sharp-memory: fix TX buffer corruption on partial update Tobias Johansson
2026-09-01 11:53 ` Tobias Johansson [this message]
2026-09-01 12:10 ` [PATCH RESEND 1/2] drm/tiny: sharp-memory: fix line address assignment " sashiko-bot
2026-09-01 11:53 ` [PATCH RESEND 2/2] drm/tiny: sharp-memory: avoid transmitting stale TX buffer data Tobias Johansson
2026-09-01 12:08 ` sashiko-bot
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=20260901-flickering-v1-1-eaf7bbf9c000@axis.com \
--to=tobias.johansson@axis.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel@axis.com \
--cc=lanzano.alex@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lumag@kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mehdi.djait@bootlin.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
--cc=u.kleine-koenig@baylibre.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.