drm/bridge/synopsys: dw-hdmi: Add an option to suppress loading CEC driver
authorJernej Skrabec <jernej.skrabec@siol.net>
Fri, 16 Apr 2021 09:27:36 +0000 (11:27 +0200)
committerNeil Armstrong <narmstrong@baylibre.com>
Tue, 20 Apr 2021 15:22:38 +0000 (17:22 +0200)
This adds DW-HDMI driver a glue option to disable loading of the CEC sub-driver.

On some SoCs, the CEC functionality is enabled in the IP config bits, but the
CEC bus is non-functional like on Amlogic SoCs, where the CEC config bit is set
but the DW-HDMI CEC signal is not connected to a physical pin, leading to some
confusion when the DW-HDMI CEC controller can't communicate on the bus.

Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Link: https://patchwork.freedesktop.org/patch/msgid/20210416092737.1971876-2-narmstrong@baylibre.com
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
include/drm/bridge/dw_hdmi.h

index dda4fa9a1a08d8ef792b7cd2959360bb79e6b79d..ae97513ef886d879075deae7241abfdae6b92db0 100644 (file)
@@ -3421,7 +3421,7 @@ struct dw_hdmi *dw_hdmi_probe(struct platform_device *pdev,
                hdmi->audio = platform_device_register_full(&pdevinfo);
        }
 
-       if (config0 & HDMI_CONFIG0_CEC) {
+       if (!plat_data->disable_cec && (config0 & HDMI_CONFIG0_CEC)) {
                cec.hdmi = hdmi;
                cec.ops = &dw_hdmi_cec_ops;
                cec.irq = irq;
index ea34ca146b82cc0cd2e1be90a37aaee6b7bc51e6..6a5716655619b9becf20d97aa454c9d670d08a51 100644 (file)
@@ -153,6 +153,8 @@ struct dw_hdmi_plat_data {
        const struct dw_hdmi_phy_config *phy_config;
        int (*configure_phy)(struct dw_hdmi *hdmi, void *data,
                             unsigned long mpixelclock);
+
+       unsigned int disable_cec : 1;
 };
 
 struct dw_hdmi *dw_hdmi_probe(struct platform_device *pdev,