Re: Sprite handling framework

2012-01-25 Thread Kristian Høgsberg
2012/1/25 Kristian Høgsberg : > On Wed, Jan 25, 2012 at 5:00 PM, Jesse Barnes > wrote: >> Ok these need some actual review.  I have things working here (you can >> test on a current kernel by enabling the DEBUG_PLANES code) and I think >> the infrastructure is starting to look ok, especially now

Re: Sprite handling framework

2012-01-25 Thread Kristian Høgsberg
On Wed, Jan 25, 2012 at 5:00 PM, Jesse Barnes wrote: > Ok these need some actual review.  I have things working here (you can > test on a current kernel by enabling the DEBUG_PLANES code) and I think > the infrastructure is starting to look ok, especially now that I don't > leak fbs on every assig

Re: [PATCH 1/3] compositor: add an plane assignment hook

2012-01-25 Thread Kristian Høgsberg
On Wed, Jan 25, 2012 at 5:00 PM, Jesse Barnes wrote: > Each output may have ways of optimizing surface drawing (e.g. by using > sprites), so push the handling of surface assignment to display planes > into the output structure, providing the existing surface setup function > as a helper. > --- >  

[PATCH 3/3] compositor: unify plane and output handling

2012-01-25 Thread Jesse Barnes
Plane and output handling are mostly the same; they both create fbs for display and then assign them to either the primary or one of the overlay planes. So unify them using a new drm_buffer_reference object, making the plane handling code work much better. --- src/compositor-drm.c | 411

[PATCH 1/3] compositor: add an plane assignment hook

2012-01-25 Thread Jesse Barnes
Each output may have ways of optimizing surface drawing (e.g. by using sprites), so push the handling of surface assignment to display planes into the output structure, providing the existing surface setup function as a helper. --- configure.ac |2 +- src/compositor-drm.c | 19

[PATCH 2/3] compositor: move scanout handling to compositor-drm

2012-01-25 Thread Jesse Barnes
Much of the scanout handling code is only used by the DRM compositor, so move it over to make it easier to add the sprite handling changes. --- src/compositor-drm.c | 44 +++- src/compositor.c | 30 +- src/compositor.h

Sprite handling framework

2012-01-25 Thread Jesse Barnes
Ok these need some actual review. I have things working here (you can test on a current kernel by enabling the DEBUG_PLANES code) and I think the infrastructure is starting to look ok, especially now that I don't leak fbs on every assignment. :) The new buffer reference code makes things a bit ni

Re: [PATCH v2 01/11] gbm: fix copy & paste error in gbm_bo_get_handle documentation

2012-01-25 Thread Kristian Høgsberg
On Wed, Jan 25, 2012 at 9:24 AM, Ander Conselvan de Oliveira wrote: Thanks, committed this one. Kristian >  src/gbm/main/gbm.c |    2 +- >  1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/src/gbm/main/gbm.c b/src/gbm/main/gbm.c > index 3e24c4a..03fc52b 100644 > --- a/src/gbm/ma

[PATCH] compositor-drm: render to a gbm_surface instead of renderbuffers

2012-01-25 Thread Ander Conselvan de Oliveira
Signed-off-by: Ander Conselvan de Oliveira --- src/compositor-drm.c | 233 ++--- 1 files changed, 124 insertions(+), 109 deletions(-) diff --git a/src/compositor-drm.c b/src/compositor-drm.c index 1f30e7b..05dfcdd 100644 --- a/src/compositor-drm.c +

[PATCH v2 11/11] gbm: add gbm_surface_has_free_buffers and implement it in dri backend

2012-01-25 Thread Ander Conselvan de Oliveira
--- src/egl/drivers/dri2/platform_drm.c | 13 + src/gbm/backends/dri/gbm_dri.c | 12 src/gbm/backends/dri/gbm_driint.h |1 + src/gbm/main/gbm.c | 12 src/gbm/main/gbm.h |3 +++ src/gbm/main/gbmint.h

[PATCH v2 10/11] egl_dri2: add triple buffering support to drm platform

2012-01-25 Thread Ander Conselvan de Oliveira
--- src/egl/drivers/dri2/egl_dri2.h | 11 + src/egl/drivers/dri2/platform_drm.c | 82 ++- 2 files changed, 92 insertions(+), 1 deletions(-) diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h index 20945c1..fc31364 100644 ---

[PATCH v2 09/11] gbm: add a release_buffer callback to dri backend

