]> git.ipfire.org Git - thirdparty/openwrt.git/blob
5138aefa38a75b4449ba8e3d98c8bc6d14b72f9d
[thirdparty/openwrt.git] /
1 From edd35490f2c99fa62a2514a7cb3a9afe483ee31b Mon Sep 17 00:00:00 2001
2 From: Maxime Ripard <maxime@cerno.tech>
3 Date: Thu, 27 Apr 2023 11:26:10 +0200
4 Subject: [PATCH 0618/1085] drm/vc4: txp: Move the encoder type in the variant
5 structure
6
7 We'll have multiple TXP instances in the BCM2712, so we can't use a
8 single encoder type anymore. Let's tie the encoder type to the
9 compatible.
10
11 Signed-off-by: Maxime Ripard <maxime@cerno.tech>
12 ---
13 drivers/gpu/drm/vc4/vc4_drv.h | 1 +
14 drivers/gpu/drm/vc4/vc4_txp.c | 3 ++-
15 2 files changed, 3 insertions(+), 1 deletion(-)
16
17 --- a/drivers/gpu/drm/vc4/vc4_drv.h
18 +++ b/drivers/gpu/drm/vc4/vc4_drv.h
19 @@ -548,6 +548,7 @@ struct vc4_crtc_data {
20
21 struct vc4_txp_data {
22 struct vc4_crtc_data base;
23 + enum vc4_encoder_type encoder_type;
24 unsigned int has_byte_enable:1;
25 unsigned int size_minus_one:1;
26 unsigned int supports_40bit_addresses:1;
27 --- a/drivers/gpu/drm/vc4/vc4_txp.c
28 +++ b/drivers/gpu/drm/vc4/vc4_txp.c
29 @@ -513,6 +513,7 @@ const struct vc4_txp_data bcm2835_txp_da
30 .hvs_available_channels = BIT(2),
31 .hvs_output = 2,
32 },
33 + .encoder_type = VC4_ENCODER_TYPE_TXP,
34 .has_byte_enable = true,
35 };
36
37 @@ -556,7 +557,7 @@ static int vc4_txp_bind(struct device *d
38 return ret;
39
40 vc4_encoder = &txp->encoder;
41 - txp->encoder.type = VC4_ENCODER_TYPE_TXP;
42 + txp->encoder.type = txp_data->encoder_type;
43
44 encoder = &vc4_encoder->base;
45 encoder->possible_crtcs = drm_crtc_mask(&vc4_crtc->base);