[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKb7UvgARVWX9=_mGAPZTh6SWQ_PhTZVzOoA-rruajWPsdJujA@mail.gmail.com>
Date: Fri, 4 Aug 2017 18:19:55 -0400
From: Ilia Mirkin <imirkin@...m.mit.edu>
To: Eric Anholt <eric@...olt.net>
Cc: Laurent Pinchart <laurent.pinchart@...asonboard.com>,
"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
Archit Taneja <architt@...eaurora.org>,
Andrzej Hajda <a.hajda@...sung.com>,
Thierry Reding <thierry.reding@...il.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Daniel Vetter <daniel.vetter@...l.ch>
Subject: Re: [PATCH v5 2/6] drm/bridge: Add a devm_ allocator for panel bridge.
On Fri, Aug 4, 2017 at 4:43 PM, Eric Anholt <eric@...olt.net> wrote:
> Laurent Pinchart <laurent.pinchart@...asonboard.com> writes:
>
>> Hi Eric,
>>
>> (CC'ing Daniel)
>>
>> Thank you for the patch.
>>
>> On Tuesday 18 Jul 2017 14:05:06 Eric Anholt wrote:
>>> This will let drivers reduce the error cleanup they need, in
>>> particular the "is_panel_bridge" flag.
>>>
>>> v2: Slight cleanup of remove function by Andrzej
>>
>> I just want to point out that, in the context of Daniel's work on hot-unplug,
>> 90% of the devm_* allocations are wrong and will get in the way. All DRM core
>> objects that are accessible one way or another from userspace will need to be
>> properly reference-counted and freed only when the last reference disappears,
>> which could be well after the corresponding device is removed. I believe this
>> could be one such objects :-/
>
> Sure, if you're hotplugging, your life is pain. For non-hotpluggable
> devices, like our SOC platform devices (current panel-bridge consumers),
> this still seems like an excellent simplification of memory management.
At that point you may as well make your module non-unloadable, and
return failure when trying to remove a device from management by the
driver (whatever the opposite of "probe" is, I forget). Hotplugging
doesn't only happen when physically removing, it can happen for all
kinds of reasons... and userspace may still hold references in some of
those cases.
Powered by blists - more mailing lists