The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Fabio Piparo <holofermes@gmail.com>
To: Javier Martinez Canillas <javierm@redhat.com>
Cc: 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>,
	Amit Barzilai <amit.barzilai22@gmail.com>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	Fabio Piparo <holofermes@gmail.com>,
	stable@vger.kernel.org
Subject: [PATCH] drm/ssd130x: Set the address window in ssd132x_clear_screen()
Date: Mon, 17 Aug 2026 11:24:59 -0400	[thread overview]
Message-ID: <20260817152500.703770-1-holofermes@gmail.com> (raw)

ssd132x_clear_screen() sends its zeroes without setting the column and
row ranges first, so they land in whatever window the last
ssd132x_update_rect() left programmed. A partial final update then
leaves the rest of the screen uncleared, with fbcon the last damage is
typically the cursor cell, so blanking keeps the console content on
the panel.

Set the full-screen window first, as ssd130x_clear_screen() already
does.

Fixes: fdd591e00a9c ("drm/ssd130x: Add support for the SSD132x OLED controller family")
Assisted-by: LLM
Cc: stable@vger.kernel.org
Signed-off-by: Fabio Piparo <holofermes@gmail.com>
---
Exercised on an SPI SSD1322 under local enablement patches for that
chip; compile-tested only on the SSD1325/1327. ssd133x_clear_screen()
has the same problem, left alone here for lack of hardware.

 drivers/gpu/drm/solomon/ssd130x.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/gpu/drm/solomon/ssd130x.c b/drivers/gpu/drm/solomon/ssd130x.c
index 0b0fc6fe3df..256d370e240 100644
--- a/drivers/gpu/drm/solomon/ssd130x.c
+++ b/drivers/gpu/drm/solomon/ssd130x.c
@@ -900,9 +900,20 @@ static void ssd132x_clear_screen(struct ssd130x_device *ssd130x, u8 *data_array)
 {
 	unsigned int columns = DIV_ROUND_UP(ssd130x->width, SSD132X_SEGMENT_WIDTH);
 	unsigned int height = ssd130x->height;
+	int ret;
 
 	memset(data_array, 0, columns * height);
 
+	/* Set column start and end */
+	ret = ssd130x_write_cmd(ssd130x, 3, SSD132X_SET_COL_RANGE, 0, columns - 1);
+	if (ret < 0)
+		return;
+
+	/* Set row start and end */
+	ret = ssd130x_write_cmd(ssd130x, 3, SSD132X_SET_ROW_RANGE, 0, height - 1);
+	if (ret < 0)
+		return;
+
 	/* Write out update in one go since horizontal addressing mode is used */
 	ssd130x_write_data(ssd130x, data_array, columns * height);
 }
-- 
2.43.0


             reply	other threads:[~2026-08-17 15:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-17 15:24 Fabio Piparo [this message]
     [not found] ` <20260817154126.D13271F000E9@smtp.kernel.org>
2026-08-17 22:24   ` [PATCH] drm/ssd130x: Set the address window in ssd132x_clear_screen() Fabio Piparo

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=20260817152500.703770-1-holofermes@gmail.com \
    --to=holofermes@gmail.com \
    --cc=airlied@gmail.com \
    --cc=amit.barzilai22@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=javierm@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=stable@vger.kernel.org \
    --cc=tzimmermann@suse.de \
    /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