Skip to content

Commit 18f47a5

Browse files
mripardpopcornmix
authored andcommitted
drm/vc4: hdmi: Add HDMI ID
Some operations will need us to have the raw ID of the HDMI controller in the BCM2711, such as the encoder type to register, the name of the debugfs files, etc. Let's add it to our variant structure. Signed-off-by: Maxime Ripard <maxime@cerno.tech>
1 parent 74cdf7c commit 18f47a5

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

‎drivers/gpu/drm/vc4/vc4_hdmi.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1252,11 +1252,10 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data)
12521252
vc4_hdmi = devm_kzalloc(dev, sizeof(*vc4_hdmi), GFP_KERNEL);
12531253
if (!vc4_hdmi)
12541254
return -ENOMEM;
1255-
12561255
vc4_hdmi->pdev = pdev;
12571256
variant = of_device_get_match_data(dev);
12581257
vc4_hdmi->variant = variant;
1259-
vc4_hdmi->encoder.base.type = VC4_ENCODER_TYPE_HDMI0;
1258+
vc4_hdmi->encoder.base.type = variant->id ? VC4_ENCODER_TYPE_HDMI1 : VC4_ENCODER_TYPE_HDMI0;
12601259
encoder = &vc4_hdmi->encoder.base.base;
12611260

12621261
ret = variant->init_resources(vc4_hdmi);

‎drivers/gpu/drm/vc4/vc4_hdmi.h‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ struct vc4_hdmi;
2727
struct vc4_hdmi_register;
2828

2929
struct vc4_hdmi_variant {
30+
/* On devices that have multiple, different instances (like
31+
* the BCM2711), which instance is that variant useful for.
32+
*/
33+
unsigned int id;
34+
3035
/* List of the registers available on that variant */
3136
const struct vc4_hdmi_register *registers;
3237

0 commit comments

Comments
 (0)