Openwrt/target/linux/bcm27xx/patches-5.4/950-0466-drm-vc4-fkms-Change-crtc_state-structure-name-to-avo.patch
Álvaro Fernández Rojas 77e97abf12 bcm27xx: update to latest patches from RPi foundation
Also removes random module and switches to new bcm2711 thermal driver.
Boot tested on RPi 4B v1.1 4G.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2020-05-28 19:12:43 +02: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);