[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANh8Qzz4bx8scFdF3Hhe0UsojEyBswBuwiJQ0UW9HPUjrjpd_Q@mail.gmail.com>
Date: Wed, 20 May 2020 13:15:07 +0200
From: "Fuzzey, Martin" <martin.fuzzey@...wbird.group>
To: Lucas Stach <l.stach@...gutronix.de>
Cc: stable@...r.kernel.org,
Christian Gmeiner <christian.gmeiner@...il.com>,
The etnaviv authors <etnaviv@...ts.freedesktop.org>,
"Linux-Kernel@...r. Kernel. Org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drm/etnaviv: fix memory leak when mapping prime imported buffers
Hi Lucas,
> Am Mittwoch, den 20.05.2020, 12:10 +0200 schrieb Martin Fuzzey:
> What's the use-case where you did hit this issue? mmap'ing of imported
> buffers through the etnaviv DRM device is currently not well defined
> and I was pondering the idea of forbidding it completely by not
> returning a mmap offset for those objects.
>
I hit this on Android 8 (on i.MX6 using mesa 20.0.6 with gbm gralloc
and drm hwcomposer) and had a memory leak every time an activity was
started.
I'm not sure exactly why but Android does a gralloc.lock() and
gralloc.unlock() on every activity startup.
Those map and unmap the buffer.
Under Android (at least in 8+) the actual graphics buffer allocations
are done by a dedicated process
(android.hardware.graphics.allocator@...-service)
because it uses a "binderized HAL" for the allocation
[https://source.android.com/devices/architecture/hal-types]
This means that buffers are *always* imported (though they are usually
only mmaped for SW rendering or screen shots).
Regards,
Martin
Powered by blists - more mailing lists