kernel: bump 6.1 to 6.1.39
[openwrt/staging/hauke.git] / target / linux / bcm27xx / patches-6.1 / 950-0035-drm-panel-Add-prepare_upstream_first-flag-to-drm_pan.patch
1 From 5ea6b17027810ffbdb5bea7d0a2b1d312dd1021c Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Mon, 5 Dec 2022 17:33:27 +0000
4 Subject: [PATCH] drm/panel: Add prepare_prev_first flag to drm_panel
5
6 Mapping to the drm_bridge flag pre_enable_prev_first,
7 add a new flag prepare_prev_first to drm_panel to allow
8 the panel driver to request that the upstream bridge should
9 be pre_enabled before the panel prepare.
10
11 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
12 Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
13 Link: https://lore.kernel.org/r/20221205173328.1395350-6-dave.stevenson@raspberrypi.com
14 Signed-off-by: Maxime Ripard <maxime@cerno.tech>
15 ---
16 drivers/gpu/drm/bridge/panel.c | 2 ++
17 include/drm/drm_panel.h | 10 ++++++++++
18 2 files changed, 12 insertions(+)
19
20 --- a/drivers/gpu/drm/bridge/panel.c
21 +++ b/drivers/gpu/drm/bridge/panel.c
22 @@ -368,6 +368,8 @@ struct drm_bridge *devm_drm_panel_bridge
23 devres_free(ptr);
24 }
25
26 + bridge->pre_enable_prev_first = panel->prepare_prev_first;
27 +
28 return bridge;
29 }
30 EXPORT_SYMBOL(devm_drm_panel_bridge_add_typed);
31 --- a/include/drm/drm_panel.h
32 +++ b/include/drm/drm_panel.h
33 @@ -196,6 +196,16 @@ struct drm_panel {
34 * Panel entry in registry.
35 */
36 struct list_head list;
37 +
38 + /**
39 + * @prepare_prev_first:
40 + *
41 + * The previous controller should be prepared first, before the prepare
42 + * for the panel is called. This is largely required for DSI panels
43 + * where the DSI host controller should be initialised to LP-11 before
44 + * the panel is powered up.
45 + */
46 + bool prepare_prev_first;
47 };
48
49 void drm_panel_init(struct drm_panel *panel, struct device *dev,