Linux-mediatek Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 00/30] drm/bridge: Add device links for lifetime control
@ 2019-11-26 13:15 Mihail Atanassov
  2019-11-26 13:16 ` [PATCH 25/30] drm/mediatek: hdmi: Use drm_bridge_init() Mihail Atanassov
  2019-11-26 15:27 ` [PATCH 00/30] drm/bridge: Add device links for lifetime control Russell King - ARM Linux admin
  0 siblings, 2 replies; 4+ messages in thread
From: Mihail Atanassov @ 2019-11-26 13:15 UTC (permalink / raw)
  To: dri-devel
  Cc: Martyn Welch, Neil Armstrong, David Airlie, Linus Walleij,
	Peter Senna Tschudin, Liviu Dudau, Philippe Cornu, Andrzej Hajda,
	Laurent Pinchart, Benjamin Gaignard, Boris Brezillon,
	Mihail Atanassov, Sam Ravnborg, Jerome Brunet, Rob Clark,
	linux-renesas-soc, linux-samsung-soc, Joonyoung Shim,
	Russell King, Krzysztof Kozlowski, Vasily Khoruzhick, Kukjin Kim,
	james qian wang (Arm Technology China),
	CK Hu, Thierry Reding, Martin Donnelly, Philipp Zabel,
	Jonas Karlman, linux-kernel, Maarten Lankhorst, Brian Masney,
	Maxime Ripard, Inki Dae, linux-mediatek, Matthias Brugger, nd,
	Vincent Abriou, linux-arm-kernel, Jernej Skrabec,
	Dariusz Marcinkiewicz, Wolfram Sang, Seung-Woo Kim,
	Douglas Anderson, Matt Redfearn, Yannick Fertré,
	Kyungmin Park, Kieran Bingham, Torsten Duwe, Daniel Vetter,
	Icenowy Zheng, Brian Starkey

Hi all,

This series adds device links support to drm_bridge. The motivation
behind it is that a drm_bridge in a module could get removed under the
feet of the bridge user without warning, so we need a way to remove and
reprobe the client as needed to avoid peering into the void.

1: Add a drm_bridge_init() function which wraps all initialisation of
the structure prior to calling drm_bridge_add().

2-26,28: Apply the drm_bridge_init() refactor to every bridge that uses
drm_bridge_add().

27: Minor cleanup in rcar-du.

29: Add of_drm_find_bridge_devlink() which functions the same as
of_drm_find_bridge() plus adds a device device link from the owning
drm_device to the bridge device.

30: As a motivating example, convert komeda to exclusively use
drm_bridge for its pipe outputs; this isn't a regression in usability
any more since device links bring the same automatic remove/reprobe
feature as components.

Mihail Atanassov (29):
  drm: Introduce drm_bridge_init()
  drm/bridge: adv7511: Use drm_bridge_init()
  drm/bridge: anx6345: Use drm_bridge_init()
  drm/bridge: anx78xx: Use drm_bridge_init()
  drm/bridge: cdns: Use drm_bridge_init()
  drm/bridge: dumb-vga-dac: Use drm_bridge_init()
  drm/bridge: lvds-encoder: Use drm_bridge_init()
  drm/bridge: megachips-stdpxxxx-ge-b850v3-fw: Use drm_bridge_init()
  drm/bridge: nxp-ptn3460: Use drm_bridge_init()
  drm/bridge: panel: Use drm_bridge_init()
  drm/bridge: ps8622: Use drm_bridge_init()
  drm/bridge: sii902x: Use drm_bridge_init()
  gpu: drm: bridge: sii9234: Use drm_bridge_init()
  drm/bridge: sil_sii8620: Use drm_bridge_init()
  drm/bridge: dw-hdmi: Use drm_bridge_init()
  drm/bridge/synopsys: dsi: Use drm_bridge_init()
  drm/bridge: tc358764: Use drm_bridge_init()
  drm/bridge: tc358767: Use drm_bridge_init()
  drm/bridge: thc63: Use drm_bridge_init()
  drm/bridge: ti-sn65dsi86: Use drm_bridge_init()
  drm/bridge: ti-tfp410: Use drm_bridge_init()
  drm/exynos: mic: Use drm_bridge_init()
  drm/i2c: tda998x: Use drm_bridge_init()
  drm/mcde: dsi: Use drm_bridge_init()
  drm/mediatek: hdmi: Use drm_bridge_init()
  drm: rcar-du: lvds: Use drm_bridge_init()
  drm: rcar-du: lvds: Don't set drm_bridge private pointer
  drm/sti: sti_vdo: Use drm_bridge_init()
  drm/komeda: Use drm_bridge interface for pipe outputs

