bcm27xx-userland: update to latest version
[openwrt/staging/wigyori.git] / target / linux / bcm27xx / patches-5.4 / 950-0589-drm-vc4-hdmi-Add-HDMI-ID.patch
1 From 84c1a6034e361078d540c9b3bc672ccae623dc03 Mon Sep 17 00:00:00 2001
2 From: Maxime Ripard <maxime@cerno.tech>
3 Date: Tue, 7 Jan 2020 13:14:07 +0100
4 Subject: [PATCH] drm/vc4: hdmi: Add HDMI ID
5
6 Some operations will need us to have the raw ID of the HDMI controller
7 in the BCM2711, such as the encoder type to register, the name of the
8 debugfs files, etc.
9
10 Let's add it to our variant structure.
11
12 Signed-off-by: Maxime Ripard <maxime@cerno.tech>
13 ---
14 drivers/gpu/drm/vc4/vc4_hdmi.c | 3 +--
15 drivers/gpu/drm/vc4/vc4_hdmi.h | 5 +++++
16 2 files changed, 6 insertions(+), 2 deletions(-)
17
18 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c
19 +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
20 @@ -1267,11 +1267,10 @@ static int vc4_hdmi_bind(struct device *
21 vc4_hdmi = devm_kzalloc(dev, sizeof(*vc4_hdmi), GFP_KERNEL);
22 if (!vc4_hdmi)
23 return -ENOMEM;
24 -
25 vc4_hdmi->pdev = pdev;
26 variant = of_device_get_match_data(dev);
27 vc4_hdmi->variant = variant;
28 - vc4_hdmi->encoder.base.type = VC4_ENCODER_TYPE_HDMI0;
29 + vc4_hdmi->encoder.base.type = variant->id ? VC4_ENCODER_TYPE_HDMI1 : VC4_ENCODER_TYPE_HDMI0;
30 encoder = &vc4_hdmi->encoder.base.base;
31
32 ret = variant->init_resources(vc4_hdmi);
33 --- a/drivers/gpu/drm/vc4/vc4_hdmi.h
34 +++ b/drivers/gpu/drm/vc4/vc4_hdmi.h
35 @@ -27,6 +27,11 @@ struct vc4_hdmi;
36 struct vc4_hdmi_register;
37
38 struct vc4_hdmi_variant {
39 + /* On devices that have multiple, different instances (like
40 + * the BCM2711), which instance is that variant useful for.
41 + */
42 + unsigned int id;
43 +
44 /* List of the registers available on that variant */
45 const struct vc4_hdmi_register *registers;
46