On 04/04/2014 01:20 PM, Thomas Hellstrom wrote:
NAK!
No generic mmap() APIs of GBM bos, please.
The reason is that this impossible to implement in an efficient way on
non-coherent architectures, and once the interface is there, people will
start using it and ignore the non-coherent architectures. And these
will, in the end, have to implement a horrendous solution to this problem.
I didn't make it clear enough that the interface is optional. I'll send
another version that makes that more evident. One thing to note is that
this doesn't implement support for map in the default gbm backend (dri).
Users need a bit of a special setup to be able to use the new API.
Anyway, comments on how to improve the interface would be really
welcome. I understand that for non-coherent architectures one would need
at least read and write flags and damage reporting, is that right?
Thanks,
Ander
This problem has been discussed on the dri-devel list, linaro-mm-sig and
on the mesa-list before when the Mir developers
attempted to add another variant of an mmap interface.
/Thomas
On 04/04/2014 10:36 AM, Ander Conselvan de Oliveira wrote:
From: Ander Conselvan de Oliveira <ander.conselvan.de.olive...@intel.com>
Changes from previous version:
- removed the extra gbm egl platform;
- set errno to ENOSYS when the map/unmap capability is not implemented.
Thanks,
Ander
Ander Conselvan de Oliveira (9):
gbm: Set errno on errors
gbm: Move private pointer from gbm_dri_surface to gbm_surface
egl: Protect use of gbm_dri with ifdef HAVE_DRM_PLATFORM
gbm: Add a native intel backend
gbm_drm: Keep a reference to drm native objects
dri, i965: Add an extension for sharing the drm bufmgr
dri, i965: Add entry point for creating image from native handle
egl/drm: Add support for native gbm backends
gbm: Add entry points for mapping and unmapping bos
Neil Roberts (1):
wayland: Fix the logic in disabling the prime capability
include/GL/internal/dri_interface.h | 24 ++-
src/egl/drivers/dri2/egl_dri2.c | 11 +-
src/egl/drivers/dri2/egl_dri2.h | 8 +-
src/egl/drivers/dri2/platform_drm.c | 252 ++++++++++++++++++++------
src/egl/drivers/dri2/platform_wayland.c | 2 +-
src/gbm/Makefile.am | 14 +-
src/gbm/backends/dri/gbm_dri.c | 49 +++--
src/gbm/backends/dri/gbm_driint.h | 2 -
src/gbm/backends/intel/gbm_intel.c | 286 ++++++++++++++++++++++++++++++
src/gbm/backends/intel/gbm_intel.h | 76 ++++++++
src/gbm/main/backend.c | 2 +
src/gbm/main/common_drm.h | 13 ++
src/gbm/main/gbm.c | 56 +++++-
src/gbm/main/gbm.h | 10 ++
src/gbm/main/gbmint.h | 4 +
src/mesa/drivers/dri/common/dri_util.c | 2 +
src/mesa/drivers/dri/common/dri_util.h | 1 +
src/mesa/drivers/dri/i965/intel_regions.c | 50 +++---
src/mesa/drivers/dri/i965/intel_regions.h | 6 +
src/mesa/drivers/dri/i965/intel_screen.c | 46 ++++-
20 files changed, 807 insertions(+), 107 deletions(-)
create mode 100644 src/gbm/backends/intel/gbm_intel.c
create mode 100644 src/gbm/backends/intel/gbm_intel.h
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev