kernel: bump 5.4 to 5.4.69
[openwrt/openwrt.git] / target / linux / bcm27xx / patches-5.4 / 950-0591-drm-vc4-hdmi-Add-CEC-support-flag.patch
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
5
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
8 flag.
9
10 Signed-off-by: Maxime Ripard <maxime@cerno.tech>
11 ---
12 drivers/gpu/drm/vc4/vc4_hdmi.c | 4 ++++
13 drivers/gpu/drm/vc4/vc4_hdmi.h | 3 +++
14 2 files changed, 7 insertions(+)
15
16 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c
17 +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
18 @@ -1187,6 +1187,9 @@ static int vc4_hdmi_cec_init(struct vc4_
19 u32 value;
20 int ret;
21
22 + if (!vc4_hdmi->variant->cec_available)
23 + return 0;
24 +
25 vc4_hdmi->cec_adap = cec_allocate_adapter(&vc4_hdmi_cec_adap_ops,
26 vc4_hdmi, "vc4",
27 CEC_CAP_DEFAULTS |
28 @@ -1475,6 +1478,7 @@ static int vc4_hdmi_dev_remove(struct pl
29
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),
35
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 */
40 bool audio_available;
41
42 + /* Set to true when the CEC support is available */
43 + bool cec_available;
44 +
45 /* List of the registers available on that variant */
46 const struct vc4_hdmi_register *registers;
47