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: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
This commit is contained in:
Lucas Stach 2017-03-08 12:13:18 +01:00 committed by Philipp Zabel
parent 0d6c9a4244
commit 92681fe7e9
1 changed files with 10 additions and 1 deletions

View File

@ -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)
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);