linux-samsung-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 21/28] drm/exynos: mic: Use drm_bridge_init()
       [not found] <20191204114732.28514-1-mihail.atanassov@arm.com>
@ 2019-12-04 11:48 ` Mihail Atanassov
  2019-12-09 10:39 ` [PATCH v2 00/28] drm/bridge: Consolidate initialization Neil Armstrong
  1 sibling, 0 replies; 3+ messages in thread
From: Mihail Atanassov @ 2019-12-04 11:48 UTC (permalink / raw)
  To: dri-devel
  Cc: Mihail Atanassov, nd, Inki Dae, Joonyoung Shim, Seung-Woo Kim,
	Kyungmin Park, David Airlie, Daniel Vetter, Kukjin Kim,
	Krzysztof Kozlowski, linux-arm-kernel, linux-samsung-soc,
	linux-kernel

No functional change: no logic depends on driver_private being NULL, so
it's safe to set it earlier in exynos_mic_probe.

Acked-by: Inki Dae <inki.dae@samsung.com>
Tested-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Mihail Atanassov <mihail.atanassov@arm.com>
---
 drivers/gpu/drm/exynos/exynos_drm_mic.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_mic.c b/drivers/gpu/drm/exynos/exynos_drm_mic.c
index f41d75923557..caad348a5646 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_mic.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_mic.c
@@ -309,10 +309,6 @@ static const struct drm_bridge_funcs mic_bridge_funcs = {
 static int exynos_mic_bind(struct device *dev, struct device *master,
 			   void *data)
 {
-	struct exynos_mic *mic = dev_get_drvdata(dev);
-
-	mic->bridge.driver_private = mic;
-
 	return 0;
 }
 
@@ -422,9 +418,7 @@ static int exynos_mic_probe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, mic);
 
-	mic->bridge.funcs = &mic_bridge_funcs;
-	mic->bridge.of_node = dev->of_node;
-
+	drm_bridge_init(&mic->bridge, dev, &mic_bridge_funcs, NULL, mic);
 	drm_bridge_add(&mic->bridge);
 
 	pm_runtime_enable(dev);
-- 
2.23.0


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

* Re: [PATCH v2 00/28] drm/bridge: Consolidate initialization
       [not found] <20191204114732.28514-1-mihail.atanassov@arm.com>
  2019-12-04 11:48 ` [PATCH v2 21/28] drm/exynos: mic: Use drm_bridge_init() Mihail Atanassov
@ 2019-12-09 10:39 ` Neil Armstrong
  2019-12-09 11:08   ` Mihail Atanassov
  1 sibling, 1 reply; 3+ messages in thread
From: Neil Armstrong @ 2019-12-09 10:39 UTC (permalink / raw)
  To: Mihail Atanassov, dri-devel
  Cc: Martyn Welch, David Airlie, Peter Senna Tschudin, Russell King,
	Laurent Pinchart, Boris Brezillon, Sam Ravnborg, Jerome Brunet,
	linux-renesas-soc, linux-samsung-soc, Vincent Abriou,
	Martin Donnelly, Krzysztof Kozlowski, Vasily Khoruzhick,
	Kukjin Kim, Icenowy Zheng, Jonas Karlman, linux-arm-msm,
	Brian Masney, linux-mediatek, Matthias Brugger, nd, Sean Paul,
	linux-arm-kernel, Jernej Skrabec, Wolfram Sang, Seung-Woo Kim,
	Douglas Anderson, linux-kernel, Yannick Fertré,
	Kyungmin Park, Kieran Bingham, Torsten Duwe,
	Dariusz Marcinkiewicz, freedreno

Hi Mihail,

On 04/12/2019 12:48, Mihail Atanassov wrote:
> Hi all,
> 
> I've dropped the fun parts of this series since they need more work, but
> figured drm_bridge_init() as a concept is still valuable on its own (and
> I think I'll need it to roll out device links for registered bridges),
> so here goes.
> 
> v2:
>  - expanded commit messages and added some extra bridge-related
>    documentation (Daniel)
>  - dropped v1 patches 29 and 30: 29 needs more work, and 30 depends on
>    it
>  - added all remaining drm_bridge implementers, found by searching for
>    drm_bridge_funcs which is mandatory for any bridge; new uses in
>    patches 3, 27, and 28 (Sam)
>  - due to the above, I've decided to squash all analogix changes into
>    one patch
> 
> ---
> v1 [https://patchwork.freedesktop.org/series/70039/] cover text below:
> 
> 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 (28):
>   drm: Introduce drm_bridge_init()
>   drm/bridge: adv7511: Use drm_bridge_init()
>   drm/bridge/analogix: 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: Use drm_bridge_init()
>   drm/msm: Use drm_bridge_init()
> 
>  drivers/gpu/drm/bridge/adv7511/adv7511_drv.c  |  5 ++-
>  .../drm/bridge/analogix/analogix-anx6345.c    |  5 ++-
>  .../drm/bridge/analogix/analogix-anx78xx.c    |  8 ++---
>  .../drm/bridge/analogix/analogix_dp_core.c    |  5 ++-
>  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                  | 34 ++++++++++++++++++-
>  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/msm/dsi/dsi_manager.c         |  4 +--
>  drivers/gpu/drm/msm/edp/edp_bridge.c          |  3 +-
>  drivers/gpu/drm/msm/hdmi/hdmi_bridge.c        |  4 +--
>  drivers/gpu/drm/rcar-du/rcar_lvds.c           |  5 ++-
>  drivers/gpu/drm/sti/sti_dvo.c                 |  4 +--
>  drivers/gpu/drm/sti/sti_hda.c                 |  3 +-
>  drivers/gpu/drm/sti/sti_hdmi.c                |  3 +-
>  include/drm/drm_bridge.h                      | 15 +++++++-
>  34 files changed, 100 insertions(+), 103 deletions(-)
> 

Can you check it doesn't collides with Boris 1-7 of "drm: Add support for bus-format negotiation" patches he just pushed on drm-misc-next ?

Neil

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

* Re: [PATCH v2 00/28] drm/bridge: Consolidate initialization
  2019-12-09 10:39 ` [PATCH v2 00/28] drm/bridge: Consolidate initialization Neil Armstrong
