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

2014-04-08 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira 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. --- src/gbm/backends/dri/gbm_dri.c | 36

[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 Cc: "10.0" "10.1" --- 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 100644 --- a/src/gbm/backends/dri/gbm_dri.c ++

[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 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/drivers/dri2/egl_dri2.h | 3

[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 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/drivers/dri/i965/intel_regions.h | 6

[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 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/backends/intel/gbm_intel.c b/src/gbm

[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 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 if the GBM_BO_USE_MAP flag was supplied and

[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 --- 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 files changed, 200 insertions(+), 35

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

2014-04-08 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira 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/intel/gbm_intel.c | 254

[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 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 fixes it to actually disa

[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 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 - src/gbm/backends/dri

[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 Otherwise it fails to compile if the drm egl platform is disabled. Cc: "10.0" "10.1" Reviewed-by: Emil Velikov --- src/egl/drivers/dri2/egl_dri2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/egl/drivers/dri2/egl_dri2.c b/

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

2014-04-08 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira 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 path in dri_device_create() gbm: Set

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 A few minor nits inline. --- src/gbm/Makefile.am| 14 +- src/gbm/backends/intel/gbm_intel.c | 258

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 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

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

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

[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 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/drivers/dri/i965/intel_regions.h | 6

[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 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/drivers/dri2/egl_dri2.h | 3

[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 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/backends/intel/gbm_intel.h | 2 ++ src

[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 --- 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 files changed, 200 insertions(+), 35

[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 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/backends/intel/gbm_intel.c b/src/gbm

[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 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 index 8abe8ac..a5ba048 100644 --- a

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

2014-04-04 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira --- 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 + src/gbm/main/common_drm.h

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

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

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

2014-04-04 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira 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. --- src/gbm/backends/dri/gbm_dri.c | 38

[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 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 - src/gbm/backends/dri

[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 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 fixes it to actually disa

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

2014-03-25 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira 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. --- src/gbm/backends/dri/gbm_dri.c | 38

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

2014-03-24 Thread Ander Conselvan de Oliveira
Conselvan de Oliveira mailto:conselv...@gmail.com>>: From: Ander Conselvan de Oliveira mailto: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 implement

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

2014-03-13 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira --- 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 | 2 + src/gbm/main/common_drm.h

[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 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/backends/intel/gbm_intel.h | 2 ++ src

[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 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/drivers/dri/i965/intel_regions.h | 6

[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 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/backends/intel/gbm_intel.c b/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 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/drivers/dri2/egl_dri2.h | 3

[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 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. A new EGL platform is nece

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

2014-03-13 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira 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 | 6 + src/egl/drivers/dri2/egl_dri2.h

[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 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 index 892f1f4..2e8f01b 100644 --- a

[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 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 deletions(-) diff --git a/src/egl/drivers

[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 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/i965/intel_mipmap_tree.c | 4

[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 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 intel_region that represents only a part of the

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

2014-02-18 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira 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 (there is one less format field in __DRIimageRec

[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 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/intel_screen.c b/src/mesa/drivers/dri/i965

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

2013-11-28 Thread Ander Conselvan de Oliveira
bos. */ 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 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.

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

2013-11-27 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira 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 structured images can be created. The

[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 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/i965/intel_mipmap_tree.c |4

[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 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 intel_region that represents only a part of the

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

2013-11-27 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira 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, but I couldn't figure out a w

[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 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/intel_screen.c b/src/mesa/drivers/dri/i965

[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 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 intel_region that represents only a part of the

[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 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 Oliveira --- src/mesa/drivers/dri/i915

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

2013-11-05 Thread Ander Conselvan de Oliveira
Add gbm_bo_map() and gbm_bo_unmap(). This lets a user access the contents of a bo using the CPU. --- I'm not sure about the extra flags. We do have GBM_BO_USE_WRITE but that is defined to always work with GBM_BO_USE_CURSOR_64X64. Reusing that would imply that these buffers are always mappable or

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

2013-11-05 Thread Ander Conselvan de Oliveira
SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS 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

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

2013-11-05 Thread Ander Conselvan de Oliveira
LUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, A

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

2013-11-05 Thread Ander Conselvan de Oliveira
hat it would 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):

[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 --- 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..2f5acb2 100644 --- a/src/egl

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

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

[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 inserti

[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 chang

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

2013-07-18 Thread Ander Conselvan de Oliveira
: Ander Conselvan de Oliveira --- 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| 1 - src/egl/main

[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 --- src/gallium/state_trackers/egl/wayland/native_drm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/gallium/state_trackers/egl/wayland/native_drm.c b/src

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

2013-07-18 Thread Ander Conselvan de Oliveira
of Wayland 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 --- src/gallium/state_trackers/egl/M

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

2013-07-18 Thread Ander Conselvan de Oliveira
gallium egl. Even though struct wl_buffer is deprecated on the server side, occurences of it on the client side are still valid, but due to the mix of APIs that would cause warnings. In the process of doing that some code duplication is removed. Cheers, Ander Ander Conselvan de Oliveira (3): gallium

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 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 will contain the fix for the issue. This

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 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 will contain the fix for the issue

[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 3/3] wayland: Add prime fd passing as a buffer sharing mechanism

2013-03-01 Thread Ander Conselvan de Oliveira
hose files. Indent is done both ways 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 C

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 ++

[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 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 extension, so this bug does not exist

Re: [Mesa-dev] [PATCH v2 3/3] egl/wayland: Implement EGL_EXT_buffer_age

2013-01-14 Thread Ander Conselvan de Oliveira
ri2_dpy) @@ -697,6 +719,7 @@ dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp) } disp->Extensions.WL_bind_wayland_display = EGL_TRUE; + disp->Extensions.EXT_buffer_age = EGL_TRUE; dri2_dpy->authenticate = dri2_wayland_authenticate; /* we're supporting EGL 1.4

Re: [Mesa-dev] [PATCH v2 2/3] egl/wayland: Pull color buffers from dri2_surf->color_buffers pool

2013-01-14 Thread Ander Conselvan de Oliveira
[WL_BUFFER_THIRD]) - wl_buffer_destroy(dri2_surf->wl_drm_buffer[WL_BUFFER_THIRD]); - dri2_surf->wl_drm_buffer[WL_BUFFER_THIRD] = NULL; - dri2_surf->wl_buffer_lock[WL_BUFFER_THIRD] = 0; -} + if (dri2_surf->back == NULL) + return -1; + if (dri2_surf->bac

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, since

Re: [Mesa-dev] [PATCH 6/8] egl/wayland: Pull color buffers from dri2_surf->color_buffers pool

2012-12-20 Thread Ander Conselvan de Oliveira
2012/12/14 Kristian Høgsberg > We used to keep the color buffers in the dri_buffers array and > swap __DRI_BUFFER_BACK_LEFT and __DRI_BUFFER_FRONT_LEFT around there > and swap third_buffer in in case we needed to triple buffer. That > gets a little fidgety with all the swaps, so lets use the > c

[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 wl_egl_window_resiz

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 a

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 cha

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

2012-05-03 Thread Ander Conselvan de Oliveira
-1; + /* if use != WRITE || region->map_refcount; return -1; */ Did you intend to check for write usage here? Other than this, Reviewed-by: Ander Conselvan de Oliveira ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

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

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 t

[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 @@ gbm_bo_get_handle(s

[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 *su

[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 --g

[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 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 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 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 deletion

[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 +++ b/src/me