From: Thierry Reding <thierry.reding@gmail.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: Jani Nikula <jani.nikula@intel.com>,
Shobhit Kumar <shobhit.kumar@intel.com>,
intel-gfx <intel-gfx@lists.freedesktop.org>,
dri-devel <dri-devel@lists.freedesktop.org>,
Andrzej Hajda <a.hajda@samsung.com>,
jacob.jun.pan@intel.com, Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [Intel-gfx] [RFC v2 1/4] drm: Add support to find drm_panel by name
Date: Fri, 16 Jan 2015 13:19:04 +0100 [thread overview]
Message-ID: <20150116121902.GE4885@ulmo.nvidia.com> (raw)
In-Reply-To: <CAKMK7uH4DRL+S5agmt-sUcdx=Uk9=73LmDdTVWkFy_9Qcu2ouA@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 1417 bytes --]
On Tue, Jan 13, 2015 at 12:08:11AM +0100, Daniel Vetter wrote:
> On Fri, Jan 9, 2015 at 1:50 PM, Jani Nikula <jani.nikula@intel.com> wrote:
> > I have a slightly uneasy feeling about handing out drm_panel pointers
> > (both from here and of_drm_find_panel) without refcounting. If the panel
> > driver gets removed, whoever called the find functions will have a
> > dangling pointer. I supposed this will be discussed on drm-devel.
>
> There's been some discussion already about exactly this problem (but
> with drm bridges) with Thierry and some other people. Cc'ed them all
> hopefully. Especially when the panel/bridge is a separate driver
> there's imo indeed an issue.
I posted patches some time ago to create a generic registry to do the
actual ref-counting[0]. It didn't seem to be very well received by Greg
for the core, so perhaps we could test-drive it in DRM first for panels
and bridges and once it's matured a bit it could still be promoted to
the driver core, or maybe lib/.
The difficult part about it is that while reference counting gives you
the benefit of keeping a valid pointer around, you may still want to
have a method of getting notified of the panel going away. I've thought
a bit about that and I think we could probably integrate that into the
registry, since that will notice anyway.
Thierry
[0]: http://www.spinics.net/linux/lists/kernel/msg1859333.html
[-- Attachment #1.2: Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2015-01-16 12:19 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-02 13:41 [RFC v2 0/4] Crystal Cove PMIC based Panel and Backlight Control Shobhit Kumar
2015-01-02 13:41 ` [RFC v2 1/4] drm: Add support to find drm_panel by name Shobhit Kumar
2015-01-09 12:50 ` Jani Nikula
2015-01-12 7:37 ` Kumar, Shobhit
2015-01-12 23:08 ` [Intel-gfx] " Daniel Vetter
2015-01-13 15:14 ` Andrzej Hajda
2015-01-16 12:19 ` Thierry Reding [this message]
2015-01-02 13:41 ` [RFC v2 2/4] mfd: Add a new cell device for panel controlled by crystal cove pmic Shobhit Kumar
2015-01-02 13:41 ` [RFC v2 3/4] drm/panel: Add new panel driver based on " Shobhit Kumar
2015-01-09 13:08 ` Jani Nikula
2015-01-12 8:26 ` Kumar, Shobhit
2015-01-12 9:02 ` Kumar, Shobhit
2015-01-02 13:41 ` [RFC v2 4/4] drm/i915: Enable DSI panel enable/disable based on PMIC Shobhit Kumar
2015-01-09 13:17 ` Jani Nikula
2015-01-12 8:23 ` Kumar, Shobhit
2015-01-12 23:11 ` Daniel Vetter
2015-01-07 5:06 ` [RFC v2 0/4] Crystal Cove PMIC based Panel and Backlight Control Kumar, Shobhit
2015-01-09 13:20 ` Jani Nikula
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=20150116121902.GE4885@ulmo.nvidia.com \
--to=thierry.reding@gmail.com \
--cc=a.hajda@samsung.com \
--cc=daniel.vetter@intel.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jacob.jun.pan@intel.com \
--cc=jani.nikula@intel.com \
--cc=shobhit.kumar@intel.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