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
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
11 Signed-off-by: Maxime Ripard <maxime@cerno.tech>
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(-)
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 {
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),
33 + .encoder_type = VC4_ENCODER_TYPE_TXP,
34 .has_byte_enable = true,
37 @@ -556,7 +557,7 @@ static int vc4_txp_bind(struct device *d
40 vc4_encoder = &txp->encoder;
41 - txp->encoder.type = VC4_ENCODER_TYPE_TXP;
42 + txp->encoder.type = txp_data->encoder_type;
44 encoder = &vc4_encoder->base;
45 encoder->possible_crtcs = drm_crtc_mask(&vc4_crtc->base);