[RFC][PATCH 1/5] libdrm: Use mmap64 instead of __mmap2

Emil Velikov emil.l.velikov at gmail.com
Tue Apr 23 09:47:42 UTC 2019


On Sat, 20 Apr 2019 at 05:25, John Stultz <john.stultz at linaro.org> wrote:
>
> From: Sean Paul <seanpaul at chromium.org>
>
> __mmap2 isn't supported on all platforms, mmap64 is the right way
> to do this in android.
>
> Also folds in a fix from Stéphane Marchesin <marcheu at chromium.org>
> to use an offset in bytes not pages, as that's what mmap64 takes.
>
> Cc: Emil Velikov <emil.velikov at collabora.com>
> Cc: Sean Paul <seanpaul at chromium.org>
> Cc: Alistair Strachan <astrachan at google.com>
> Cc: Marissa Wall <marissaw at google.com>
> Signed-off-by: Sean Paul <seanpaul at chromium.org>
> Signed-off-by: John Stultz <john.stultz at linaro.org>
> ---
>  libdrm_macros.h | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
>From a quick look mmap64 was introduced in bionic with Andoid 5 (Lollipop).
A reasonable min. version although we're lacking a check.

As a separate commit, copy the PLATFORM_VERSION hunk (or equiv.) from
Mesa's Android.mk.
Here I'd add a note "introduced with Android L which we require as of
earlier commit" and drop the bytes/pages mention.

With that this patch is:
Reviewed-by: Emil Velikov <emil.velikov at collabora.com>

-Emil


More information about the dri-devel mailing list