[Mesa-dev] [PATCH 39/51] i965: Convert brw_emit_mi_flush() to use batch begin/end

2017-01-10 Thread Chris Wilson
We have many flushes outside of the batch buffer critical sections that need wrapping. Introduce a simple function to wrap the brw_emit_mi_flush() with the begin/end. Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/i965/brw_clear.c| 4 +-- src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH 45/51] i965: Remove use of deprecated drm_intel_aub routines

2017-01-10 Thread Chris Wilson
With mesa/drm commit cd2f91e18db087edf93fed828e568ee53b887860 Author: Kristian Høgsberg Kristensen Date: Fri Jul 31 10:47:50 2015 -0700 intel: Drop aub dumping functionality the drm_intel_aub routines are mere stubs and do nothing. Likewise remove our invocations. Signed-off-by: Chris

[Mesa-dev] [PATCH 27/51] i965: Move brw_bo creation to brw_batch.h

2017-01-10 Thread Chris Wilson
Churn now to reduce churn later. Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/i965/brw_batch.h| 34 + src/mesa/drivers/dri/i965/brw_binding_tables.c | 3 +- src/mesa/drivers/dri/i965/brw_context.c | 3 +- src/mesa/drivers/dri/i965/brw_program.c

[Mesa-dev] [PATCH 47/51] i965: Allow syncobjects to hook into the internal fence tracking

2017-01-10 Thread Chris Wilson
Since we use fences internally for tracking buffer busyness within brw_batch.c, we can expose those directly for GL/DRI2 sync objects. Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/i965/brw_batch.c | 87 -- src/mesa/drivers/dri/i965/brw_batch.h | 22 - src/mesa

[Mesa-dev] [PATCH 22/51] i965: Refactor batch flush into intel_front_flush()

2017-01-10 Thread Chris Wilson
Since we always flush the intel_batchbuffer before calling intel_front_flush(), simply more that call into intel_front_flush() itself. Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/i965/brw_context.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/mesa

[Mesa-dev] [PATCH 28/51] i965: Pass can-use-active flag to brw_bo_create()

2017-01-10 Thread Chris Wilson
-off-by: Chris Wilson --- src/mesa/drivers/dri/i965/brw_binding_tables.c | 3 ++- src/mesa/drivers/dri/i965/brw_program.c| 2 +- src/mesa/drivers/dri/i965/brw_queryobj.c | 9 ++--- src/mesa/drivers/dri/i965/gen6_queryobj.c | 3 ++- src/mesa/drivers/dri/i965/gen6_sol.c

[Mesa-dev] [PATCH 15/51] i965: Move pipelined register access to its own file

2017-01-10 Thread Chris Wilson
generic routine for storing the register values found in gen6_queryobj.c which we can transplant into the new pipelined mmio file. Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/i965/Makefile.sources | 2 + src/mesa/drivers/dri/i965/brw_compute.c| 1 + src/mesa/drivers

[Mesa-dev] [PATCH 37/51] i965: Refactor aperture testing and restarting

2017-01-10 Thread Chris Wilson
Refactor the aperture test, roll back and retry logic to a common idiom. Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/i965/brw_batch.h | 18 src/mesa/drivers/dri/i965/brw_compute.c | 36 +++- src/mesa/drivers/dri/i965/brw_draw.c | 33

[Mesa-dev] [PATCH 50/51] i965: Coalesce relocation read/write domains to a single integer

2017-01-10 Thread Chris Wilson
lobal GTT workaround, essentially 2 bits of information. We can therefore trim a parameter by coalescing the relocation domains to a single unsigned bitfield (i.e. 32 bits of read/write domains rather than 64 bits) without loss of generality. Signed-off-by: Chris Wilson --- src/intel/blorp/bl

[Mesa-dev] [PATCH 41/51] i965: Move all the render preamble together

2017-01-10 Thread Chris Wilson
Rather than split the render batch setup between two hooks, coalesce it into a single callback. To simplify this, move some of the state dirtying from the start to the finish hook hook. Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/i965/brw_context.c | 15 ++- src/mesa

[Mesa-dev] [PATCH 48/51] i965: Use fences for tracking QueryCounters

2017-01-10 Thread Chris Wilson
We can use our fence tracking mechanism for fine-grained waiting on results. Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/i965/brw_conditional_render.c | 4 +- src/mesa/drivers/dri/i965/brw_context.c| 2 + src/mesa/drivers/dri/i965/brw_context.h| 10 +- src

[Mesa-dev] [PATCH 31/51] i965: Refactor the always_flush check

2017-01-10 Thread Chris Wilson
Provide a common routine for doing conditional batch flushes. Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/i965/brw_batch.h | 6 ++ src/mesa/drivers/dri/i965/brw_compute.c | 3 +-- src/mesa/drivers/dri/i965/brw_draw.c| 3 +-- src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH 20/51] i965: Add dword aliases to bitfield structs

2017-01-10 Thread Chris Wilson
situation. Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/i965/brw_structs.h | 137 +--- 1 file changed, 89 insertions(+), 48 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_structs.h b/src/mesa/drivers/dri/i965/brw_structs.h index 55338c0e24

[Mesa-dev] [PATCH 49/51] i965: Enable brw-batch dirty tracking

