Re: [Mesa-dev] [PATCH 7/7] i965: Fix asynchronous mappings on !LLC platforms.

2017-07-07 Thread Chris Wilson
Quoting Kenneth Graunke (2017-07-07 07:08:16) > On Thursday, July 6, 2017 10:51:49 PM PDT Kenneth Graunke wrote: > > On Wednesday, July 5, 2017 2:24:55 PM PDT Chris Wilson wrote: > > > Quoting Kenneth Graunke (2017-07-05 21:56:54) > > > > --- > > > > s

[Mesa-dev] [PATCH] i965: Use brw_bo_wait() for brw_bo_wait_rendering()

2017-07-07 Thread Chris Wilson
ioctl. Historically libdrm used set-domain as we did not have an explicit wait-ioctl (and the patches to teach it to use wait if available were lost in the mists). Since mesa already depends upon a kernel support the wait-ioctl, we do not need to supply a fallback. Signed-off-by: Chris Wilson Cc: D

[Mesa-dev] [PATCH v2] i965: Resolve framebuffers before signaling the fence

2017-07-07 Thread Chris Wilson
before as is currently the case. v2: fixup assert to use GL_SYNC_GPU_COMMANDS_COMPLETE (Chad) Reported-by: Sergi Granell Fixes: c636284ee8ee ("i965/sync: Implement DRI2_Fence extension") Signed-off-by: Chris Wilson Cc: Sergi Granell Cc: Rob Clark Cc: Chad Versace Cc: Daniel Stone Cc: Ke

Re: [Mesa-dev] [Intel-gfx] [PATCH 1/1] drm/i915: Version the MOCS settings

2017-07-07 Thread Chris Wilson
Quoting Ben Widawsky (2017-07-07 19:42:25) > On 17-07-07 11:34:48, Chris Wilson wrote: > >Quoting Ben Widawsky (2017-07-07 00:27:01) > >> drivers/gpu/drm/i915/i915_drv.c | 3 +++ > >> drivers/gpu/drm/i915/i915_drv.h | 2 ++ > >> drivers/gpu/drm/i915/i915_pc

Re: [Mesa-dev] [PATCH] anv: Stop setting domains to RENDER on EXEC_OBJECT_WRITE

2017-07-07 Thread Chris Wilson
out. That was until I saw what you were planning to do for anv. Hmm, that puts the oldest kernel that might support anv as commit 51bc140431e233284660b1d22c47dec9ecdb521e [v4.3] Author: Chris Wilson Date: Mon Aug 31 15:10:39 2015 +0100 drm/i915: Always mark the object as dirty when used by

[Mesa-dev] [PATCH] i965: Use VALGRIND_MAKE_MEM_x in place of MALLOCLIKE/FREELIKE

2017-07-11 Thread Chris Wilson
Valgrind doesn't actually implement VALGRIND_FREELIKE_BLOCK as the exact inverse of VALGRIND_MALLOCLIKE_BLOCK. It makes the block inaccessible, but still leaves it defined in its allocation tracker i.e. it will report the mmap as lost despite the call to FREELIKE! Instead of treating the mmap as a

[Mesa-dev] [PATCH] i965: Fix up a failed CPU/WC mmaping with a GTT mapping

2017-07-11 Thread Chris Wilson
Not all objects will be mappable for direct access by the CPU (either using WC/CPU or WC paths), for example, a dmabuf wrapping an object on a foreign device or an object wrapping access to stolen memory. Since either the physical pages are not known or even do not exist, we need to use the mediate

Re: [Mesa-dev] [PATCH 1/4] i965: Drop bogus pthread_mutex_unlock in map_gtt error path.

2017-07-12 Thread Chris Wilson
patch. My apologies for not noticing! I appear to have fixed it in a rebase and so it disappeared from my tree. Reviewed-by: Chris Wilson Doing a quick grep on the remaining bufmgr->lock shows that we are now only locking around the global hash tables. -Chris

Re: [Mesa-dev] [PATCH 3/4] i965: Use write-combine mappings where available

2017-07-12 Thread Chris Wilson
Quoting Kenneth Graunke (2017-07-12 08:22:24) > From: Matt Turner > > Write-combine mappings give much better performance on writes than > uncached access through the GTT. > > Improves performance of GFXBench 4's gl_driver2 benchmark at 1024x768 > on Apollolake by 3.6086% +/- 0.674193% (n=15). >

Re: [Mesa-dev] [PATCH 4/4] i965: Drop non-LLC lunacy in the program cache code.

2017-07-12 Thread Chris Wilson
Quoting Kenneth Graunke (2017-07-12 08:22:25) > The non-LLC story was a horror show. We uploaded data via pwrite > (drm_intel_bo_subdata), which would stall if the cache BO was in > use (being read) by the GPU. Obviously, we wanted to avoid that. > So, we tried to detect whether the buffer was bu

Re: [Mesa-dev] [PATCH 4/4] i965: Drop non-LLC lunacy in the program cache code.

2017-07-12 Thread Chris Wilson
Quoting Chris Wilson (2017-07-12 10:40:43) > Quoting Kenneth Graunke (2017-07-12 08:22:25) > > The non-LLC story was a horror show. We uploaded data via pwrite > > (drm_intel_bo_subdata), which would stall if the cache BO was in > > use (being read) by the GPU. Obviously, we