2012-01-25 Thread Ander Conselvan de Oliveira
This adds a mechanism for the egl platform code to be notified when the user releases a surface buffer that was previously locked with gbm_surface_lock_front_buffer(). --- src/gbm/backends/dri/gbm_dri.c|8 src/gbm/backends/dri/gbm_driint.h |2 ++ 2 files changed, 10 insertions

[PATCH v2 08/11] gbm: implement gbm_surface_lock_front_buffer in dri backend

2012-01-25 Thread Ander Conselvan de Oliveira
--- src/egl/drivers/dri2/platform_drm.c | 11 src/gbm/backends/dri/gbm_dri.c | 45 ++- src/gbm/backends/dri/gbm_driint.h |1 + 3 files changed, 56 insertions(+), 1 deletions(-) diff --git a/src/egl/drivers/dri2/platform_drm.c b/src/egl/driv

[PATCH v2 07/11] egl_dri2: implement get_buffers and swap_buffers in drm platform

2012-01-25 Thread Ander Conselvan de Oliveira
--- src/egl/drivers/dri2/platform_drm.c | 153 ++- 1 files changed, 152 insertions(+), 1 deletions(-) diff --git a/src/egl/drivers/dri2/platform_drm.c b/src/egl/drivers/dri2/platform_drm.c index 6ec63c1..bafaa22 100644 --- a/src/egl/drivers/dri2/platform_drm.c ++

[PATCH v2 06/11] gbm: creates hooks for dri2_loader_extension in dri backend

2012-01-25 Thread Ander Conselvan de Oliveira
--- src/gbm/backends/dri/gbm_dri.c| 53 - src/gbm/backends/dri/gbm_driint.h | 17 +++- 2 files changed, 68 insertions(+), 2 deletions(-) diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c index 6f6b00d..ec2c572 100644 -

[PATCH v2 05/11] egl_dri2: use gbm_surface as the native window type in drm platform

2012-01-25 Thread Ander Conselvan de Oliveira
--- src/egl/drivers/dri2/egl_dri2.h |7 +++ src/egl/drivers/dri2/platform_drm.c | 100 ++- 2 files changed, 106 insertions(+), 1 deletions(-) diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h index 84ea0b6..20945c1 100644 --- a

[PATCH v2 04/11] gbm: implement basic gbm_surface on dri backend

2012-01-25 Thread Ander Conselvan de Oliveira
Make gbm_surface_create return something that the drm egl platform can use. --- src/gbm/backends/dri/gbm_dri.c| 16 +++- src/gbm/backends/dri/gbm_driint.h | 10 ++ 2 files changed, 25 insertions(+), 1 deletions(-) diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/b

[PATCH v2 03/11] egl_dri2: make flush extension useable by drm platform

2012-01-25 Thread Ander Conselvan de Oliveira
--- src/egl/drivers/dri2/platform_drm.c |1 + src/gbm/backends/dri/gbm_dri.c |1 + src/gbm/backends/dri/gbm_driint.h |1 + 3 files changed, 3 insertions(+), 0 deletions(-) diff --git a/src/egl/drivers/dri2/platform_drm.c b/src/egl/drivers/dri2/platform_drm.c index 3dc2c40..bd3

[PATCH v2 02/11] gbm: add gbm_surface interface

2012-01-25 Thread Ander Conselvan de Oliveira
The implementation is empty for now, but the idea here is to be able to create an egl window surface from a gbm_surface and let the EGL platform handle buffer allocation but keeping the user in charge of page flipping. gbm_surface_lock_front_buffer() locks a surface's front buffer and returns a bo

[PATCH v2 01/11] gbm: fix copy & paste error in gbm_bo_get_handle documentation

2012-01-25 Thread Ander Conselvan de Oliveira
--- src/gbm/main/gbm.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/gbm/main/gbm.c b/src/gbm/main/gbm.c index 3e24c4a..03fc52b 100644 --- a/src/gbm/main/gbm.c +++ b/src/gbm/main/gbm.c @@ -211,7 +211,7 @@ gbm_bo_get_pitch(struct gbm_bo *bo) * the format of this ha

[PATCH v2 00/11] gbm_surface

2012-01-25 Thread Ander Conselvan de Oliveira
Here's a second version of the gbm surface patchs. Changes in v2: o documented the new functions o renamed gbm_surface_get_bo() and gbm_surface_release_bo() to gbm_surface_lock_front_buffer() and gbm_surface_release_buffer() o change the locks on egl drm from 0-1 variable to counters to proper