All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm: bridge: adv7511: Enable DRM_BRIDGE_OP_HPD based on HPD interrupt
@ 2022-04-19 14:24 ` Biju Das
  0 siblings, 0 replies; 8+ messages in thread
From: Biju Das @ 2022-04-19 14:24 UTC (permalink / raw)
  To: Andrzej Hajda, Neil Armstrong, Robert Foss, David Airlie, Daniel Vetter
  Cc: Biju Das, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
	Maxime Ripard, Sam Ravnborg, Lucas Stach, Jagan Teki, dri-devel,
	Geert Uytterhoeven, Chris Paterson, Biju Das,
	Prabhakar Mahadev Lad, linux-renesas-soc

Connector detection using poll method won't work in case of bridge
attached to the encoder with the flag DRM_BRIDGE_ATTACH_NO_CONNECTOR, as
the code defaults to HPD.

Enable DRM_BRIDGE_OP_HPD based on HPD interrupt availability, so that
it will fall back to polling, if HPD is not available.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
 drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
index 668dcefbae17..b3f10c54e064 100644
--- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
+++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
@@ -1292,8 +1292,10 @@ static int adv7511_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
 		goto err_unregister_cec;
 
 	adv7511->bridge.funcs = &adv7511_bridge_funcs;
-	adv7511->bridge.ops = DRM_BRIDGE_OP_DETECT | DRM_BRIDGE_OP_EDID
-			    | DRM_BRIDGE_OP_HPD;
+	adv7511->bridge.ops = DRM_BRIDGE_OP_DETECT | DRM_BRIDGE_OP_EDID;
+	if (adv7511->i2c_main->irq)
+		adv7511->bridge.ops |= DRM_BRIDGE_OP_HPD;
+
 	adv7511->bridge.of_node = dev->of_node;
 	adv7511->bridge.type = DRM_MODE_CONNECTOR_HDMIA;
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH] drm: bridge: adv7511: Enable DRM_BRIDGE_OP_HPD based on HPD interrupt
@ 2022-04-19 14:24 ` Biju Das
  0 siblings, 0 replies; 8+ messages in thread
From: Biju Das @ 2022-04-19 14:24 UTC (permalink / raw)
  To: Andrzej Hajda, Neil Armstrong, Robert Foss, David Airlie, Daniel Vetter
  Cc: Jagan Teki, Chris Paterson, Geert Uytterhoeven, Jonas Karlman,
	dri-devel, Prabhakar Mahadev Lad, Jernej Skrabec, Biju Das,
	linux-renesas-soc, Maxime Ripard, Biju Das, Sam Ravnborg,
	Laurent Pinchart

Connector detection using poll method won't work in case of bridge
attached to the encoder with the flag DRM_BRIDGE_ATTACH_NO_CONNECTOR, as
the code defaults to HPD.

Enable DRM_BRIDGE_OP_HPD based on HPD interrupt availability, so that
it will fall back to polling, if HPD is not available.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
 drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
index 668dcefbae17..b3f10c54e064 100644
--- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
+++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
@@ -1292,8 +1292,10 @@ static int adv7511_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
 		goto err_unregister_cec;
 
 	adv7511->bridge.funcs = &adv7511_bridge_funcs;
-	adv7511->bridge.ops = DRM_BRIDGE_OP_DETECT | DRM_BRIDGE_OP_EDID
-			    | DRM_BRIDGE_OP_HPD;
+	adv7511->bridge.ops = DRM_BRIDGE_OP_DETECT | DRM_BRIDGE_OP_EDID;
+	if (adv7511->i2c_main->irq)
+		adv7511->bridge.ops |= DRM_BRIDGE_OP_HPD;
+
 	adv7511->bridge.of_node = dev->of_node;
 	adv7511->bridge.type = DRM_MODE_CONNECTOR_HDMIA;
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] drm: bridge: adv7511: Enable DRM_BRIDGE_OP_HPD based on HPD interrupt
  2022-04-19 14:24 ` Biju Das
@ 2022-04-19 16:10   ` Robert Foss
  -1 siblings, 0 replies; 8+ messages in thread