2017-01-10 Thread Chris Wilson
Remove the old hashtable approach and switch over to the inline write tracking with brw-batch. Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/i965/brw_batch.c | 70 ++- src/mesa/drivers/dri/i965/brw_batch.h | 10 +--- src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH 10/51] i965: Add a simple utility function to wrap drm_intel_bo_flink()

2017-01-10 Thread Chris Wilson
Just to reduce some later churn, pull out the flink wrapper. Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/i965/brw_batch.h| 7 +++ src/mesa/drivers/dri/i965/brw_context.c | 11 +-- src/mesa/drivers/dri/i965/intel_screen.c | 2 +- 3 files changed, 13 insertions(+), 7

[Mesa-dev] [PATCH 14/51] i965: Extract brw_batch_busy()

2017-01-10 Thread Chris Wilson
A simple helper to check whether the last batch buffer submitted to the hardware is still busy. Extract it now to reduce churn later. Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/i965/brw_batch.h | 5 + src/mesa/drivers/dri/i965/brw_cs.c| 5 ++--- src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH 26/51] i965: Refactor batch buffer dumping

2017-01-10 Thread Chris Wilson
Move the computation of the state offset into a smaller helper to reduce churn later. Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/i965/brw_state_dump.c | 62 -- 1 file changed, 33 insertions(+), 29 deletions(-) diff --git a/src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH 18/51] i965: Refactor setting a register with an immediate constant

2017-01-10 Thread Chris Wilson
We have a few instances where we set a register to an immediate value (MI_LOAD_REGISTER_IMM), so let's replace them with a simple routine. Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/i965/brw_draw.c | 6 +- src/mesa/drivers/dri/i965/brw_state_upload.c | 11 +--

[Mesa-dev] [PATCH 25/51] i965: Move HW context into brw_batch

2017-01-10 Thread Chris Wilson
To reduce churn later, move the HW context variable from brw_context to brw_batch. Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/i965/brw_batch.h | 2 ++ src/mesa/drivers/dri/i965/brw_context.c | 23 -- src/mesa/drivers/dri/i965/brw_context.h | 2

[Mesa-dev] [PATCH 40/51] i965: Wrap brw_memory_barrier with begin/end

2017-01-10 Thread Chris Wilson
Or rather export a higher level brw_pipe_control_flush() that wraps the brw_emit_pipe_control_flush() into a batch as appropriate for the caller. Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/i965/brw_context.h | 1 + src/mesa/drivers/dri/i965/brw_pipe_control.c | 9 + src

[Mesa-dev] [PATCH 17/51] i965: Replace opencoded brw_store_register_mem32()

2017-01-10 Thread Chris Wilson
The gen7 transform feedback routines store the SOL_OFFSET between batches into its scratch buffer. Convert these from using opencoded brw_store_register_mem32() Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/i965/gen7_sol_state.c | 10 +++--- src/mesa/drivers/dri/i965/hsw_sol.c

[Mesa-dev] [PATCH 44/51] i965: Pass the map-mode along to intel_mipmap_tree_map_raw()

2017-01-10 Thread Chris Wilson
Since we can distinguish when mapping between READ and WRITE, we can pass along the map mode to avoid stalls and flushes where possible. Signed-off-by: Chris Wilson Reviewed-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 29 +++ 1 file changed

Re: [Mesa-dev] i965: No relocation support for GL

2017-01-11 Thread Chris Wilson
On Wed, Jan 11, 2017 at 10:16:06AM +0200, Martin Peres wrote: > On 10/01/17 23:23, Chris Wilson wrote: > >Not much has changed in the couple of years since last posting, just a > >lot of rebasing. > > > >Still the major open question is how much locking do individual co

Re: [Mesa-dev] [PATCH] i965: Always scissor on Gen7/7.5 instead of disabling guardband.

2017-01-12 Thread Chris Wilson
*/ > - if (brw->gen < 8) { Would not if (brw->gen < 8 && !(brw_is_drawing_points(brw) || brw_is_drawing_lines(brw))) by itself fix the misrendering as a first step without any concern for wider impact? -Chris -- Chris Wilson, Intel Open Source Technology Centre ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 7/7] i965: Use persistent CPU mappings for the program cache even on non-LLC.

2017-01-17 Thread Chris Wilson
n all platforms. On non-LLC > > platforms, we simply need to clflush after memcpy'ing in new shaders, > > so they're visible to the GPU. This is not only better, but the code > > is also significantly simpler. Or just use a WC mapping, for even greater simpli

[Mesa-dev] [PATCH] i965: Share the workaround bo between all contexts

2017-01-26 Thread Chris Wilson
nd bo for the context since the context itself is owned by the screen (and so we can rely on the bo existing for the lifetime of the context). Signed-off-by: Chris Wilson Cc: Kenneth Graunke Cc: Martin Peres Cc: Chad Versace Cc: Daniel Vetter --- src/mesa/drivers/dri/i965/Makefile.am

Re: [Mesa-dev] [PATCH] i965: Share the workaround bo between all contexts

2017-01-26 Thread Chris Wilson
On Thu, Jan 26, 2017 at 09:39:51AM -0800, Chad Versace wrote: > On Thu 26 Jan 2017, Chris Wilson wrote: > > Since the workaround bo is used strictly as a write-only buffer, we need > > only allocate one per screen and use the same one from all contexts. > > > >

Re: [Mesa-dev] [PATCH] i965: Share the workaround bo between all contexts

