Re: [Mesa-dev] [PATCH] st/dri: Add support for PIPE_FORMAT_RGBX8888_UNORM

2017-06-19 Thread Varad Gautam
se __DRI_IMAGE_FORMAT_XBGR: > + pf = PIPE_FORMAT_RGBX_UNORM; > + break; > case __DRI_IMAGE_FORMAT_ABGR8888: >pf = PIPE_FORMAT_RGBA_UNORM; >break; Reviewed-by: Varad Gautam <varadgau...@gmail.com> > -- > 2.13.1.518.g3d

[Mesa-dev] [PATCH v2] i965: Add tiling mode to BO import

2017-06-06 Thread Varad Gautam
From: Daniel Stone <dani...@collabora.com> When importing a dmabuf, verify that the tiling mode matches what was expected. v2: rebase to 'i965: Improve same-buffer restriction for imports' v2. Signed-off-by: Daniel Stone <dani...@collabora.com> Signed-off-by: Varad Gautam <varadg

[Mesa-dev] [PATCH v2] i965: Improve same-buffer restriction for imports

2017-06-06 Thread Varad Gautam
; Signed-off-by: Varad Gautam <varad.gau...@collabora.com> --- src/mesa/drivers/dri/i965/intel_screen.c | 50 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c inde

[Mesa-dev] [PATCH v3] i965: Support dmabuf import with modifiers

2017-06-06 Thread Varad Gautam
for imports' v2 Signed-off-by: Varad Gautam <varadgau...@gmail.com> Signed-off-by: Daniel Stone <dani...@collabora.com> --- src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 6 ++ src/mesa/drivers/dri/i965/intel_screen.c | 114 +++--- 2 files changed, 107 inser

Re: [Mesa-dev] [PATCH v14 15/36] i965: Improve same-buffer restriction for imports

