[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220607165010.369618689@linuxfoundation.org>
Date: Tue, 7 Jun 2022 18:56:17 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Chen-Yu Tsai <wens@...e.org>,
Javier Martinez Canillas <javierm@...hat.com>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH 5.18 259/879] drm: ssd130x: Fix COM scan direction register mask
From: Chen-Yu Tsai <wens@...e.org>
[ Upstream commit efb37e66b7572ce4696aa0ac21675e17d6b9a17d ]
The SSD130x's command to toggle COM scan direction uses bit 3 and only
bit 3 to set the direction of the scanout. The driver has an incorrect
GENMASK(3, 2), causing the setting to be set on bit 2, rendering it
ineffective.
Fix the mask to only bit 3, so that the requested setting is applied
correctly.
Fixes: a61732e80867 ("drm: Add driver for Solomon SSD130x OLED displays")
Signed-off-by: Chen-Yu Tsai <wens@...e.org>
Acked-by: Javier Martinez Canillas <javierm@...hat.com>
Tested-by: Geert Uytterhoeven <geert@...ux-m68k.org>
Reviewed-by: Geert Uytterhoeven <geert@...ux-m68k.org>
Signed-off-by: Javier Martinez Canillas <javierm@...hat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220308160758.26060-1-wens@kernel.org
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
drivers/gpu/drm/solomon/ssd130x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/solomon/ssd130x.c b/drivers/gpu/drm/solomon/ssd130x.c
index ce4dc20412e0..ccd378135589 100644
--- a/drivers/gpu/drm/solomon/ssd130x.c
+++ b/drivers/gpu/drm/solomon/ssd130x.c
@@ -61,7 +61,7 @@
#define SSD130X_SET_COM_PINS_CONFIG 0xda
#define SSD130X_SET_VCOMH 0xdb
-#define SSD130X_SET_COM_SCAN_DIR_MASK GENMASK(3, 2)
+#define SSD130X_SET_COM_SCAN_DIR_MASK GENMASK(3, 3)
#define SSD130X_SET_COM_SCAN_DIR_SET(val) FIELD_PREP(SSD130X_SET_COM_SCAN_DIR_MASK, (val))
#define SSD130X_SET_CLOCK_DIV_MASK GENMASK(3, 0)
#define SSD130X_SET_CLOCK_DIV_SET(val) FIELD_PREP(SSD130X_SET_CLOCK_DIV_MASK, (val))
--
2.35.1
Powered by blists - more mailing lists