On Tue, 2026-07-14 at 13:44 +0200, AngeloGioacchino Del Regno wrote:
> Add support for the Display Output Processor hardware component,
> found in the MediaTek Kompanio Ultra MT8196, Genio Pro 5100 MT8894,
> Dimensity 9400 MT6991 and others.
>
> This hardware handles the post-stage of pixel processing in the
> layer overlaying process and is also capable of performing gamma
> correction, ensuring that the per-pixel values are within the
> expected gamma range.
>
> Signed-off-by: AngeloGioacchino Del Regno
> <[email protected]>
> ---
[snip]
> +static int mtk_disp_outproc_probe(struct platform_device *pdev)
> +{
> + struct device *dev = &pdev->dev;
> + struct mtk_disp_outproc *priv;
> + int ret;
> +
> + priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
> + if (!priv)
> + return -ENOMEM;
> +
> + priv->regs = devm_platform_ioremap_resource(pdev, 0);
> + if (IS_ERR(priv->regs))
> + return dev_err_probe(dev, PTR_ERR(priv->regs), "Cannot get reg
> resource\n");
> +
> + priv->clk = devm_clk_get(dev, NULL);
> + if (IS_ERR(priv->clk))
> + return dev_err_probe(dev, PTR_ERR(priv->clk), "Cannot get
> clocks\n");
> +
> +#if IS_REACHABLE(CONFIG_MTK_CMDQ)
> + ret = cmdq_dev_get_client_reg(dev, &priv->cmdq_reg, 0);
> + if (ret)
> + dev_dbg(dev, "No mediatek,gce-client-reg\n");
> +#endif
> +
> + priv->irq = platform_get_irq_optional(pdev, 0);
Only some outproc has interrupt?
So one pipeline may have multiple outproc?
If one pipeline has only one outproc, where is the interrupt of the pipeline
whose outproc has no interrupt?
Regards,
CK
> + if (priv->irq > 0) {
> + ret = devm_request_irq(dev, priv->irq, mtk_outproc_irq_handler,
> + IRQF_NO_AUTOEN, dev_name(dev), priv);
> + if (ret)
> + return dev_err_probe(dev, ret, "Failed to request
> irq\n");
> + }
> +
> + platform_set_drvdata(pdev, priv);
> +
> + ret = devm_pm_runtime_enable(dev);
> + if (ret)
> + return ret;
> +
> + ret = component_add(dev, &mtk_disp_outproc_component_ops);
> + if (ret)
> + return dev_err_probe(dev, ret, "Failed to add component\n");
> +
> + return ret;
> +}
> +