drm: ssd130x: Always apply segment remap setting
authorChen-Yu Tsai <wens@csie.org>
Tue, 8 Mar 2022 16:07:58 +0000 (00:07 +0800)
committerJavier Martinez Canillas <javierm@redhat.com>
Wed, 9 Mar 2022 13:55:52 +0000 (14:55 +0100)
commita134109c301736ea2ac5054ba3c29c30c87f6ba7
tree4510ee0d91bae0f20bfa9bf064396c04accdcf61
parentefb37e66b7572ce4696aa0ac21675e17d6b9a17d
drm: ssd130x: Always apply segment remap setting

Currently the ssd130x driver only sets the segment remap setting when
the device tree requests it; it however does not clear the setting if
it is not requested. This leads to the setting incorrectly persisting
if the hardware is always on and has no reset GPIO wired. This might
happen when a developer is trying to find the correct settings for an
unknown module, and cause the developer to get confused because the
settings from the device tree are not consistently applied.

Make the driver apply the segment remap setting consistently, setting
the value correctly based on the device tree setting. This also makes
this setting's behavior consistent with the other settings, which are
always applied.

Fixes: a61732e80867 ("drm: Add driver for Solomon SSD130x OLED displays")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Javier Martinez Canillas <javierm@redhat.com>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220308160758.26060-2-wens@kernel.org
drivers/gpu/drm/solomon/ssd130x.c