Openwrt/target/linux/bcm27xx/patches-5.4/950-0460-drm-vc4-fkms-Change-crtc_state-structure-name-to-avo.patch
Álvaro Fernández Rojas f07e572f64 bcm27xx: import latest patches from the RPi foundation
bcm2708: boot tested on RPi B+ v1.2
bcm2709: boot tested on RPi 3B v1.2 and RPi 4B v1.1 4G
bcm2710: boot tested on RPi 3B v1.2
bcm2711: boot tested on RPi 4B v1.1 4G

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2021-02-18 23:42:32 +01:00

80 lines
2.8 KiB
Diff

From c0b2ca6abdde60a111fd6d3257be78c7f44e16ff Mon Sep 17 00:00:00 2001
From: Maxime Ripard <maxime@cerno.tech>
Date: Thu, 26 Dec 2019 15:44:31 +0100
Subject: [PATCH] drm/vc4: fkms: Change crtc_state structure name to
avoid conflict
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
drivers/gpu/drm/vc4/vc4_firmware_kms.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
--- a/drivers/gpu/drm/vc4/vc4_firmware_kms.c
+++ b/drivers/gpu/drm/vc4/vc4_firmware_kms.c
@@ -260,7 +260,7 @@ static inline struct vc4_crtc *to_vc4_cr
return container_of(crtc, struct vc4_crtc, base);
}
-struct vc4_crtc_state {
+struct fkms_crtc_state {
struct drm_crtc_state base;
struct {
@@ -271,10 +271,10 @@ struct vc4_crtc_state {
} margins;
};
-static inline struct vc4_crtc_state *
-to_vc4_crtc_state(struct drm_crtc_state *crtc_state)
+static inline struct fkms_crtc_state *
+to_fkms_crtc_state(struct drm_crtc_state *crtc_state)
{
- return (struct vc4_crtc_state *)crtc_state;
+ return (struct fkms_crtc_state *)crtc_state;
}
struct vc4_fkms_encoder {
@@ -410,7 +410,7 @@ static void vc4_fkms_crtc_get_margins(st
unsigned int *left, unsigned int *right,
unsigned int *top, unsigned int *bottom)
{
- struct vc4_crtc_state *vc4_state = to_vc4_crtc_state(state);
+ struct fkms_crtc_state *vc4_state = to_fkms_crtc_state(state);
struct drm_connector_state *conn_state;
struct drm_connector *conn;
int i;
@@ -423,7 +423,7 @@ static void vc4_fkms_crtc_get_margins(st
/* We have to interate over all new connector states because
* vc4_fkms_crtc_get_margins() might be called before
* vc4_fkms_crtc_atomic_check() which means margins info in
- * vc4_crtc_state might be outdated.
+ * fkms_crtc_state might be outdated.
*/
for_each_new_connector_in_state(state->state, conn, conn_state, i) {
if (conn_state->crtc != state->crtc)
@@ -1068,7 +1068,7 @@ vc4_crtc_mode_valid(struct drm_crtc *crt
static int vc4_crtc_atomic_check(struct drm_crtc *crtc,
struct drm_crtc_state *state)
{
- struct vc4_crtc_state *vc4_state = to_vc4_crtc_state(state);
+ struct fkms_crtc_state *vc4_state = to_fkms_crtc_state(state);
struct drm_connector *conn;
struct drm_connector_state *conn_state;
int i;
@@ -1178,13 +1178,13 @@ static int vc4_page_flip(struct drm_crtc
static struct drm_crtc_state *
vc4_crtc_duplicate_state(struct drm_crtc *crtc)
{
- struct vc4_crtc_state *vc4_state, *old_vc4_state;
+ struct fkms_crtc_state *vc4_state, *old_vc4_state;
vc4_state = kzalloc(sizeof(*vc4_state), GFP_KERNEL);
if (!vc4_state)
return NULL;
- old_vc4_state = to_vc4_crtc_state(crtc->state);
+ old_vc4_state = to_fkms_crtc_state(crtc->state);
vc4_state->margins = old_vc4_state->margins;
__drm_atomic_helper_crtc_duplicate_state(crtc, &vc4_state->base);