Re: [Mesa-dev] [PATCH v2 00/10] Map support for GBM bos

2014-04-08 Thread Ander Conselvan de Oliveira
, 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

Re: [Mesa-dev] [PATCH 01/10] gbm: Set errno on errors

2014-04-08 Thread Ander Conselvan de Oliveira
On 04/04/2014 01:37 PM, Emil Velikov wrote: On 04/04/14 09:36, Ander Conselvan de Oliveira wrote: From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com This should give the caller some information of what called the error. For the gbm_bo_import() case, for instance

Re: [Mesa-dev] [PATCH 05/10] gbm: Add a native intel backend

2014-04-08 Thread Ander Conselvan de Oliveira
On 04/04/2014 02:06 PM, Emil Velikov wrote: On 04/04/14 09:36, Ander Conselvan de Oliveira wrote: From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com A few minor nits inline. --- src/gbm/Makefile.am| 14 +- src/gbm/backends/intel/gbm_intel.c | 258

[Mesa-dev] [PATCH v3 00/11] Map support for GBM

2014-04-08 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com Changes from previous version: - make it clearer that the interface is optional; - fix other issues raised on the last review round. Thanks, Ander Ander Conselvan de Oliveira (10): gbm/dri: Fix out-of-memory error

[Mesa-dev] [PATCH 04/11] gbm: Move private pointer from gbm_dri_surface to gbm_surface

2014-04-08 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com This allows the pointer stored in dri2_surf in the EGL platform to be changed to a generic gbm_surface pointer. --- src/egl/drivers/dri2/egl_dri2.h | 2 +- src/egl/drivers/dri2/platform_drm.c | 37

[Mesa-dev] [PATCH 03/11] wayland: Fix the logic in disabling the prime capability

2014-04-08 Thread Ander Conselvan de Oliveira
From: Neil Roberts n...@linux.intel.com It looks like this bit of code is trying to disable the prime capability if the driver doesn't support createImageFromFds. However the logic looks a bit broken and what it would actually do is disable all other capabilities apart from prime. This patch

[Mesa-dev] [PATCH 05/11] egl: Protect use of gbm_dri with ifdef HAVE_DRM_PLATFORM

2014-04-08 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com Otherwise it fails to compile if the drm egl platform is disabled. Cc: 10.0 10.1 mesa-sta...@lists.freedesktop.org Reviewed-by: Emil Velikov emil.l.veli...@gmail.com --- src/egl/drivers/dri2/egl_dri2.c | 2 ++ 1 file

[Mesa-dev] [PATCH 11/11] gbm: Add entry points for mapping and unmapping bos

2014-04-08 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com Add gbm_bo_map() and gbm_bo_unmap(). This lets a user access the contents of a bo using the CPU. v2: - improve documentation to clarify this is an optional interface; - make gbm_bo_create() fail with ENOSYS

[Mesa-dev] [PATCH 10/11] egl/drm: Add support for native gbm backends

2014-04-08 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- src/egl/drivers/dri2/egl_dri2.c | 9 +- src/egl/drivers/dri2/egl_dri2.h | 3 +- src/egl/drivers/dri2/platform_drm.c | 217 ++-- src/gbm/main/common_drm.h | 6 + 4

[Mesa-dev] [PATCH 06/11] gbm: Add a native intel backend

2014-04-08 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com v2: - restore src/gbm/Makefile.am include that was deleted by mistake; - fix error path of gbm_intel_device_create(); - remove unused function align(). --- src/gbm/Makefile.am| 12 ++ src/gbm/backends

[Mesa-dev] [PATCH 07/11] gbm_drm: Keep a reference to drm native objects

2014-04-08 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com Add bo and bufmgr fields to gbm_drm_bo and gbm_drm_device respectively. --- src/gbm/backends/intel/gbm_intel.c | 4 src/gbm/main/common_drm.h | 6 ++ 2 files changed, 10 insertions(+) diff --git a/src/gbm

[Mesa-dev] [PATCH 08/11] dri, i965: Add an extension for sharing the drm bufmgr

2014-04-08 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com If the fd used by the DRI driver is going to be shared with something else, like gbm, this lets the loader pass the bufmgr struct so it is shared too. --- include/GL/internal/dri_interface.h | 11 +++ src/egl