Re: [Mesa-dev] [EGL android: accquire fence implementation] i965: Queue the buffer with a sync fence for Android OS

2017-07-13 Thread Chris Wilson
Quoting Wu, Zhongmin (2017-07-13 09:31:15) > As for the using of last fence when the batch buffer is empty for > create_fence_fd, I suggest it can be another story and we will try to > optimize it in the future... Note that is a backend problem. If you call a driver interface to create a fence

Re: [Mesa-dev] [PATCH v2 3/3] i965: if DEBUG_OUT_OF_BOUND_CHK is up, check that noise padding for each bo used in batchbuffer is correct

2017-12-13 Thread Chris Wilson
Quoting kevin.rogo...@intel.com (2017-12-13 10:18:38) > From: Kevin Rogovin > > v2: > Comments indicating that brw_bo_padding_is_good() will do the required > waiting for GPU commands to finish > > Signed-off-by: Kevin Rogovin > --- > src/mesa/drivers/dri/i965/intel_batchbuffer.c | 19 ++

Re: [Mesa-dev] [PATCH v2 3/3] i965: if DEBUG_OUT_OF_BOUND_CHK is up, check that noise padding for each bo used in batchbuffer is correct

2017-12-13 Thread Chris Wilson
Quoting Rogovin, Kevin (2017-12-13 11:19:10) > Hi, > > > Actually that's not strictly true. Since you only do a pread here, it will > > only synchronize against the last declared write to the bo. > > There's no guaranteed sync with the last batch for a set of read-only bo. > > Similarly, because

Re: [Mesa-dev] [PATCH v2 3/3] i965: if DEBUG_OUT_OF_BOUND_CHK is up, check that noise padding for each bo used in batchbuffer is correct

2017-12-13 Thread Chris Wilson
Quoting Rogovin, Kevin (2017-12-13 11:59:41) > Just to make sure of the reason of the original objection to trusting pread > blindly: > pread will miss writes IF the GEM BO was not listed in the execbuffer2 ioctl. Yes. It's just the accidental writes into the read-only bo that you may miss. You

[Mesa-dev] [PATCH 2/2] RFC i965: Share the GTT between non-robust contexts

2017-12-15 Thread Chris Wilson
require robust segregation (e.g. ARB_robustness). Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/i965/brw_bufmgr.c | 23 +-- src/mesa/drivers/dri/i965/brw_bufmgr.h | 2 +- src/mesa/drivers/dri/i965/brw_context.c | 2 +- 3 files changed, 19 insertions(+), 8 deletions

[Mesa-dev] [PATCH 1/2] i965: Always try to create a logical context

2017-12-15 Thread Chris Wilson
Always enable use of HW logical contexts to preserve GPU state between batches when the kernel supports such constructs, continuing to enforce the required support for gen6+. At runtime, this effectively removes the BRW_NEW_CONTEXT flag (and the upload of invariant state) from the start of every b

Re: [Mesa-dev] [PATCH 2/2] RFC i965: Share the GTT between non-robust contexts

2017-12-15 Thread Chris Wilson
Quoting Jason Ekstrand (2017-12-15 15:40:51) > What does this actually gain us? Multiple contexts aren't common. UE4 is one that I know of that uses multiple contexts to separate rendering from presentation, afaik. The API is precursor to try and define a lighterweight context object for future e

Re: [Mesa-dev] [PATCH 2/2] RFC i965: Share the GTT between non-robust contexts

2017-12-15 Thread Chris Wilson
Quoting Jason Ekstrand (2017-12-15 16:21:42) > On Fri, Dec 15, 2017 at 5:42 AM, Chris Wilson > wrote: > > Every client (everyone instance that opens /dev/dri/card0 or the render > nodes), receives a unique per-process GTT (where supported by the > hardware, unfort

Re: [Mesa-dev] [PATCH 2/2] RFC i965: Share the GTT between non-robust contexts

2017-12-15 Thread Chris Wilson
Quoting Jason Ekstrand (2017-12-15 17:38:10) > On Fri, Dec 15, 2017 at 8:27 AM, Chris Wilson > wrote: > > Quoting Jason Ekstrand (2017-12-15 16:21:42) > > On Fri, Dec 15, 2017 at 5:42 AM, Chris Wilson > wrote: > > > >     Every client (ever

Re: [Mesa-dev] [PATCH resend 1/2] i965: Avoid problems from referencing orphaned BOs after growing.

2018-01-05 Thread Chris Wilson
Quoting Kenneth Graunke (2018-01-05 18:56:32) > Growing the batch/state buffer is a lot more dangerous than I thought. > > A number of places emit multiple state buffer sections, and then write > data to the returned pointer, or save a pointer to brw->batch.state.bo > and then use it in relocation

Re: [Mesa-dev] [PATCH v3 2/3] i965: add noise padding to buffer object and function to check if noise is correct

2018-01-09 Thread Chris Wilson
return false; > + } > + expected_value = next_noise_value(expected_value); > + } > + drm_munmap(mapped, bo->padding_size); > + } > + return true; > +} Looks good from the uabi pov and interaction with brw_bo. Reviewed-by: Chris Wilson I'

Re: [Mesa-dev] [PATCH 3/4] i965/bufmgr: Add a set_tiling helper

