From c4161c364b5d7256e7f9058b7753a900dba957dd Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Fri, 6 May 2022 21:19:07 +0200 Subject: [PATCH] Remove some 5.15 RPI patches --- ...rrypi-touchscreen-Avoid-NULL-deref-i.patch | 29 ----------- ...rrypi-touchscreen-Initialise-the-bri.patch | 50 ------------------- 2 files changed, 79 deletions(-) delete mode 100644 root/target/linux/bcm27xx/patches-5.15/950-0487-drm-panel-raspberrypi-touchscreen-Avoid-NULL-deref-i.patch delete mode 100644 root/target/linux/bcm27xx/patches-5.15/950-0488-drm-panel-raspberrypi-touchscreen-Initialise-the-bri.patch diff --git a/root/target/linux/bcm27xx/patches-5.15/950-0487-drm-panel-raspberrypi-touchscreen-Avoid-NULL-deref-i.patch b/root/target/linux/bcm27xx/patches-5.15/950-0487-drm-panel-raspberrypi-touchscreen-Avoid-NULL-deref-i.patch deleted file mode 100644 index d06d616f..00000000 --- a/root/target/linux/bcm27xx/patches-5.15/950-0487-drm-panel-raspberrypi-touchscreen-Avoid-NULL-deref-i.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 6906538a69b5bafe0b891e5e73f27818137158c7 Mon Sep 17 00:00:00 2001 -From: Dave Stevenson -Date: Fri, 3 Sep 2021 17:47:37 +0100 -Subject: [PATCH 487/828] drm/panel/raspberrypi-touchscreen: Avoid NULL deref - if not initialised - -If a call to rpi_touchscreen_i2c_write from rpi_touchscreen_probe -fails before mipi_dsi_device_register_full is called, then -in trying to log the error message if uses ts->dsi->dev when -it is still NULL. - -Use ts->i2c->dev instead, which is initialised earlier in probe. - -Signed-off-by: Dave Stevenson ---- - drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c -+++ b/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c -@@ -257,7 +257,7 @@ static void rpi_touchscreen_i2c_write(st - - ret = i2c_smbus_write_byte_data(ts->i2c, reg, val); - if (ret) -- dev_err(&ts->dsi->dev, "I2C write failed: %d\n", ret); -+ dev_err(&ts->i2c->dev, "I2C write failed: %d\n", ret); - } - - static int rpi_touchscreen_write(struct rpi_touchscreen *ts, u16 reg, u32 val) diff --git a/root/target/linux/bcm27xx/patches-5.15/950-0488-drm-panel-raspberrypi-touchscreen-Initialise-the-bri.patch b/root/target/linux/bcm27xx/patches-5.15/950-0488-drm-panel-raspberrypi-touchscreen-Initialise-the-bri.patch deleted file mode 100644 index 7923bdc5..00000000 --- a/root/target/linux/bcm27xx/patches-5.15/950-0488-drm-panel-raspberrypi-touchscreen-Initialise-the-bri.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 44fd02629872ede2f8906bc8d2326f2e8c3dd996 Mon Sep 17 00:00:00 2001 -From: Dave Stevenson -Date: Fri, 3 Sep 2021 17:52:59 +0100 -Subject: [PATCH 488/828] 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 ---- - drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c | 11 +++++++++-- - 1 file changed, 9 insertions(+), 2 deletions(-) - ---- 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 d - 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 - 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(str - 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, - };