From: Robert Foss @ 2022-04-19 16:10 UTC (permalink / raw)
  To: Biju Das
  Cc: Andrzej Hajda, Neil Armstrong, David Airlie, Daniel Vetter,
	Laurent Pinchart, Jonas Karlman, Jernej Skrabec, Maxime Ripard,
	Sam Ravnborg, Lucas Stach, Jagan Teki, dri-devel,
	Geert Uytterhoeven, Chris Paterson, Biju Das,
	Prabhakar Mahadev Lad, linux-renesas-soc

On Tue, 19 Apr 2022 at 16:25, Biju Das <biju.das.jz@bp.renesas.com> wrote:
>
> Connector detection using poll method won't work in case of bridge
> attached to the encoder with the flag DRM_BRIDGE_ATTACH_NO_CONNECTOR, as
> the code defaults to HPD.
>
> Enable DRM_BRIDGE_OP_HPD based on HPD interrupt availability, so that
> it will fall back to polling, if HPD is not available.
>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> ---
>  drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> index 668dcefbae17..b3f10c54e064 100644
> --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> @@ -1292,8 +1292,10 @@ static int adv7511_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
>                 goto err_unregister_cec;
>
>         adv7511->bridge.funcs = &adv7511_bridge_funcs;
> -       adv7511->bridge.ops = DRM_BRIDGE_OP_DETECT | DRM_BRIDGE_OP_EDID
> -                           | DRM_BRIDGE_OP_HPD;
> +       adv7511->bridge.ops = DRM_BRIDGE_OP_DETECT | DRM_BRIDGE_OP_EDID;
> +       if (adv7511->i2c_main->irq)
> +               adv7511->bridge.ops |= DRM_BRIDGE_OP_HPD;
> +
>         adv7511->bridge.of_node = dev->of_node;
>         adv7511->bridge.type = DRM_MODE_CONNECTOR_HDMIA;
>

Reviewed-by: Robert Foss <robert.foss@linaro.org>

Applied to drm-misc-next

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] drm: bridge: adv7511: Enable DRM_BRIDGE_OP_HPD based on HPD interrupt
@ 2022-04-19 16:10   ` Robert Foss
  0 siblings, 0 replies; 8+ messages in thread
From: Robert Foss @ 2022-04-19 16:10 UTC (permalink / raw)
  To: Biju Das
  Cc: Jagan Teki, Chris Paterson, Andrzej Hajda, Geert Uytterhoeven,
	Jonas Karlman, David Airlie, dri-devel, Neil Armstrong,
	Prabhakar Mahadev Lad, Jernej Skrabec, Biju Das,
	linux-renesas-soc, Laurent Pinchart, Sam Ravnborg, Maxime Ripard

On Tue, 19 Apr 2022 at 16:25, Biju Das <biju.das.jz@bp.renesas.com> wrote:
>
> Connector detection using poll method won't work in case of bridge
> attached to the encoder with the flag DRM_BRIDGE_ATTACH_NO_CONNECTOR, as
> the code defaults to HPD.
>
> Enable DRM_BRIDGE_OP_HPD based on HPD interrupt availability, so that
> it will fall back to polling, if HPD is not available.
>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> ---
>  drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> index 668dcefbae17..b3f10c54e064 100644
> --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> @@ -1292,8 +1292,10 @@ static int adv7511_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
>                 goto err_unregister_cec;
>
>         adv7511->bridge.funcs = &adv7511_bridge_funcs;
> -       adv7511->bridge.ops = DRM_BRIDGE_OP_DETECT | DRM_BRIDGE_OP_EDID
> -                           | DRM_BRIDGE_OP_HPD;
> +       adv7511->bridge.ops = DRM_BRIDGE_OP_DETECT | DRM_BRIDGE_OP_EDID;
> +       if (adv7511->i2c_main->irq)
> +               adv7511->bridge.ops |= DRM_BRIDGE_OP_HPD;
> +
>         adv7511->bridge.of_node = dev->of_node;
>         adv7511->bridge.type = DRM_MODE_CONNECTOR_HDMIA;
>

Reviewed-by: Robert Foss <robert.foss@linaro.org>

Applied to drm-misc-next

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] drm: bridge: adv7511: Enable DRM_BRIDGE_OP_HPD based on HPD interrupt
  2022-04-19 14:24 ` Biju Das
