]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/ssd130x: fix ssd132x encoding
authorJohn Keeping <jkeeping@inmusicbrands.com>
Wed, 15 Jan 2025 11:01:37 +0000 (11:01 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Apr 2025 12:39:13 +0000 (14:39 +0200)
commit5a3461ca54db8d9f337c9c6af4a415de28b4b595
tree3fb522f665a28ff4cb152c9ef7b3c0a803767a4d
parenta9c4366566e6f8f4b434bd62ce940cfcb07d0a54
drm/ssd130x: fix ssd132x encoding

[ Upstream commit 1e14484677c8e87548f5f0d4eb8800e408004404 ]

The ssd132x buffer is encoded one pixel per nibble, with two pixels in
each byte.  When encoding an 8-bit greyscale input, take the top 4-bits
as the value and ensure the two pixels are distinct and do not overwrite
each other.

Fixes: fdd591e00a9c ("drm/ssd130x: Add support for the SSD132x OLED controller family")
Signed-off-by: John Keeping <jkeeping@inmusicbrands.com>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250115110139.1672488-2-jkeeping@inmusicbrands.com
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/solomon/ssd130x.c