public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm: ssd130x: Fix COM scan direction register mask
@ 2022-03-08 16:07 Chen-Yu Tsai
  2022-03-08 16:07 ` [PATCH 2/2] drm: ssd130x: Always apply segment remap setting Chen-Yu Tsai
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Chen-Yu Tsai @ 2022-03-08 16:07 UTC (permalink / raw)
  To: Javier Martinez Canillas, David Airlie, Daniel Vetter
  Cc: Chen-Yu Tsai, dri-devel, linux-kernel

From: Chen-Yu Tsai <wens@csie.org>

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@csie.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.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-03-09 13:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-08 16:07 [PATCH 1/2] drm: ssd130x: Fix COM scan direction register mask Chen-Yu Tsai
2022-03-08 16:07 ` [PATCH 2/2] drm: ssd130x: Always apply segment remap setting Chen-Yu Tsai
2022-03-08 20:38   ` Javier Martinez Canillas
2022-03-08 20:26 ` [PATCH 1/2] drm: ssd130x: Fix COM scan direction register mask Javier Martinez Canillas
2022-03-09 12:56 ` Geert Uytterhoeven
2022-03-09 13:59   ` Javier Martinez Canillas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox