Skip to contentSkip to conversation

gpu: ipu-v3: default to id 0 on missing OF alias

PATCH New Philipp Zabel 1 participant 1 message Aug 2, 2018

Subsystems (2)
lore
Share & tools
lore

Philipp Zabel

author maintainer
#0 lore raw

PATCH 1/1 gpu: ipu-v3: default to id 0 on missing OF alias

This is better than storing -ENODEV in the id number. This fixes SoCs with only one IPU that don't specify an IPU alias in the device tree.

---
 drivers/gpu/ipu-v3/ipu-common.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/ipu-v3/ipu-common.c +2 -0
index 48685cddbad1..c73bd003f845 100644
@@ -1401,6 +1401,8 @@ static int ipu_probe(struct platform_device *pdev)
 		return -ENODEV;
 
 	ipu->id = of_alias_get_id(np, "ipu");
+	if (ipu->id < 0)
+		ipu->id = 0;
 
 	if (of_device_is_compatible(np, "fsl,imx6qp-ipu") &&
 	    IS_ENABLED(CONFIG_DRM)) {
Signature · 6 lines
2.18.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel