bcm27xx: switch to kernel v6.1
[openwrt/openwrt.git] / target / linux / bcm27xx / patches-5.15 / 950-0013-drm-vc4-Make-vc4_crtc_get_encoder-public.patch
1 From e83ac8f131b0f691e2a35866fa67b484c7256a49 Mon Sep 17 00:00:00 2001
2 From: Maxime Ripard <maxime@cerno.tech>
3 Date: Wed, 26 May 2021 16:07:01 +0200
4 Subject: [PATCH] drm/vc4: Make vc4_crtc_get_encoder public
5
6 We'll need that function in vc4_kms to compute the core clock rate
7 requirements.
8
9 Signed-off-by: Maxime Ripard <maxime@cerno.tech>
10 ---
11 drivers/gpu/drm/vc4/vc4_crtc.c | 8 ++++----
12 drivers/gpu/drm/vc4/vc4_drv.h | 5 +++++
13 2 files changed, 9 insertions(+), 4 deletions(-)
14
15 --- a/drivers/gpu/drm/vc4/vc4_crtc.c
16 +++ b/drivers/gpu/drm/vc4/vc4_crtc.c
17 @@ -281,10 +281,10 @@ static u32 vc4_crtc_get_fifo_full_level_
18 * allows drivers to push pixels to more than one encoder from the
19 * same CRTC.
20 */
21 -static struct drm_encoder *vc4_get_crtc_encoder(struct drm_crtc *crtc,
22 - struct drm_atomic_state *state,
23 - struct drm_connector_state *(*get_state)(struct drm_atomic_state *state,
24 - struct drm_connector *connector))
25 +struct drm_encoder *vc4_get_crtc_encoder(struct drm_crtc *crtc,
26 + struct drm_atomic_state *state,
27 + struct drm_connector_state *(*get_state)(struct drm_atomic_state *state,
28 + struct drm_connector *connector))
29 {
30 struct drm_connector *connector;
31 struct drm_connector_list_iter conn_iter;
32 --- a/drivers/gpu/drm/vc4/vc4_drv.h
33 +++ b/drivers/gpu/drm/vc4/vc4_drv.h
34 @@ -544,6 +544,11 @@ vc4_crtc_to_vc4_pv_data(const struct vc4
35 return container_of(data, struct vc4_pv_data, base);
36 }
37
38 +struct drm_encoder *vc4_get_crtc_encoder(struct drm_crtc *crtc,
39 + struct drm_atomic_state *state,
40 + struct drm_connector_state *(*get_state)(struct drm_atomic_state *state,
41 + struct drm_connector *connector));
42 +
43 struct vc4_crtc_state {
44 struct drm_crtc_state base;
45 /* Dlist area for this CRTC configuration. */