0b48018c1ed2aff376909097b58fefa667442af3
[openwrt/staging/thess.git] /
1 From c0b2ca6abdde60a111fd6d3257be78c7f44e16ff Mon Sep 17 00:00:00 2001
2 From: Maxime Ripard <maxime@cerno.tech>
3 Date: Thu, 26 Dec 2019 15:44:31 +0100
4 Subject: [PATCH] drm/vc4: fkms: Change crtc_state structure name to
5 avoid conflict
6
7 Signed-off-by: Maxime Ripard <maxime@cerno.tech>
8 ---
9 drivers/gpu/drm/vc4/vc4_firmware_kms.c | 18 +++++++++---------
10 1 file changed, 9 insertions(+), 9 deletions(-)
11
12 --- a/drivers/gpu/drm/vc4/vc4_firmware_kms.c
13 +++ b/drivers/gpu/drm/vc4/vc4_firmware_kms.c
14 @@ -260,7 +260,7 @@ static inline struct vc4_crtc *to_vc4_cr
15 return container_of(crtc, struct vc4_crtc, base);
16 }
17
18 -struct vc4_crtc_state {
19 +struct fkms_crtc_state {
20 struct drm_crtc_state base;
21
22 struct {
23 @@ -271,10 +271,10 @@ struct vc4_crtc_state {
24 } margins;
25 };
26
27 -static inline struct vc4_crtc_state *
28 -to_vc4_crtc_state(struct drm_crtc_state *crtc_state)
29 +static inline struct fkms_crtc_state *
30 +to_fkms_crtc_state(struct drm_crtc_state *crtc_state)
31 {
32 - return (struct vc4_crtc_state *)crtc_state;
33 + return (struct fkms_crtc_state *)crtc_state;
34 }
35
36 struct vc4_fkms_encoder {
37 @@ -410,7 +410,7 @@ static void vc4_fkms_crtc_get_margins(st
38 unsigned int *left, unsigned int *right,
39 unsigned int *top, unsigned int *bottom)
40 {
41 - struct vc4_crtc_state *vc4_state = to_vc4_crtc_state(state);
42 + struct fkms_crtc_state *vc4_state = to_fkms_crtc_state(state);
43 struct drm_connector_state *conn_state;
44 struct drm_connector *conn;
45 int i;
46 @@ -423,7 +423,7 @@ static void vc4_fkms_crtc_get_margins(st
47 /* We have to interate over all new connector states because
48 * vc4_fkms_crtc_get_margins() might be called before
49 * vc4_fkms_crtc_atomic_check() which means margins info in
50 - * vc4_crtc_state might be outdated.
51 + * fkms_crtc_state might be outdated.
52 */
53 for_each_new_connector_in_state(state->state, conn, conn_state, i) {
54 if (conn_state->crtc != state->crtc)
55 @@ -1068,7 +1068,7 @@ vc4_crtc_mode_valid(struct drm_crtc *crt
56 static int vc4_crtc_atomic_check(struct drm_crtc *crtc,
57 struct drm_crtc_state *state)
58 {
59 - struct vc4_crtc_state *vc4_state = to_vc4_crtc_state(state);
60 + struct fkms_crtc_state *vc4_state = to_fkms_crtc_state(state);
61 struct drm_connector *conn;
62 struct drm_connector_state *conn_state;
63 int i;
64 @@ -1178,13 +1178,13 @@ static int vc4_page_flip(struct drm_crtc
65 static struct drm_crtc_state *
66 vc4_crtc_duplicate_state(struct drm_crtc *crtc)
67 {
68 - struct vc4_crtc_state *vc4_state, *old_vc4_state;
69 + struct fkms_crtc_state *vc4_state, *old_vc4_state;
70
71 vc4_state = kzalloc(sizeof(*vc4_state), GFP_KERNEL);
72 if (!vc4_state)
73 return NULL;
74
75 - old_vc4_state = to_vc4_crtc_state(crtc->state);
76 + old_vc4_state = to_fkms_crtc_state(crtc->state);
77 vc4_state->margins = old_vc4_state->margins;
78
79 __drm_atomic_helper_crtc_duplicate_state(crtc, &vc4_state->base);