@ 2022-04-19 16:16   ` Laurent Pinchart
  -1 siblings, 0 replies; 8+ messages in thread
From: Laurent Pinchart @ 2022-04-19 16:16 UTC (permalink / raw)
  To: Biju Das
  Cc: Andrzej Hajda, Neil Armstrong, Robert Foss, David Airlie,
	Daniel Vetter, Jonas Karlman, Jernej Skrabec, Maxime Ripard,
	Sam Ravnborg, Lucas Stach, Jagan Teki, dri-devel,
	Geert Uytterhoeven, Chris Paterson, Biju Das,
	Prabhakar Mahadev Lad, linux-renesas-soc

Hi Biju,

Thank you for the patch.

On Tue, Apr 19, 2022 at 03:24:53PM +0100, Biju Das wrote:
> Connector detection using poll method won't work in case of bridge
> attached to the encoder with the flag DRM_BRIDGE_ATTACH_NO_CONNECTOR, as
> the code defaults to HPD.
> 
> Enable DRM_BRIDGE_OP_HPD based on HPD interrupt availability, so that
> it will fall back to polling, if HPD is not available.
> 
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> index 668dcefbae17..b3f10c54e064 100644
> --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> @@ -1292,8 +1292,10 @@ static int adv7511_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
>  		goto err_unregister_cec;
>  
>  	adv7511->bridge.funcs = &adv7511_bridge_funcs;
> -	adv7511->bridge.ops = DRM_BRIDGE_OP_DETECT | DRM_BRIDGE_OP_EDID
> -			    | DRM_BRIDGE_OP_HPD;
> +	adv7511->bridge.ops = DRM_BRIDGE_OP_DETECT | DRM_BRIDGE_OP_EDID;
> +	if (adv7511->i2c_main->irq)
> +		adv7511->bridge.ops |= DRM_BRIDGE_OP_HPD;
> +
>  	adv7511->bridge.of_node = dev->of_node;
>  	adv7511->bridge.type = DRM_MODE_CONNECTOR_HDMIA;
>  

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] drm: bridge: adv7511: Enable DRM_BRIDGE_OP_HPD based on HPD interrupt
@ 2022-04-19 16:16   ` Laurent Pinchart
  0 siblings, 0 replies; 8+ messages in thread
From: Laurent Pinchart @ 2022-04-19 16:16 UTC (permalink / raw)
  To: Biju Das
  Cc: Jagan Teki, Chris Paterson, Andrzej Hajda, Geert Uytterhoeven,
	Jonas Karlman, David Airlie, dri-devel, Neil Armstrong,
	Prabhakar Mahadev Lad, Robert Foss, Biju Das, linux-renesas-soc,
	Jernej Skrabec, Sam Ravnborg, Maxime Ripard

Hi Biju,

Thank you for the patch.

On Tue, Apr 19, 2022 at 03:24:53PM +0100, Biju Das wrote:
> Connector detection using poll method won't work in case of bridge
> attached to the encoder with the flag DRM_BRIDGE_ATTACH_NO_CONNECTOR, as
> the code defaults to HPD.
> 
> Enable DRM_BRIDGE_OP_HPD based on HPD interrupt availability, so that
> it will fall back to polling, if HPD is not available.
> 
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> index 668dcefbae17..b3f10c54e064 100644
> --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> @@ -1292,8 +1292,10 @@ static int adv7511_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
>  		goto err_unregister_cec;
>  
>  	adv7511->bridge.funcs = &adv7511_bridge_funcs;
> -	adv7511->bridge.ops = DRM_BRIDGE_OP_DETECT | DRM_BRIDGE_OP_EDID
> -			    | DRM_BRIDGE_OP_HPD;
> +	adv7511->bridge.ops = DRM_BRIDGE_OP_DETECT | DRM_BRIDGE_OP_EDID;
> +	if (adv7511->i2c_main->irq)
> +		adv7511->bridge.ops |= DRM_BRIDGE_OP_HPD;
> +
>  	adv7511->bridge.of_node = dev->of_node;
>  	adv7511->bridge.type = DRM_MODE_CONNECTOR_HDMIA;
>  

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] drm: bridge: adv7511: Enable DRM_BRIDGE_OP_HPD based on HPD interrupt
  2022-04-19 14:24 ` Biju Das
@ 2022-04-19 19:34   ` Kieran Bingham
  -1 siblings, 0 replies; 8+ messages in thread