Russell King (1):
  drm/bridge: add support for device links to bridge

 .../gpu/drm/arm/display/komeda/komeda_drv.c   | 54 ++++++-------
 .../gpu/drm/arm/display/komeda/komeda_kms.c   | 77 ++++++++++++++++--
 .../gpu/drm/arm/display/komeda/komeda_kms.h   |  2 +
 drivers/gpu/drm/bridge/adv7511/adv7511_drv.c  |  5 +-
 .../drm/bridge/analogix/analogix-anx6345.c    |  5 +-
 .../drm/bridge/analogix/analogix-anx78xx.c    |  8 +-
 drivers/gpu/drm/bridge/cdns-dsi.c             |  4 +-
 drivers/gpu/drm/bridge/dumb-vga-dac.c         |  6 +-
 drivers/gpu/drm/bridge/lvds-encoder.c         |  7 +-
 .../bridge/megachips-stdpxxxx-ge-b850v3-fw.c  |  4 +-
 drivers/gpu/drm/bridge/nxp-ptn3460.c          |  4 +-
 drivers/gpu/drm/bridge/panel.c                |  7 +-
 drivers/gpu/drm/bridge/parade-ps8622.c        |  3 +-
 drivers/gpu/drm/bridge/sii902x.c              |  5 +-
 drivers/gpu/drm/bridge/sii9234.c              |  3 +-
 drivers/gpu/drm/bridge/sil-sii8620.c          |  3 +-
 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c     |  7 +-
 drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c |  7 +-
 drivers/gpu/drm/bridge/tc358764.c             |  4 +-
 drivers/gpu/drm/bridge/tc358767.c             |  3 +-
 drivers/gpu/drm/bridge/thc63lvd1024.c         |  7 +-
 drivers/gpu/drm/bridge/ti-sn65dsi86.c         |  5 +-
 drivers/gpu/drm/bridge/ti-tfp410.c            |  5 +-
 drivers/gpu/drm/drm_bridge.c                  | 78 +++++++++++++++----
 drivers/gpu/drm/exynos/exynos_drm_mic.c       |  8 +-
 drivers/gpu/drm/i2c/tda998x_drv.c             |  6 +-
 drivers/gpu/drm/mcde/mcde_dsi.c               |  3 +-
 drivers/gpu/drm/mediatek/mtk_hdmi.c           |  4 +-
 drivers/gpu/drm/rcar-du/rcar_lvds.c           |  5 +-
 drivers/gpu/drm/sti/sti_dvo.c                 |  4 +-
 include/drm/drm_bridge.h                      |  8 ++
 31 files changed, 217 insertions(+), 134 deletions(-)

-- 
2.23.0


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* [PATCH 25/30] drm/mediatek: hdmi: Use drm_bridge_init()
  2019-11-26 13:15 [PATCH 00/30] drm/bridge: Add device links for lifetime control Mihail Atanassov
@ 2019-11-26 13:16 ` Mihail Atanassov
  2019-11-26 15:27 ` [PATCH 00/30] drm/bridge: Add device links for lifetime control Russell King - ARM Linux admin
  1 sibling, 0 replies; 4+ messages in thread
From: Mihail Atanassov @ 2019-11-26 13:16 UTC (permalink / raw)
  To: dri-devel
  Cc: Mihail Atanassov, Philipp Zabel, David Airlie, linux-kernel,
	Matthias Brugger, linux-mediatek, Daniel Vetter, CK Hu, nd,
	linux-arm-kernel

No functional change.

Signed-off-by: Mihail Atanassov <mihail.atanassov@arm.com>
---
 drivers/gpu/drm/mediatek/mtk_hdmi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi.c b/drivers/gpu/drm/mediatek/mtk_hdmi.c
index f684947c5243..9761a80674d9 100644
--- a/drivers/gpu/drm/mediatek/mtk_hdmi.c
+++ b/drivers/gpu/drm/mediatek/mtk_hdmi.c
@@ -1708,8 +1708,8 @@ static int mtk_drm_hdmi_probe(struct platform_device *pdev)
 
 	mtk_hdmi_register_audio_driver(dev);
 
-	hdmi->bridge.funcs = &mtk_hdmi_bridge_funcs;
-	hdmi->bridge.of_node = pdev->dev.of_node;
+	drm_bridge_init(&hdmi->bridge, &pdev->dev, &mtk_hdmi_bridge_funcs,
+			NULL, NULL);
 	drm_bridge_add(&hdmi->bridge);
 
 	ret = mtk_hdmi_clk_enable_audio(hdmi);
