mirror of
https://github.com/Ysurac/openmptcprouter.git
synced 2025-02-15 04:42:02 +00:00
55 lines
1.9 KiB
Diff
55 lines
1.9 KiB
Diff
From cb2aae713bb2448a1e7ac9c39b5714a4b56ffa99 Mon Sep 17 00:00:00 2001
|
|
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
|
Date: Fri, 3 Sep 2021 17:52:59 +0100
|
|
Subject: [PATCH 509/634] drm/panel/raspberrypi-touchscreen: Initialise the
|
|
bridge in prepare
|
|
|
|
The panel has a prepare call which is before video starts, and an
|
|
enable call which is after.
|
|
The Toshiba bridge should be configured before video, so move
|
|
the relevant power and initialisation calls to prepare.
|
|
|
|
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
|
---
|
|
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c | 11 +++++++++--
|
|
1 file changed, 9 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c b/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
|
|
index f361cedac6ea..bd15c2f2e247 100644
|
|
--- a/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
|
|
+++ b/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
|
|
@@ -293,7 +293,7 @@ static int rpi_touchscreen_noop(struct drm_panel *panel)
|
|
return 0;
|
|
}
|
|
|
|
-static int rpi_touchscreen_enable(struct drm_panel *panel)
|
|
+static int rpi_touchscreen_prepare(struct drm_panel *panel)
|
|
{
|
|
struct rpi_touchscreen *ts = panel_to_ts(panel);
|
|
int i;
|
|
@@ -324,6 +324,13 @@ static int rpi_touchscreen_enable(struct drm_panel *panel)
|
|
rpi_touchscreen_write(ts, DSI_STARTDSI, 0x01);
|
|
msleep(100);
|
|
|
|
+ return 0;
|
|
+}
|
|
+
|
|
+static int rpi_touchscreen_enable(struct drm_panel *panel)
|
|
+{
|
|
+ struct rpi_touchscreen *ts = panel_to_ts(panel);
|
|
+
|
|
/* Turn on the backlight. */
|
|
rpi_touchscreen_i2c_write(ts, REG_PWM, 255);
|
|
|
|
@@ -378,7 +385,7 @@ static int rpi_touchscreen_get_modes(struct drm_panel *panel,
|
|
static const struct drm_panel_funcs rpi_touchscreen_funcs = {
|
|
.disable = rpi_touchscreen_disable,
|
|
.unprepare = rpi_touchscreen_noop,
|
|
- .prepare = rpi_touchscreen_noop,
|
|
+ .prepare = rpi_touchscreen_prepare,
|
|
.enable = rpi_touchscreen_enable,
|
|
.get_modes = rpi_touchscreen_get_modes,
|
|
};
|
|
--
|
|
2.33.1
|
|
|