[Mesa-dev] [PATCH v2 0/4] Android kms_swrast support

Robert Foss robert.foss at collabora.com
Tue Jul 17 10:32:56 UTC 2018


This series implements kms_swrast support for the Android
platform. And since having to debug a null pointer dereference,
simplify that process for the next guy.

As it stands now, any kernel must have the following ioctls flagged with
DRM_RENDER_ALLOW[1], which isn't the case in the mainline kernel.

DRM_IOCTL_MODE_CREATE_DUMB
DRM_IOCTL_MODE_MAP_DUMB

While it would be possible to open a non-render node to pass the
authentication check, this would still cause authentication issues
when the /dev/dri/cardX node needs to be opened as master by both mesa
and the compositor.

I don't know how acceptable this series is for upstreaming, while relying on
a non-mainline kernel. I think the policy is to not accept changes that
don't have both a user and kernel space solution in place.

Like I noted yesterday[2] the alternative to using dumb buffers and having
authentication issues is using VGEM, which is new territory to me, and it would
take me a little bit of time to figure exactly how it fits into the current
kms_swrast approach.
Input, like noted before, is very much welcome.


The series is available here:
https://gitlab.collabora.com/robertfoss/mesa/tree/kms_swrast_v2


[1] https://groups.google.com/a/chromium.org/forum/#!topic/chromium-os-reviews/5nOxn-JXJUk
[2] https://lists.freedesktop.org/archives/mesa-dev/2018-July/200229.html


Changes since v1:
  - Added r-b
  - Added patch for asserting on failed pipe_transfer_map()

Changes since RFC:
  - Dropped "st/dri: Allow kms_swrast to work without a device FD"
  - Removed software renderer fallback from platform_android
  - Fixed various smaller issues


Rob Herring (1):
  android: Build kms_swrast for the Android platform

Robert Foss (3):
  softpipe: Add assert verifying successful pipe_transfer_map
  egl/android: Add Android property for forcing software rendering
  platform/android: Enable kms_swrast fallback

 src/egl/drivers/dri2/platform_android.c      | 18 ++++++-----
 src/egl/main/egldriver.c                     | 10 ++++++
 src/gallium/Android.mk                       |  2 +-
 src/gallium/auxiliary/pipe-loader/Android.mk |  1 +
 src/gallium/drivers/softpipe/Android.mk      |  4 +--
 src/gallium/drivers/softpipe/sp_tile_cache.c |  1 +
 src/gallium/state_trackers/dri/Android.mk    |  1 +
 src/gallium/winsys/sw/kms-dri/Android.mk     | 33 ++++++++++++++++++++
 8 files changed, 59 insertions(+), 11 deletions(-)
 create mode 100644 src/gallium/winsys/sw/kms-dri/Android.mk

-- 
2.17.1



More information about the mesa-dev mailing list