From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Peter Rosin <peda@axentia.se>
Cc: Martyn Welch <martyn.welch@collabora.co.uk>,
David Airlie <airlied@linux.ie>,
dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kern,
Kyungmin Park <kyungmin.park@samsung.com>,
Krzysztof Kozlowski <krzk@kernel.org>,
Kukjin Kim <kgene@kernel.org>,
Peter Senna Tschudin <peter.senna@collabora.com>,
Martin Donnelly <martin.donnelly@ge.com>,
linux-arm-msm@vger.kernel.org, Jyri Sarha <jsarha@ti.com>,
el.org@freedesktop.org, Matthias Brugger <matthias.bgg@gmail.com>,
Vincent Abriou <vincent.abriou@st.com>,
linux-arm-kernel@lists.infradead.org,
Seung-Woo Kim <sw0312.kim@samsung.com>,
linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
linux-mediatek@lists.infradead.org,
freedreno@lists.freedesktop.org
Subject: Re: [PATCH 00/24] device link, bridge supplier <-> drm device
Date: Fri, 27 Apr 2018 02:18:27 +0300 [thread overview]
Message-ID: <3483427.EaMxDYJt8U@avalon> (raw)
In-Reply-To: <8a9fcd8c-962d-1acc-c2ba-74a3d8f59590@axentia.se>
Hi Peter,
On Friday, 27 April 2018 02:09:14 EEST Peter Rosin wrote:
> On 2018-04-27 00:40, Laurent Pinchart wrote:
> > On Friday, 27 April 2018 01:31:15 EEST Peter Rosin wrote:
> >> Hi!
> >>
> >> It was noted by Russel King [1] that bridges (not using components)
> >> might disappear unexpectedly if the owner of the bridge was unbound.
> >> Jyri Sarha had previously noted the same thing with panels [2]. Jyri
> >> came up with using device links to resolve the panel issue, which
> >> was also my (independent) reaction to the note from Russel.
> >>
> >> This series builds up to the addition of that link in the last
> >> patch, but in my opinion the other 23 patches do have merit on their
> >> own.
> >>
> >> The last patch needs testing, while the others look trivial. That
> >> said, I might have missed some subtlety.
> >
> > I don't think this is the way to go. We have a real lifetime management
> > problem with bridges, and device links are just trying to hide the problem
> > under the carpet. They will further corner us by making a real fix much
> > more difficult to implement. I'll try to comment further in the next few
> > days on what I think a better solution would be, but in a nutshell I
> > believe that drm_bridge objects need to be refcounted, with a .release()
> > operation to free the bridge resources when the reference count drops to
> > zero. This shouldn't be difficult to implement and I'm willing to help.
>
> Ok, sp 24/24 is dead, and maybe 23/24 too.
Not necessarily, maybe I'll get proven wrong :-) Let's discuss, but I first
need some sleep.
> But how do you feel about dropping .of_node in favour of .owner? That gets
> rid of ugly #ifdefs...
I'll review that part and reply, I have nothing against it on principle at the
moment. The more generic the code is, the better in my opinion. We just need
to make sure that the OF node we're interested in will always be .owner-
>of_node in all cases.
> I also have the nagging feeling that .driver_private serves very little real
> purpose if there is a .owner so that you can do
>
> dev_get_drvdata(bridge->owner)
>
> for the cases where the container_of macro is not appropriate.
I'll review that too, it's a good point.
--
Regards,
Laurent Pinchart
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2018-04-26 23:18 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20180426223215epcas2p38fe3b0b7b1ea1c8190805f9e2a89e11e@epcas2p3.samsung.com>
2018-04-26 22:31 ` [PATCH 00/24] device link, bridge supplier <-> drm device Peter Rosin
2018-04-26 22:31 ` [PATCH 01/24] drm/bridge: allow optionally specifying an .owner device Peter Rosin
2018-04-26 22:31 ` [PATCH 18/24] drm/mediatek: hdmi: provide an .owner device for the bridge Peter Rosin
2018-04-26 22:31 ` [PATCH 22/24] drm/bridge: remove the .of_node member Peter Rosin
[not found] ` <20180426223139.16740-23-peda-koto5C5qi+TLoDKTGw+V6w@public.gmane.org>
2018-04-28 8:09 ` kbuild test robot
[not found] ` <201804281608.Iji1Keed%fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2018-04-30 11:14 ` Peter Rosin
2018-04-26 22:31 ` [PATCH 23/24] drm/bridge: require the .owner to be filled in on drm_bridge_attach Peter Rosin
[not found] ` <20180426223139.16740-24-peda-koto5C5qi+TLoDKTGw+V6w@public.gmane.org>
2018-04-30 15:24 ` Daniel Vetter
[not found] ` <20180430152438.GO12521-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2018-04-30 20:32 ` Peter Rosin
2018-04-26 22:31 ` [PATCH 24/24] drm/bridge: establish a link between the bridge supplier and consumer Peter Rosin
[not found] ` <20180426223139.16740-25-peda-koto5C5qi+TLoDKTGw+V6w@public.gmane.org>
2018-04-30 15:32 ` Daniel Vetter
[not found] ` <20180430153236.GP12521-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2018-04-30 21:12 ` Peter Rosin
[not found] ` <20180426223139.16740-1-peda-koto5C5qi+TLoDKTGw+V6w@public.gmane.org>
2018-04-26 22:40 ` [PATCH 00/24] device link, bridge supplier <-> drm device Laurent Pinchart
2018-04-26 23:09 ` Peter Rosin
2018-04-26 23:18 ` Laurent Pinchart [this message]
2018-04-27 7:27 ` Peter Rosin
2018-04-30 15:18 ` Daniel Vetter
2018-04-27 7:11 ` Andrzej Hajda
2018-04-27 7:37 ` Peter Rosin
[not found] ` <7d4bceeb-9611-cbf9-3906-fef5db88aad8-koto5C5qi+TLoDKTGw+V6w@public.gmane.org>
2018-04-27 7:51 ` Peter Rosin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3483427.EaMxDYJt8U@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=el.org@freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=jsarha@ti.com \
--cc=kgene@kernel.org \
--cc=krzk@kernel.org \
--cc=kyungmin.park@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-samsung-soc@vger.kern \
--cc=martin.donnelly@ge.com \
--cc=martyn.welch@collabora.co.uk \
--cc=matthias.bgg@gmail.com \
--cc=peda@axentia.se \
--cc=peter.senna@collabora.com \
--cc=sw0312.kim@samsung.com \
--cc=vincent.abriou@st.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox