mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
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>
This commit is contained in:
committed by
popcornmix
parent
f4d41ef889
commit
7130a187d8
@@ -1264,11 +1264,10 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data)
|
||||
vc4_hdmi = devm_kzalloc(dev, sizeof(*vc4_hdmi), GFP_KERNEL);
|
||||
if (!vc4_hdmi)
|
||||
return -ENOMEM;
|
||||
|
||||
vc4_hdmi->pdev = pdev;
|
||||
variant = of_device_get_match_data(dev);
|
||||
vc4_hdmi->variant = variant;
|
||||
vc4_hdmi->encoder.base.type = VC4_ENCODER_TYPE_HDMI0;
|
||||
vc4_hdmi->encoder.base.type = variant->id ? VC4_ENCODER_TYPE_HDMI1 : VC4_ENCODER_TYPE_HDMI0;
|
||||
encoder = &vc4_hdmi->encoder.base.base;
|
||||
|
||||
ret = variant->init_resources(vc4_hdmi);
|
||||
|
||||
@@ -27,6 +27,11 @@ struct vc4_hdmi;
|
||||
struct vc4_hdmi_register;
|
||||
|
||||
struct vc4_hdmi_variant {
|
||||
/* On devices that have multiple, different instances (like
|
||||
* the BCM2711), which instance is that variant useful for.
|
||||
*/
|
||||
unsigned int id;
|
||||
|
||||
/* List of the registers available on that variant */
|
||||
const struct vc4_hdmi_register *registers;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user