-- 
2.23.0


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: [PATCH 00/30] drm/bridge: Add device links for lifetime control
  2019-11-26 13:15 [PATCH 00/30] drm/bridge: Add device links for lifetime control Mihail Atanassov
  2019-11-26 13:16 ` [PATCH 25/30] drm/mediatek: hdmi: Use drm_bridge_init() Mihail Atanassov
@ 2019-11-26 15:27 ` Russell King - ARM Linux admin
  2019-11-26 15:55   ` Mihail Atanassov
  1 sibling, 1 reply; 4+ messages in thread
From: Russell King - ARM Linux admin @ 2019-11-26 15:27 UTC (permalink / raw)
  To: Mihail Atanassov
  Cc: Martyn Welch, Neil Armstrong, David Airlie, Linus Walleij,
	Peter Senna Tschudin, Liviu Dudau, dri-devel, Philippe Cornu,
	Andrzej Hajda, Laurent Pinchart, Benjamin Gaignard,
	Boris Brezillon, Sam Ravnborg, Jerome Brunet, Rob Clark,
	linux-renesas-soc, linux-samsung-soc, Joonyoung Shim,
	Krzysztof Kozlowski, Vasily Khoruzhick, Kukjin Kim,
	james qian wang (Arm Technology China),
	CK Hu, Thierry Reding, Martin Donnelly, Philipp Zabel,
	Jonas Karlman, linux-kernel, Maarten Lankhorst, Brian Masney,
	Maxime Ripard, Inki Dae, linux-mediatek, Matthias Brugger, nd,
	Vincent Abriou, linux-arm-kernel, Jernej Skrabec,
	Dariusz Marcinkiewicz, Wolfram Sang, Seung-Woo Kim,
	Douglas Anderson, Matt Redfearn, Yannick Fertré,
	Kyungmin Park, Kieran Bingham, Torsten Duwe, Daniel Vetter,
	Icenowy Zheng, Brian Starkey

What happened with the patches I posted doing exactly this?

On Tue, Nov 26, 2019 at 01:15:58PM +0000, Mihail Atanassov wrote:
> Hi all,
> 
> This series adds device links support to drm_bridge. The motivation
> behind it is that a drm_bridge in a module could get removed under the
> feet of the bridge user without warning, so we need a way to remove and
> reprobe the client as needed to avoid peering into the void.
> 
> 1: Add a drm_bridge_init() function which wraps all initialisation of
> the structure prior to calling drm_bridge_add().
> 
> 2-26,28: Apply the drm_bridge_init() refactor to every bridge that uses
> drm_bridge_add().
> 
> 27: Minor cleanup in rcar-du.
> 
> 29: Add of_drm_find_bridge_devlink() which functions the same as
> of_drm_find_bridge() plus adds a device device link from the owning
> drm_device to the bridge device.
> 
> 30: As a motivating example, convert komeda to exclusively use
> drm_bridge for its pipe outputs; this isn't a regression in usability
> any more since device links bring the same automatic remove/reprobe
> feature as components.
> 
> Mihail Atanassov (29):
>   drm: Introduce drm_bridge_init()
>   drm/bridge: adv7511: Use drm_bridge_init()
>   drm/bridge: anx6345: Use drm_bridge_init()
>   drm/bridge: anx78xx: Use drm_bridge_init()
>   drm/bridge: cdns: Use drm_bridge_init()
>   drm/bridge: dumb-vga-dac: Use drm_bridge_init()
>   drm/bridge: lvds-encoder: Use drm_bridge_init()
>   drm/bridge: megachips-stdpxxxx-ge-b850v3-fw: Use drm_bridge_init()
>   drm/bridge: nxp-ptn3460: Use drm_bridge_init()
>   drm/bridge: panel: Use drm_bridge_init()
>   drm/bridge: ps8622: Use drm_bridge_init()
>   drm/bridge: sii902x: Use drm_bridge_init()
>   gpu: drm: bridge: sii9234: Use drm_bridge_init()
>   drm/bridge: sil_sii8620: Use drm_bridge_init()
>   drm/bridge: dw-hdmi: Use drm_bridge_init()
>   drm/bridge/synopsys: dsi: Use drm_bridge_init()
>   drm/bridge: tc358764: Use drm_bridge_init()
>   drm/bridge: tc358767: Use drm_bridge_init()
>   drm/bridge: thc63: Use drm_bridge_init()
>   drm/bridge: ti-sn65dsi86: Use drm_bridge_init()
>   drm/bridge: ti-tfp410: Use drm_bridge_init()
>   drm/exynos: mic: Use drm_bridge_init()
>   drm/i2c: tda998x: Use drm_bridge_init()
>   drm/mcde: dsi: Use drm_bridge_init()
>   drm/mediatek: hdmi: Use drm_bridge_init()
>   drm: rcar-du: lvds: Use drm_bridge_init()
>   drm: rcar-du: lvds: Don't set drm_bridge private pointer
>   drm/sti: sti_vdo: Use drm_bridge_init()
>   drm/komeda: Use drm_bridge interface for pipe outputs
> 
> Russell King (1):
>   drm/bridge: add support for device links to bridge
> 
>  .../gpu/drm/arm/display/komeda/komeda_drv.c   | 54 ++++++-------
>  .../gpu/drm/arm/display/komeda/komeda_kms.c   | 77 ++++++++++++++++--
>  .../gpu/drm/arm/display/komeda/komeda_kms.h   |  2 +
>  drivers/gpu/drm/bridge/adv7511/adv7511_drv.c  |  5 +-
>  .../drm/bridge/analogix/analogix-anx6345.c    |  5 +-
>  .../drm/bridge/analogix/analogix-anx78xx.c    |  8 +-
>  drivers/gpu/drm/bridge/cdns-dsi.c             |  4 +-
>  drivers/gpu/drm/bridge/dumb-vga-dac.c         |  6 +-
>  drivers/gpu/drm/bridge/lvds-encoder.c         |  7 +-
>  .../bridge/megachips-stdpxxxx-ge-b850v3-fw.c  |  4 +-
>  drivers/gpu/drm/bridge/nxp-ptn3460.c          |  4 +-
>  drivers/gpu/drm/bridge/panel.c                |  7 +-
>  drivers/gpu/drm/bridge/parade-ps8622.c        |  3 +-
>  drivers/gpu/drm/bridge/sii902x.c              |  5 +-
>  drivers/gpu/drm/bridge/sii9234.c              |  3 +-
>  drivers/gpu/drm/bridge/sil-sii8620.c          |  3 +-
>  drivers/gpu/drm/bridge/synopsys/dw-hdmi.c     |  7 +-
>  drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c |  7 +-
>  drivers/gpu/drm/bridge/tc358764.c             |  4 +-
>  drivers/gpu/drm/bridge/tc358767.c             |  3 +-
>  drivers/gpu/drm/bridge/thc63lvd1024.c         |  7 +-
>  drivers/gpu/drm/bridge/ti-sn65dsi86.c         |  5 +-
>  drivers/gpu/drm/bridge/ti-tfp410.c            |  5 +-
>  drivers/gpu/drm/drm_bridge.c                  | 78 +++++++++++++++----
>  drivers/gpu/drm/exynos/exynos_drm_mic.c       |  8 +-
>  drivers/gpu/drm/i2c/tda998x_drv.c             |  6 +-
>  drivers/gpu/drm/mcde/mcde_dsi.c               |  3 +-
>  drivers/gpu/drm/mediatek/mtk_hdmi.c           |  4 +-
>  drivers/gpu/drm/rcar-du/rcar_lvds.c           |  5 +-
>  drivers/gpu/drm/sti/sti_dvo.c                 |  4 +-
>  include/drm/drm_bridge.h                      |  8 ++
>  31 files changed, 217 insertions(+), 134 deletions(-)
> 
> -- 
> 2.23.0
> 
> 

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: [PATCH 00/30] drm/bridge: Add device links for lifetime control
  2019-11-26 15:27 ` [PATCH 00/30] drm/bridge: Add device links for lifetime control Russell King - ARM Linux admin