[Mesa-dev] [PATCH 09/11] dri, i965: Add entry point for creating image from native handle

2014-04-08 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com The native handle is a pointer to drm_intel_bo for the i965 driver. --- include/GL/internal/dri_interface.h | 13 +++- src/mesa/drivers/dri/i965/intel_regions.c | 50 ++- src/mesa

[Mesa-dev] [PATCH 01/11] gbm/dri: Fix out-of-memory error path in dri_device_create()

2014-04-08 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com Cc: 10.0 10.1 mesa-sta...@lists.freedesktop.org --- src/gbm/backends/dri/gbm_dri.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c index 50fa588..f681836

[Mesa-dev] [PATCH 02/11] gbm: Set errno on errors

2014-04-08 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com This should give the caller some information of what called the error. For the gbm_bo_import() case, for instance, it is possible to know if the import is not supported or the error was caused by an invalid parameter

[Mesa-dev] [PATCH 01/10] gbm: Set errno on errors

2014-04-04 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com This should give the caller some information of what called the error. For the gbm_bo_import() case, for instance, it is possible to know if the import is not supported or the error was caused by an invalid parameter

[Mesa-dev] [PATCH 03/10] gbm: Move private pointer from gbm_dri_surface to gbm_surface

2014-04-04 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com This allows the pointer stored in dri2_surf in the EGL platform to be changed to a generic gbm_surface pointer. --- src/egl/drivers/dri2/egl_dri2.h | 2 +- src/egl/drivers/dri2/platform_drm.c | 37

[Mesa-dev] [PATCH v2 00/10] Map support for GBM bos

2014-04-04 Thread Ander Conselvan de Oliveira
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

[Mesa-dev] [PATCH 02/10] wayland: Fix the logic in disabling the prime capability

2014-04-04 Thread Ander Conselvan de Oliveira
From: Neil Roberts n...@linux.intel.com It looks like this bit of code is trying to disable the prime capability if the driver doesn't support createImageFromFds. However the logic looks a bit broken and what it would actually do is disable all other capabilities apart from prime. This patch

[Mesa-dev] [PATCH 06/10] gbm_drm: Keep a reference to drm native objects

2014-04-04 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com Add bo and bufmgr fields to gbm_drm_bo and gbm_drm_device respectively. --- src/gbm/backends/intel/gbm_intel.c | 4 src/gbm/main/common_drm.h | 6 ++ 2 files changed, 10 insertions(+) diff --git a/src/gbm

[Mesa-dev] [PATCH 05/10] gbm: Add a native intel backend

2014-04-04 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- src/gbm/Makefile.am| 14 +- src/gbm/backends/intel/gbm_intel.c | 258 + src/gbm/backends/intel/gbm_intel.h | 74 +++ src/gbm/main/backend.c | 2

[Mesa-dev] [PATCH 10/10] gbm: Add entry points for mapping and unmapping bos

2014-04-04 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com Add gbm_bo_map() and gbm_bo_unmap(). This lets a user access the contents of a bo using the CPU. --- src/gbm/backends/dri/gbm_dri.c | 3 +++ src/gbm/backends/intel/gbm_intel.c | 24 src/gbm

[Mesa-dev] [PATCH 09/10] egl/drm: Add support for native gbm backends

2014-04-04 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- src/egl/drivers/dri2/egl_dri2.c | 9 +- src/egl/drivers/dri2/egl_dri2.h | 3 +- src/egl/drivers/dri2/platform_drm.c | 217 ++-- src/gbm/main/common_drm.h | 6 + 4

[Mesa-dev] [PATCH 07/10] dri, i965: Add an extension for sharing the drm bufmgr

2014-04-04 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com If the fd used by the DRI driver is going to be shared with something else, like gbm, this lets the loader pass the bufmgr struct so it is shared too. --- include/GL/internal/dri_interface.h | 11 +++ src/egl

[Mesa-dev] [PATCH 04/10] egl: Protect use of gbm_dri with ifdef HAVE_DRM_PLATFORM

2014-04-04 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com Otherwise it fails to compile if the drm egl platform is disabled. --- src/egl/drivers/dri2/egl_dri2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c