2018-01-12 Thread Chris Wilson
Quoting Jason Ekstrand (2018-01-12 01:40:52) > This helper should be used carefully as setting tiling is a racy > operation since it potentially interacts with other processes. Still, > it is a useful thing to be able to do. > > Cc: mesa-sta...@lists.freedesktop.org > --- > src/mesa/drivers/dri/

[Mesa-dev] [PATCH] intel: Future-proof ring names for aubinator_error_decode

2018-01-17 Thread Chris Wilson
course means we need to teach aubinator_error_decode how to map both sets of ring names onto its register maps. Signed-off-by: Chris Wilson Cc: Michel Thierry Cc: Michal Wajdeczko Cc: Tvrtko Ursulin Cc: Lionel Landwerlin Cc: Kenneth Graunke --- src/intel/tools/aubinator_error_decode.c | 122

Re: [Mesa-dev] [PATCH] intel: Future-proof ring names for aubinator_error_decode

2018-01-18 Thread Chris Wilson
Quoting Michel Thierry (2018-01-18 16:44:18) > On 1/17/2018 7:47 AM, Chris Wilson wrote: > > The kernel is moving to a $class$instance naming scheme in preparation > > for accommodating more rings in the future in a consistent manner. It is > > already using the naming schem

Re: [Mesa-dev] [PATCH v4] i965: Avoid problems from referencing orphaned BOs after growing.

2018-01-18 Thread Chris Wilson
r BO - and > we'll sort it out and combine the two properly in the end. > > v2/v3: > - Handle stale pointers in the shadow copy case, where realloc may or > may not move our shadow copy to a new address. > - Track the partial map explicitly, to avoid problems with buffer r

Re: [Mesa-dev] [PATCH] anv: implement VK_EXT_global_priority extension

2018-01-19 Thread Chris Wilson
Quoting Tapani Pälli (2018-01-19 10:44:49) > diff --git a/src/intel/vulkan/anv_gem.c b/src/intel/vulkan/anv_gem.c > index 34c0989108..46069dcdc7 100644 > --- a/src/intel/vulkan/anv_gem.c > +++ b/src/intel/vulkan/anv_gem.c > @@ -302,6 +302,55 @@ close_and_return: > return swizzled; > } > > +s

Re: [Mesa-dev] [PATCH v2] anv: implement VK_EXT_global_priority extension

2018-01-19 Thread Chris Wilson
Quoting Samuel Iglesias Gonsálvez (2018-01-19 11:58:24) > Reviewed-by: Samuel Iglesias Gonsálvez Me too! Reviewed-by: Chris Wilson -Chris ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH] i965: Accept CONTEXT_ATTRIB_PRIORITY for brwCreateContext

2018-01-19 Thread Chris Wilson
h to the kernel"). Fixes: 6d87500fe12e ("dri: Change __DriverApiRec::CreateContext to take a struct for attribs") Signed-off-by: Chris Wilson Cc: Adam Jackson Cc: Nicolai Hähnle Cc: Emil Velikov Cc: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_context.c | 4 +++- 1 fi

Re: [Mesa-dev] [PATCH 1/2] i965: Plumb brw through to intel_batchbuffer_reset().

2017-09-17 Thread Chris Wilson
Quoting Kenneth Graunke (2017-09-16 09:31:26) > We'll want to pass this to brw_bo_map in a moment. Reviewed-by: Chris Wilson -Chris ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 2/2] i965: Warn for GTT fallbacks when mapping the batch/state buffers.

2017-09-17 Thread Chris Wilson
curiosity, the GTT mmap also failed? If you didn't have enough virtual space for one mmap, the other should also fail. Reviewed-by: Chris Wilson How important is the requirement to flag GL_NO_MEMORY rather than explode? Even for batch reset, we should still be able to propagate the error

Re: [Mesa-dev] [PATCH 2/2] i965: Warn for GTT fallbacks when mapping the batch/state buffers.

2017-09-18 Thread Chris Wilson
Quoting Kenneth Graunke (2017-09-17 15:06:49) > On Sunday, September 17, 2017 1:58:16 AM PDT Chris Wilson wrote: > > Quoting Kenneth Graunke (2017-09-16 09:31:27) > > > This shouldn't really happen in practice, but I hit it a couple of times > > > when running a dr

Re: [Mesa-dev] [PATCH 1/2] i965: Move MI_BATCHBUFFER_END handling into brw_finish_batch().

2017-09-18 Thread Chris Wilson
Quoting Kenneth Graunke (2017-09-18 18:56:56) > This is, by definition, finishing the batch. > --- > src/mesa/drivers/dri/i965/intel_batchbuffer.c | 14 +++--- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/src/mesa/drivers/dri/i965/intel_batchbuffer.c > b/src/mesa/dr

Re: [Mesa-dev] [PATCH 2/2] i965: Fix brw_finish_batch to grow the batchbuffer.

2017-09-18 Thread Chris Wilson
Quoting Kenneth Graunke (2017-09-18 18:56:57) > brw_finish_batch emits commands needed at the end of every batch buffer, > including any workarounds. In the past, we freed up some "reserved" > batch space before calling it, so we would never have to flush during > it. This was error prone and eas

Re: [Mesa-dev] [PATCH 2/2] i965: Fix brw_finish_batch to grow the batchbuffer.

2017-09-19 Thread Chris Wilson
Quoting Kenneth Graunke (2017-09-18 21:44:57) > On Monday, September 18, 2017 11:14:35 AM PDT Chris Wilson wrote: > > Quoting Kenneth Graunke (2017-09-18 18:56:57) > > > brw_finish_batch emits commands needed at the end of every batch buffer, > > > including any workarou

Re: [Mesa-dev] [PATCH 1/2] i965: Move MI_BATCHBUFFER_END handling into brw_finish_batch().

2017-09-19 Thread Chris Wilson
Quoting Kenneth Graunke (2017-09-18 21:38:09) > On Monday, September 18, 2017 11:03:37 AM PDT Chris Wilson wrote: > > Tangential: Do we care about intel_upload_finish on batch flush any more > > now that async access is universal? > > I'm not sure. We could certainly

Re: [Mesa-dev] [PATCH 2/2] i965: Fix brw_finish_batch to grow the batchbuffer.

2017-09-19 Thread Chris Wilson
Quoting Chris Wilson (2017-09-19 09:38:54) > Quoting Kenneth Graunke (2017-09-18 21:44:57) > > On Monday, September 18, 2017 11:14:35 AM PDT Chris Wilson wrote: > > > Quoting Kenneth Graunke (2017-09-18 18:56:57) > > > > @@ -904,13 +914,6 @@ _intel_batchbuffer_

Re: [Mesa-dev] [PATCH 4/4] i965: Drop the batch and limp along if execbuf fails.

2017-09-25 Thread Chris Wilson
Quoting Jason Ekstrand (2017-09-24 22:53:04) > I've got this a few times recently and it's really annoying. I don't know > if this will fix anything or not but it may be worth a go. I fear, > however, that ignoring an execbuf failure will lead to permanently > corrupted rendering or even addit

Re: [Mesa-dev] [PATCH 2/4] i965: Use atomic ops in get_new_program_id().

2017-09-25 Thread Chris Wilson
han post-increment, so we > change screen->program_id to be initialized to 0 instead of 1. At which > point, we can just delete the initialization because intel_screen is > rzalloc'd. Reviewed-by: Chris Wilson -Chris ___ mesa-dev mailing

Re: [Mesa-dev] [PATCH 1/4] i965: Convert brw_bufmgr to use C11 mutexes instead of pthreads.

2017-09-25 Thread Chris Wilson
Quoting Kenneth Graunke (2017-09-24 07:02:03) > There's no real advantage or disadvantage here, it's just for stylistic > consistency with the rest of the codebase. Being consistent is its own reward. Reviewed-by: Chris Wilson -Chris

Re: [Mesa-dev] [PATCH 3/4] i965: Rename do_flush_locked to submit_batch().

2017-09-25 Thread Chris Wilson
Quoting Kenneth Graunke (2017-09-24 07:02:05) > do_flush_locked isn't a great name - especially given that there's no > locking going on in our code relating to execbuf. Reviewed-by: Chris Wilson -Chris ___ mesa-dev maili

Re: [Mesa-dev] [PATCH 4/4] i965: Drop the batch and limp along if execbuf fails.

2017-09-25 Thread Chris Wilson
Quoting Kenneth Graunke (2017-09-25 17:46:11) > On Monday, September 25, 2017 8:05:29 AM PDT Chris Wilson wrote: > > Quoting Jason Ekstrand (2017-09-24 22:53:04) > > > I've got this a few times recently and it's really annoying. I don't > > > know >

Re: [Mesa-dev] [PATCH 00/22] RFC: Batchbuffer Logger for Intel GPU

2017-09-26 Thread Chris Wilson
Quoting Rogovin, Kevin (2017-09-26 10:35:44) > Hi, > > Attached to this message are the following: > 1. a file giving example usage of the tool with a modified apitrace to > produce json output > > 2. the patches to apitrace to make it BatchbufferLogger aware > > 3. the JSON fi

Re: [Mesa-dev] [PATCH 00/22] RFC: Batchbuffer Logger for Intel GPU

2017-09-27 Thread Chris Wilson
Quoting Rogovin, Kevin (2017-09-27 07:53:29) > Hi, > > Right now the way the thing works is that it walks the batchbuffer just > after the kernel returns from the ioctl and updates its internal view of the > GPU state as it walks and emits to the log file the data. The log on a single > batchb

Re: [Mesa-dev] [PATCH 06/22] i965: Enable BatchbufferLogger in i965 driver