@ 2019-11-26 15:55   ` Mihail Atanassov
  0 siblings, 0 replies; 4+ messages in thread
From: Mihail Atanassov @ 2019-11-26 15:55 UTC (permalink / raw)
  To: Russell King - ARM Linux admin, Martyn Welch, Rob Clark
  Cc: Neil Armstrong, David Airlie, Linus Walleij,
	Peter Senna Tschudin, Liviu Dudau, dri-devel, Philippe Cornu,
	Andrzej Hajda, Laurent Pinchart, Benjamin Gaignard,
	Boris Brezillon, Sam Ravnborg, Jerome Brunet, linux-renesas-soc,
	linux-samsung-soc, Joonyoung Shim, Krzysztof Kozlowski,
	Vasily Khoruzhick, Kukjin Kim,
	james qian wang (Arm Technology China),
	CK Hu, Thierry Reding, Icenowy Zheng, Philipp Zabel,
	Jonas Karlman, Maarten Lankhorst, Maxime Ripard, Inki Dae,
	linux-mediatek, Matthias Brugger, nd, Vincent Abriou,
	linux-arm-kernel, Jernej Skrabec, Dariusz Marcinkiewicz,
	Wolfram Sang, Seung-Woo Kim, Douglas Anderson, linux-kernel,
	Yannick Fertré,
	Kyungmin Park, Kieran Bingham, Torsten Duwe, Daniel Vetter,
	Brian Masney, Brian Starkey

On Tuesday, 26 November 2019 15:27:16 GMT Russell King - ARM Linux admin wrote:
> What happened with the patches I posted doing exactly this?

Hi Russell,

> 
> [snip]
> > 
> > Russell King (1):
> >   drm/bridge: add support for device links to bridge

^^^
Do you mean this one? It's 29/30 in the series, you're Cc'd on it.
I've kept the non-trivial part identical to
https://patchwork.freedesktop.org/patch/337181/ , which is the only
recent patch of yours that I'm aware of on the topic. I've preserved
the authorship.

> > 
> >  .../gpu/drm/arm/display/komeda/komeda_drv.c   | 54 ++++++-------
> >  .../gpu/drm/arm/display/komeda/komeda_kms.c   | 77 ++++++++++++++++--
> >  .../gpu/drm/arm/display/komeda/komeda_kms.h   |  2 +
> >  drivers/gpu/drm/bridge/adv7511/adv7511_drv.c  |  5 +-
> >  .../drm/bridge/analogix/analogix-anx6345.c    |  5 +-
> >  .../drm/bridge/analogix/analogix-anx78xx.c    |  8 +-
> >  drivers/gpu/drm/bridge/cdns-dsi.c             |  4 +-
> >  drivers/gpu/drm/bridge/dumb-vga-dac.c         |  6 +-
> >  drivers/gpu/drm/bridge/lvds-encoder.c         |  7 +-
> >  .../bridge/megachips-stdpxxxx-ge-b850v3-fw.c  |  4 +-
> >  drivers/gpu/drm/bridge/nxp-ptn3460.c          |  4 +-
> >  drivers/gpu/drm/bridge/panel.c                |  7 +-
> >  drivers/gpu/drm/bridge/parade-ps8622.c        |  3 +-
> >  drivers/gpu/drm/bridge/sii902x.c              |  5 +-
> >  drivers/gpu/drm/bridge/sii9234.c              |  3 +-
> >  drivers/gpu/drm/bridge/sil-sii8620.c          |  3 +-
> >  drivers/gpu/drm/bridge/synopsys/dw-hdmi.c     |  7 +-
> >  drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c |  7 +-
> >  drivers/gpu/drm/bridge/tc358764.c             |  4 +-
> >  drivers/gpu/drm/bridge/tc358767.c             |  3 +-
> >  drivers/gpu/drm/bridge/thc63lvd1024.c         |  7 +-
> >  drivers/gpu/drm/bridge/ti-sn65dsi86.c         |  5 +-
> >  drivers/gpu/drm/bridge/ti-tfp410.c            |  5 +-
> >  drivers/gpu/drm/drm_bridge.c                  | 78 +++++++++++++++----
> >  drivers/gpu/drm/exynos/exynos_drm_mic.c       |  8 +-
> >  drivers/gpu/drm/i2c/tda998x_drv.c             |  6 +-
> >  drivers/gpu/drm/mcde/mcde_dsi.c               |  3 +-
> >  drivers/gpu/drm/mediatek/mtk_hdmi.c           |  4 +-
> >  drivers/gpu/drm/rcar-du/rcar_lvds.c           |  5 +-
> >  drivers/gpu/drm/sti/sti_dvo.c                 |  4 +-
> >  include/drm/drm_bridge.h                      |  8 ++
> >  31 files changed, 217 insertions(+), 134 deletions(-)
> > 
> 
> 


-- 
Mihail




_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-26 13:15 [PATCH 00/30] drm/bridge: Add device links for lifetime control Mihail Atanassov
2019-11-26 13:16 ` [PATCH 25/30] drm/mediatek: hdmi: Use drm_bridge_init() Mihail Atanassov
2019-11-26 15:27 ` [PATCH 00/30] drm/bridge: Add device links for lifetime control Russell King - ARM Linux admin
2019-11-26 15:55   ` Mihail Atanassov

Linux-mediatek Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-mediatek/0 linux-mediatek/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mediatek linux-mediatek/ https://lore.kernel.org/linux-mediatek \
		linux-mediatek@lists.infradead.org
	public-inbox-index linux-mediatek

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-mediatek


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git