[Mesa-dev] [PATCH 08/10] dri, i965: Add entry point for creating image from native handle

2014-04-04 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com The native handle is a pointer to drm_intel_bo for the i965 driver. --- include/GL/internal/dri_interface.h | 13 +++- src/mesa/drivers/dri/i965/intel_regions.c | 50 ++- src/mesa

[Mesa-dev] [PATCH] gbm: Set errno on errors

2014-03-25 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com This should give the caller some information of what called the error. For the gbm_bo_import() case, for instance, it is possible to know if the import is not supported or the error was caused by an invalid parameter

Re: [Mesa-dev] [PATCH 0/8] Native GBM backends and map/unmap support

2014-03-24 Thread Ander Conselvan de Oliveira
de Oliveira conselv...@gmail.com mailto:conselv...@gmail.com: From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com mailto:ander.conselvan.de.olive...@intel.com Hi, This patch series implements an API for mapping an unapping GBM buffer objects. The native

[Mesa-dev] [PATCH 2/8] egl: Protect use of gbm_dri with ifdef HAVE_DRM_PLATFORM

2014-03-13 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com Otherwise it fails to compile if the drm egl platform is disabled. --- src/egl/drivers/dri2/egl_dri2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c

[Mesa-dev] [PATCH 1/8] egl/drm: Rename dri2_egl_surface field gbm_surf to gbm_dri_surf

2014-03-13 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com It actually contains a pointer to a gbm_dri_surface, so use a more appropriate name. --- src/egl/drivers/dri2/egl_dri2.h | 2 +- src/egl/drivers/dri2/platform_drm.c | 6 +++--- 2 files changed, 4 insertions(+), 4

[Mesa-dev] [PATCH 7/8] egl/dri: Add gbm platform

2014-03-13 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com This adds a GBM platform that works with native gbm backends, such as the intel backend. --- configure.ac| 7 +- src/egl/drivers/dri2/Makefile.am| 5 + src/egl/drivers/dri2/egl_dri2.c

[Mesa-dev] [PATCH 0/8] Native GBM backends and map/unmap support

2014-03-13 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com Hi, This patch series implements an API for mapping an unapping GBM buffer objects. The native intel backend was implemented so that the map and unmap functionality wouldn't have to be implemented in the DRI image extension

[Mesa-dev] [PATCH 4/8] gbm_drm: Keep a reference to drm native objects

2014-03-13 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com Add bo and bufmgr fields to gbm_drm_bo and gbm_drm_device respectively. --- src/gbm/backends/intel/gbm_intel.c | 4 src/gbm/main/common_drm.h | 6 ++ 2 files changed, 10 insertions(+) diff --git a/src/gbm

[Mesa-dev] [PATCH 5/8] dri, i965: Add an extension for sharing the drm bufmgr

2014-03-13 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com If the fd used by the DRI driver is going to be shared with something else, like gbm, this lets the loader pass the bufmgr struct so it is shared too. --- include/GL/internal/dri_interface.h | 11 +++ src/egl

[Mesa-dev] [PATCH 6/8] dri, i965: Add entry point for creating image from native handle

2014-03-13 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com The native handle is a pointer to drm_intel_bo for the i965 driver. --- include/GL/internal/dri_interface.h | 13 +++- src/mesa/drivers/dri/i965/intel_regions.c | 50 ++- src/mesa

[Mesa-dev] [PATCH 8/8] gbm: Add entry points for mapping and unmapping bos

2014-03-13 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com Add gbm_bo_map() and gbm_bo_unmap(). This lets a user access the contents of a bo using the CPU. --- src/gbm/backends/dri/gbm_dri.c | 3 +++ src/gbm/backends/intel/gbm_intel.c | 24 src/gbm

[Mesa-dev] [PATCH 3/8] gbm: Add a native intel backend

2014-03-13 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- src/gbm/Makefile.am| 14 ++- src/gbm/backends/intel/gbm_intel.c | 241 + src/gbm/backends/intel/gbm_intel.h | 74 src/gbm/main/backend.c

[Mesa-dev] [PATCH v2 0/4] i965: refactor DRI image code

