Re: [Libva] [PATCH intel-driver v2 3/3] extbuf: add support for userptr imports.

2015-04-02 Thread Emil Velikov
Hi gents, Just a small suggestion On 2 April 2015 at 22:29, Chris Wilson wrote: > On Thu, Apr 02, 2015 at 04:30:24PM +0200, Gwenole Beauchesne wrote: ... >> diff --git a/configure.ac b/configure.ac >> index d71a3cc..3c19cd2 100644 >> --- a/configure.ac >> +++ b/configure.ac >> @@ -76,6 +76,25 @@

Re: [Libva] [PATCH intel-driver v2 3/3] extbuf: add support for userptr imports.

2015-04-02 Thread Chris Wilson
[cc'ed Trvtko since he is looking into the libdrm API for userptr and associated issues.] On Thu, Apr 02, 2015 at 04:30:24PM +0200, Gwenole Beauchesne wrote: > Allow creating VA surfaces with userptr allocated buffers. This requires > a recent enough version of libdrm (>= 2.4.57), but also a kerne

[Libva] [PATCH intel-driver v2 3/3] extbuf: add support for userptr imports.

2015-04-02 Thread Gwenole Beauchesne
Allow creating VA surfaces with userptr allocated buffers. This requires a recent enough version of libdrm (>= 2.4.57), but also a kernel (>= 3.16) which contains appropriate fixes for userptr. v2: only request synchronized mappings (Chris Wilson). Signed-off-by: Gwenole Beauchesne --- configur

[Libva] [PATCH intel-driver v2 0/3] Add support for userptr

2015-04-02 Thread Gwenole Beauchesne
Hi, This patch series allows for importing userptr memory buffers into VA surfaces. This requires a recent enough libdrm version (>= 2.4.57) and also kernel (>= 3.16) with appropriate userptr fixes. The capabilities are tentatively checked for at run-time. Regards, Gwenole Beauchesne (3): extbu

[Libva] [PATCH intel-driver v2 1/3] extbuf: fix possible buffer overflow.

2015-04-02 Thread Gwenole Beauchesne
Fix possible buffer overflow when addressing the array of buffer handles to be imported into VA surfaces. Signed-off-by: Gwenole Beauchesne --- src/i965_drv_video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c index e2abc1b..0b04

[Libva] [PATCH intel-driver v2 2/3] extbuf: validate surface memory type.

2015-04-02 Thread Gwenole Beauchesne
Shuffle the internal memory type ids by one, and turn them into clean enum values. Also make sure to validate the VA surface memory type early enough. Signed-off-by: Gwenole Beauchesne --- src/i965_drv_video.c | 5 + src/i965_drv_video.h | 8 +--- 2 files changed, 10 insertions(+), 3 del

Re: [Libva] [PATCH 3/3] extbuf: add support for userptr imports.

2015-04-02 Thread Chris Wilson
On Thu, Apr 02, 2015 at 03:28:20PM +0200, Gwenole Beauchesne wrote: > +drm_intel_bo * > +do_import_userptr(struct intel_driver_data *intel, const char *name, > +void *data, size_t data_size, uint32_t va_flags) > +{ > +#ifdef HAVE_DRM_INTEL_USERPTR > +uint32_t page_size, tiling_mode, flags =

[Libva] [PATCH 3/3] extbuf: add support for userptr imports.

2015-04-02 Thread Gwenole Beauchesne
Allow creating VA surfaces with userptr allocated buffers. This requires a recent enough version of libdrm (>= 2.4.57), but also a kernel (>= 3.16) which contains appropriate fixes for userptr. Signed-off-by: Gwenole Beauchesne --- configure.ac | 19 src/i965_drv_video.c | 8

[Libva] [PATCH 0/3] Add support for userptr

2015-04-02 Thread Gwenole Beauchesne
Hi, This patch series allows for importing userptr memory buffers into VA surfaces. This requires a recent enough libdrm version (>= 2.4.57) and also kernel (>= 3.16) with appropriate userptr fixes. The capabilities are tentatively checked for at run-time. Regards, Gwenole Beauchesne (3): extbu

[Libva] [PATCH 2/3] extbuf: validate surface memory type.

2015-04-02 Thread Gwenole Beauchesne
Shuffle the internal memory type ids by one, and turn them into clean enum values. Also make sure to validate the VA surface memory type early enough. Signed-off-by: Gwenole Beauchesne --- src/i965_drv_video.c | 5 + src/i965_drv_video.h | 8 +--- 2 files changed, 10 insertions(+), 3 del

[Libva] [PATCH 1/3] extbuf: fix possible buffer overflow.

2015-04-02 Thread Gwenole Beauchesne
Fix possible buffer overflow when addressing the array of buffer handles to be imported into VA surfaces. Signed-off-by: Gwenole Beauchesne --- src/i965_drv_video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c index e2abc1b..0b04