[Intel-gfx] [PATCH 1/6] drm/i915: Remove the useless flush_chipset

2015-02-09 Thread Ben Widawsky
flush_chipset makes no sense with execlists because the former is for strictly prior to gen6, while the latter is for gen >= 8 Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/intel_lrc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_lr

Re: [Intel-gfx] [PATCH] drm/i915/fbc: fix the check for already reserved fbc size

2015-02-05 Thread Ben Widawsky
> > The bug has been introduced in > > commit 5e59f7175f96550ede91f58d267d2b551cb6fbba > Author: Ben Widawsky > Date: Mon Jun 30 10:41:24 2014 -0700 > > drm/i915: Try harder to get FBC > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88975 > S

Re: [Intel-gfx] [PATCH 1/4] drm/i915/bdw: Implement non-coherent ctx w/a

2015-02-04 Thread Ben Widawsky
On Mon, Feb 02, 2015 at 01:21:19PM +, Damien Lespiau wrote: > On Mon, Feb 02, 2015 at 02:33:48PM +0200, Ville Syrjälä wrote: > > On Thu, Jan 08, 2015 at 07:59:10PM -0800, Ben Widawsky wrote: > > > Implements a required workaround whose implications aren't entirely clear

[Intel-gfx] [PATCH] gem_render_copy: Provide an all pixels check

2015-01-27 Thread Ben Widawsky
Signed-off-by: Ben Widawsky --- tests/gem_render_copy.c | 32 +++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/tests/gem_render_copy.c b/tests/gem_render_copy.c index 006b6f5..6348eee 100644 --- a/tests/gem_render_copy.c +++ b/tests/gem_render_copy.c

Re: [Intel-gfx] [PATCH i-g-t v2] tools/intel_gpu_frequency: remove use of getsubopt

2015-01-16 Thread Ben Widawsky
On Fri, Jan 16, 2015 at 09:12:15AM +, tim.g...@intel.com wrote: > From: Tim Gore > > getsubopt is not available in android. The "get" option > doesn't really need sub-options, just display all the > current frequency settings (as per discussion with > Ben

Re: [Intel-gfx] [PATCH] drm/i915: Reduce locking in command submission

2015-01-15 Thread Ben Widawsky
On Thu, Jan 15, 2015 at 05:05:30PM +, Tvrtko Ursulin wrote: > > On 01/15/2015 04:54 PM, Ben Widawsky wrote: > >On Thu, Jan 15, 2015 at 11:21:30AM +, Tvrtko Ursulin wrote: > >>From: Tvrtko Ursulin > >> > >>This eliminates six needless spin

Re: [Intel-gfx] [PATCH] [v2] intel_frequency: A tool to manipulate Intel GPU frequency

2015-01-15 Thread Ben Widawsky
On Thu, Jan 15, 2015 at 02:00:06PM +, Dave Gordon wrote: > On 12/01/15 03:35, Ben Widawsky wrote: > > WARNING: very minimally tested > > > > In general you should not need this tool. It's primary purpose is for > > benchmarking, and for debugging performance

Re: [Intel-gfx] [PATCH i-g-t] tools/intel_gpu_frequency: remove use of getsubopt

2015-01-15 Thread Ben Widawsky
On Thu, Jan 15, 2015 at 05:27:50PM +, tim.g...@intel.com wrote: > From: Tim Gore > > getsubopt is not available in android. The "get" option > doesn't really need sub-options, just display all the > current frequency settings (as per discussion with > Ben

Re: [Intel-gfx] [PATCH] drm/i915: Reduce locking in command submission

2015-01-15 Thread Ben Widawsky
V (bench_OglBatch4 bench_OglDeferred respectively). With 95% confidence t-test on n=5 > > Kindly benchmarked by Ben Widawsky. FWIW, as I mentioned on IRC, I think the reduction of the unnecessary forcewake (someone should fix the shadow register list) is probably more beneficial than removing th

Re: [Intel-gfx] [PATCH] [v2] intel_frequency: A tool to manipulate Intel GPU frequency

2015-01-14 Thread Ben Widawsky
On Wed, Jan 14, 2015 at 09:42:24AM -0800, O'Rourke, Tom wrote: > On Tue, Jan 13, 2015 at 02:36:56PM -0800, Ben Widawsky wrote: > > On Tue, Jan 13, 2015 at 09:19:04PM +, O'Rourke, Tom wrote: > > > >Sent: Sunday, January 11, 2015 7:48 PM > > > >

Re: [Intel-gfx] [PATCH] [v2] intel_frequency: A tool to manipulate Intel GPU frequency

2015-01-13 Thread Ben Widawsky
> > > >On Sun, Jan 11, 2015 at 07:35:21PM -0800, Ben Widawsky wrote: > >> WARNING: very minimally tested > >> > >> In general you should not need this tool. It's primary purpose is for > >> benchmarking, and for debugging performance issues.

Re: [Intel-gfx] [Mesa-dev] [PATCH] drm/i915: Enable the HiZ RAW Stall Optimization on Gen8.

2015-01-12 Thread Ben Widawsky
On Mon, Jan 12, 2015 at 06:09:12PM +, Dave Gordon wrote: > On 12/01/15 18:02, Ben Widawsky wrote: > > On Mon, Jan 12, 2015 at 02:02:34PM +0200, Ville Syrjälä wrote: > >> On Sun, Jan 11, 2015 at 07:14:57PM -0800, Ben Widawsky wrote: > >>> On Sun, Jan 11, 201

Re: [Intel-gfx] [Mesa-dev] [PATCH] drm/i915: Enable the HiZ RAW Stall Optimization on Gen8.

2015-01-12 Thread Ben Widawsky
On Mon, Jan 12, 2015 at 02:02:34PM +0200, Ville Syrjälä wrote: > On Sun, Jan 11, 2015 at 07:14:57PM -0800, Ben Widawsky wrote: > > On Sun, Jan 11, 2015 at 07:05:21PM -0800, Kenneth Graunke wrote: > > > On Sunday, January 11, 2015 05:46:09 PM Ben Widawsky wrote: > > > &

Re: [Intel-gfx] [PATCH] [v2] intel_frequency: A tool to manipulate Intel GPU frequency

2015-01-11 Thread Ben Widawsky
On Sun, Jan 11, 2015 at 07:35:21PM -0800, Ben Widawsky wrote: > WARNING: very minimally tested > > In general you should not need this tool. It's primary purpose is for > benchmarking, and for debugging performance issues. I noticed the "it's" vs "its&quo

[Intel-gfx] [PATCH] [v2] intel_frequency: A tool to manipulate Intel GPU frequency

2015-01-11 Thread Ben Widawsky
ommit message in the source code. (me) Signed-off-by: Ben Widawsky Reviewed-by: Jordan Justen Cc: Kenneth Graunke Here are some sample usages: $ sudo intel_frequency --get=cur,min,max,eff cur: 200 MHz min: 200 MHz RP1: 200 MHz max: 1200 MHz $ sudo intel_frequency -g cur: 200 MHz min: 200 MHz RP1

Re: [Intel-gfx] [Mesa-dev] [PATCH] drm/i915: Enable the HiZ RAW Stall Optimization on Gen8.

2015-01-11 Thread Ben Widawsky
On Sun, Jan 11, 2015 at 07:05:21PM -0800, Kenneth Graunke wrote: > On Sunday, January 11, 2015 05:46:09 PM Ben Widawsky wrote: > > On Sun, Jan 11, 2015 at 04:05:25PM -0800, Kenneth Graunke wrote: > > > On Sunday, January 11, 2015 01:49:41 PM Ben Widawsky wrote: > > > &

Re: [Intel-gfx] [Mesa-dev] [PATCH] drm/i915: Enable the HiZ RAW Stall Optimization on Gen8.

2015-01-11 Thread Ben Widawsky
On Sun, Jan 11, 2015 at 06:53:32PM -0800, Kenneth Graunke wrote: [snip] > > Jesse had suggested setting it in broadwell_init_clock_gating on January 5th, > and Valtteri tried it on January 7th. He found "no noticeable difference". > I tried it again, and confirmed his result: there was zero per

Re: [Intel-gfx] [Mesa-dev] [PATCH] drm/i915: Enable the HiZ RAW Stall Optimization on Gen8.

2015-01-11 Thread Ben Widawsky
On Sun, Jan 11, 2015 at 04:05:25PM -0800, Kenneth Graunke wrote: > On Sunday, January 11, 2015 01:49:41 PM Ben Widawsky wrote: > > On Sat, Jan 10, 2015 at 06:44:49PM -0800, Kenneth Graunke wrote: > > > This is an important optimization for avoiding read-after-write (RAW) >

Re: [Intel-gfx] [Mesa-dev] [PATCH] drm/i915: Enable the HiZ RAW Stall Optimization on Gen8.

2015-01-11 Thread Ben Widawsky
WA_SET_BIT_MASKED(HIZ_CHICKEN, CHV_HZ_8X8_MODE_IN_1X); > I think you should do this as two separate patches, 1 per platform. For the BSW patch (given that I had the same functionality in the kernel patch I asked you to look at ;-) and FWIW, Jordan has numbers on BSW B-step with my kernel

Re: [Intel-gfx] [PATCH 2/2] intel_frequency: A tool to manipulate Intel GPU frequency

2015-01-10 Thread Ben Widawsky
Ken gave me the good idea of -d, --defaults to go back to the hardware specified defaults. I will send out a v2 if nobody else has any complaints. On Sat, Jan 10, 2015 at 08:19:29PM -0800, Ben Widawsky wrote: > WARNING: very minimally tested > > In general you should not need this t

[Intel-gfx] [PATCH 1/2] tools/Makefile: Alphabetize the list

2015-01-10 Thread Ben Widawsky
Signed-off-by: Ben Widawsky --- tools/Makefile.sources | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/tools/Makefile.sources b/tools/Makefile.sources index 48b89db..b85a6b8 100644 --- a/tools/Makefile.sources +++ b/tools/Makefile.sources @@ -8,32

[Intel-gfx] [PATCH 2/2] intel_frequency: A tool to manipulate Intel GPU frequency

2015-01-10 Thread Ben Widawsky
ality. What it does provide is an easy to package (for distros) tool that handles the most common scenarios. Signed-off-by: Ben Widawsky Here are some sample usages: $ sudo intel_frequency --get=cur,min,max,eff cur: 200 MHz min: 200 MHz RP1: 200 MHz max: 1200 MHz $ sudo intel_frequency -g cur: 20

[Intel-gfx] [PATCH 1/4] drm/i915/bdw: Implement non-coherent ctx w/a

2015-01-08 Thread Ben Widawsky
Implements a required workaround whose implications aren't entirely clear to me from the description. In particular I do not know if this effects legacy contexts, execlists, or both. I couldn't find a real workaround name, so I made up: WaHdcCtxNonCoherent Signed-off-by: Be

[Intel-gfx] [PATCH 4/4] drm/i915: Add a fallback for unimplemented gen9 w/a

2015-01-08 Thread Ben Widawsky
We know certain future platforms need things. Don't let them go unnoticed as they did for SKL by adding an error message and falling back to the possibly more conservative SKL values. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/intel_ringbuffer.c | 4 1 file changed, 4 inser

[Intel-gfx] [PATCH 2/4] drm/i915/skl: Implement WaHdcCtxNonCoherent

2015-01-08 Thread Ben Widawsky
Cc: Kristian Høgsberg Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/intel_ringbuffer.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index 62318a4..b8a445b 100644 --- a/drivers/gpu

[Intel-gfx] [PATCH 3/4] drm/i915/skl: Implement WaDisablePartialInstShootdown

2015-01-08 Thread Ben Widawsky
Cc: Kristian Høgsberg Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/intel_ringbuffer.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index b8a445b..e14748d 100644 --- a/drivers/gpu/drm/i915

Re: [Intel-gfx] [PATCH] drm/i915/hsw: Implement Selective Write workaround

2014-12-19 Thread Ben Widawsky
On Fri, Dec 19, 2014 at 08:05:30PM +, Chris Wilson wrote: > On Fri, Dec 19, 2014 at 06:34:07PM +, Chris Wilson wrote: > > Just a patch a few days ago that to fix a very ontologically similar bug > > for ivb+. > > Oh boy. I just double checked the error states from those bugs I marked > as

Re: [Intel-gfx] [PATCH] drm/i915/hsw: Implement Selective Write workaround

2014-12-19 Thread Ben Widawsky
On Fri, Dec 19, 2014 at 08:20:04AM +, Chris Wilson wrote: > On Thu, Dec 18, 2014 at 06:20:18PM -0800, Ben Widawsky wrote: > > From: Ben Widawsky > > > > The docs specify this needs to be set on HSW GT1 parts. I've implemented it > > as > > such since i

[Intel-gfx] [PATCH] drm/i915/hsw: Implement Selective Write workaround

2014-12-18 Thread Ben Widawsky
From: Ben Widawsky The docs specify this needs to be set on HSW GT1 parts. I've implemented it as such since it should only be needed when using RC6, but it can probably go anywhere. This patch fixes extremely reproducible hangs on our Jenkins setup. The interesting failure signatu

Re: [Intel-gfx] [PATCH 4/4] drm/i915: Opportunistically reduce flushing at execbuf

2014-12-16 Thread Ben Widawsky
On Tue, Dec 16, 2014 at 07:57:39AM +, Chris Wilson wrote: > On Mon, Dec 15, 2014 at 01:06:40PM -0800, Ben Widawsky wrote: > > On Mon, Dec 15, 2014 at 08:39:35PM +, Chris Wilson wrote: > > > On Mon, Dec 15, 2014 at 11:56:05AM -0800, Ben Widawsky wrote: > > > >

Re: [Intel-gfx] [PATCH 2/4] drm/cache: Try to be smarter about clflushing on x86

2014-12-15 Thread Ben Widawsky
On Sat, Dec 13, 2014 at 08:15:22PM -0800, Matt Turner wrote: > On Sat, Dec 13, 2014 at 7:08 PM, Ben Widawsky > wrote: > > Any GEM driver which has very large objects and a slow CPU is subject to > > very > > long waits simply for clflushing incoherent objects. General

Re: [Intel-gfx] [PATCH 4/4] drm/i915: Opportunistically reduce flushing at execbuf

2014-12-15 Thread Ben Widawsky
On Mon, Dec 15, 2014 at 08:39:35PM +, Chris Wilson wrote: > On Mon, Dec 15, 2014 at 11:56:05AM -0800, Ben Widawsky wrote: > > On Mon, Dec 15, 2014 at 08:20:50AM +, Chris Wilson wrote: > > > On Mon, Dec 15, 2014 at 08:55:32AM +0100, Daniel Vetter wrote: > > > >

[Intel-gfx] [PATCH] [v2] drm/cache: Use wbinvd helpers

2014-12-15 Thread Ben Widawsky
From: Ben Widawsky When the original drm code was written there were no centralized functions for doing a coordinated wbinvd across all CPUs. Now (since 2010) there are, so use them instead of rolling a new one. v2: On x86 UP systems the wbinvd_on_all_cpus() is defined as a static inline in

Re: [Intel-gfx] [PATCH 4/4] drm/i915: Opportunistically reduce flushing at execbuf

2014-12-15 Thread Ben Widawsky
On Mon, Dec 15, 2014 at 08:20:50AM +, Chris Wilson wrote: > On Mon, Dec 15, 2014 at 08:55:32AM +0100, Daniel Vetter wrote: > > On Sun, Dec 14, 2014 at 03:37:36PM -0800, Ben Widawsky wrote: > > > On Sun, Dec 14, 2014 at 03:12:21PM +0200, Ville Syrjälä wrote: > > > &

Re: [Intel-gfx] [PATCH 2/4] drm/cache: Try to be smarter about clflushing on x86

2014-12-15 Thread Ben Widawsky
On Sun, Dec 14, 2014 at 08:06:20PM -0800, Jesse Barnes wrote: > On 12/14/2014 4:59 AM, Chris Wilson wrote: > >One of the things wbinvd is considered evil for is that it blocks the > >CPU for an indeterminate amount of time - upsetting latency critcial > >aspects of the OS. For example, the x86/mm h

Re: [Intel-gfx] [PATCH 4/4] drm/i915: Opportunistically reduce flushing at execbuf

2014-12-14 Thread Ben Widawsky
On Sun, Dec 14, 2014 at 03:12:21PM +0200, Ville Syrjälä wrote: > On Sat, Dec 13, 2014 at 07:08:24PM -0800, Ben Widawsky wrote: > > If we're moving a bunch of buffers from the CPU domain to the GPU domain, > > and > > we've already blown out the entire cache

[Intel-gfx] [PATCH 2/4] drm/cache: Try to be smarter about clflushing on x86

2014-12-13 Thread Ben Widawsky
. It would be nice to hear what other developers who depend on this code think. Cc: Intel GFX Signed-off-by: Ben Widawsky --- drivers/gpu/drm/drm_cache.c | 20 +--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_cache.c b/drivers/gpu/drm/drm_cac

[Intel-gfx] [PATCH 3/4] drm/cache: Return what type of cache flush occurred

2014-12-13 Thread Ben Widawsky
very minimally considered for the sake of getting the data for the profile. Cc: Intel GFX Signed-off-by: Ben Widawsky --- drivers/gpu/drm/drm_cache.c | 34 +- include/drm/drmP.h | 13 ++--- 2 files changed, 35 insertions(+), 12 deletions(-) diff --

[Intel-gfx] [PATCH 4/4] drm/i915: Opportunistically reduce flushing at execbuf

2014-12-13 Thread Ben Widawsky
fer and attempt to flush it first, the results would be even more desirable. Cc: DRI Development Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.h| 3 ++- drivers/gpu/drm/i915/i915_gem.c| 12 +--- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 8 +-

[Intel-gfx] [PATCH 1/4] drm/cache: Use wbinvd helpers

2014-12-13 Thread Ben Widawsky
When the original drm code was written there were no centralized functions for doing a coordinated wbinvd across all CPUs. Now (since 2010) there are, so use them instead of rolling a new one. Cc: Intel GFX Signed-off-by: Ben Widawsky --- drivers/gpu/drm/drm_cache.c | 12 +++- 1 file

Re: [Intel-gfx] [PATCH] drm/i915: Add GPGPU_THREADS_DISPATCHED to the register whitelist

2014-12-11 Thread Ben Widawsky
On Thu, Dec 11, 2014 at 01:28:09PM -0800, Jordan Justen wrote: > This will allow us to read the number of dispatched compute threads > for GL_ARB_pipeline_statistics_query. > > Signed-off-by: Jordan Justen > Cc: Ben Widawsky Reviewed-by: Ben W

Re: [Intel-gfx] [Mesa-dev] [PATCH] i965: First step toward prelocation

2014-08-22 Thread Ben Widawsky
On Fri, Aug 22, 2014 at 08:15:28AM -0400, Alex Deucher wrote: > On Thu, Aug 21, 2014 at 11:12 PM, Ben Widawsky > wrote: > > This was a quick proof of concept to show the new API for prelocating > > buffers. > > > > What are prelocated buffers? http://lists.freedesk

[Intel-gfx] [PATCH 63/68] drm/i915: Introduce map and unmap for VMAs

2014-08-21 Thread Ben Widawsky
t the first time I've written this patch. XXX: This patch was never tested pre-GEN8. After rebase it was compile tested only on GEN8. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_gtt.c | 78 + drivers/gpu/drm/i915/i915_gem_gtt.h | 2

[Intel-gfx] [PATCH 60/68] drm/i915/bdw: Add 4 level switching infrastructure

2014-08-21 Thread Ben Widawsky
pdate functions insert and clear entries. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_gtt.c | 60 - drivers/gpu/drm/i915/i915_gem_gtt.h | 4 ++- drivers/gpu/drm/i915/i915_reg.h | 1 + 3 files changed, 57 insertions(+), 8 deletions(-) diff --

[Intel-gfx] [PATCH 59/68] drm/i915/bdw: implement alloc/teardown for 4lvl

2014-08-21 Thread Ben Widawsky
destroy it at teardown. (A similar argument can be made for PDPs when not using sparse addresses). Almost none of the fanciness here will exercised since the switch isn't flipped until later. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_gtt.c

[Intel-gfx] [PATCH 2/2] intel: Add prelocation support

2014-08-21 Thread Ben Widawsky
Words Signed-off-by: Ben Widawsky --- intel/intel_bufmgr.h | 8 intel/intel_bufmgr_gem.c | 102 +++ 2 files changed, 102 insertions(+), 8 deletions(-) diff --git a/intel/intel_bufmgr.h b/intel/intel_bufmgr.h index 9383c72..e4ecc44 100644

[Intel-gfx] [PATCH 66/68] drm/i915/bdw: Flip the 48b switch

2014-08-21 Thread Ben Widawsky
Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_gem_gtt.c | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 8d46993..00d9ab3 100644 --- a/drivers/gpu

[Intel-gfx] [PATCH 1/2] intel: Split out bo allocation

2014-08-21 Thread Ben Widawsky
Signed-off-by: Ben Widawsky --- intel/intel_bufmgr_gem.c | 69 1 file changed, 40 insertions(+), 29 deletions(-) diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c index 0e1cb0d..d7d3769 100644 --- a/intel/intel_bufmgr_gem.c +++ b

[Intel-gfx] [PATCH 64/68] drm/i915: Depend exclusively on map and unmap_vma

2014-08-21 Thread Ben Widawsky
-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_gtt.c | 398 +--- drivers/gpu/drm/i915/i915_gem_gtt.h | 23 +-- 2 files changed, 147 insertions(+), 274 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c index

[Intel-gfx] [PATCH 67/68] drm/i915: Provide a soft_pin hook

2014-08-21 Thread Ben Widawsky
This patch is a proof of concept hack which repurposes the MSB of the size field in created. Userptr already has the gup code, and all we need to do is reuse it. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.h| 12 - drivers/gpu/drm/i915/i915_gem.c

[Intel-gfx] [PATCH] i965: First step toward prelocation

2014-08-21 Thread Ben Widawsky
This was a quick proof of concept to show the new API for prelocating buffers. It needs way more testing, to not ifdef the no-relocs, and to do a libdrm ABI dep bump. --- src/mesa/drivers/dri/i965/Makefile.am | 1 + src/mesa/drivers/dri/i965/brw_performance_monitor.c | 6 +++--- src

[Intel-gfx] [PATCH 57/68] drm/i915/bdw: Add dynamic page trace events

2014-08-21 Thread Ben Widawsky
and track unmaps as opposed to destruction. v2: Consolidate pagetable/pagedirectory events Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_gtt.c | 35 +++ drivers/gpu/drm/i915/i915_trace.h | 32 2 files changed, 59

[Intel-gfx] [PATCH 68/68] XXX: drm/i915: Unexplained workarounds

2014-08-21 Thread Ben Widawsky
1. Always force invalidate. This doesn't fix any bugs, but it makes the time to failure longer. 2. Make TLB validation explicit I can't say I've spent too much time with these, however, it seems if I use each individually, I get no observable stability improvement. When I use them together though

[Intel-gfx] [PATCH 61/68] drm/i915/bdw: Generalize PTE writing for GEN8 PPGTT

2014-08-21 Thread Ben Widawsky
page table level and here is no exception. Having extra variables (such as the PPGTT) distracts and provides room to add bugs since the function shouldn't be touching anything in the higher order page tables. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915

[Intel-gfx] [PATCH 65/68] drm/i915: Expand error state's address width to 64b

2014-08-21 Thread Ben Widawsky
v2: 0 pad the new 8B fields or else intel_error_decode has a hard time. Note, regardless we need an igt update. v3: Make reloc_offset 64b also. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.h | 4 ++-- drivers/gpu/drm/i915/i915_gpu_error.c | 17 + 2 files

[Intel-gfx] [PATCH] no_reloc: test case

2014-08-21 Thread Ben Widawsky
needs libdrm --- tests/Makefile.am| 4 +- tests/Makefile.sources | 1 + tests/gem_exec_noreloc.c | 172 +++ 3 files changed, 175 insertions(+), 2 deletions(-) create mode 100644 tests/gem_exec_noreloc.c diff --git a/tests/Makefile.am b/te

[Intel-gfx] [PATCH 58/68] drm/i915/bdw: Add ppgtt info for dynamic pages

2014-08-21 Thread Ben Widawsky
Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_debugfs.c | 52 - drivers/gpu/drm/i915/i915_gem_gtt.c | 33 +++ drivers/gpu/drm/i915/i915_gem_gtt.h | 9 +++ 3 files changed, 82 insertions(+), 12 deletions(-) diff --git a

[Intel-gfx] [PATCH 40/68] drm/i915: Always dma map page directory allocations

2014-08-21 Thread Ben Widawsky
Similar to the patch a few back in the series, we can always map and unmap page directories when we do their allocation and teardown. Page directory pages only exist on gen8+, so this should only effect behavior on those platforms. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915

[Intel-gfx] [PATCH 19/68] drm/i915: Wrap VMA binding

2014-08-21 Thread Ben Widawsky
v2: s/i915_gem_bind_vma/i915_gem_vma_bind/ s/i915_gem_unbind_vma/i915_gem_vma_unbind/ (Chris) v3: Missed one spot v4: Don't change the trace events (Daniel) Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.h| 3 +++ drivers/gpu/drm/i915/i915_gem.c

[Intel-gfx] [PATCH 50/68] drm/i915: num_pd_pages/num_pd_entries isn't useful

2014-08-21 Thread Ben Widawsky
These values are never quite useful for dynamic allocations of the page tables. Getting rid of them will help prevent later confusion. TODO: this probably needs to be earlier in the series Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_debugfs.c | 11 - drivers/gpu/drm/i915

[Intel-gfx] [PATCH 14/68] drm/i915: Get the error state over the wire (HACKish)

2014-08-21 Thread Ben Widawsky
nt to keep reset enabled but still get error state. Since I found the patch pretty useful, I decided to clean it up and submit it. It was mostly meant as a one-off hack originally though. If a maintainer decides it's useful, then here it is. Signed-off-by: Ben Widawsky --- drivers/gp

[Intel-gfx] [PATCH 29/68] drm/i915: Un-hardcode number of page directories

2014-08-21 Thread Ben Widawsky
trivial. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_gtt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.h b/drivers/gpu/drm/i915/i915_gem_gtt.h index 4af3150..0199c5a 100644 --- a/drivers/gpu/drm/i915/i915_gem_gtt.h

[Intel-gfx] [PATCH 47/68] drm/i915/bdw: pagedirs rework allocation

2014-08-21 Thread Ben Widawsky
Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_gtt.c | 43 ++--- 1 file changed, 31 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c index 65b1c58..5447a99 100644 --- a/drivers

[Intel-gfx] [PATCH 62/68] drm/i915: Plumb sg_iter through va allocation ->maps

2014-08-21 Thread Ben Widawsky
PTEs allows the iterator to stay coherent through a VMA mapping operation spanning multiple page table levels. This looks really ugly for now, but once we move toward not separately allocating and updating PTEs, it will make a lot of sense. Signed-off-by: Ben Widawsky --- drivers/gpu/drm

[Intel-gfx] [PATCH 49/68] drm/i915/bdw: Make the pdp switch a bit less hacky

2014-08-21 Thread Ben Widawsky
The latter point only matters with full PPGTT. The former point would only effect 32b platforms, or platforms with less than 4GB memory. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_gtt.c | 34 +- drivers/gpu/drm/i915/i915_gem_gtt.h | 5 - 2 fil

[Intel-gfx] [PATCH 42/68] drm/i915: Extract context switch skip logic

2014-08-21 Thread Ben Widawsky
We have some fanciness coming up. This patch just breaks out the logic. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_context.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c

[Intel-gfx] [PATCH 53/68] drm/i915/bdw: begin bitmap tracking

2014-08-21 Thread Ben Widawsky
Like with gen6/7, we can enable bitmap tracking with all the preallocations to make sure things actually don't blow up. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_gtt.c | 101 +++- drivers/gpu/drm/i915/i915_gem_gtt.h | 12 + 2

[Intel-gfx] [PATCH 24/68] drm/i915: Split out verbose PPGTT dumping

2014-08-21 Thread Ben Widawsky
oes to him. References: 20140320115742.ga4...@nuc-i3427.alporthouse.com Cc: Mika Kuoppala Cc: Chris Wilson Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_debugfs.c | 52 +++-- 1 file changed, 32 insertions(+), 20 deletions(-) diff --git a/drivers/gp

[Intel-gfx] [PATCH 51/68] drm/i915: Extract PPGTT param from pagedir alloc

2014-08-21 Thread Ben Widawsky
navoidable wart throughout the series. (in other words, not extra flagrant). Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_gtt.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915

[Intel-gfx] [PATCH 31/68] drm/i915: Range clearing is PPGTT agnostic

2014-08-21 Thread Ben Widawsky
Therefore we can do it from our general init function. Eventually, I hope to have a lot more commonality like this. It won't arrive yet, but this was a nice easy one. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_gtt.c | 5 + 1 file changed, 1 insertion(+), 4 dele

[Intel-gfx] [PATCH 48/68] drm/i915/bdw: pagetable allocation rework

2014-08-21 Thread Ben Widawsky
Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_gtt.c | 54 - drivers/gpu/drm/i915/i915_gem_gtt.h | 10 +++ 2 files changed, 39 insertions(+), 25 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915

[Intel-gfx] [PATCH 16/68] drm/i915: Remove false assertion in ppgtt_release

2014-08-21 Thread Ben Widawsky
taking off the active list because of the missing retire seqno for a VMA. Like some of the other fixes I've submitted recently, this should be fixed by the eventual work Daniel will do. This is pretty easy to reproduce whenever mesa uses the blit engine. Signed-off-by: Ben Widawsky ---

[Intel-gfx] [PATCH 43/68] drm/i915: Track page table reload need

2014-08-21 Thread Ben Widawsky
submit a batch. This is the case today, and has been the case since the inception of hardware contexts. A note in the comment let's the user know. Signed-off-by: Ben Widawsky squash! drm/i915: Force pd restore when PDEs change, gen6-7 It's not just for gen8. If the current context

[Intel-gfx] [PATCH 21/68] drm/i915: Split out aliasing binds

2014-08-21 Thread Ben Widawsky
requiring just this. A nice benefit of this is we should no longer be able to clobber GTT only objects from the aliasing PPGTT. v2: Only add aliasing binds for the GGTT/Aliasing PPGTT at execbuf v3: Rebase resolution with changed size of flags Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915

[Intel-gfx] [PATCH 54/68] drm/i915/bdw: Dynamic page table allocations

2014-08-21 Thread Ben Widawsky
7;ve unmapped things. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_gtt.c | 371 ++-- drivers/gpu/drm/i915/i915_gem_gtt.h | 16 +- 2 files changed, 324 insertions(+), 63 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm

[Intel-gfx] [PATCH 22/68] drm/i915: fix gtt_total_entries()

2014-08-21 Thread Ben Widawsky
It's useful to have it not as a macro for some upcoming work. Generally since we try to avoid macros anyway, I think it doesn't hurt to put this as its own patch. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_gtt.c| 4 ++-- drivers/gpu/drm/i915/i915_gem_gt

[Intel-gfx] [PATCH 56/68] drm/i915/bdw: Abstract PDP usage

2014-08-21 Thread Ben Widawsky
l4 for the top level, and the pdp is just one of the entries being pointed to by a pml4e. This patch addresses some carelessness done throughout development wrt assumptions made of the root page tables. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_g

[Intel-gfx] [PATCH 46/68] drm/i915/bdw: Use dynamic allocation idioms on free

2014-08-21 Thread Ben Widawsky
The page directory freer is left here for now as it's still useful given that GEN8 still preallocates. Once the allocation functions are broken up into more discrete chunks, we'll follow suit and destroy this leftover piece. comments Signed-off-by: Ben Widawsky --- drivers/gp

[Intel-gfx] [PATCH 52/68] drm/i915/bdw: Split out mappings

2014-08-21 Thread Ben Widawsky
;ll need a function for that in the future as well. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_gtt.c | 96 - 1 file changed, 52 insertions(+), 44 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_g

[Intel-gfx] [PATCH 33/68] drm/i915: construct page table abstractions

2014-08-21 Thread Ben Widawsky
meliorated shortly. NOTE: The pun in the subject was intentional. Signed-off-by: Ben Widawsky Conflicts: drivers/gpu/drm/i915/i915_drv.h --- drivers/gpu/drm/i915/i915_gem_gtt.c | 174 ++-- drivers/gpu/drm/i915/i915_gem_gtt.h | 23 +++-- 2 files ch

[Intel-gfx] [PATCH 20/68] drm/i915: Make pin global flags explicit

2014-08-21 Thread Ben Widawsky
ned-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.h| 14 -- drivers/gpu/drm/i915/i915_gem.c| 31 +++--- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 8 ++-- drivers/gpu/drm/i915/i915_gem_gtt.c| 12 ++-- drive

[Intel-gfx] [PATCH 17/68] Revert "drm/i915/bdw: Use timeout mode for RC6 on bdw"

2014-08-21 Thread Ben Widawsky
This reverts commit 0d68b25e9ceb344fe2f93373b1c0311d33814265. At one time I bisected reset breakage to this patch by using a mesa that is guaranteed to generate a hang when using the fs, and then running the following test case: ./bin/shader_runner tests/shaders/glsl-algebraic-add-zero.shader_te

[Intel-gfx] [PATCH 41/68] drm/i915: Track GEN6 page table usage

2014-08-21 Thread Ben Widawsky
sing PPGTT is not managed here. The patch which actually begins dynamic allocation/teardown explains the reasoning forthis. v2: s/pdp.pagedir/pdp.pagedirs Make a scratch page allocation helper Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_g

[Intel-gfx] [PATCH 18/68] drm/i915/trace: Fix offsets for 64b

2014-08-21 Thread Ben Widawsky
Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_trace.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_trace.h b/drivers/gpu/drm/i915/i915_trace.h index f5aa006..cbf5521 100644 --- a/drivers/gpu/drm/i915/i915_trace.h +++ b/drivers

[Intel-gfx] [PATCH 45/68] drm/i915: Finish gen6/7 dynamic page table allocation

2014-08-21 Thread Ben Widawsky
dated trace event to spit out a name Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_debugfs.c | 19 - drivers/gpu/drm/i915/i915_drv.h | 7 ++ drivers/gpu/drm/i915/i915_gem_context.c | 2 +- drivers/gpu/drm/i915/i915_gem_gtt.c

[Intel-gfx] [PATCH 39/68] drm/i915: Consolidate dma mappings