2017-01-26 Thread Chris Wilson
On Thu, Jan 26, 2017 at 09:39:51AM -0800, Chad Versace wrote: > On Thu 26 Jan 2017, Chris Wilson wrote: > > Since the workaround bo is used strictly as a write-only buffer, we need > > only allocate one per screen and use the same one from all contexts. > > > >

Re: [Mesa-dev] [Intel-gfx] [PATCH] i965: Share the workaround bo between all contexts

2017-01-27 Thread Chris Wilson
On Fri, Jan 27, 2017 at 06:20:46PM +, Emil Velikov wrote: > On 27 January 2017 at 00:01, Chad Versace wrote: > > On Thu 26 Jan 2017, Chad Versace wrote: > >> On Thu 26 Jan 2017, Chris Wilson wrote: > >> > Since the workaround bo is used strictly as a write-on

Re: [Mesa-dev] [PATCH v2 1/2] anv: Add support for 48-bit addresses

2017-03-29 Thread Chris Wilson
ecified by STATE_BASE_ADDRESS will > +* over-flow the 48-bit address range, and the GPU will hang. In order to > +* avoid this problem, we tell the kernel that the buffer does not support > +* 48-bit addresses, and it places the buffer at a 32-bit address. While > +* this solution is probably overkill, it is effective. How about just setting the field to the bo->size? You must know the bo already at that point so that you can set the relocation target. Or you could allocate the sparse trtt in the high range and the kernel will then never be able to place objects high enough to overflow. I presume the overflow of the bo base + limit into the trtt will not cause similar issues... -Chris -- Chris Wilson, Intel Open Source Technology Centre ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH v2 1/2] anv: Add support for 48-bit addresses

2017-03-29 Thread Chris Wilson
On Wed, Mar 29, 2017 at 08:36:36AM -0700, Jason Ekstrand wrote: >On Wed, Mar 29, 2017 at 1:51 AM, Chris Wilson ><[1]ch...@chris-wilson.co.uk> wrote: > > On Tue, Mar 28, 2017 at 05:41:12PM -0700, Jason Ekstrand wrote: > > This commit adds support for using

Re: [Mesa-dev] [PATCH v2 1/2] anv: Add support for 48-bit addresses

2017-03-29 Thread Chris Wilson
On Wed, Mar 29, 2017 at 04:51:12PM +0100, Chris Wilson wrote: > On Wed, Mar 29, 2017 at 08:36:36AM -0700, Jason Ekstrand wrote: > >On Wed, Mar 29, 2017 at 1:51 AM, Chris Wilson > ><[1]ch...@chris-wilson.co.uk> wrote: > > > diff --git a/src/intel/vulka

Re: [Mesa-dev] [PATCH 7/7] intel: tools: add aubinator_error_decode tool

2017-03-30 Thread Chris Wilson
was won over at having pager support. I was getting close to moving the decoder to mesa myself, though it would have been a much less refined effort! -Chris -- Chris Wilson, Intel Open Source Technology Centre ___ mesa-dev mailing list mesa-dev

Re: [Mesa-dev] [PATCH] i965: Fix GLX_MESA_query_renderer video memory on 32-bit.

2017-03-30 Thread Chris Wilson
ntext_param p; size_t mappable_size, aper_size; memset(&p, 0, sizeof(p)); p.param = I915_CONTEXT_PARAM_GTT_SIZE; if (drmIoctl(fd, DRM_IOCTL_I915_GEM_CONTEXT_GETPARAM, &p) == 0) return p.value; /* do sometheing useful for old kernels */ drm_intel_g

Re: [Mesa-dev] [PATCH] i965: Fix GLX_MESA_query_renderer video memory on 32-bit.

2017-03-31 Thread Chris Wilson
e is *meaningless* with full-ppgtt. But if libdrm is limiting your batchbuffers using its result, than that is the maximum usable memory for GL (whilst it remains using libdrm_intel batchbuffers). :( -Chris -- Chris Wilson, Intel Open Source Technology Centre

Re: [Mesa-dev] [PATCH] anv/query: Busy-wait for available query entries

2017-04-05 Thread Chris Wilson
onger busy. If we haven't seen availability yet, > + * then we never will. > + */ > + return query_is_available(device, slot) ? VK_SUCCESS : VK_NOT_READY; > + case VK_TIMEOUT: > + /* The BO is still busy, keep waiting. */ > +

Re: [Mesa-dev] [PATCH 01/53] i965: Fix GLX_MESA_query_renderer video memory on 32-bit.

2017-04-05 Thread Chris Wilson
ing get_aperture so that it matches the batch space calculation used by libdrm, and the reminder that once that is lifted, this can be replaced. -Chris -- Chris Wilson, Intel Open Source Technology Centre ___ mesa-dev mailing list mesa-dev@lists.freedesk

Re: [Mesa-dev] [PATCH 02/53] i965: Stop calling drm_intel_bufmgr_gem_enable_fenced_relocs().

2017-04-05 Thread Chris Wilson
On Tue, Apr 04, 2017 at 05:09:52PM -0700, Kenneth Graunke wrote: > This does nothing on Gen4+, which is the only hardware we support. Reviewed-by: Chris Wilson -Chris -- Chris Wilson, Intel Open Source Technology Centre ___ mesa-dev mailing list m

Re: [Mesa-dev] [PATCH 03/53] i965: Make sure we don't use CPU maps for the scanout buffer.

2017-04-05 Thread Chris Wilson
accessible. A wayland compositor + gbm could allocate all framebuffers from stolen -- it's an issue of protocol, both parties must be aware that certain bo are not first class. -Chris -- Chris Wilson, Intel Open Source Technology Centre ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 04/53] i965: Import libdrm_intel.

2017-04-05 Thread Chris Wilson
> > We rename intel_bufmgr.h to brw_bufmgr.h to avoid #include conflicts. > We also fix UTF-8 symbol problems in intel_bufmgr_gem.c comments > because vim keeps trying to fix that every time I edit the file, > and we may as well fix it right away. Acked-by: Chris Wilson I was dreaming of way

Re: [Mesa-dev] [PATCH 05/53] i965/drm: remove legacy defines, aub functions, and decoder prototypes

2017-04-05 Thread Chris Wilson
e for post-mortem debugging. Instead of trying to emit a continous description/replay, just capture a description for each batch and include it in the error state. That's my wishful thinking. -Chris -- Chris Wilson, Intel Open Source Technology Centre __

Re: [Mesa-dev] [PATCH 06/53] i965/drm: Use __typeof__ rather than typeof.

2017-04-05 Thread Chris Wilson
Slightly less invasive? -Chris -- Chris Wilson, Intel Open Source Technology Centre ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 07/53] i965/drm: Drop libpciaccess dependencies.