2014-02-18 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com Hi, This is an attempt to refactor the DRI image implementation in the i965. While the main motivation for this was to make it possible to compile that code independently, this also simplifies the format handling

[Mesa-dev] [PATCH 3/4] i965: Make names of DRI image extension functions more consistent

2014-02-18 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com Prefix everything with intel_dri_image. --- src/mesa/drivers/dri/i965/intel_screen.c | 116 --- 1 file changed, 59 insertions(+), 57 deletions(-) diff --git a/src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH 1/4] i965: Support allocation of subregions of an intel_region

2014-02-18 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com Both __DRIimage and intel_region have width and height fields. They actually differ when an image is created for a texture but are the same in all the other cases. For images created from a planar image, a special

[Mesa-dev] [PATCH 2/4] i965: Change intel_region interface to not depend on intelScreen

2014-02-18 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com The only field from intelScreen used by the intel_region code is the drm_intel_bufmgr, so take that as a parameter instead of the whole screen. --- src/mesa/drivers/dri/i965/brw_context.c | 2 +- src/mesa/drivers/dri

Re: [Mesa-dev] [PATCH] Don't use gbm_dri_device when its not there

2013-11-28 Thread Ander Conselvan de Oliveira
. */ if (dri2_dpy-gbm_dri) dri2_dpy-gbm_dri-wl_drm = dri2_dpy-wl_server_drm; +#endif return EGL_TRUE; } Reviewed-by: Ander Conselvan de Oliveira conselv...@gmail.com ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http

[Mesa-dev] [PATCH 0/4] Refactor i965 DRI image implementation

2013-11-27 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com Hi, The main motivation for this series is to split the image code out of intel_screen.c so that this could be compiled into a separate statically linked library that we could also use in GBM. The last patch is quite big

[Mesa-dev] [PATCH 3/4] i965: Make names of DRI image extension functions more consistent

2013-11-27 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com Prefix everything with intel_dri_image. --- src/mesa/drivers/dri/i965/intel_screen.c | 116 +++--- 1 file changed, 59 insertions(+), 57 deletions(-) diff --git a/src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH 1/4] i965: Support allocation of subregions of an intel_region

2013-11-27 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com Both __DRIimage and intel_region have width and height fields. They actually differ when an image is created for a texture but are the same in all the other cases. For images created from a planar image, a special

[Mesa-dev] [PATCH 2/4] i965: Change intel_region interface to not depend on intelScreen

2013-11-27 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com The only field from intelScreen used by the intel_region code is the drm_intel_bufmgr, so take that as a parameter instead of the whole screen. --- src/mesa/drivers/dri/i965/brw_context.c |2 +- src/mesa/drivers

[Mesa-dev] [PATCH 4/4] i965: Refactor DRI image code

2013-11-27 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com The DRI image extension gained a lot of new entry points lately. Some of the new additions have a slightly different signature. The planar image introduces the concept of an image without a format from which different well

[Mesa-dev] [PATCH] i965: Support allocation of subregions of an intel_region

2013-11-13 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com Both __DRIimage and intel_region have width and height fields. They actually differ when an image is created for a texture but are the same in all the other cases. For images created from a planar image, a special

[Mesa-dev] [PATCH] dri/i915, dri/i965: Fix support for planar images

2013-11-12 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com Planar images have format __DRI_IMAGE_FORMAT_NONE, but the patch that moved the conversion from dri_format to the mesa format made it impossible to allocate a image with that format. Signed-off-by: Ander Conselvan de

[Mesa-dev] [RFC] [PATCH 0/3] gbm: Add support for mapping bos

2013-11-05 Thread Ander Conselvan de Oliveira
be able to do the converse. That ability together with an entry point for creating a gbm_device for a given wl_display would be enough for making this available for any wayland client. Any comments on this will be highly appreciated. Thanks, Ander Ander Conselvan de Oliveira (3): gbm: Add intel

[Mesa-dev] [PATCH 2/3] egl/dri: Add gbm platform

2013-11-05 Thread Ander Conselvan de Oliveira
, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Authors: + *Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com + *Kristian Høgsberg k...@bitplanet.net + */ + +#include stdlib.h +#include stdio.h +#include string.h

[Mesa-dev] [PATCH 1/3] gbm: Add intel backend

2013-11-05 Thread Ander Conselvan de Oliveira
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Authors: + *Ander Conselvan de Oliveira ander.conselvan.de.olive

[Mesa-dev] [PATCH] wayland: Don't leak wl_drm global when unbinding display

2013-10-16 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- src/egl/wayland/wayland-drm/wayland-drm.c |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/egl/wayland/wayland-drm/wayland-drm.c b/src/egl/wayland/wayland-drm/wayland-drm.c index 06bd18c

[Mesa-dev] [PATCH v2] gallium-egl: Simplify native_wayland_drm_bufmgr_helper interface

2013-07-19 Thread Ander Conselvan de Oliveira
The helper provides a series of functions to easy the implementation of the WL_bind_wayland_display extension on different platforms. But even with the helpers there was still a bit of duplicated code between platforms, with the drm authentication being the only part that differs. This patch

[Mesa-dev] [PATCH v2] gallium-egl: Fix compiler warning due to mismatched prototype

2013-07-19 Thread Ander Conselvan de Oliveira
common/native_wayland_drm_bufmgr.c: In function 'wayland_drm_bufmgr_create': common/native_wayland_drm_bufmgr.c:204:30: warning: assignment from incompatible pointer type [enabled by default] --- src/gallium/state_trackers/egl/common/native_wayland_bufmgr.h | 8 +--- 1 file changed, 5

Re: [Mesa-dev] [PATCH mesa 1/3] gallium-egl: Simplify native_wayland_drm_bufmgr_helper interface

2013-07-19 Thread Ander Conselvan de Oliveira
On 07/18/2013 10:04 PM, Emil Velikov wrote: On 18/07/13 13:11, Ander Conselvan de Oliveira wrote: [...] +static EGLBoolean +wayland_drm_bufmgr_query_buffer(struct native_display *ndpy, +struct wl_buffer *_buffer, +EGLint

Re: [Mesa-dev] [PATCH mesa 0/3] Wayland: update to 1.2 server API

2013-07-19 Thread Ander Conselvan de Oliveira
On 07/18/2013 10:49 PM, Armin K. wrote: On 07/18/2013 02:11 PM, Ander Conselvan de Oliveira wrote: Hi, Wayland 1.2 server API changed a little bit. The change that affects mesa the most is the deprecation of struct wl_buffer. This series updates all EGL code to use the new API. The motivation

[Mesa-dev] [PATCH mesa 1/3] gallium-egl: Simplify native_wayland_drm_bufmgr_helper interface

2013-07-18 Thread Ander Conselvan de Oliveira
client and server code in the wayland drm platform source file. All the uses of libwayland-server are now contained in native_wayland_drm_bufmgr.c. Changes to the drm platform are only compile tested. Signed-off-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- src/gallium

[Mesa-dev] [PATCH mesa 2/3] gallium-egl: Don't add a listener for wl_drm twice in wayland platform

2013-07-18 Thread Ander Conselvan de Oliveira
A listener is added just after the interface is bound, in registry_handle_global(). Signed-off-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- src/gallium/state_trackers/egl/wayland/native_drm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/gallium

[Mesa-dev] [PATCH mesa 3/3] egl: Update to Wayland 1.2 server API

2013-07-18 Thread Ander Conselvan de Oliveira
-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- docs/specs/WL_bind_wayland_display.spec| 8 ++- include/EGL/eglmesaext.h | 6 +- src/egl/drivers/dri2/egl_dri2.c| 28 + src/egl/drivers/dri2/egl_dri2.h

Re: [Mesa-dev] [PATCH mesa] wayland: Disable prime support on buggy kernels

2013-05-10 Thread Ander Conselvan de Oliveira
On 05/08/2013 11:50 PM, Jonas Ådahl wrote: On Tue, Apr 23, 2013 at 3:54 PM, Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com wrote: Linux kernel 3.8 shipped with a bug in the prime fd passing code that makes it unreliable. As of this writing, it seems unlikely that 3.9

Re: [Mesa-dev] [PATCH mesa] wayland: Disable prime support on buggy kernels

2013-04-30 Thread Ander Conselvan de Oliveira
On 04/29/2013 07:15 PM, Kristian Høgsberg wrote: On Tue, Apr 23, 2013 at 9:54 AM, Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com wrote: Linux kernel 3.8 shipped with a bug in the prime fd passing code that makes it unreliable. As of this writing, it seems unlikely that 3.9

[Mesa-dev] [PATCH mesa] wayland: Disable prime support on buggy kernels

2013-04-23 Thread Ander Conselvan de Oliveira
Linux kernel 3.8 shipped with a bug in the prime fd passing code that makes it unreliable. As of this writing, it seems unlikely that 3.9 will contain the fix for the issue. This patch disable prime support when running on top of those kernels, in order to prevent unexpected behavior when running

Re: [Mesa-dev] [PATCH 2/3] Add dri image entry point for creating image from fd

2013-03-01 Thread Ander Conselvan de Oliveira
On 02/28/2013 03:52 AM, Kristian Høgsberg wrote: --- include/GL/internal/dri_interface.h| 14 +++- src/mesa/drivers/dri/intel/intel_regions.c | 33 +++ src/mesa/drivers/dri/intel/intel_regions.h | 6 src/mesa/drivers/dri/intel/intel_screen.c | 53

Re: [Mesa-dev] [PATCH 3/3] wayland: Add prime fd passing as a buffer sharing mechanism

2013-03-01 Thread Ander Conselvan de Oliveira
in them. Anyway, the series looks good to me, feel free to add my R-b, although you might want someone else to review the intel_screen.c changes too. I'm not that familiar with that code. Reviewed-by: Ander Conselvan de Oliveira conselv...@gmail.com Cheers, Ander

[Mesa-dev] [PATCH 9.0 stable branch] egl/wayland: Destroy the pending buffer callback with the egl surface

2013-01-21 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com Otherwise, we crash when the callback is executed, since the dri2_surf pointer may point to invalid data. --- The wayland EGL platform code was heavily changed in master for the implementation of the EGL_EXT_buffer_age

Re: [Mesa-dev] [PATCH 7/8] egl/wayland: Implement EGL_EXT_buffer_age

2012-12-20 Thread Ander Conselvan de Oliveira
The age of the buffers is not reset on dri2_release_buffers() or anywhere else, so after a resize the buffer age is not zero. I think we should set age to zero on get_back_bo() when the new buffer is allocated. Same thing for the gbm backend, although there this would be only for clarity,

[Mesa-dev] [PATCH mesa] egl/wayland: Don't invalidate drawable on swap buffers

2012-11-30 Thread Ander Conselvan de Oliveira
We used to invalidate the drawable after a call to eglSwapBuffers(), so that a wl_egl_window_resize() would take effect for the next frame. However, that leads to calling dri2_get_buffers() when eglMakeCurrent() is called with the current context and surface, and a later call to

Re: [Mesa-dev] __DRIimage sub-image v2 series

2012-07-11 Thread Ander Conselvan de Oliveira
On 07/10/2012 12:03 AM, Kristian Høgsberg wrote: Here's the patch series with Erics suggestion and comments incorporated, and I've also added support for the packed YUYV format in this version. The changes since last series boils down to: - Use __DRI_IMAGE_FORMAT_NONE when we create

Re: [Mesa-dev] [PATCH 07/11 v3] gbm: add handle2(drm buffer region name)

2012-06-19 Thread Ander Conselvan de Oliveira
On 06/14/2012 01:32 PM, Zhao Halley wrote: --- src/gbm/backends/dri/gbm_dri.c |6 +- src/gbm/main/gbm.c | 14 ++ src/gbm/main/gbm.h |3 +++ src/gbm/main/gbmint.h |1 + 4 files changed, 23 insertions(+), 1 deletions(-) mode

Re: [Mesa-dev] [PATCH] gbm: Add gbm_bo_write entry point

2012-05-03 Thread Ander Conselvan de Oliveira
-map_refcount; return -1; */ Did you intend to check for write usage here? Other than this, Reviewed-by: Ander Conselvan de Oliveira conselv...@gmail.com ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo

[Mesa-dev] [PATCH v2] intel: set dri_format field for all images

2012-04-30 Thread Ander Conselvan de Oliveira
Only images created with intel_create_image() had the field properly set. Set it also on intel_dup_image(), intel_create_image_from_name() and intel_create_image_from_renderbuffer(). --- Changed patch to also handle format 565 in intel_create_image_from_renderbuffer(). I'm not sure where would be

[Mesa-dev] [PATCH 0/4] gbm: add more interfaces

2012-04-30 Thread Ander Conselvan de Oliveira
Hi, This series adds a couple of new functions to gbm. The motivation for these is to be able to reuse the kms fb objects on weston, instead of creating and destroying them once for every frame. Ander Conselvan de Oliveira (4): gbm: remove unused fields from gbm_dri_surface gbm: add

[Mesa-dev] [PATCH 1/4] gbm: remove unused fields from gbm_dri_surface

2012-04-30 Thread Ander Conselvan de Oliveira
--- src/gbm/backends/dri/gbm_driint.h |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/src/gbm/backends/dri/gbm_driint.h b/src/gbm/backends/dri/gbm_driint.h index 3b7db65..f404368 100644 --- a/src/gbm/backends/dri/gbm_driint.h +++ b/src/gbm/backends/dri/gbm_driint.h @@

[Mesa-dev] [PATCH 2/4] gbm: add gbm_bo_get/set_user_data()

2012-04-30 Thread Ander Conselvan de Oliveira
This allows the user to associate some data to a gbm_bo and get a callback when the bo is destroyed. --- src/gbm/main/gbm.c| 32 src/gbm/main/gbm.h|7 +++ src/gbm/main/gbmint.h |2 ++ 3 files changed, 41 insertions(+), 0 deletions(-) diff

[Mesa-dev] [PATCH 3/4] gbm: update documentation to reflect current behavior

2012-04-30 Thread Ander Conselvan de Oliveira
--- src/gbm/main/gbm.c | 18 ++ 1 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/gbm/main/gbm.c b/src/gbm/main/gbm.c index 0871905..be6bc66 100644 --- a/src/gbm/main/gbm.c +++ b/src/gbm/main/gbm.c @@ -389,10 +389,11 @@ gbm_surface_destroy(struct gbm_surface

[Mesa-dev] [PATCH 4/4] gbm: add gbm_bo_get_device() function

2012-04-30 Thread Ander Conselvan de Oliveira
--- src/gbm/main/gbm.c | 11 +++ src/gbm/main/gbm.h |3 +++ 2 files changed, 14 insertions(+), 0 deletions(-) diff --git a/src/gbm/main/gbm.c b/src/gbm/main/gbm.c index be6bc66..09be1c3 100644 --- a/src/gbm/main/gbm.c +++ b/src/gbm/main/gbm.c @@ -231,6 +231,17 @@

Re: [Mesa-dev] about EGL_MESA_no_surface extension

2012-04-30 Thread Ander Conselvan de Oliveira
On 04/30/2012 12:26 PM, Cooper Yuan wrote: Wayland is using EGL_MESA_no_surface extension, unfortunately I can't find any page describing it, anyone could forward/paste some text about this extension? Thanks! Don't you mean EGL_KHR_surfaceless? Recently gbm and Weston were changed to not use

Re: [Mesa-dev] about EGL_MESA_no_surface extension

2012-04-30 Thread Ander Conselvan de Oliveira
On 04/30/2012 02:10 PM, Cooper Yuan wrote: Yes, That's good: Recently gbm and Weston were changed to not use this extension anymore. BTW, who is working on personal git to remove this extension from weston? It is weston master already. ___ mesa-dev

[Mesa-dev] [PATCH 1/2] intel: properly return the image format on intel_query_image

2012-04-26 Thread Ander Conselvan de Oliveira
--- src/mesa/drivers/dri/intel/intel_screen.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c index e823792..ac21e96 100644 --- a/src/mesa/drivers/dri/intel/intel_screen.c +++

[Mesa-dev] [PATCH 2/2] intel: set dri_format field for all images

2012-04-26 Thread Ander Conselvan de Oliveira
Only images created with intel_create_image() had the field properly set. Set it also on intel_dup_image(), intel_create_image_from_name() and intel_create_image_from_renderbuffer(). --- src/mesa/drivers/dri/intel/intel_screen.c | 15 +++ 1 files changed, 15 insertions(+), 0