1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter.git synced 2025-02-15 04:42:02 +00:00
openmptcprouter/6.6/target/linux/bcm27xx/patches-6.6/0474-panel-sitronix-st7701-Fix-panel-prepare-over-SPI.patch
Ycarus (Yannick Chabanois) 12de1d2995 Add RPI kernel 6.6 support
2024-04-05 20:55:33 +02:00

40 lines
1.3 KiB
Diff

From 93ae2b9f6c792d17b691e23e4ba3cf07867e1df1 Mon Sep 17 00:00:00 2001
From: Jack Andersen <jackoalan@gmail.com>
Date: Fri, 26 May 2023 12:19:19 -0700
Subject: [PATCH 0474/1002] panel-sitronix-st7701: Fix panel prepare over SPI
A DSI write is issued in st7701_prepare even when the probed panel
runs on SPI. In practice, this results in a panic with the
vc4-kms-dpi-hyperpixel2r overlay active.
Perform the equivalent write over SPI in this case.
Signed-off-by: Jack Andersen <jackoalan@gmail.com>
---
drivers/gpu/drm/panel/panel-sitronix-st7701.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7701.c b/drivers/gpu/drm/panel/panel-sitronix-st7701.c
index 16e8b5ed2997..b226d8a885ba 100644
--- a/drivers/gpu/drm/panel/panel-sitronix-st7701.c
+++ b/drivers/gpu/drm/panel/panel-sitronix-st7701.c
@@ -605,7 +605,15 @@ static int st7701_prepare(struct drm_panel *panel)
st7701->desc->gip_sequence(st7701);
/* Disable Command2 */
- st7701_switch_cmd_bkx(st7701, false, 0);
+ switch (st7701->desc->interface) {
+ case ST7701_CTRL_DSI:
+ st7701_switch_cmd_bkx(st7701, false, 0);
+ break;
+ case ST7701_CTRL_SPI:
+ ST7701_SPI(st7701, DSI_CMD2BKX_SEL,
+ 0x177, 0x101, 0x100, 0x100, SPI_CMD2BKX_SEL_NONE);
+ break;
+ }
return 0;
}
--
2.44.0