2014-08-21 Thread Ben Widawsky
quire newlines, or local variables to make it fit cleanly. Notice that even the page allocation shares this same attribute. For now, I am leaving that code untouched because the macro version would be a bit on the big side - but it's a nice cleanup as well (IMO) Signed-off-by: Ben Widawsky --

[Intel-gfx] [PATCH 23/68] drm/i915: Rename to GEN8_LEGACY_PDPES

2014-08-21 Thread Ben Widawsky
In gen8, 32b PPGTT has always had one "pdp" (it doesn't actually have one, but it resembles having one). The #define was confusing as is, and using "PDPE" is a much better description. sed -i 's/GEN8_LEGACY_PDPS/GEN8_LEGACY_PDPES/' drivers/gpu/drm/i915/

[Intel-gfx] [PATCH 26/68] drm/i915: rename map/unmap to dma_map/unmap

2014-08-21 Thread Ben Widawsky
Upcoming patches will use the terms map and unmap in references to the page table entries. Having this distinction will really help with code clarity at that point. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_gtt.c | 12 ++-- 1 file changed, 6 insertions(+), 6

[Intel-gfx] [PATCH 35/68] drm/i915: Create page table allocators

2014-08-21 Thread Ben Widawsky
ing around with such things trivial. v2: Updated commit message to explain why this patch exists Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_gtt.c | 226 +++- drivers/gpu/drm/i915/i915_gem_gtt.h | 4 +- 2 files changed, 147 insertions(+), 83

[Intel-gfx] [PATCH 37/68] drm/i915: Clean up pagetable DMA map & unmap

2014-08-21 Thread Ben Widawsky
be a discrete operation. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_gtt.c | 147 +--- 1 file changed, 85 insertions(+), 62 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c index 8df3b15..4b

[Intel-gfx] [PATCH 34/68] drm/i915: Complete page table structures

2014-08-21 Thread Ben Widawsky
Move the remaining members over to the new page table structures. This can be squashed with the previous commit if desire. The reasoning is the same as that patch. I simply felt it is easier to review if split. Signed-off-by: Ben Widawsky Conflicts: drivers/gpu/drm/i915/i915_drv.h

[Intel-gfx] [PATCH 38/68] drm/i915: Always dma map page table allocations

2014-08-21 Thread Ben Widawsky
There is never a case where we don't want to do it. Since we've broken up the allocations into nice clean helper functions, it's both easy and obvious to do the dma mapping at the same time. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915

[Intel-gfx] [PATCH 44/68] drm/i915: Initialize all contexts

2014-08-21 Thread Ben Widawsky
e. It was tricky to track this down as we don't have much insight into what happens in a context save. This is required for the next patch which enables dynamic page tables. I need to go back and test this pre-GEN8 Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_context.c |

[Intel-gfx] [PATCH 15/68] drm/i915/gen8: Invalidate TLBs before PDP reload

2014-08-21 Thread Ben Widawsky
This is a spec requirement for all rings. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_context.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c index 61b36f9..ef256ae 100644 --- a/drivers

[Intel-gfx] [PATCH 25/68] drm/i915: s/pd/pdpe, s/pt/pde

2014-08-21 Thread Ben Widawsky
f future patches. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_gtt.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c index ab863bb..861df21 100644 --- a/drivers/gpu/drm/

[Intel-gfx] [PATCH 32/68] drm/i915: Page table helpers, and define renames

2014-08-21 Thread Ben Widawsky
lt;<22) == 512); assert(gen6_pde_count(base + 0x1000, 512<<22) == 512); assert(gen6_pde_count(base + (1<<22), 512<<22) == 511); } int main() { test_pde(0); while (1) test_pte(rand() & ~((1<<22) - 1)); return 0; } v

[Intel-gfx] [PATCH 30/68] drm/i915: Make gen6_write_pdes gen6_map_page_tables

2014-08-21 Thread Ben Widawsky
Split out single mappings which will help with upcoming work. Also while here, rename the function because it is a better description - but this function is going away soon. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_gtt.c | 39 ++--- 1 file

[Intel-gfx] [PATCH 13/68] drm/i915/bdw: Enable full PPGTT

2014-08-21 Thread Ben Widawsky
Broadwell is perfectly capable of full PPGTT. I've been using it for some time, and seen no especially ill effects. Signed-off-by: Ben Widawsky Conflicts: drivers/gpu/drm/i915/i915_drv.h --- drivers/gpu/drm/i915/i915_drv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[Intel-gfx] [PATCH 27/68] drm/i915: Setup less PPGTT on failed pagedir

2014-08-21 Thread Ben Widawsky
The current code will both potentially print a WARN, and setup part of the PPGTT structure. Neither of these harm the current code, it is simply for clarity, and to perhaps prevent later bugs, or weird debug messages. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_gtt.c | 5

[Intel-gfx] [PATCH 55/68] drm/i915/bdw: Make pdp allocation more dynamic

2014-08-21 Thread Ben Widawsky
This transitional patch doesn't do much for the existing code. However, it should make upcoming patches to use the full 48b address space a bit easier to swallow. The patch also introduces the PML4, ie. the new top level structure of the page tables. Signed-off-by: Ben Widawsky --- driver

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