aeb63589fc495a14f206ae220f6f1bd2497c3149
[openwrt/staging/neocturne.git] /
1 From a6872b25f18fe46ef9979f9d4a3635a9c3966afd Mon Sep 17 00:00:00 2001
2 From: eng33 <eng33@waveshare.com>
3 Date: Mon, 11 Dec 2023 15:06:45 +0800
4 Subject: [PATCH] drivers/gpu/drm/panel:fix waveshare panel software
5 restart/shutdown display is abnormal Fixed the screen stays white when the
6 user restarts or shuts down
7
8 Signed-off-by: eng33 <eng33@waveshare.com>
9 ---
10 drivers/gpu/drm/panel/panel-waveshare-dsi.c | 10 ++++++++++
11 1 file changed, 10 insertions(+)
12
13 --- a/drivers/gpu/drm/panel/panel-waveshare-dsi.c
14 +++ b/drivers/gpu/drm/panel/panel-waveshare-dsi.c
15 @@ -362,9 +362,18 @@ static void ws_panel_remove(struct i2c_c
16 {
17 struct ws_panel *ts = i2c_get_clientdata(i2c);
18
19 + ws_panel_disable(&ts->base);
20 +
21 drm_panel_remove(&ts->base);
22 }
23
24 +static void ws_panel_shutdown(struct i2c_client *i2c)
25 +{
26 + struct ws_panel *ts = i2c_get_clientdata(i2c);
27 +
28 + ws_panel_disable(&ts->base);
29 +}
30 +
31 static const struct of_device_id ws_panel_of_ids[] = {
32 {
33 .compatible = "waveshare,2.8inch-panel",
34 @@ -403,6 +412,7 @@ static struct i2c_driver ws_panel_driver
35 },
36 .probe = ws_panel_probe,
37 .remove = ws_panel_remove,
38 + .shutdown = ws_panel_shutdown,
39 };
40 module_i2c_driver(ws_panel_driver);
41