Re: [PATCH v2 35/46] drm/mediatek: Add support for Display Output Processor component
From: Fei Shao
Date: Thu Nov 26 2026 - 05:01:20 EST
On Tue, Jul 14, 2026 at 7:46 PM AngeloGioacchino Del Regno
<angelogioacchino.delregno@xxxxxxxxxxxxx> 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 <angelogioacchino.delregno@xxxxxxxxxxxxx>
> ---
> drivers/gpu/drm/mediatek/Makefile | 1 +
> drivers/gpu/drm/mediatek/mtk_ddp_comp.c | 14 ++
> drivers/gpu/drm/mediatek/mtk_disp_drv.h | 14 ++
> drivers/gpu/drm/mediatek/mtk_disp_outproc.c | 247 ++++++++++++++++++++
> drivers/gpu/drm/mediatek/mtk_drm_drv.c | 3 +
> drivers/gpu/drm/mediatek/mtk_drm_drv.h | 1 +
> include/linux/soc/mediatek/mtk-mmsys.h | 1 +
> 7 files changed, 281 insertions(+)
> create mode 100644 drivers/gpu/drm/mediatek/mtk_disp_outproc.c
>
[snip]
> + priv->irq = platform_get_irq_optional(pdev, 0);
> + 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_get_irq_optional() can return error codes that need to be
handled; otherwise, mtk_outproc_bind()/unbind() will pass the negative
values to enable_irq()/disable_irq():
ret = platform_get_irq_optional(pdev, 0);
if (ret < 0 && ret != -ENXIO)
return dev_err_probe(dev, ret, "Failed to get irq\n");
if (ret > 0) {
priv->irq = ret;
ret = devm_request_irq(dev, priv->irq, ...);
...
}
Regards,
Fei