devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: devicetree <devicetree@vger.kernel.org>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Rob Herring <robh+dt@kernel.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>
Subject: Re: [RFC] drm: implement generic firmware eviction
Date: Fri, 26 Aug 2016 14:58:51 +0200	[thread overview]
Message-ID: <ae99ee66-e3c4-8d97-0ff1-c6764e0d9d87@redhat.com> (raw)
In-Reply-To: <20160826125253.GB21452@lukather>

Hi,

On 26-08-16 14:52, Maxime Ripard wrote:
> On Fri, Aug 26, 2016 at 11:02:17AM +0200, Hans de Goede wrote:
>> Hi,
>>
>> On 26-08-16 10:58, Maxime Ripard wrote:
>>> Hi,
>>>
>>> On Fri, Aug 26, 2016 at 10:43:55AM +0200, Hans de Goede wrote:
>>>>>> I'm not sure we would want to remove the device at all, we
>>>>>> certainly should not be removing the dt_node from the devicetree
>>>>>> IMHO. Having that around to see how the bootloader set things up
>>>>>> is really useful for debugging and normally we should never modify
>>>>>> the devicetree as set up by the bootloader.
>>>>>>
>>>>>> Why not just unbind the driver from the platform device? That
>>>>>> should be enough.
>>>>>
>>>>> That will leave IORESOURCE_MEM around, causing conflicts if
>>>>> re-used/claimed by other devices/drivers. Furthermore, it is really
>>>>> fragile leaving the device around, without any control over
>>>>> possible future driver probing.
>>>>
>>>> Ah, good point. On ARM this currently typically is reserved by the bootloader
>>>> so never touched by the kernel at all, not even when the simplefb is no longer
>>>> used, actually returning this memory to the kernel after unbinding the simplefb /
>>>> destroying the simplefb platform-dev would be really good to do. We should
>>>> probably figure out how that should be done before getting rid of
>>>> remove_conflicting_framebuffers... (sorry).
>>>
>>> That would be rather easy to do. The firmware could generate a
>>> reserved-memory node instead of passing a smaller memory size to the
>>> kernel. That way, the kernel will know that it's actual ram that it
>>> can reclaim.
>>
>> So when would the kernel reclaim the RAM then?
>
> When we kickout the framebuffer driver?

Yes that is when we _want_ it to reclaim the RAM, my question was when
it will _actually_ happen ? I'm not familiar with the reserved-memory
implementation. Does your answer mean that some driver must make an
explicit call to get the memory reclaimed ?

Regards,

Hans
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2016-08-26 12:58 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-26  0:00 [RFC] drm: implement generic firmware eviction David Herrmann
2016-08-26  7:57 ` Hans de Goede
2016-08-26  8:01   ` David Herrmann
2016-08-26  8:43     ` Hans de Goede
2016-08-26  8:58       ` Maxime Ripard
2016-08-26  9:02         ` Hans de Goede
2016-08-26 12:52           ` Maxime Ripard
2016-08-26 12:58             ` Hans de Goede [this message]
2016-08-26 13:33               ` Maxime Ripard
2016-08-26  9:39 ` Jani Nikula
     [not found] ` <20160826000056.12806-1-dh.herrmann-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-08-26  5:59   ` Daniel Vetter
2016-08-26 12:36   ` Rob Herring
2016-08-30 19:30     ` David Herrmann
2016-08-30 20:58       ` Rob Herring
2016-08-30 21:12         ` David Herrmann
     [not found]           ` <CANq1E4Twr6Uy2QnowV_WP8yz9QymkchnFS1GwFf_FBRcYF6oOQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-08-30 23:01             ` Rob Herring
     [not found]               ` <CAL_JsqJuyPW-kPBbiaq2hRyMN0CBY5UXiUOxHR7GYkjDQodAfA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-08-31  6:59                 ` David Herrmann
2016-08-30 21:00       ` Maxime Ripard
2016-08-26 13:27   ` Maxime Ripard

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=ae99ee66-e3c4-8d97-0ff1-c6764e0d9d87@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=maxime.ripard@free-electrons.com \
    --cc=robh+dt@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).