mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-22 06:57:57 +00:00
2e715fb4fc
Add support for BCM2712 (Raspberry Pi 5).
3bb5880ab3
Patches were generated from the diff between linux kernel branch linux-6.1.y
and rpi-6.1.y from raspberry pi kernel source:
- git format-patch linux-6.1.y...rpi-6.1.y
Build system: x86_64
Build-tested: bcm2708, bcm2709, bcm2710, bcm2711
Run-tested: bcm2710/RPi3B, bcm2711/RPi4B
Signed-off-by: Marty Jones <mj8263788@gmail.com>
[Remove applied and reverted patches, squash patches and config commits]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
57 lines
1.8 KiB
Diff
57 lines
1.8 KiB
Diff
From e8dbad6d506b6fac992fdf74a7e3a66a38e554c3 Mon Sep 17 00:00:00 2001
|
|
From: Maxime Ripard <maxime@cerno.tech>
|
|
Date: Thu, 27 Apr 2023 09:30:33 +0200
|
|
Subject: [PATCH] drm/vc4: txp: Add byte enable toggle bit
|
|
|
|
The MOPLET doesn't have the BYTE_ENABLE field to set, but the TXP and
|
|
MOP do, so let's add a boolean to control whether or not we need to set
|
|
it.
|
|
|
|
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
|
---
|
|
drivers/gpu/drm/vc4/vc4_drv.h | 1 +
|
|
drivers/gpu/drm/vc4/vc4_txp.c | 6 +++++-
|
|
2 files changed, 6 insertions(+), 1 deletion(-)
|
|
|
|
--- a/drivers/gpu/drm/vc4/vc4_drv.h
|
|
+++ b/drivers/gpu/drm/vc4/vc4_drv.h
|
|
@@ -563,6 +563,7 @@ struct vc4_crtc_data {
|
|
|
|
struct vc4_txp_data {
|
|
struct vc4_crtc_data base;
|
|
+ unsigned int has_byte_enable:1;
|
|
};
|
|
|
|
extern const struct vc4_txp_data bcm2835_txp_data;
|
|
--- a/drivers/gpu/drm/vc4/vc4_txp.c
|
|
+++ b/drivers/gpu/drm/vc4/vc4_txp.c
|
|
@@ -291,6 +291,7 @@ static void vc4_txp_connector_atomic_com
|
|
struct drm_connector_state *conn_state = drm_atomic_get_new_connector_state(state,
|
|
conn);
|
|
struct vc4_txp *txp = connector_to_vc4_txp(conn);
|
|
+ const struct vc4_txp_data *txp_data = txp->data;
|
|
struct drm_gem_dma_object *gem;
|
|
struct drm_display_mode *mode;
|
|
struct drm_framebuffer *fb;
|
|
@@ -313,9 +314,11 @@ static void vc4_txp_connector_atomic_com
|
|
return;
|
|
|
|
ctrl = TXP_GO | TXP_EI |
|
|
- VC4_SET_FIELD(0xf, TXP_BYTE_ENABLE) |
|
|
VC4_SET_FIELD(txp_fmts[i], TXP_FORMAT);
|
|
|
|
+ if (txp_data->has_byte_enable)
|
|
+ ctrl |= VC4_SET_FIELD(0xf, TXP_BYTE_ENABLE);
|
|
+
|
|
if (fb->format->has_alpha)
|
|
ctrl |= TXP_ALPHA_ENABLE;
|
|
else
|
|
@@ -496,6 +499,7 @@ const struct vc4_txp_data bcm2835_txp_da
|
|
.hvs_available_channels = BIT(2),
|
|
.hvs_output = 2,
|
|
},
|
|
+ .has_byte_enable = true,
|
|
};
|
|
|
|
static int vc4_txp_bind(struct device *dev, struct device *master, void *data)
|