From: Kieran Bingham @ 2022-04-19 19:34 UTC (permalink / raw)
  To: Andrzej Hajda, Biju Das, Daniel Vetter, David Airlie,
	Neil Armstrong, Robert Foss
  Cc: Biju Das, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
	Maxime Ripard, Sam Ravnborg, Lucas Stach, Jagan Teki, dri-devel,
	Geert Uytterhoeven, Chris Paterson, Biju Das,
	Prabhakar Mahadev Lad, linux-renesas-soc

Quoting Biju Das (2022-04-19 15:24:53)
> Connector detection using poll method won't work in case of bridge
> attached to the encoder with the flag DRM_BRIDGE_ATTACH_NO_CONNECTOR, as
> the code defaults to HPD.
> 
> Enable DRM_BRIDGE_OP_HPD based on HPD interrupt availability, so that
> it will fall back to polling, if HPD is not available.


Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>

> 
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> ---
>  drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> index 668dcefbae17..b3f10c54e064 100644
> --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> @@ -1292,8 +1292,10 @@ static int adv7511_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
>                 goto err_unregister_cec;
>  
>         adv7511->bridge.funcs = &adv7511_bridge_funcs;
> -       adv7511->bridge.ops = DRM_BRIDGE_OP_DETECT | DRM_BRIDGE_OP_EDID
> -                           | DRM_BRIDGE_OP_HPD;
> +       adv7511->bridge.ops = DRM_BRIDGE_OP_DETECT | DRM_BRIDGE_OP_EDID;
> +       if (adv7511->i2c_main->irq)
> +               adv7511->bridge.ops |= DRM_BRIDGE_OP_HPD;
> +
>         adv7511->bridge.of_node = dev->of_node;
>         adv7511->bridge.type = DRM_MODE_CONNECTOR_HDMIA;
>  
> -- 
> 2.25.1
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] drm: bridge: adv7511: Enable DRM_BRIDGE_OP_HPD based on HPD interrupt
@ 2022-04-19 19:34   ` Kieran Bingham
  0 siblings, 0 replies; 8+ messages in thread
From: Kieran Bingham @ 2022-04-19 19:34 UTC (permalink / raw)
  To: Andrzej Hajda, Biju Das, Daniel Vetter, David Airlie,
	Neil Armstrong, Robert Foss
  Cc: Jagan Teki, Chris Paterson, Geert Uytterhoeven, Jonas Karlman,
	dri-devel, Prabhakar Mahadev Lad, Jernej Skrabec, Biju Das,
	linux-renesas-soc, Maxime Ripard, Biju Das, Sam Ravnborg,
	Laurent Pinchart

Quoting Biju Das (2022-04-19 15:24:53)
> Connector detection using poll method won't work in case of bridge
> attached to the encoder with the flag DRM_BRIDGE_ATTACH_NO_CONNECTOR, as
> the code defaults to HPD.
> 
> Enable DRM_BRIDGE_OP_HPD based on HPD interrupt availability, so that
> it will fall back to polling, if HPD is not available.


Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>

> 
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> ---
>  drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> index 668dcefbae17..b3f10c54e064 100644
> --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> @@ -1292,8 +1292,10 @@ static int adv7511_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
>                 goto err_unregister_cec;
>  
>         adv7511->bridge.funcs = &adv7511_bridge_funcs;
> -       adv7511->bridge.ops = DRM_BRIDGE_OP_DETECT | DRM_BRIDGE_OP_EDID
> -                           | DRM_BRIDGE_OP_HPD;
> +       adv7511->bridge.ops = DRM_BRIDGE_OP_DETECT | DRM_BRIDGE_OP_EDID;
> +       if (adv7511->i2c_main->irq)
> +               adv7511->bridge.ops |= DRM_BRIDGE_OP_HPD;
> +
>         adv7511->bridge.of_node = dev->of_node;
>         adv7511->bridge.type = DRM_MODE_CONNECTOR_HDMIA;
>  
> -- 
> 2.25.1
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-04-19 19:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-19 14:24 [PATCH] drm: bridge: adv7511: Enable DRM_BRIDGE_OP_HPD based on HPD interrupt Biju Das
2022-04-19 14:24 ` Biju Das
2022-04-19 16:10 ` Robert Foss
2022-04-19 16:10   ` Robert Foss
2022-04-19 16:16 ` Laurent Pinchart
2022-04-19 16:16   ` Laurent Pinchart
2022-04-19 19:34 ` Kieran Bingham
2022-04-19 19:34   ` Kieran Bingham

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.