2017-04-05 Thread Chris Wilson
as far as I can tell, it has never been fixed) about how using libpciaccess from libdrm_intel breaks the world (since libpciaccess uses a singleton that is torn down at the first request rather than upon the last user). Reviewed-by: Chris Wilson -Chris -- Chris Wilson, Intel Open Source T

Re: [Mesa-dev] [PATCH 10/53] i965/drm: Port to Mesa's atomic header.

2017-04-05 Thread Chris Wilson
; > Signed-off-by: Kenneth Graunke Reviewed-by: Chris Wilson -Chris -- Chris Wilson, Intel Open Source Technology Centre ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 11/53] i965/drm: Switch to util/list.h instead of libdrm_lists.h.

2017-04-05 Thread Chris Wilson
EX_INITIALIZER; > -static drmMMListHead bufmgr_list = { &bufmgr_list, &bufmgr_list }; > +static struct list_head bufmgr_list = { &bufmgr_list, &bufmgr_list }; A missing opportunity for static LIST_HEAD(bufmgr_list)? Looks mechanical as expected, Reviewed-by: Chris Wilson -Chris -- Chris Wilson, Intel Open Source Technology Centre ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 12/53] i965/drm: Remove some unused functions and macros.

2017-04-05 Thread Chris Wilson
On Tue, Apr 04, 2017 at 05:10:02PM -0700, Kenneth Graunke wrote: > Based on a patch by Kristian Høgsberg. Even a token explanation "These functions are unused, remove them from the build. More to come later after refactoring!" ? Seems small! Reviewed-by: Chris Wilson -Chris --

Re: [Mesa-dev] [PATCH 14/53] i965/drm: Delete execbuf1 support.

2017-04-05 Thread Chris Wilson
On Tue, Apr 04, 2017 at 05:10:04PM -0700, Kenneth Graunke wrote: > execbuf2 has been around for years. since v2.6.33, comformtably older than the current minimum supported kernel version. Reviewed-by: Chris Wilson -Chris -- Chris Wilson, Intel Open Source Technology Cen

Re: [Mesa-dev] [PATCH 13/53] i965/drm: Remove a bunch of gen < 4 stuff

2017-04-05 Thread Chris Wilson
construction. All the related fence functions are unused. Reviewed-by: Chris Wilson -Chris -- Chris Wilson, Intel Open Source Technology Centre ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 15/53] i965/drm: Use ALIGN, not ROUND_UP_TO.

2017-04-05 Thread Chris Wilson
On Tue, Apr 04, 2017 at 05:10:05PM -0700, Kenneth Graunke wrote: > ROUND_UP_TO handles a NPOT alignment, but all the alignments we use > are power of two anyway, so there's no need. Slightly better than the kernel's roundup and round_up! Reviewed-by: Chris Wilson -Chris -- Chr

Re: [Mesa-dev] [PATCH 16/53] i965/drm: Use Mesa's macros.h instead of duplicating them.

2017-04-05 Thread Chris Wilson
Chris Wilson -Chris -- Chris Wilson, Intel Open Source Technology Centre ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 17/53] i965/drm: Check INTEL_DEBUG & DEBUG_BUFMGR directly.

2017-04-05 Thread Chris Wilson
On Tue, Apr 04, 2017 at 05:10:07PM -0700, Kenneth Graunke wrote: > Eliminates some API around this, and more importantly, the last > field in one bufmgr class. Nice. Some quirms that it is using DEBUG_BUFMGR for batch tracking rather than buffer handling, but Reviewed-by: Chris Wilson

Re: [Mesa-dev] [PATCH 18/53] i965/drm: Devirtualize the bufmgr.

2017-04-05 Thread Chris Wilson
orting the old crap you get a \o/ for every removal.) Reviewed-by: Chris Wilson -Chris -- Chris Wilson, Intel Open Source Technology Centre ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 19/53] i965/drm: Drop cliprects and dr4 from execbuf variants.