2017-09-27 Thread Chris Wilson
Quoting kevin.rogo...@intel.com (2017-09-25 11:34:06) > +static > +uint32_t > +intel_batchbuffer_state(const struct i965_logged_batchbuffer *st) > +{ > + struct intel_batchbuffer *batch > + = (struct intel_batchbuffer*) st->driver_data; > + > + assert(batch->bo->gem_handle == st->gem_bo);

Re: [Mesa-dev] [PATCH] vc4: Mark BOs as purgeable when they enter the BO cache

2017-09-27 Thread Chris Wilson
Quoting Boris Brezillon (2017-09-27 14:45:17) > static struct vc4_bo * > vc4_bo_from_cache(struct vc4_screen *screen, uint32_t size, const char *name) > { > @@ -111,6 +121,11 @@ vc4_bo_from_cache(struct vc4_screen *screen, uint32_t > size, const char *name) > return NUL

Re: [Mesa-dev] [PATCH] vc4: Mark BOs as purgeable when they enter the BO cache

2017-09-27 Thread Chris Wilson
Quoting Boris Brezillon (2017-09-27 15:06:53) > On Wed, 27 Sep 2017 14:50:10 +0100 > Chris Wilson wrote: > > > Quoting Boris Brezillon (2017-09-27 14:45:17) > > > static struct vc4_bo * > > > vc4_bo_from_cache(struct vc4_screen *screen, uint3

Re: [Mesa-dev] [PATCH 06/22] i965: Enable BatchbufferLogger in i965 driver

2017-09-27 Thread Chris Wilson
Quoting Rogovin, Kevin (2017-09-27 15:22:00) > Hi, > > > Hmm, this needs updating for the batch/state split; > > This was rebased (and working) against Mesa of Monday, Sept 25, 2017, which I > thought already had the batchbuffer split. I had thought the split was > already in master... but why

[Mesa-dev] [PATCH] i965: Record the presence of the kernel scheduler

2017-09-27 Thread Chris Wilson
Mention to the debug log if the kernel scheduler is enabled; and in particular if it has preemption enabled. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Ben Widawsky --- src/mesa/drivers/dri/i965/intel_screen.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/src/mesa

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

2017-09-29 Thread Chris Wilson
river, the EGLContext will remain at medium priority. Signed-off-by: Chris Wilson Cc: Rob Clark Reviewed-by: Ben Widawsky Reviewed-by: Emil Velikov Reviewed-by: Eric Engestrom --- include/GL/internal/dri_interface.h | 8 + src/egl/drivers/dri2/egl_dri2.c | 5 src/egl/mai

[Mesa-dev] [PATCH 5/7] i965: Pass the EGL/DRI context priority through to the kernel

2017-09-29 Thread Chris Wilson
setting to medium, we can faithfully report any error whilst setting without worrying about kernel version. Signed-off-by: Chris Wilson Cc: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_bufmgr.c | 18 ++ src/mesa/drivers/dri/i965/brw_bufmgr.h | 9 + src/mesa/drivers/dri

[Mesa-dev] [PATCH 4/7] i965: Record the presence of the kernel scheduler

2017-09-29 Thread Chris Wilson
Mention to the debug log if the kernel scheduler is enabled; and in particular if it has preemption enabled. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Ben Widawsky Reviewed-by: Joonas Lahtinen --- src/mesa/drivers/dri/i965/intel_screen.c | 11 +++ 1 file changed, 11

[Mesa-dev] [PATCH 3/7] i965: Sync i915_drm.h from kernel for IMG_context_priority

2017-09-29 Thread Chris Wilson
Pulling in changes from upto kernel commit 5f3b6efaabcd917a778dc924208bcf8f5319bef3 Author: Chris Wilson Date: Wed Oct 26 22:00:57 2016 +0100 drm/i915/scheduler: Support user-defined priorities for implementing IMG_context_priority. Signed-off-by: Chris Wilson --- include/drm-uapi

[Mesa-dev] [PATCH 6/7] i965: Reported supported context priorities to EGL/DRI

2017-09-29 Thread Chris Wilson
version and privilege) and we should only have to do it once during screen setup -- although the SETPARAM should be fast, they are still an ioctl each. Signed-off-by: Chris Wilson Cc: Kenneth Graunke Reviewed-by: Emil Velikov --- src/mesa/drivers/dri/i965/intel_screen.c | 13 + 1 file

[Mesa-dev] [PATCH 7/7] relnotes/17.3: EGL_IMG_context_priority is now implemented

2017-09-29 Thread Chris Wilson
Suggested-by: Emil Velikov Signed-off-by: Chris Wilson --- docs/relnotes/17.3.0.html | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/relnotes/17.3.0.html b/docs/relnotes/17.3.0.html index 4a74284632..6a0a4735a8 100644 --- a/docs/relnotes/17.3.0.html +++ b/docs/relnotes/17.3.0.html

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

2017-09-29 Thread Chris Wilson
checked at the user boundary.) Signed-off-by: Chris Wilson Acked-by: Ben Widawsky # i915/i965 Reviewed-by: Emil Velikov Reviewed-by: Eric Engestrom --- include/GL/internal/dri_interface.h| 6 src/egl/drivers/dri2/egl_dri2.c| 38 +- src

Re: [Mesa-dev] [PATCH 3/7] i965: Sync i915_drm.h from kernel for IMG_context_priority

2017-09-29 Thread Chris Wilson
Quoting Emil Velikov (2017-09-29 13:03:03) > Hi Chris, > > On 29 September 2017 at 11:25, Chris Wilson wrote: > > Pulling in changes from upto > > > > kernel commit 5f3b6efaabcd917a778dc924208bcf8f5319bef3 > Which tree is this SHA1 based on? I cannot find it in

Re: [Mesa-dev] [PATCH 6/7] i965: Reported supported context priorities to EGL/DRI

2017-09-29 Thread Chris Wilson
Quoting Kenneth Graunke (2017-09-29 20:55:53) > On Friday, September 29, 2017 3:25:09 AM PDT Chris Wilson wrote: > > Hook up the RendererQuery for __DRI2_RENDERER_HAS_CONTEXT_PRIORITY to > > report the available DRM_I915_GEM_CONTEXT_SETPARAM options based on the > > the defaul

Re: [Mesa-dev] [PATCH 6/7] i965: Reported supported context priorities to EGL/DRI

2017-09-29 Thread Chris Wilson
Quoting Chris Wilson (2017-09-29 21:03:14) > Quoting Kenneth Graunke (2017-09-29 20:55:53) > > Typically we wait to pull in new headers until the kernel patches land > > in airlied's drm-next tree. > > drm-intel is a non-rebasing tree, once the commit lands there,

Re: [Mesa-dev] [PATCH 6/7] i965: Reported supported context priorities to EGL/DRI

2017-10-02 Thread Chris Wilson
Quoting Kenneth Graunke (2017-09-29 22:59:56) > On Friday, September 29, 2017 1:03:14 PM PDT Chris Wilson wrote: > > Quoting Kenneth Graunke (2017-09-29 20:55:53) > > > On Friday, September 29, 2017 3:25:09 AM PDT Chris Wilson wrote: > > > >

Re: [Mesa-dev] [PATCH 4/6] i965: Add blorp-based texture upload path

2017-10-11 Thread Chris Wilson
Quoting Kenneth Graunke (2017-10-10 23:14:17) > +bool > +brw_blorp_download_miptree(struct brw_context *brw, > + struct intel_mipmap_tree *src_mt, > + mesa_format src_format, uint32_t src_swizzle, > + uint32_t level, uint

Re: [Mesa-dev] [PATCH 4/6] i965: Add blorp-based texture upload path

2017-10-11 Thread Chris Wilson
Quoting Kenneth Graunke (2017-10-10 23:14:17) > +/* Consider all the restrictions and determine the format of the source. */ > +static mesa_format > +blorp_get_client_format(struct brw_context *brw, > +GLenum format, GLenum type, > +const struct gl_pi

Re: [Mesa-dev] [PATCH 2/2] i965: Rename brw->no_batch_wrap to intel_batchbuffer::no_wrap

2017-10-13 Thread Chris Wilson
Quoting Kenneth Graunke (2017-10-13 08:38:15) > This really makes more sense in the intel_batchbuffer struct. Reviewed-by: Chris Wilson -Chris ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/m

Re: [Mesa-dev] [PATCH 1/2] i965: Delete dead brw_context fields.

2017-10-13 Thread Chris Wilson
Quoting Kenneth Graunke (2017-10-13 08:38:14) > fast_clear_op is leftover from the meta-fast-clear days. > No idea what the other thing was for, but it isn't used now. Simply mechanics so no great insight required, I hope, Reviewed-by: Chris Wil

[Mesa-dev] [PATCH 6/6] docs/relnotes: Add AMD_pinned_memory for i965

2017-10-13 Thread Chris Wilson
Technically only for Sandybridge and later core designs, but finally we can claim support for allowing clients to create glBufferObjects from their own memory. --- docs/relnotes/17.3.0.html | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/relnotes/17.3.0.html b/docs/relnotes/17.3.0.html in

[Mesa-dev] [PATCH 3/6] i965: Allow creation of brw_bo from system memory (userptr)

2017-10-13 Thread Chris Wilson
Since v3.16 (though universal access was only enabled by default in v4.6), the kernel has offered the ability to wrap any system memory (i.e. RAM and not I/O mapped memory) into an object that can be used by the GPU. The caveat is that this object is marked as cache coherent (so that the client can

[Mesa-dev] [PATCH 1/6] i965: Only put external handles into the handle ht

2017-10-13 Thread Chris Wilson
We know that we will only ever need to lookup an external handle and so can defer adding a bo to the external ht until it is ever exported or imported, keeping that hashtable compact. Cc: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_bufmgr.c | 36 +++--- 1 file c

[Mesa-dev] [PATCH 5/6] i965: Expose AMD_pinned_memory

2017-10-13 Thread Chris Wilson
All GEN GPU can bind to any piece of memory (thanks UMA), and so through a special ioctl we can map a chunk of page-aligned client memory into the GPU address space. However, not all GEN are equal. Some have cache-coherency between the CPU and the GPU, whilst the others are incoherent and rely on s

[Mesa-dev] [PATCH 4/6] i965: Use blorp+userptr for GPU readback

2017-10-13 Thread Chris Wilson
The primary benefit for this is that we get format conversion for "free", along with detiling and cache flushing (most relevant for !llc). Using the GPU does impose a bandwidth cost that is presumably better used for rendering, hence we limit the use to readback into client memory (not pbo) where w

[Mesa-dev] [PATCH 2/6] intel: Mark i965g/i965gm as having buggy snoop access

2017-10-13 Thread Chris Wilson
Recent kernels do exclude snoop access for i965g/i965gm as it does not work as advertised. However to avoid depending on a recent kernel for old hardware, mark the presence of the bug in gen_device_info. See kernel commit df0700e53047662c167836bd6fdeea55d5d8dcfa Author: Chris Wilson Date: Wed

Re: [Mesa-dev] [PATCH 0/6] Enable OpenGL 4.0 on Haswell

2017-01-03 Thread Chris Wilson
hives/mesa-dev/2015-August/091077.html But we do want to share the bufmgr between screens, and you do want to deprecate the current intel_batchbuffer.c due to the very large overhead it imposes. -Chris -- Chris Wilson, Intel Open Source Technology Centre ___

[Mesa-dev] [PATCH 01/51] i965: Do not use purged bo after calling glObjectUnpurgeable

2017-01-10 Thread Chris Wilson
APPLE when called with glObjectUnpurgeable(GL_UNDEFINED_APPLE). Testcase: piglit/object_purgeable-api-* Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/i965/brw_object_purgeable.c | 36 ++-- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/src/mesa/driver

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

2017-01-10 Thread Chris Wilson
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 contexts require amongst a shared set - can we rely of the upper layer providing sufficient serialisation around access to brw_context? The 40% i

[Mesa-dev] [PATCH 03/51] i965: Only flush the batchbuffer if we need to zero the SO offsets

2017-01-10 Thread Chris Wilson
sters without a full batch flush. Signed-off-by: Chris Wilson Cc: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_context.h | 1 + src/mesa/drivers/dri/i965/gen7_sol_state.c | 13 - src/mesa/drivers/dri/i965/intel_extensions.c | 1 + 3 files changed, 14 insertions(+), 1 del

[Mesa-dev] [PATCH 05/51] i965: Remove direct includes of intel_batchbuffer.h

2017-01-10 Thread Chris Wilson
Upcoming patches eliminate the intel_batchbuffer interface and one of the minor changes that causes a lot of churn is the removal of the header, along with the occassional need to now call intel_reg.h themselves. This patch moves the individual includes into brw_context.h. Signed-off-by: Chris

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

2017-01-10 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 --- src/mesa/drivers/dri/i965/brw_context.h | 2 +- src/mesa/drivers/dri

[Mesa-dev] [PATCH 16/51] i965: Replace opencoded brw_load_register_mem()

2017-01-10 Thread Chris Wilson
gen7_sol_state loads the SOL_OFFSET registers from its scratch buffer by hand, switch it over to the common routine for emitting that command. Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/i965/gen7_sol_state.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff

[Mesa-dev] [PATCH 08/51] i965: Rename intel_batchbuffer to brw_batch

2017-01-10 Thread Chris Wilson
In order to reduce future churn, rename the intel_batchbuffer struct. Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/i965/brw_batch.h | 4 ++-- src/mesa/drivers/dri/i965/brw_context.h | 2 +- src/mesa/drivers/dri/i965/brw_state_batch.c | 6 ++ src/mesa/drivers/dri

[Mesa-dev] [PATCH 13/51] i965: Rename render_cache dirty tracking to reduce later churn

2017-01-10 Thread Chris Wilson
Simple rename and parameter passing changes now to avoid doing so inside a much larger patch. Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/i965/brw_batch.h | 5 + src/mesa/drivers/dri/i965/brw_context.c | 12 ++ src/mesa/drivers/dri/i965/brw_context.h

[Mesa-dev] [PATCH 24/51] i965: Move batch related parameters from brw_context to intel_batchbuffer

2017-01-10 Thread Chris Wilson
In order to reduce later churn, move a few parameters from the general brw_context into the intel_batchbuffer. Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/i965/brw_batch.h | 20 + src/mesa/drivers/dri/i965/brw_compute.c | 2 +- src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH 09/51] i965: Add a couple of utility functions to ref/unref a brw_bo

2017-01-10 Thread Chris Wilson
To further reduce churn when replacing the buffer object implementation, wrap the existing drm_intel_bo_reference/drm_intel_bo_unreference. Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/i965/brw_batch.h| 12 ++ src/mesa/drivers/dri/i965/brw_context.c | 29

[Mesa-dev] [PATCH 02/51] i965: Order write of query availablity with earlier writes

2017-01-10 Thread Chris Wilson
is ordered after earlier pipe control writes. Testcase: piglit/arb_query_buffer_object-qbo/*async* Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/i965/gen6_queryobj.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/gen6_queryobj.c

[Mesa-dev] [PATCH 23/51] i965: Move bufmgr from brw_context to brw_batch

2017-01-10 Thread Chris Wilson
Since brw_batch will become the dominate interface for brw_bo, move the pointer now to reduce later churn. Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/i965/brw_batch.h| 2 ++ src/mesa/drivers/dri/i965/brw_binding_tables.c | 2 +- src/mesa/drivers/dri/i965/brw_context.c

[Mesa-dev] [PATCH 12/51] i965: Move the render_cache dirty set from the context to the batch

2017-01-10 Thread Chris Wilson
To reduce churn later, move the brw->render_cache dirty set into the batch (i.e. brw->batch.render_cache). Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/i965/brw_batch.h | 7 +++ src/mesa/drivers/dri/i965/brw_context.h | 7 --- src/mesa/drivers/dri/i965/intel_fbo.c

[Mesa-dev] [PATCH 36/51] i965: Move a few intel_batchbuffer functions to brw_batch

2017-01-10 Thread Chris Wilson
In preparation for the next patch, just transplant some functions between header files. Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/i965/brw_batch.h | 17 + src/mesa/drivers/dri/i965/intel_batchbuffer.h | 18 -- 2 files changed, 17 insertions

[Mesa-dev] [PATCH 30/51] i965: Introduce a perf_debug() hook for flushing the intel_batchbuffer

2017-01-10 Thread Chris Wilson
If we have to flush the batchbuffer early that has performance implications, and if it is a result of user action we should report that through the perf_debug interface. Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/i965/brw_batch.h| 3 ++ src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH 07/51] i965: Move struct intel_batchbuffer from brw_context.h to brw_batch.h

2017-01-10 Thread Chris Wilson
To ease future transitions. Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/i965/brw_batch.h | 32 src/mesa/drivers/dri/i965/brw_context.h | 32 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/src/mesa

[Mesa-dev] [PATCH 06/51] i965: Subsitute drm_intel_bo with a local name, brw_bo

2017-01-10 Thread Chris Wilson
In preparation for a local batch manager with a new buffer object, first reduce the churn by renaming the existing buffer objects: s/drm_intel_bo/brw_bo/ We only have to be careful to leave the global screen drm_intel_bo as they are. Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH 29/51] i965: Extract batch start/finish hooks

2017-01-10 Thread Chris Wilson
In order to reduce future churn, move the callbacks for starting and finishing the batch from intel_batchbuffer to the brw_context. Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/i965/brw_context.c | 83 +++ src/mesa/drivers/dri/i965/intel_batchbuffer.c | 79

[Mesa-dev] [PATCH 51/51] i965: Request batch promotion when using mmio commands

2017-01-10 Thread Chris Wilson
We only need the batch promotion if we need to modify privileged registers, so only request it when we do register loads and stores. Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/i965/brw_batch.c | 7 ++- src/mesa/drivers/dri/i965/brw_batch.h | 2 ++ src

[Mesa-dev] [PATCH 34/51] i965: Move no_batch_wrap from brw_context to brw_batch

2017-01-10 Thread Chris Wilson
To ease intermediate patches. Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/i965/brw_batch.h | 2 ++ src/mesa/drivers/dri/i965/brw_compute.c | 4 ++-- src/mesa/drivers/dri/i965/brw_context.h | 1 - src/mesa/drivers/dri/i965/brw_draw.c | 4 ++-- src/mesa

[Mesa-dev] [PATCH 21/51] i965: Refactor adding relocations into the batch buffer

2017-01-10 Thread Chris Wilson
address into the state with a convenient helper. Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/i965/brw_batch.h| 54 ++ src/mesa/drivers/dri/i965/brw_cc.c | 14 ++--- src/mesa/drivers/dri/i965/brw_clip_state.c | 14 ++--- src/mesa/drivers/dri

[Mesa-dev] [PATCH 35/51] i965: Convert some intel_batchbuffer prototypes over to brw_batch

2017-01-10 Thread Chris Wilson
Just to ease the next intermediate patch. Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/i965/brw_batch.h | 1 + src/mesa/drivers/dri/i965/brw_compute.c | 6 +-- src/mesa/drivers/dri/i965/brw_draw.c | 7 ++-- src/mesa/drivers/dri/i965/brw_state_batch.c | 6

[Mesa-dev] [PATCH 32/51] i965: Set buffer dirty flags for this batch

2017-01-10 Thread Chris Wilson
Process the postdraw resolves (including setting the buffer dirty flag) before any conditional batch flush as that flush will want to clear the dirty flag. Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/i965/brw_draw.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff

[Mesa-dev] [PATCH 11/51] i965: Wrap drm_intel_bo_madvise() for brw_bo

2017-01-10 Thread Chris Wilson
To reduce later churn, extract drm_intel_bo_madvise() with a smaller wrapper. Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/i965/brw_batch.h| 5 + src/mesa/drivers/dri/i965/brw_object_purgeable.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src

[Mesa-dev] [PATCH 33/51] i965: Move RESERVED_SPACE from intel_batchbuffer.h to brw_batch.h

2017-01-10 Thread Chris Wilson
Simple non-functional change to ease later patches. Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/i965/brw_batch.h | 26 ++ src/mesa/drivers/dri/i965/intel_batchbuffer.h | 26 -- 2 files changed, 26 insertions(+), 26 deletions

[Mesa-dev] [PATCH 19/51] i965: Simplify parameters to brw_emit_pipe_control_write()

2017-01-10 Thread Chris Wilson
Rather than passing the uint64_t value to write as a pair of high/lo uint32_t values, place the burden on the callee to split the large value into the dwords desired by the hardware. Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/i965/brw_context.h | 3 +-- src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH 38/51] i965: Wrap all instances of batch buffer access in begin/end

2017-01-10 Thread Chris Wilson
ff-by: Chris Wilson --- src/mesa/drivers/dri/i965/brw_conditional_render.c | 5 + src/mesa/drivers/dri/i965/brw_queryobj.c | 15 +++ src/mesa/drivers/dri/i965/brw_state_upload.c | 13 +++-- src/mesa/drivers/dri/i965/gen6_queryobj.c

[Mesa-dev] [PATCH 42/51] i965: Pack a couple of batch booleans into a flags field

2017-01-10 Thread Chris Wilson
The flags field becomes more useful later as we store more bits in it, but for now we can start it off with the pair of boolean state already stored inside batch. Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/i965/brw_batch.h | 5 +++-- src/mesa/drivers/dri/i965/brw_misc_state.c

[Mesa-dev] [PATCH 43/51] i965: Unconditionally reset the HW binding table offsets after a batch

2017-01-10 Thread Chris Wilson
Rather than spend an instruction deciding whether we need to, just zero out the single integer to reset the HW binding tables. Signed-off-by: Chris Wilson --- src/mesa/drivers/dri/i965/brw_binding_tables.c | 6 -- src/mesa/drivers/dri/i965/brw_context.c| 3 +-- src/mesa/drivers/dri

<    2   3   4   5   6   7   8   9   10   11   >