Commit 92681fe7 authored by Lucas Stach's avatar Lucas Stach Committed by Philipp Zabel

gpu: ipu-v3: hook up PRG unit

The i.MX6 QuadPlus IPU needs to PRG unit to gain access to the
data bus. Make sure it is present and available to be used.
Signed-off-by: default avatarLucas Stach <l.stach@pengutronix.de>
Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
parent 0d6c9a42
...@@ -939,6 +939,7 @@ static const struct of_device_id imx_ipu_dt_ids[] = { ...@@ -939,6 +939,7 @@ static const struct of_device_id imx_ipu_dt_ids[] = {
{ .compatible = "fsl,imx51-ipu", .data = &ipu_type_imx51, }, { .compatible = "fsl,imx51-ipu", .data = &ipu_type_imx51, },
{ .compatible = "fsl,imx53-ipu", .data = &ipu_type_imx53, }, { .compatible = "fsl,imx53-ipu", .data = &ipu_type_imx53, },
{ .compatible = "fsl,imx6q-ipu", .data = &ipu_type_imx6q, }, { .compatible = "fsl,imx6q-ipu", .data = &ipu_type_imx6q, },
{ .compatible = "fsl,imx6qp-ipu", .data = &ipu_type_imx6q, },
{ /* sentinel */ } { /* sentinel */ }
}; };
MODULE_DEVICE_TABLE(of, imx_ipu_dt_ids); MODULE_DEVICE_TABLE(of, imx_ipu_dt_ids);
...@@ -1398,11 +1399,19 @@ static int ipu_probe(struct platform_device *pdev) ...@@ -1398,11 +1399,19 @@ static int ipu_probe(struct platform_device *pdev)
if (!ipu) if (!ipu)
return -ENODEV; return -ENODEV;
ipu->id = of_alias_get_id(np, "ipu");
if (of_device_is_compatible(np, "fsl,imx6qp-ipu")) {
ipu->prg_priv = ipu_prg_lookup_by_phandle(&pdev->dev,
"fsl,prg", ipu->id);
if (!ipu->prg_priv)
return -EPROBE_DEFER;
}
for (i = 0; i < 64; i++) for (i = 0; i < 64; i++)
ipu->channel[i].ipu = ipu; ipu->channel[i].ipu = ipu;
ipu->devtype = devtype; ipu->devtype = devtype;
ipu->ipu_type = devtype->type; ipu->ipu_type = devtype->type;
ipu->id = of_alias_get_id(np, "ipu");
spin_lock_init(&ipu->lock); spin_lock_init(&ipu->lock);
mutex_init(&ipu->channel_lock); mutex_init(&ipu->channel_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment