[PATCH v1 08/17] drm/mediatek: hdmi: add cec flag

AngeloGioacchino Del Regno angelogioacchino.delregno at collabora.com
Tue Sep 20 03:34:28 PDT 2022


Il 19/09/22 18:56, Guillaume Ranquet ha scritto:
> Add a flag to indicate support for cec.
> 
> Signed-off-by: Guillaume Ranquet <granquet at baylibre.com>
> 
> diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi_common.c b/drivers/gpu/drm/mediatek/mtk_hdmi_common.c
> index bfcca6f8b839..86653ebaacfd 100644
> --- a/drivers/gpu/drm/mediatek/mtk_hdmi_common.c
> +++ b/drivers/gpu/drm/mediatek/mtk_hdmi_common.c
> @@ -154,35 +154,38 @@ int mtk_hdmi_dt_parse_pdata(struct mtk_hdmi *hdmi, struct platform_device *pdev,
>   		return ret;
>   	}
>   
> -	/* The CEC module handles HDMI hotplug detection */
> -	cec_np = of_get_compatible_child(np->parent, "mediatek,mt8173-cec");
> -	if (!cec_np) {
> -		dev_err(dev, "Failed to find CEC node\n");
> -		return -EINVAL;
> -	}
> +	if (hdmi->conf->has_cec) {

I think that's a pointless overcomplication: I know why you're doing this but I'm
not sure that this is a good solution.

I would simply disable CEC support if there is no CEC child node and that's it...

Regards,
Angelo



More information about the linux-arm-kernel mailing list