2017-04-05 Thread Chris Wilson
On Tue, Apr 04, 2017 at 05:10:09PM -0700, Kenneth Graunke wrote: > Legacy DRI1 leftovers. Do you want to convert intel_batch.c to only using one exec function, then remove all the others in one fell swoop? Nevertheless, Reviewed-by: Chris Wilson -Chris -- Chris Wilson, Intel Open Sou

Re: [Mesa-dev] [PATCH 20/53] i965/drm: Move _drm_bacon_context to intel_bufmgr_gem.c.

2017-04-05 Thread Chris Wilson
On Tue, Apr 04, 2017 at 05:10:10PM -0700, Kenneth Graunke wrote: > This moves us one step closer to killing off intel_bufmgr_priv.h. And please hint you will be killing drm_bacon_context! Reviewed-by: Chris Wilson -Chris -- Chris Wilson, Intel Open Source Technology Cen

Re: [Mesa-dev] [PATCH 21/53] i965/drm: Combine drm_bacon_bufmgr_gem and drm_bacon_bufmgr classes.

2017-04-05 Thread Chris Wilson
On Tue, Apr 04, 2017 at 05:10:11PM -0700, Kenneth Graunke wrote: The distinction was required when the bufmgr was virtualised, now there is only one class, we no longer need the distraction of pretending it is a subclass. Reviewed-by: Chris Wilson -Chris -- Chris Wilson, Intel Open Source

Re: [Mesa-dev] [PATCH 22/53] i965/drm: Assume aperture size query will work.

2017-04-05 Thread Chris Wilson
On Tue, Apr 04, 2017 at 05:10:12PM -0700, Kenneth Graunke wrote: > This query has been available since 2.6.28. We require 3.6. Sure, get-aperture is still misleading though ;) Reviewed-by: Chris Wilson -Chris -- Chris Wilson, Intel Open Source Technology Cen

Re: [Mesa-dev] [PATCH 23/53] i965/drm: Drop has_wait_timeout.

2017-04-05 Thread Chris Wilson
On Tue, Apr 04, 2017 at 05:10:13PM -0700, Kenneth Graunke wrote: > We require Kernel 3.6 and fail screen creation if this doesn't exist. The wait-ioctl was introduced in kernel v3.6 (20120930) and that is our current minimum requirement for screen creation. Reviewed-by: Chris Wilson

Re: [Mesa-dev] [PATCH 24/53] i965/drm: Drop deprecated drm_bacon_bo::offset.

2017-04-05 Thread Chris Wilson
On Tue, Apr 04, 2017 at 05:10:14PM -0700, Kenneth Graunke wrote: > This field was the wrong size, so we replaced it with offset64. Reviewed-by: Chris Wilson > --- > src/mesa/drivers/dri/i965/brw_bufmgr.h | 6 -- > src/mesa/drivers/dri/i965/intel_bufmgr_gem.c | 3 ---

Re: [Mesa-dev] [PATCH 25/53] i965/drm: Drop intel_chipset.h in favor of using gen_device_info.

2017-04-05 Thread Chris Wilson
Reviewed-by: Chris Wilson We are still managing multiple pci-id lists. We gave ourselves the goal many, many years ago of having a single canonical list. -Chris -- Chris Wilson, Intel Open Source Technology Centre ___ mesa-dev mailing list mesa-dev@lis

Re: [Mesa-dev] [PATCH 26/53] i965/drm: Delete engine checks.

2017-04-05 Thread Chris Wilson
On Tue, Apr 04, 2017 at 05:10:16PM -0700, Kenneth Graunke wrote: > This is basically handholding to prevent a bogus caller from trying to > execbuffer on a bogus engine. i965 already does this correctly. Too true. Reviewed-by: Chris Wilson -Chris -- Chris Wilson, Intel Open Source Tech

Re: [Mesa-dev] [PATCH 27/53] i965/drm: Drop userptr support for now.

2017-04-05 Thread Chris Wilson
lot faster using the format conversion with blorp than mesa, even with the synchronisation cost. (I thought I sent the userptr integration along with brw_batch?) Reviewed-by: Chris Wilson -Chris -- Chris Wilson, Intel Open Source Technology Centre ___

Re: [Mesa-dev] [PATCH 28/53] i965/drm: Drop softpin support for now.

2017-04-05 Thread Chris Wilson
Chris Wilson -Chris -- Chris Wilson, Intel Open Source Technology Centre ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 30/53] i965/drm: Drop bo_gem::kflags.

2017-04-05 Thread Chris Wilson
On Tue, Apr 04, 2017 at 05:10:20PM -0700, Kenneth Graunke wrote: > It's always zero now. Reviewed-by: Kenneth Graunke -Chris -- Chris Wilson, Intel Open Source Technology Centre ___ mesa-dev mailing list mesa-dev@lists.freedesktop.o

Re: [Mesa-dev] [PATCH 29/53] i965/drm: Drop has_exec_async related API.

2017-04-05 Thread Chris Wilson
On Tue, Apr 04, 2017 at 05:10:19PM -0700, Kenneth Graunke wrote: > Mesa doesn't use this yet. We'll almost certainly want to, but we can > add the functionality back after we clean up the messy drm code. Reviewed-by: Chris Wilson -Chris -- Chris Wilson, Intel Open Source T

Re: [Mesa-dev] [PATCH 31/53] i965/drm: Switch from uthash to Mesa's hash table.

2017-04-05 Thread Chris Wilson
alablity is far more important. It used to be a linear list which for a stress test of many hundreds of thousands of bo was unconscionable. I choose uthash simply for its license and convenience. Mesa should have a dense integer focused hash/idr. (And one day it will ;) Reviewed-by: Chris Wil

Re: [Mesa-dev] [PATCH 32/53] i965/drm: Unwrap the unnecessary drm_bacon_reloc_target_info struct.

2017-04-05 Thread Chris Wilson
On Tue, Apr 04, 2017 at 05:10:22PM -0700, Kenneth Graunke wrote: > This used to have another field, but now it's just a BO pointer. Reviewed-by: Chris Wilson -Chris -- Chris Wilson, Intel Open Source Technology Centre ___ mesa-dev mailing l

Re: [Mesa-dev] [PATCH 33/53] i965/drm: Drop code to search for an existing bufmgr.

2017-04-05 Thread Chris Wilson
ship of those handles is shared by those independent parties. * * Don't do this! Ensure that each library/bufmgr has its own device * fd so that its namespace does not clash with another. */ Hmm, not great. The point about namespaces is ok, but the danger is the blurb is more confusi

Re: [Mesa-dev] [PATCH 34/53] i965/drm: Drop GEM_SW_FINISH stuff.

2017-04-05 Thread Chris Wilson
s. Drop the code. Reviewed-by: Chris Wilson (Still pining for a few assert(!bo->scanout || !write);) -Chris -- Chris Wilson, Intel Open Source Technology Centre ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/m

Re: [Mesa-dev] [PATCH 35/53] i965: Change intel_batchbuffer_reloc() into brw_emit_reloc().

2017-04-05 Thread Chris Wilson
intel_batchbuffer *batch, uint32_t batch_offset, > + drm_bacon_bo *target, uint32_t target_offset, > + uint32_t read_domains, uint32_t write_domain) Names make sense, but target_offset limited to u32? I hope that's on your today list. (As well as sto

Re: [Mesa-dev] [PATCH 36/53] i965: Use brw_emit_reloc() instead of drm_bacon_bo_emit_reloc().

2017-04-05 Thread Chris Wilson
he bugs are kept. -Chris -- Chris Wilson, Intel Open Source Technology Centre ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 37/53] i965: Make/use a brw_batch_references() wrapper.

2017-04-05 Thread Chris Wilson
h the bo. As a simple name change, Reviewed: Chris Wilson -Chris -- Chris Wilson, Intel Open Source Technology Centre ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 38/53] i965: Make a screen::aperture_threshold field.

2017-04-05 Thread Chris Wilson
this when we rewrite aperture space checking, shortly. > In the meantime, we can also use it in GLX_MESA_query_renderer. This patch could be applied now, since it is moving the query from runtime to screen init. Reviewed-by: Chris Wilson -Chris -- Chris Wilson, Intel Open S

Re: [Mesa-dev] [PATCH 39/53] i965/drm: Make register write check handle execbuffer directly.

2017-04-05 Thread Chris Wilson
nt = 2, > + .batch_len = ALIGN((char *) batch - (char *) bo->virtual, 8), > + .flags = I915_EXEC_RENDER, > + }; > + > + __DRIscreen *dri_screen = screen->driScrnPriv; > + drmIoctl(dri_screen->fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, &e

Re: [Mesa-dev] [PATCH 40/53] i965/drm: Rewrite relocation handling.

2017-04-05 Thread Chris Wilson
> +} > + > +bool > brw_batch_references(struct intel_batchbuffer *batch, drm_bacon_bo *bo) > { > - return drm_bacon_bo_references(batch->bo, bo); > + for (int i = 0; i < batch->exec_count; i++) { > + if (batch->exec_bos[i] == bo) > + return t

Re: [Mesa-dev] [PATCH 41/53] i965/drm: Merge bo->handle and bo_gem->gem_handle.

2017-04-05 Thread Chris Wilson
? Is there a reason why the drm_bacon_bo/drm_bacon_gem_bo has remained so long? At the moment they are the same global information. Reviewed-by: Chris Wilson -Chris -- Chris Wilson, Intel Open Source Technology Centre ___ mesa-dev mailing list mesa-dev@

Re: [Mesa-dev] [PATCH 42/53] i965/drm: Merge drm_bacon_bo_gem into drm_bacon_bo.

2017-04-05 Thread Chris Wilson
On Tue, Apr 04, 2017 at 05:10:32PM -0700, Kenneth Graunke wrote: > The separate class gives us a bit of extra encapsulation, but I don't > know that it's really worth the boilerplate. I think we can reasonably > expect the rest of the driver to be responsible. Reviewed-by: Chr

Re: [Mesa-dev] [PATCH 43/53] i965/drm: Drop drm_bacon_gem_bo_madvise_internal().

2017-04-05 Thread Chris Wilson
Reviewed-by: Chris Wilson -Chris -- Chris Wilson, Intel Open Source Technology Centre ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 44/53] i965/drm: Drop drm_bacon_* from static functions.

2017-04-05 Thread Chris Wilson
On Tue, Apr 04, 2017 at 05:10:34PM -0700, Kenneth Graunke wrote: > Mesa style is to not use lengthy prefixes for static functions. All the types are wrong. :( Please fix this inherited mess. Reviewed-by: Chris Wilson -Chris -- Chris Wilson, Intel Open Source Technology Cen

Re: [Mesa-dev] [PATCH 45/53] i965/drm: Rename drm_bacon_gem_bo_bucket to bo_cache_bucket.

2017-04-05 Thread Chris Wilson
On Tue, Apr 04, 2017 at 05:10:35PM -0700, Kenneth Graunke wrote: > No need for a prefix as this struct is local to the .c file. > > Less bacon. Reviewed-by: Chris Wilson -Chris -- Chris Wilson, Intel Open Source Technology Centre ___ mesa-de

Re: [Mesa-dev] [PATCH 46/53] i965/drm: Fold drm_bacon_gem_reset_stats into the callers.

2017-04-05 Thread Chris Wilson
, DRM_IOCTL_I915_GET_RESET_STATS, stats)) err = -errno; return err; /* reporting the actual error may be overkill, just habit! */ } Reviewed-by: Chris Wilson -Chris -- Chris Wilson, Intel Open Source Technology Centre

Re: [Mesa-dev] [PATCH 47/53] i965: Just use a uint32_t context handle rather than a malloc'd wrapper.

2017-04-05 Thread Chris Wilson
if (ctx_id != 0 && > + drmIoctl(bufmgr->fd, DRM_IOCTL_I915_GEM_CONTEXT_DESTROY, &d) != 0) { > fprintf(stderr, "DRM_IOCTL_I915_GEM_CONTEXT_DESTROY failed: > %s\n", Reviewing the fprintf I hope are on the todo list. Reviewed-by: Chris

Re: [Mesa-dev] [PATCH 49/53] i965/drm: Rename drm_bacon_reg_read() to brw_reg_read().

2017-04-05 Thread Chris Wilson
On Tue, Apr 04, 2017 at 05:10:39PM -0700, Kenneth Graunke wrote: > Less bacon. brw_reg_read() now doesn't need to be part of the bufmgr. -Chris -- Chris Wilson, Intel Open Source Technology Centre ___ mesa-dev mailing list

Re: [Mesa-dev] [PATCH 50/53] i965: Drop brw_bo_map[_gtt] wrappers which issue perf warnings.

2017-04-05 Thread Chris Wilson
BO map > function itself, so all callers gain the warning. I plumbed your perf_debug into the lower layers to maintain the stall warnings. Would that not be a better approach? -Chris -- Chris Wilson, Intel Open Source Technology Centre ___ mesa-dev

Re: [Mesa-dev] [PATCH 00/53] i965: Eat libdrm_intel for breakfast

2017-04-05 Thread Chris Wilson
fort into trying to explain why brw_batch.c behaves as it does and how it expects the kernel to behave in relation to itself. Those comments are probably more valuable than the code contributions... -Chris -- Chris Wilson, Intel Open Source Technology Centre _

Re: [Mesa-dev] [PATCH] anv/query: Busy-wait for available query entries

2017-04-05 Thread Chris Wilson
On Wed, Apr 05, 2017 at 09:37:16AM -0700, Jason Ekstrand wrote: >On Wed, Apr 5, 2017 at 1:27 AM, Chris Wilson <[1]ch...@chris-wilson.co.uk> >wrote: > > On Tue, Apr 04, 2017 at 07:21:38PM -0700, Jason Ekstrand wrote: > > Before, we were just looking at

Re: [Mesa-dev] [PATCH v2 1/2] anv: Use GEM_BUSY instead of GEM_WAIT when timeout == 0

2017-04-05 Thread Chris Wilson
other thread, I just mentioned a subtlety that GEM_BUSY is restricted to reporting on i915.ko GPU users of the bo, whereas GEM_WAIT will report on the status of all users, including third parties and miscellaneous asynchronous tasks. -Chris -- Chris Wilson, Intel Open Source Technology

Re: [Mesa-dev] [PATCH v3 2/2] anv/query: Busy-wait for available query entries

2017-04-05 Thread Chris Wilson
t the bo is idle, you might then went to check for a reset in case it was due to a lost device. GEM_BUSY is lockless, but GEM_RESET_STATS currently takes the big struct_mutex and so has non-deterministic and often quite large latencies. -Chris -- Chris Wilson, Intel Open Source Technology Centre ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH v3 2/2] anv/query: Busy-wait for available query entries

2017-04-05 Thread Chris Wilson
On Wed, Apr 05, 2017 at 11:02:18AM -0700, Jason Ekstrand wrote: >On Wed, Apr 5, 2017 at 10:45 AM, Chris Wilson ><[1]ch...@chris-wilson.co.uk> wrote: > > On Wed, Apr 05, 2017 at 10:28:53AM -0700, Jason Ekstrand wrote: > > Before, we were just looking at

Re: [Mesa-dev] [PATCH 00/53] i965: Eat libdrm_intel for breakfast

2017-04-05 Thread Chris Wilson
rs. > >> > > >> I believe I mentioned it a few days ago - there is no need to worry > >> about API or ABI stability. > >> > >> Need new API - add it. Things getting fragile or too many layers - > sed > >> /libdrm_intel$(N)/libdrm_intel$(N+1)/ and rework as needed. > >> > >> I fear that Importing libdrm_intel will be detrimental to libva's > >> intel-driver, Beignet and xf86-video-intel > >I wouldn't worry about xf86-video-intel.  Chris has already copy+pasted >half of the X server, what's libdrm? :-) Slight overexaggeration, but that libdrm_intel was snafu was the original split. -Chris -- Chris Wilson, Intel Open Source Technology Centre ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH v4 2/2] anv/query: Busy-wait for available query entries

2017-04-05 Thread Chris Wilson
on > each query until it's available. > > This significantly reduces pipeline bubbles and improves performance of > The Talos Principle on medium settings (where the GPU isn't overloaded > with drawing) by around 20% on my SkyLake gt4. I've no more hopefully helpful s

Re: [Mesa-dev] very strange intermittent frame-dropping

2017-04-05 Thread Chris Wilson
gt; > > LIBGL_DEBUG=verbose glxgears > libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/tls/i965_dri.so > libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/i965_dri.so > libGL: Can't open configuration file /home/lkcl/.drirc: No such file > or directory. > li

Re: [Mesa-dev] [PATCH 25/53] i965/drm: Drop intel_chipset.h in favor of using gen_device_info.

2017-04-05 Thread Chris Wilson
On Wed, Apr 05, 2017 at 02:36:38PM -0700, Kenneth Graunke wrote: > On Wednesday, April 5, 2017 3:33:39 AM PDT Chris Wilson wrote: > > On Tue, Apr 04, 2017 at 05:10:15PM -0700, Kenneth Graunke wrote: > > > This moves the PCI ID detection to intel_screen.c and makes > > >

Re: [Mesa-dev] [PATCH 40/53] i965/drm: Rewrite relocation handling.

2017-04-06 Thread Chris Wilson
On Wed, Apr 05, 2017 at 04:56:42PM -0700, Kenneth Graunke wrote: > On Wednesday, April 5, 2017 4:46:27 AM PDT Chris Wilson wrote: > > On Tue, Apr 04, 2017 at 05:10:30PM -0700, Kenneth Graunke wrote: > > > The execbuf2 kernel API requires us to construct two kinds of lists

Re: [Mesa-dev] [PATCH] aubinator_error_decode: print unknown instructions in red

2017-04-06 Thread Chris Wilson
On Thu, Apr 06, 2017 at 12:04:40PM +0100, Lionel Landwerlin wrote: > This is a pretty good indicator that something's gone horribly wrong. Do you run IPEHR through the decoder? That was somewhere on the todo list for intel_error_decode. -Chris -- Chris Wilson, Intel Open Source Te

Re: [Mesa-dev] [PATCH] aubinator_error_decode: print unknown instructions in red

2017-04-06 Thread Chris Wilson
On Thu, Apr 06, 2017 at 12:17:00PM +0100, Lionel Landwerlin wrote: > On 06/04/17 12:12, Chris Wilson wrote: > >On Thu, Apr 06, 2017 at 12:04:40PM +0100, Lionel Landwerlin wrote: > >>This is a pretty good indicator that something's gone horribly wrong. > >Do you run IP

[Mesa-dev] [PATCH 1/2] egl: Support IMG_context_priority

2017-04-06 Thread Chris Wilson
e! Signed-off-by: Chris Wilson Reviewed-by: Tapani Pälli Cc: Rob Clark --- src/egl/drivers/dri2/egl_dri2.c | 1 + src/egl/main/eglapi.c | 2 ++ src/egl/main/eglcontext.c | 30 ++ src/egl/main/eglcontext.h | 1 + src/egl/main/egldisplay.h

[Mesa-dev] [PATCH 2/2] egl, dri: Propagate context priority hint to driver->CreateContext

2017-04-06 Thread Chris Wilson
driver as a function parameter. Issues: * How to pass back the priority of the create context (as it may be modified by the driver) back to EGL? Signed-off-by: Chris Wilson --- include/GL/internal/dri_interface.h| 6 src/egl/drivers/dri2/egl_dri2.c| 38

Re: [Mesa-dev] [PATCH 1/2] intel/aubinator_error_decode: Avoid printing long ascii85 lines

2017-04-07 Thread Chris Wilson
>if (sscanf(line, "%m[^ ] command stream\n", &new_ring_name) > 0) { > @@ -356,7 +357,7 @@ read_data_file(FILE *file) > ring_name = new_ring_name; >} Just handle ascii85_start here, they are unique line[0]. decode() needs a few fixes to use the

Re: [Mesa-dev] [PATCH v2 2/5] anv/descriptor_set: Use anv_multialloc for descriptor set layouts

2017-04-07 Thread Chris Wilson
; anv_multialloc_add(&ma, &set_layout, 1); anv_multialloc_add(&ma, &bindings, max_binding + 1); anv_multialloc_add(&ma, &samplers, immutable_sampler_count); if (!anv_multialloc_alloc(&ma, &device->alloc ?:

Re: [Mesa-dev] [PATCH] anv/query: Use snooping on !LLC platforms

2017-04-07 Thread Chris Wilson
invalidate_range(pool->bo.map + offset, > - MIN2(size, pool->bo.size - offset)); > - } > - > VkResult status = VK_SUCCESS; > for (uint32_t i = 0; i < queryCount; i++) { >uint64_t *slot = pool->bo.map + (firstQuery + i) * pool->stride; Reviewed-by: Chris Wilson -Chris -- Chris Wilson, Intel Open Source Technology Centre ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

<    3   4   5   6   7   8   9   10   11   >