mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: [PATCH 1/2] drm/bridge: dw-hdmi: Add DT binding to disable hotplug detect
       [not found] <20210131095537.962292-1-ddone@aruko.org>
@ 2021-02-08  9:19 ` Neil Armstrong
  0 siblings, 0 replies; only message in thread
From: Neil Armstrong @ 2021-02-08  9:19 UTC (permalink / raw)
  To: Mykyta Poturai
  Cc: Andrzej Hajda, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
	David Airlie, Daniel Vetter, Sam Ravnborg, Boris Brezillon,
	Liu Ying, dri-devel, linux-kernel

On 31/01/2021 10:55, Mykyta Poturai wrote:
> Add "disable-hpd" boolean binding for the device tree. When this option
> is turned on HPD-related IRQ is disabled and it is assumed that the HDMI
> connector is connected all the time. This may be useful in systems where
> it is impossible or undesirable to connect the HPD pin, or the
> connection is broken.

DRM mode forcing exists for this reason.

You can even force an EDID to have a fixed mode.

Neil

> 
> Signed-off-by: Mykyta Poturai <ddone@aruko.org>
> ---
>  drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> index 0c79a9ba48bb..4ca0ac130beb 100644
> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> @@ -194,6 +194,7 @@ struct dw_hdmi {
>  	unsigned int audio_cts;
>  	unsigned int audio_n;
>  	bool audio_enable;
> +	bool disable_hpd;
>  
>  	unsigned int reg_shift;
>  	struct regmap *regm;
> @@ -1559,7 +1560,7 @@ static void dw_hdmi_phy_disable(struct dw_hdmi *hdmi, void *data)
>  enum drm_connector_status dw_hdmi_phy_read_hpd(struct dw_hdmi *hdmi,
>  					       void *data)
>  {
> -	return hdmi_readb(hdmi, HDMI_PHY_STAT0) & HDMI_PHY_HPD ?
> +	return hdmi_readb(hdmi, HDMI_PHY_STAT0) & HDMI_PHY_HPD || hdmi->disable_hpd ?
>  		connector_status_connected : connector_status_disconnected;
>  }
>  EXPORT_SYMBOL_GPL(dw_hdmi_phy_read_hpd);
> @@ -1585,6 +1586,10 @@ void dw_hdmi_phy_setup_hpd(struct dw_hdmi *hdmi, void *data)
>  	 * Configure the PHY RX SENSE and HPD interrupts polarities and clear
>  	 * any pending interrupt.
>  	 */
> +
> +	if (hdmi->disable_hpd)
> +		return;
> +
>  	hdmi_writeb(hdmi, HDMI_PHY_HPD | HDMI_PHY_RX_SENSE, HDMI_PHY_POL0);
>  	hdmi_writeb(hdmi, HDMI_IH_PHY_STAT0_HPD | HDMI_IH_PHY_STAT0_RX_SENSE,
>  		    HDMI_IH_PHY_STAT0);
> @@ -3212,6 +3217,10 @@ struct dw_hdmi *dw_hdmi_probe(struct platform_device *pdev,
>  	mutex_init(&hdmi->cec_notifier_mutex);
>  	spin_lock_init(&hdmi->audio_lock);
>  
> +	if (of_property_read_bool(np, "disable-hpd")) {
> +		dev_info(hdmi->dev, "Disabling HPD\n");
> +		hdmi->disable_hpd = true;
> +	}
>  	ddc_node = of_parse_phandle(np, "ddc-i2c-bus", 0);
>  	if (ddc_node) {
>  		hdmi->ddc = of_get_i2c_adapter_by_node(ddc_node);
> 


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-02-08  9:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20210131095537.962292-1-ddone@aruko.org>
2021-02-08  9:19 ` [PATCH 1/2] drm/bridge: dw-hdmi: Add DT binding to disable hotplug detect Neil Armstrong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®