2017-06-05 Thread Varad Gautam
Hi Daniel, On Mon, 2017-06-05 at 14:53 +0100, Daniel Stone wrote: > Hi Varad, > > On 30 May 2017 at 12:53, Varad Gautam <varadgau...@gmail.com> wrote: > > > > +   /* We only support all planes from the same bo. > > +* brw_bo_gem_create_from_prime() shoul

[Mesa-dev] [PATCH v14 29/36] i965: Add new resolve hints full and partial

2017-05-30 Thread Varad Gautam
From: Ben Widawsky Upper layers of the code will have the need to specify full or partial resolves (more on this in the next patch). This code simply adds the new enums and plumbs it in as minimally as necessary. Signed-off-by: Ben Widawsky Acked-by:

[Mesa-dev] [PATCH v14 34/36] i965: Add tiling mode to BO import

2017-05-30 Thread Varad Gautam
From: Daniel Stone <dani...@collabora.com> When importing a dmabuf, verify that the tiling mode matches what was expected. Signed-off-by: Daniel Stone <dani...@collabora.com> Signed-off-by: Varad Gautam <varadgau...@gmail.com> --- src/mesa/drivers/dri/i965/brw_bufmgr.c | 12

[Mesa-dev] [PATCH v14 33/36] i965: Handle compression modifier

2017-05-30 Thread Varad Gautam
From: Ben Widawsky v2: Rename modifier to be more smart (Jason) FINISHME: Use the kernel's final choice for the fb modifier bwidawsk@norris2:~/intel-gfx/kmscube (modifiers $) ~/scripts/measure_bandwidth.sh ./kmscube none Read bandwidth: 603.91 MiB/s Write bandwidth: 615.28

[Mesa-dev] [PATCH v14 36/36] i965: Add format/modifier advertising

2017-05-30 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> v2: Rebase and reuse tiling/modifier map. (Daniel Stone) v3: bump DRIimageExtension to version 15, fill external_only array. Signed-off-by: Varad Gautam <varadgau...@gmail.com> Signed-off-by: Daniel Stone <dani...@collabora.com

[Mesa-dev] [PATCH v14 35/36] i965: Support dmabuf import with modifiers

2017-05-30 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> Add support for createImageFromDmaBufs2, adding a modifier to the original, and allow importing CCS resources with auxiliary data from dmabufs. v2: avoid DRIimageExtension version bump, pass single modifier to createImageFromDmaBufs2.

[Mesa-dev] [PATCH v14 20/36] i965: Restructure CCS disabling

2017-05-30 Thread Varad Gautam
From: Ben Widawsky Make the code only disable CCS when it has to, unlike before where it disabled CCS and enabled it when it could. This is much more inline with how it should work in a few patches, where we have fewer restrictions as to when we disable CCS. v2: Change CCS

[Mesa-dev] [PATCH v14 28/36] i965: Plumb resolve hints from miptrees to blorp

2017-05-30 Thread Varad Gautam
From: Ben Widawsky Signed-off-by: Ben Widawsky Acked-by: Daniel Stone Reviewed-by: Topi Pohjolainen --- src/mesa/drivers/dri/i965/brw_blorp.c | 3 ++- src/mesa/drivers/dri/i965/brw_blorp.h

[Mesa-dev] [PATCH v14 30/36] i965: Use partial resolves for CCS buffers being scanned out

2017-05-30 Thread Varad Gautam
From: Ben Widawsky On Gen9 hardware, the display engine is able to scanout a compressed framebuffer by providing an offset to auxiliary compression information. Unfortunately, the hardware is incapable of doing the same thing for the fast clear color. To mitigate this, the

[Mesa-dev] [PATCH v14 26/36] i965: Pretend that CCS modified images are two planes

2017-05-30 Thread Varad Gautam
From: Ben Widawsky v2: move is_aux into if block. (Jason) Use else block instead of goto (Jason) v3: Fix up logic for is_aux (Ben) Fix up size calculations and add FIXME (Ben) Cc: Jason Ekstrand Signed-off-by: Ben Widawsky Acked-by:

[Mesa-dev] [PATCH v14 31/36] i965/miptree: Remove dead code assertion

2017-05-30 Thread Varad Gautam
From: Ben Widawsky We no longer allocate a miptree for the mcs_buf, so this is not a useful assertion. Recommended-by: Topi Pohjolainen Signed-off-by: Ben Widawsky Reviewed-by: Topi Pohjolainen ---

[Mesa-dev] [PATCH v14 25/36] i965/miptree: Allocate mt earlier in update winsys

2017-05-30 Thread Varad Gautam
From: Ben Widawsky Allows us to continue utilizing common miptree creation using __DRIimage without creating a new DRIimage (for the intel_process_dri2_buffer() case). This is a bit ugly, but I think it's the best one can do. v2: This patch let's us remove the temporary

[Mesa-dev] [PATCH v14 27/36] i965: Change resolve flags to enum

2017-05-30 Thread Varad Gautam
From: Ben Widawsky In the foreseeable future it doesn't seem to make sense to have multiple resolve flags. What does make sense is to have the caller give an indication to the lower layers what it things should be done for resolve. The enum change distinguishes this binary

[Mesa-dev] [PATCH v14 32/36] i965: Remove scanout restriction from lossless compression

2017-05-30 Thread Varad Gautam
From: Ben Widawsky v2: Try to keep the assert as recommended by Topi. This requires modifying the num_samples check to be <= 1 because internally created buffers set num_samples = 0. v3: Buffers are proactively marked as scanout, often, and so checking is_scanout in whether

[Mesa-dev] [PATCH v14 19/36] i965/miptree: Allocate mcs_buf for an image's CCS_E

2017-05-30 Thread Varad Gautam
From: Ben Widawsky This code will disable actually creating these buffers for the scanout, but it puts the allocation in place. Primarily this patch is split out for review, it can be squashed in later if preferred. v2: assert(mt->offset == 0) in ccs creation (as requested

[Mesa-dev] [PATCH v14 10/36] st/dri: implement createImageWithModifiers in DRIimage

2017-05-30 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> adds a pscreen->resource_create_with_modifiers() to create textures with modifier. v2: - stylefixes (Emil Velikov) - don't return selected modifier from resource_create_with_modifiers. we can use the winsys_handle to get this. S

[Mesa-dev] [PATCH v14 24/36] i965/miptree: Add a return for updating of winsys

2017-05-30 Thread Varad Gautam
From: Ben Widawsky There is nothing particularly useful to do currently if the update fails, but there is no point carrying on either. As a result, this has a behavior change. v2: Make the return type a bool (Topi) v3: Don't leak the bo if update_winsys_renderbuffer fails.

[Mesa-dev] [PATCH v14 22/36] i965: Allocate tile aligned height

2017-05-30 Thread Varad Gautam
From: Ben Widawsky This patch shouldn't actually do anything because the libdrm function should already do this alignment. However, it preps us for a future patch where we add in the CCS AUX size, and in the process it serves as a good place to find bisectable issues if libdrm

[Mesa-dev] [PATCH v14 21/36] i965: add a no_aux field to identify buffers without aux data

2017-05-30 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> v2: split this into a separate patch (Jason) Signed-off-by: Ben Widawsky <b...@bwidawsk.net> Signed-off-by: Daniel Stone <dani...@collabora.com> Cc: Jason Ekstrand <ja...@jlekstrand.net> --- src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH v14 23/36] i965: Add logic for allocating BO with CCS

2017-05-30 Thread Varad Gautam
From: Ben Widawsky This patch provides the support (and comments) for allocating the BO with space for the CCS buffer just underneath it. This patch was originally titled: "i965: Create correctly sized mcs for an image" In order to make things more bisectable, reviewable,

[Mesa-dev] [PATCH v14 11/36] st/dri: implement DRIimage creation from dmabufs with modifiers

2017-05-30 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> support importing dmabufs into DRIimage while taking format modifiers in account, as per DRIimage extension version 15. v2: initialize winsys modifier to DRM_FORMAT_MOD_INVALID (Daniel Stone) v3: do not bump DRIimageExtension version. spl

[Mesa-dev] [PATCH v14 12/36] st/dri: support format queries

2017-05-30 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> ask the driver for supported dmabuf formats v2: rebase to master. v3: return false on failure. v4: use pscreen->is_format_supported instead of adding a new query. (Lucas Stach) v5: stylefix to conform to formatting rules (Brian P

[Mesa-dev] [PATCH v14 17/36] i965: Support images with offset aux buffers

2017-05-30 Thread Varad Gautam
From: Ben Widawsky Previously our aux buffers (MCS, and HiZ) never had an offset because they were in their own buffer object. When using the CCS lossless compression feature, it's desirable to store the data at an offset from the main framebuffer, ie. share a buffer object.

[Mesa-dev] [PATCH v14 13/36] gallium: introduce format modifier querying

2017-05-30 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> format modifiers tokens are driver specific, and hence, need to come in from the driver. this allows drivers to be queried for supported format modifiers for EGL_EXT_image_dma_buf_import_modifiers. v2: rebase to master. v3: drivers must

[Mesa-dev] [PATCH v14 18/36] i965/miptree: Add a helper function for image creation

2017-05-30 Thread Varad Gautam
From: Ben Widawsky This provides a common function or creating miptrees when there is an existing DRIimage to use. That provides an easy way to add CCS allocation. v2: Make the new function assume there are always no layout flags. This will be adjusted later. Signed-off-by:

[Mesa-dev] [PATCH v14 08/36] gallium/winsys/drm: introduce modifier field to winsys_handle

2017-05-30 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> we use this to import resources with format modifiers, and to support per-resource modifier queries. Signed-off-by: Varad Gautam <varad.gau...@collabora.com> Cc: Lucas Stach <l.st...@pengutronix.de> --- src/gallium/inc

[Mesa-dev] [PATCH v14 15/36] i965: Improve same-buffer restriction for imports

2017-05-30 Thread Varad Gautam
dually, the FDs may be different even if the underlying buffer is the same. Instead of checking the FDs for equality, we must check if they actually point to the same buffer (Jason). Signed-off-by: Daniel Stone <dani...@collabora.com> Signed-off-by: Varad Gautam <varad.gau...@collabora.com

[Mesa-dev] [PATCH v14 14/36] st/dri: support format modifier queries

2017-05-30 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> ask the driver for supported modifiers for a given format. v2: move to __DRIimageExtension v16. v3: fail if the supplied format is not supported by driver. v4: purge PIPE_CAP_QUERY_DMABUF_ATTRIBS. v5: - move to __DRIimageExtension v15

[Mesa-dev] [PATCH v14 16/36] i965: Invert image modifier/tiling inference

2017-05-30 Thread Varad Gautam
From: Daniel Stone When allocating images, we record a tiling mode and then work backwards to infer the modifier. Unfortunately this is the wrong way around, since it is a one:many mapping (e.g. TILING_Y can be plain Y-tiling, or Y-tiling with CCS). Invert the mapping, so

[Mesa-dev] [PATCH v14 06/36] egl: implement eglQueryDmaBufModifiersEXT

2017-05-30 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> query and return supported dmabuf format modifiers for EGL_EXT_image_dma_buf_import_modifiers. v2: move format check to the driver instead of making format queries here and then checking. v3: Check DRIimageExtension version before query (

[Mesa-dev] [PATCH v14 09/36] st/dri: enable DRIimage modifier queries

2017-05-30 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> return the modifier selected by the driver when creating this image. v2: since we can use winsys_handle->modifier to serve these, remove DRIimage->modifier from v1. use DRM_API_HANDLE_TYPE_KMS instead of DRM_API_HANDLE_TYPE

[Mesa-dev] [PATCH v14 02/36] egl/main: add support for fourth plane tokens

2017-05-30 Thread Varad Gautam
ifiers is not suported. (Emil Velikov) Signed-off-by: Pekka Paalanen <pekka.paala...@collabora.co.uk> Signed-off-by: Varad Gautam <varad.gau...@collabora.com> Reviewed-by: Eric Engestrom <eric.engest...@imgtec.com> Reviewed-by: Daniel Stone <dani...@collabora.com> --- src/eg

[Mesa-dev] [PATCH v14 00/36] EGL_EXT_image_dma_buf_import_modifiers with i915 CCS

2017-05-30 Thread Varad Gautam
add support for fourth plane tokens Varad Gautam (15): dri: introduce dmabuf format modifier related handles egl/dri2: Create EGLImages with dmabuf modifiers egl: implement eglQueryDmaBufFormatsEXT egl: implement eglQueryDmaBufModifiersEXT egl: advertise EGL_EXT_image_dma_buf_import_modifi

[Mesa-dev] [PATCH v14 07/36] egl: advertise EGL_EXT_image_dma_buf_import_modifiers

2017-05-30 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> v2: check for DRIimageExtension version 15 (Jason Ekstrand) Signed-off-by: Varad Gautam <varad.gau...@collabora.com> Reviewed-by: Daniel Stone <dani...@collabora.com> Reviewed-by: Emil Velikov <emil.veli...@collabora.com> -

[Mesa-dev] [PATCH v14 03/36] dri: introduce dmabuf format modifier related handles

2017-05-30 Thread Varad Gautam
) - pass a single modifier form createImageFromDmaBufs2 since all planes have the same modifier (Jason Ekstrand) Signed-off-by: Pekka Paalanen <pekka.paala...@collabora.co.uk> Signed-off-by: Varad Gautam <varad.gau...@collabora.com> Reviewed-by: Daniel Stone <dani...@collabora.com>

[Mesa-dev] [PATCH v14 01/36] egl: introduce DMA_BUF_MAX_PLANES

2017-05-30 Thread Varad Gautam
From: Pekka Paalanen <pekka.paala...@collabora.co.uk> Rather than hardcoding 3, use a #define. Makes it easier to bump this later to 4. Signed-off-by: Pekka Paalanen <pekka.paala...@collabora.co.uk> Signed-off-by: Varad Gautam <varad.gau...@collabora.com> Reviewed-by: Eric Enge

[Mesa-dev] [PATCH v14 05/36] egl: implement eglQueryDmaBufFormatsEXT

2017-05-30 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> allow egl clients to query the dmabuf formats supported on this platform. v2: return EGLBoolean. v3: Check DRIimageExtension version before querying (Daniel Stone). v4: move to DRIimageExtension version 15, error checking (Jason Ekstrand).

[Mesa-dev] [PATCH v14 04/36] egl/dri2: Create EGLImages with dmabuf modifiers

2017-05-30 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> Allow creating EGLImages with dmabuf format modifiers when target is EGL_LINUX_DMA_BUF_EXT for EGL_EXT_image_dma_buf_import_modifiers. v2: - clear modifier assembling and error label name (Eric Engestrom) v3: - remove goto jumps within switc

Re: [Mesa-dev] [PATCH v3 01/15] st/dri: refactor multi-planar YUV import path

2017-05-24 Thread Varad Gautam
Hi Lucas, On Tue, May 23, 2017 at 9:10 PM, Lucas Stach <l.st...@pengutronix.de> wrote: > Hi Varad, > > Am Dienstag, den 23.05.2017, 14:40 +0530 schrieb Varad Gautam: >> Hi Lucas, >> >> On Mon, May 22, 2017 at 11:16 PM, Lucas Stach <l.st...@pengutronix.de>

Re: [Mesa-dev] [PATCH v13 07/36] egl: implement eglQueryDmaBufModifiersEXT

2017-05-23 Thread Varad Gautam
On Mon, 2017-05-22 at 14:03 +0100, Emil Velikov wrote: > Hi Dan, > > On 19 May 2017 at 10:37, Daniel Stone <dani...@collabora.com> wrote: > > > > From: Varad Gautam <varadgau...@gmail.com> > > > > query and return supported dmabuf format modifiers f

Re: [Mesa-dev] [PATCH v3 01/15] st/dri: refactor multi-planar YUV import path

2017-05-23 Thread Varad Gautam
Hi Lucas, On Mon, May 22, 2017 at 11:16 PM, Lucas Stach <l.st...@pengutronix.de> wrote: > Am Mittwoch, den 10.05.2017, 23:15 +0530 schrieb Varad Gautam: >> From: Varad Gautam <varad.gau...@collabora.com> >> >> we currently ignore the plane count when converting f

Re: [Mesa-dev] [RFC] st/dri: implement createImageWithModifiers

2017-05-15 Thread Varad Gautam
Hi Lucas, On Fri, May 12, 2017 at 4:22 PM, Lucas Stach <l.st...@pengutronix.de> wrote: > Hi Varad, > > Am Freitag, den 12.05.2017, 15:11 +0530 schrieb Varad Gautam: >> gallium doesn't have a way to pass modifiers to the driver when creating >> resources.

[Mesa-dev] [RFC] st/dri: implement createImageWithModifiers

2017-05-12 Thread Varad Gautam
155312/ complete tree, with the egl series: https://git.collabora.com/cgit/user/varad/mesa.git/log/?h=egl-modifiers-v4 Signed-off-by: Varad Gautam <varadgau...@gmail.com> --- src/gallium/include/pipe/p_screen.h | 13 ++ src/gallium/state_trackers/dri/dri2.c | 80 ++

Re: [Mesa-dev] [PATCH v3 02/15] dri: Add an image creation with modifiers

2017-05-11 Thread Varad Gautam
On Thu, May 11, 2017 at 10:26 PM, Ben Widawsky <b...@bwidawsk.net> wrote: > On 17-05-10 23:15:29, Varad Gautam wrote: >> >> From: Ben Widawsky <b...@bwidawsk.net> >> >> Modifiers will be obtained or guessed by the client and passed in during >>

[Mesa-dev] [PATCH v3 15/15] egl: advertise EGL_EXT_image_dma_buf_import_modifiers

2017-05-10 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> Signed-off-by: Varad Gautam <varad.gau...@collabora.com> --- src/egl/drivers/dri2/egl_dri2.c | 6 ++ src/egl/main/eglapi.c | 1 + 2 files changed, 7 insertions(+) diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/

[Mesa-dev] [PATCH v3 14/15] egl: implement eglQueryDmaBufModifiersEXT

2017-05-10 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> query and return supported dmabuf format modifiers for EGL_EXT_image_dma_buf_import_modifiers. v2: rebase to master. v3: move format check to the driver instead of making format queries from here and then checking. Signed-off-by: Varad

[Mesa-dev] [PATCH v3 12/15] gallium: introduce format modifier querying

2017-05-10 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> format modifiers tokens are driver specific, and hence, need to come in from the driver. this allows drivers to be queried for supported format modifiers for EGL_EXT_image_dma_buf_import_modifiers. v2: rebase to master. v3: drivers must

[Mesa-dev] [PATCH v3 13/15] st/dri: support format modifier queries

2017-05-10 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> ask the driver for supported modifiers for a given format. bump __DRIimageExtension to 16. v2: move to __DRIimageExtension v16. v3: fail if the supplied format is not supported by driver. v4: purge PIPE_CAP_QUERY_DMABUF_ATTRIBS. Sign

[Mesa-dev] [PATCH v3 09/15] dri: add queryDmaBufFormats and queryDmaBufModifiers to DRIimage

2017-05-10 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> these allow querying the driver for supported dmabuf formats and modifiers. v2: move to __DRIimageExtension version 16. v3: return GLBoolean for error reporting, document params better. Signed-off-by: Varad Gautam <varad.gau...@coll

[Mesa-dev] [PATCH v3 10/15] st/dri: support format queries

2017-05-10 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> ask the driver for supported dmabuf formats v2: rebase to master. v3: return false on failure. v4: use pscreen->is_format_supported instead of adding a new query. (Lucas Stach) Signed-off-by: Varad Gautam <varad.gau...@collabora.c

[Mesa-dev] [PATCH v3 11/15] egl: implement eglQueryDmaBufFormatsEXT

2017-05-10 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> allow egl clients to query the dmabuf formats supported on this platform. v2: rebase to master. v3: return EGL_FALSE upon failure. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> Signed-off-by: Varad Gauta

[Mesa-dev] [PATCH v3 08/15] egl_dri2: add support for using modifier attributes in eglCreateImageKHR

2017-05-10 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> allow creating EGLImages with dmabuf format modifiers when target is EGL_LINUX_DMA_BUF_EXT for EGL_EXT_image_dma_buf_import_modifiers. v2: - clear modifier assembling and error label name (Eric Engestrom) v3: - remove goto jumps within

[Mesa-dev] [PATCH v3 05/15] st/dri: enable DRIimage modifier queries

2017-05-10 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> introduce modifier field in DRIimage and set it to DRM_FORMAT_MOD_INVALID for now. support DRIimage modifier queries. Suggested-by: Daniel Stone <dani...@collabora.com> Signed-off-by: Varad Gautam <varad.gau...@collabora.com>

[Mesa-dev] [PATCH v3 07/15] st/dri: implement DRIimage creation from dmabufs with modifiers

2017-05-10 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> support importing dmabufs into DRIimage while taking format modifiers in account, as per DRIimage extension version 15. bump __DRIimageExtension to 15. v2: initialize winsys modifier to DRM_FORMAT_MOD_INVALID (Daniel Stone) Signed-off-by:

[Mesa-dev] [PATCH v3 00/15] EGL_EXT_image_dma_buf_import_modifiers v3

2017-05-10 Thread Varad Gautam
dri: support DRIimage creation from dmabufs with modifiers Varad Gautam (11): st/dri: refactor multi-planar YUV import path st/dri: enable DRIimage modifier queries st/dri: implement DRIimage creation from dmabufs with modifiers egl_dri2: add support for using modi

[Mesa-dev] [PATCH v3 03/15] egl: introduce DMA_BUF_MAX_PLANES

2017-05-10 Thread Varad Gautam
From: Pekka Paalanen <pekka.paala...@collabora.co.uk> Rather than hardcoding 3, use a #define. Makes it easier to bump this later to 4. Signed-off-by: Pekka Paalanen <pekka.paala...@collabora.co.uk> Signed-off-by: Varad Gautam <varad.gau...@collabora.com> Reviewed-by: Eric Enge

[Mesa-dev] [PATCH v3 01/15] st/dri: refactor multi-planar YUV import path

2017-05-10 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> we currently ignore the plane count when converting from __DRI_IMAGE_FORMAT* tokens to __DRI_IMAGE_FOURCC* for multiplanar images, and only return the first plane's simplified fourcc. this adds a fourcc to __DRI_IMAGE_FORMAT_* mapping

[Mesa-dev] [PATCH v3 06/15] dri: support DRIimage creation from dmabufs with modifiers

2017-05-10 Thread Varad Gautam
From: Pekka Paalanen <pekka.paala...@collabora.co.uk> add createImageFromDmaBufs2 function which accepts per-plane dmabuf format modifiers. Signed-off-by: Pekka Paalanen <pekka.paala...@collabora.co.uk> Signed-off-by: Varad Gautam <varad.gau...@collabora.com> --- i

[Mesa-dev] [PATCH v3 02/15] dri: Add an image creation with modifiers

2017-05-10 Thread Varad Gautam
et> Reviewed-by: Eric Engestrom <eric.engest...@imgtec.com> (v1) Acked-by: Daniel Stone <dani...@collabora.com> Signed-off-by: Varad Gautam <varad.gau...@collabora.com> --- src/gallium/state_trackers/dri/dri2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sr

[Mesa-dev] [PATCH v3 04/15] egl/main: add support for fourth plane tokens

2017-05-10 Thread Varad Gautam
ifiers is not suported. (Emil Velikov) Signed-off-by: Pekka Paalanen <pekka.paala...@collabora.co.uk> Signed-off-by: Varad Gautam <varad.gau...@collabora.com> Reviewed-by: Eric Engestrom <eric.engest...@imgtec.com> --- src/egl/drivers/dri2/egl_dri2.c | 2 +- src/egl/main/egldisplay

[Mesa-dev] [PATCH v3] egl: implement eglQueryDmaBufModifiersEXT

2017-04-26 Thread Varad Gautam
query and return supported dmabuf format modifiers for EGL_EXT_image_dma_buf_import_modifiers. v2: rebase to master. v3: move format check to the driver instead of making format queries from here and then checking. Signed-off-by: Varad Gautam <varad.gau...@collabora.com> --- src/egl/d

[Mesa-dev] [PATCH v3] st/dri: support format modifier queries

2017-04-26 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> ask the driver for supported modifiers for a given format. bump __DRIimageExtension to 16. v2: move to __DRIimageExtension v16. v3: fail if the supplied format is not supported by driver. Signed-off-by: Varad Gautam <varad.gau...@coll

[Mesa-dev] [PATCH v3] egl: implement eglQueryDmaBufFormatsEXT

2017-04-26 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> allow egl clients to query the dmabuf formats supported on this platform. v2: rebase to master. v3: return EGL_FALSE upon failure. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> Signed-off-by: Varad Gauta

[Mesa-dev] [PATCH v3] gallium: introduce dmabuf format and modifier querying

2017-04-26 Thread Varad Gautam
. Signed-off-by: Varad Gautam <varad.gau...@collabora.com> --- src/gallium/docs/source/screen.rst | 2 ++ src/gallium/drivers/freedreno/freedreno_screen.c | 1 + src/gallium/drivers/i915/i915_screen.c | 1 + src/gallium/drivers/llvmpipe/lp_screen.c | 1 + src/g

[Mesa-dev] [PATCH v3] dri: add queryDmaBufFormats and queryDmaBufModifiers to DRIimage

2017-04-26 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> these allow querying the driver for supported dmabuf formats and modifiers. v2: move to __DRIimageExtension version 16. v3: return GLBoolean for error reporting, document params better. Signed-off-by: Varad Gautam <varad.gau...@coll

[Mesa-dev] [PATCH v3] st/dri: support format queries

2017-04-26 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> ask the driver for supported dmabuf formats v2: rebase to master. v3: return false on failure. Signed-off-by: Varad Gautam <varad.gau...@collabora.com> --- src/gallium/state_trackers/dri/dri2.c | 15 +++ 1 file changed, 1

[Mesa-dev] [PATCH v2] egl: implement eglQueryDmaBufModifiersEXT

2017-04-14 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> query and return supported dmabuf format modifiers for EGL_EXT_image_dma_buf_import_modifiers. v2: rebase to master. Signed-off-by: Varad Gautam <varad.gau...@collabora.com> --- src/egl/drivers/dri2/egl

[Mesa-dev] [PATCH v2] egl: advertise EGL_EXT_image_dma_buf_import_modifiers

2017-04-14 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> v2: check for both queryDmaBufFormats and queryDmaBufModifiers, rebase to master. Signed-off-by: Varad Gautam <varad.gau...@collabora.com> --- src/egl/drivers/dri2/egl_dri2.c | 6 ++ src/egl/main/eglapi.c | 1 + 2 f

[Mesa-dev] [PATCH v2] dri: support DRIimage creation from dmabufs with modifiers

2017-04-14 Thread Varad Gautam
k> Signed-off-by: Varad Gautam <varad.gau...@collabora.com> --- include/GL/internal/dri_interface.h | 21 - 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h index 86efd1b..e330723 10

[Mesa-dev] [PATCH v2] gallium: introduce dmabuf format and modifier querying

2017-04-14 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> allows drivers to be queried for supported formats and format modifiers for EGL_EXT_image_dma_buf_import_modifiers. drivers that implement format/modifier queries must advertise these under PIPE_CAP_QUERY_DMABUF_ATTRIBS. v2: rebase to

[Mesa-dev] [PATCH v2] st/dri: support format modifier queries

2017-04-14 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> ask the driver for supported modifiers for a given format. bump __DRIimageExtension to 16. v2: move to __DRIimageExtension v16. Signed-off-by: Varad Gautam <varad.gau...@collabora.com> --- src/gallium/state_trackers/dri

[Mesa-dev] [PATCH v2] st/dri: support format queries

2017-04-14 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> ask the driver for supported dmabuf formats v2: rebase to master. Signed-off-by: Varad Gautam <varad.gau...@collabora.com> --- src/gallium/state_trackers/dri/dri2.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a

[Mesa-dev] [PATCH v2] st/dri: implement DRIimage creation from dmabufs with modifiers

2017-04-14 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> support importing dmabufs into DRIimage while taking format modifiers in account, and bump __DRIimageExtension on gallium to version 15. v2: move to __DRIimageExtension v15. Signed-off-by: Varad Gautam <varad.gau...@collabora.com> ---

[Mesa-dev] [PATCH v2] egl: implement eglQueryDmaBufFormatsEXT

2017-04-14 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> allow egl clients to query the dmabuf formats supported on this platform. v2: rebase to master. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> Signed-off-by: Varad Gautam <varad.gau...@collabora.com> --- sr

[Mesa-dev] [PATCH v2] dri: add queryDmaBufFormats and queryDmaBufModifiers to DRIimage

2017-04-14 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> these allow querying the driver for supported dmabuf formats and modifiers. v2: move to __DRIimageExtension version 16. Signed-off-by: Varad Gautam <varad.gau...@collabora.com> --- include/GL/internal/dri_inte

Re: [Mesa-dev] [PATCH v2 00/14] implement EGL_EXT_image_dma_buf_import_modifiers v2

2017-01-04 Thread Varad Gautam
Hi Ben, On Wed, Jan 4, 2017 at 3:25 AM, Ben Widawsky <b...@bwidawsk.net> wrote: > On 16-11-24 20:50:37, Varad Gautam wrote: >> >> This is the second revision to the EGL_EXT_image_dma_buf_import_modifiers >> [1] >> series at [2], addressing the comments re

[Mesa-dev] [PATCH v2 11/14] egl: implement eglQueryDmaBufFormatsEXT

2016-11-24 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> allow egl clients to query the dmabuf formats supported on this platform. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> Signed-off-by: Varad Gautam <varad.gau...@collabora.com> --- src/egl/drivers/dr

[Mesa-dev] [PATCH v2 13/14] egl: implement eglQueryDmaBufModifiersEXT

2016-11-24 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> query and return supported dmabuf format modifiers for EGL_EXT_image_dma_buf_import_modifiers. Signed-off-by: Varad Gautam <varad.gau...@collabora.com> --- src/egl/drivers/dri2/egl_dri2.c | 47 ++

[Mesa-dev] [PATCH v2 14/14] egl: advertise EGL_EXT_image_dma_buf_import_modifiers

2016-11-24 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> Signed-off-by: Varad Gautam <varad.gau...@collabora.com> --- src/egl/drivers/dri2/egl_dri2.c | 5 + src/egl/main/eglapi.c | 1 + 2 files changed, 6 insertions(+) diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/

[Mesa-dev] [PATCH v2 06/14] st/dri: implement DRIimage creation from dmabufs with modifiers

2016-11-24 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> support importing dmabufs into DRIimage taking format modifiers in account, as per DRIimage extension version 14. Signed-off-by: Varad Gautam <varad.gau...@collabora.com> --- src/gallium/include/state_tracker/drm_driver.h | 2 ++

[Mesa-dev] [PATCH v2 10/14] st/dri: support format queries

2016-11-24 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> ask the driver for supported dmabuf formats Signed-off-by: Varad Gautam <varad.gau...@collabora.com> --- src/gallium/state_trackers/dri/dri2.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/src/gallium/state_track

[Mesa-dev] [PATCH v2 12/14] st/dri: support format modifier queries

2016-11-24 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> ask the driver for supported modifiers for a given format. bump __DRI_IMAGE implementation version to 15. Signed-off-by: Varad Gautam <varad.gau...@collabora.com> --- src/gallium/state_trackers/dri/dri2.c | 21 +

[Mesa-dev] [PATCH v3 07/14] egl_dri2: add support for using modifier attributes in eglCreateImageKHR

2016-11-24 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> allow creating EGLImages with dmabuf format modifiers when target is EGL_LINUX_DMA_BUF_EXT for EGL_EXT_image_dma_buf_import_modifiers. v2: - clear modifier assembling and error label name (Eric Engestrom) v3: - remove goto jumps within

[Mesa-dev] [PATCH v2 08/14] dri: add queryDmaBufFormats and queryDmaBufModifiers to DRIimage

2016-11-24 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> these allow querying the driver for supported dmabuf formats and modifiers. Signed-off-by: Varad Gautam <varad.gau...@collabora.com> --- include/GL/internal/dri_interface.h | 22 +- 1 file changed, 21 insertions(+)

[Mesa-dev] [PATCH v2 09/14] gallium: introduce dmabuf format and modifier querying

2016-11-24 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> this allows drivers to be queried for supported formats and format modifiers. drivers that implement these queries must expose these under PIPE_CAP_QUERY_DMABUF_ATTRIBS. Signed-off-by: Varad Gautam <varad.gau...@collabora.com> --- src/

[Mesa-dev] [PATCH v2 05/14] dri: support DRIimage creation from dmabufs with modifiers

2016-11-24 Thread Varad Gautam
From: Pekka Paalanen <pekka.paala...@collabora.co.uk> add createImageFromDmaBufs2 function which accepts per-plane dmabuf format modifiers. Signed-off-by: Pekka Paalanen <pekka.paala...@collabora.co.uk> Signed-off-by: Varad Gautam <varad.gau...@collabora.com> --- i

[Mesa-dev] [PATCH v2 03/14] egl: update eglext.h

2016-11-24 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> update eglext.h to revision 33288 from Khronos Signed-off-by: Varad Gautam <varad.gau...@collabora.com> Reviewed-by: Eric Engestrom <eric.engest...@imgtec.com> --- include/EGL/eglext.h | 60 +

[Mesa-dev] [PATCH v2 04/14] egl/main: add support for fourth plane tokens

2016-11-24 Thread Varad Gautam
ifiers is not suported. (Emil Velikov) Signed-off-by: Pekka Paalanen <pekka.paala...@collabora.co.uk> Signed-off-by: Varad Gautam <varad.gau...@collabora.com> Reviewed-by: Eric Engestrom <eric.engest...@imgtec.com> --- src/egl/drivers/dri2/egl_dri2.c | 2 +- src/egl/main/egldisplay

[Mesa-dev] [PATCH v2 01/14] egl: return error for unknown EGLImage attributes

2016-11-24 Thread Varad Gautam
If an attribute specified in is not one of the attributes listed in Table bbb, the error EGL_BAD_PARAMETER is generated. Implement this. Signed-off-by: Pekka Paalanen <pekka.paala...@collabora.co.uk> Signed-off-by: Varad Gautam <varad.gau...@collabora.com> Reviewed-by:

[Mesa-dev] [PATCH v2 00/14] implement EGL_EXT_image_dma_buf_import_modifiers v2

2016-11-24 Thread Varad Gautam
with modifiers Varad Gautam (10): egl: update eglext.h st/dri: implement DRIimage creation from dmabufs with modifiers egl_dri2: add support for using modifier attributes in eglCreateImageKHR dri: add queryDmaBufFormats and queryDmaBufModifiers to DRIimage gallium: introduce dmabuf format

Re: [Mesa-dev] [PATCH 10/13] gallium: introduce format modifier querying

2016-11-16 Thread Varad Gautam
On Wed, Nov 16, 2016 at 12:25 PM, Michel Dänzer <mic...@daenzer.net> wrote: > On 15/11/16 11:24 PM, Varad Gautam wrote: >> From: Varad Gautam <varad.gau...@collabora.com> >> >> drivers should implement pipe_screen->get_modifiers_for_format and >> adverti

[Mesa-dev] [PATCH v2] egl_dri2: add support for using modifier attributes in eglCreateImageKHR

2016-11-16 Thread Varad Gautam
alanen <pekka.paala...@collabora.co.uk> Signed-off-by: Varad Gautam <varad.gau...@collabora.com> Reviewed-by: Eric Engestrom <eric.engest...@imgtec.com> --- src/egl/drivers/dri2/egl_dri2.c | 67 ++--- src/egl/main/egldisplay.h | 1 + src/egl/main

[Mesa-dev] [PATCH 11/13] st/dri: support format modifier queries

2016-11-15 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> ask the driver for supported modifiers for a given format. Signed-off-by: Varad Gautam <varad.gau...@collabora.com> --- src/gallium/state_trackers/dri/dri2.c | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-)

[Mesa-dev] [PATCH 06/13] st/dri: implement DRIimage creation from dmabufs with modifiers

2016-11-15 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> support importing dmabufs into DRIimage taking format modifiers in account, as per DRIimage extension version 14. Signed-off-by: Varad Gautam <varad.gau...@collabora.com> --- src/gallium/include/state_tracker/drm_driver.h | 2 ++

[Mesa-dev] [PATCH 10/13] gallium: introduce format modifier querying

2016-11-15 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> drivers should implement pipe_screen->get_modifiers_for_format and advertise it with PIPE_CAP_QUERY_DMABUF_MODIFIERS to support format modifier queries. Signed-off-by: Varad Gautam <varad.gau...@collabora.com> --- src/gall

[Mesa-dev] [PATCH 12/13] egl: implement eglQueryDmaBufModifiersEXT

2016-11-15 Thread Varad Gautam
From: Varad Gautam <varad.gau...@collabora.com> query and return supported dmabuf format modifiers for EGL_EXT_image_dma_buf_import_modifiers. Signed-off-by: Varad Gautam <varad.gau...@collabora.com> --- src/egl/drivers/dri2/egl_dri2.c | 39 +++

  1   2   >