OpenCloudOS-Kernel/drivers/gpu/drm/solomon
Javier Martinez Canillas 343c700480
drm/ssd130x: Init display before the SSD130X_DISPLAY_ON command
Commit 622113b9f1 ("drm/ssd130x: Replace simple display helpers with the
atomic helpers") changed the driver to just use the atomic helpers instead
of the simple KMS abstraction layer.

But the commit also made a subtle change on the display power sequence and
initialization order, by moving the ssd130x_power_on() call to the encoder
.atomic_enable handler and the ssd130x_init() call to CRTC .reset handler.

Before this change, both ssd130x_power_on() and ssd130x_init() were called
in the simple display pipeline .enable handler, so the display was already
initialized by the time the SSD130X_DISPLAY_ON command was sent.

For some reasons, it only made the ssd130x SPI driver to fail but the I2C
was still working. That is the reason why the bug was not noticed before.

To revert to the old driver behavior, move the ssd130x_init() call to the
encoder .atomic_enable as well. Besides fixing the panel not being turned
on when using SPI, it also gets rid of the custom CRTC .reset callback.

Fixes: 622113b9f1 ("drm/ssd130x: Replace simple display helpers with the atomic helpers")
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230125184230.3343206-1-javierm@redhat.com
2023-01-26 19:55:23 +01:00
..
Kconfig drm/solomon: Add SSD130x OLED displays SPI support 2022-04-20 18:48:17 +02:00
Makefile drm/solomon: Add SSD130x OLED displays SPI support 2022-04-20 18:48:17 +02:00
ssd130x-i2c.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
ssd130x-spi.c drm/ssd130x: Use new regmap bulk write support to drop custom bus 2022-07-18 10:38:42 +02:00
ssd130x.c drm/ssd130x: Init display before the SSD130X_DISPLAY_ON command 2023-01-26 19:55:23 +01:00
ssd130x.h drm/ssd130x: Replace simple display helpers with the atomic helpers 2022-09-08 10:46:19 +02:00