@ 2019-12-09 11:08   ` Mihail Atanassov
  0 siblings, 0 replies; 3+ messages in thread
From: Mihail Atanassov @ 2019-12-09 11:08 UTC (permalink / raw)
  To: Neil Armstrong, dri-devel
  Cc: Martyn Welch, David Airlie, Peter Senna Tschudin, Russell King,
	Laurent Pinchart, Boris Brezillon, Sam Ravnborg, Jerome Brunet,
	linux-renesas-soc, linux-samsung-soc, Vincent Abriou,
	Martin Donnelly, Krzysztof Kozlowski, Vasily Khoruzhick,
	Kukjin Kim, Icenowy Zheng, Jonas Karlman, linux-arm-msm,
	Brian Masney, linux-mediatek, Matthias Brugger, nd, Sean Paul,
	linux-arm-kernel, Jernej Skrabec, Wolfram Sang, Seung-Woo Kim,
	Douglas Anderson, linux-kernel, Yannick Fertré,
	Kyungmin Park, Kieran Bingham, Torsten Duwe,
	Dariusz Marcinkiewicz, freedreno

On Monday, 9 December 2019 10:39:07 GMT Neil Armstrong wrote:
> Hi Mihail,

Hi Neil,

> 
> On 04/12/2019 12:48, Mihail Atanassov wrote:
> > Hi all,
> > 
> > I've dropped the fun parts of this series since they need more work, but
> > figured drm_bridge_init() as a concept is still valuable on its own (and
> > I think I'll need it to roll out device links for registered bridges),
> > so here goes.
> > 
> > v2:
> >  - expanded commit messages and added some extra bridge-related
> >    documentation (Daniel)
> >  - dropped v1 patches 29 and 30: 29 needs more work, and 30 depends on
> >    it
> >  - added all remaining drm_bridge implementers, found by searching for
> >    drm_bridge_funcs which is mandatory for any bridge; new uses in
> >    patches 3, 27, and 28 (Sam)
> >  - due to the above, I've decided to squash all analogix changes into
> >    one patch
> > 
> > ---
> > v1 [https://patchwork.freedesktop.org/series/70039/] cover text below:
> > 
> > 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 (28):
> >   drm: Introduce drm_bridge_init()
> >   drm/bridge: adv7511: Use drm_bridge_init()
> >   drm/bridge/analogix: 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: Use drm_bridge_init()
> >   drm/msm: Use drm_bridge_init()
> > 
> >  drivers/gpu/drm/bridge/adv7511/adv7511_drv.c  |  5 ++-
> >  .../drm/bridge/analogix/analogix-anx6345.c    |  5 ++-
> >  .../drm/bridge/analogix/analogix-anx78xx.c    |  8 ++---
> >  .../drm/bridge/analogix/analogix_dp_core.c    |  5 ++-
> >  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                  | 34 ++++++++++++++++++-
> >  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/msm/dsi/dsi_manager.c         |  4 +--
> >  drivers/gpu/drm/msm/edp/edp_bridge.c          |  3 +-
> >  drivers/gpu/drm/msm/hdmi/hdmi_bridge.c        |  4 +--
> >  drivers/gpu/drm/rcar-du/rcar_lvds.c           |  5 ++-
> >  drivers/gpu/drm/sti/sti_dvo.c                 |  4 +--
> >  drivers/gpu/drm/sti/sti_hda.c                 |  3 +-
> >  drivers/gpu/drm/sti/sti_hdmi.c                |  3 +-
> >  include/drm/drm_bridge.h                      | 15 +++++++-
> >  34 files changed, 100 insertions(+), 103 deletions(-)
> > 
> 
> Can you check it doesn't collides with Boris 1-7 of "drm: Add support for bus-format negotiation" patches he just pushed on drm-misc-next ?

Thanks for the heads-up. There's no technical conflict but the build fails.
I'll fix it for v3 after I get the de-midlayering of drm_bridge done
(see https://patchwork.freedesktop.org/patch/343643/?series=70432&rev=1 for
context) and the s/bridge->dev/bridge->drm/ patch merged
(https://patchwork.freedesktop.org/patch/343824/).

> 
> Neil
> 

-- 
Mihail




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

end of thread, other threads:[~2019-12-09 11:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20191204114732.28514-1-mihail.atanassov@arm.com>
2019-12-04 11:48 ` [PATCH v2 21/28] drm/exynos: mic: Use drm_bridge_init() Mihail Atanassov
2019-12-09 10:39 ` [PATCH v2 00/28] drm/bridge: Consolidate initialization Neil Armstrong
2019-12-09 11:08   ` Mihail Atanassov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).