1 From 0f626dc8443a93138806b4a3f351bac346036358 Mon Sep 17 00:00:00 2001
2 From: Maxime Ripard <maxime@cerno.tech>
3 Date: Thu, 6 Feb 2020 16:22:50 +0100
4 Subject: [PATCH] drm/vc4: hdmi: Add CEC support flag
6 Similarly to the audio support, CEC support is not there yet for the
7 BCM2711, so let's skip entirely the CEC initialization through a variant
10 Signed-off-by: Maxime Ripard <maxime@cerno.tech>
12 drivers/gpu/drm/vc4/vc4_hdmi.c | 4 ++++
13 drivers/gpu/drm/vc4/vc4_hdmi.h | 3 +++
14 2 files changed, 7 insertions(+)
16 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c
17 +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
18 @@ -1186,6 +1186,9 @@ static int vc4_hdmi_cec_init(struct vc4_
22 + if (!vc4_hdmi->variant->cec_available)
25 vc4_hdmi->cec_adap = cec_allocate_adapter(&vc4_hdmi_cec_adap_ops,
28 @@ -1474,6 +1477,7 @@ static int vc4_hdmi_dev_remove(struct pl
30 static const struct vc4_hdmi_variant bcm2835_variant = {
31 .audio_available = true,
32 + .cec_available = true,
33 .registers = vc4_hdmi_fields,
34 .num_registers = ARRAY_SIZE(vc4_hdmi_fields),
36 --- a/drivers/gpu/drm/vc4/vc4_hdmi.h
37 +++ b/drivers/gpu/drm/vc4/vc4_hdmi.h
38 @@ -35,6 +35,9 @@ struct vc4_hdmi_variant {
39 /* Set to true when the audio support is available */
42 + /* Set to true when the CEC support is available */
45 /* List of the registers available on that variant */
46 const struct vc4_hdmi_register *registers;