[Intel-gfx] [PATCH 3/3] drm/i915: Make file default context persistent

2014-01-02 Thread Ben Widawsky
With full PPGTT and per file default contexts it no longer makes sense to inhibit saving and restoring those hw contexts. The /real/ default context is system wide and still benefits from not saving/restoring. The upshot of this patch is that with a simple param, userspace will be able to avoid al

[Intel-gfx] [PATCH 2/3] drm/i915: set ctx->initialized only after RCS

2014-01-02 Thread Ben Widawsky
The initialized flag is used to specify a context has been initialized and it's context is safe to load, ie. the 3d state is setup properly. With full PPGTT, we emit the address space loads during context switch and this currently marks a context as initialized. With full PPGTT patches, if a client

[Intel-gfx] [PATCH] [v2] drm/i915/ppgtt: Never return a NULL context

2014-01-02 Thread Ben Widawsky
It makes all the code which calls into this function way too confusing. v2: Fix destroy IOCTL as well v3: Clarify the other two callers of i915_gem_context_get() to never check for NULL. (Mika) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72903 Signed-off-by: Ben Widawsky --- drivers

[Intel-gfx] [PATCH 3/5] intel: Merge latest i915_drm.h

2014-01-02 Thread Ben Widawsky
This was not done as a straight copy because reset_stats IOCTL landed in libdrm before upstream kernel. (We'll do a similar thing for full PPGTT anyway, so there isn't really a point in syncing exactly). Signed-off-by: Ben Widawsky --- include/drm/i915_drm.h | 113 +++

[Intel-gfx] [PATCH 1/5] intel: squash unused variable 'bo_gem'

2014-01-02 Thread Ben Widawsky
Signed-off-by: Ben Widawsky --- intel/intel_bufmgr_gem.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c index 48ff62e..3b1f584 100644 --- a/intel/intel_bufmgr_gem.c +++ b/intel/intel_bufmgr_gem.c @@ -1337,7 +1337,9 @@ int drm_intel_gem_bo

[Intel-gfx] [PATCH 2/5] intel: Handle malloc fails in context create

2014-01-02 Thread Ben Widawsky
The previous code would just use the potentially unallocated variable, which is probably okay most of the time, but not very nice to the user of the library. Signed-off-by: Ben Widawsky --- intel/intel_bufmgr_gem.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/intel/in

[Intel-gfx] [PATCH 4/5] intel: Intel full PPGTT param

2014-01-02 Thread Ben Widawsky
This will allow mesa to determine if it needs to create a context, or can reuse the default context. Reusing the default context saves memory, and startup time. To keep the libdrm interface as dumb as possible, we simply expose a getter for the default context (which is only a real context when th

[Intel-gfx] [PATCH] i965: Use default contexts when possible.

2014-01-02 Thread Ben Widawsky
Will full PPGTT support it can be assumed that every file descriptor gets its own hardware context. As such, there is no need to allocate anew context in order to use the features provided by hardware contexts. Eliminating this extra context allocation saves both physical memory (currently PPGTT pa

[Intel-gfx] [PATCH 5/5] configure.ac: bump version to 2.4.51 for release

2014-01-02 Thread Ben Widawsky
Provides the parameter for full PPGTT on Intel. Signed-off-by: Ben Widawsky --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index c5b8d40..d0d051a 100644 --- a/configure.ac +++ b/configure.ac @@ -20,7 +20,7 @@ AC_PREREQ([2.63])

Re: [Intel-gfx] DP1 Monitor Flashes

2014-01-02 Thread Robert Navarro
I too am having the same issue. I'm running on kernel 3.12.6 (just updated) The issue happens less frequently, but it still happens and it's quite annoying. Previously I would just get lines like this: [ 342.071567] [drm:ilk_display_irq_handler], Pipe B FIFO underrun [ 342.071584] [drm:cpt_ser

Re: [Intel-gfx] [PATCH 1/6] igt_kms: don't leak the mmap used for cairo

2014-01-02 Thread Paulo Zanoni
2013/12/31 Chris Wilson : > On Mon, Dec 30, 2013 at 06:16:20PM +, Chris Wilson wrote: >> On Mon, Dec 30, 2013 at 03:53:10PM -0200, Paulo Zanoni wrote: >> > 2013/12/30 Chris Wilson : >> > > On Mon, Dec 30, 2013 at 01:56:48PM -0200, Paulo Zanoni wrote: >> > >> From: Paulo Zanoni >> > >> >> > >>

Re: [Intel-gfx] [PATCH 3/3] drm/i915: remove the vblank_wait hack from HSW+

2014-01-02 Thread Paulo Zanoni
2013/12/20 Lee, Chon Ming : > On 12/20 12:32, Paulo Zanoni wrote: >> 2013/12/19 Daniel Vetter : >> > On Thu, Dec 19, 2013 at 10:12 PM, Paulo Zanoni wrote: >> >> From: Paulo Zanoni >> >> >> >> When I forked haswell_crtc_enable I copied all the code from >> >> ironlake_crtc_enable. The last piece o

[Intel-gfx] [PATCH] drm/ivb: Flush outstanding requests before allocating new seqno

2014-01-02 Thread Chris Wilson
In very rare cases (such as a memory failure stress test) it is possible to fill the entire ring without emitting a request. Under this circumstance, the outstanding request is flushed and waited upon. After space on the ring is cleared, we return to emitting the new command - except that we just c

Re: [Intel-gfx] [PATCH] [v2] drm/i915/ppgtt: Never return a NULL context

2014-01-02 Thread Mika Kuoppala
Ben Widawsky writes: > It makes all the code which calls into this function way too confusing. > > v2: Fix destroy IOCTL as well > callsite inside i915_gem_validate_context() and after it is called in i915_gem_do_execbuffer() are still confusing as they seem to expect NULL. Latter even tries to

Re: [Intel-gfx] [PATCH 1/3] drm/i915: Only bind each object rather than for every execbuffer

2014-01-02 Thread Chris Wilson
On Wed, Jan 01, 2014 at 01:51:57PM -0800, Ben Widawsky wrote: > On Wed, Jan 01, 2014 at 02:00:54PM +, Chris Wilson wrote: > > diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c > > b/drivers/gpu/drm/i915/i915_gem_gtt.c > > index 998f9a0b322a..d113eb5e2f5b 100644 > > --- a/drivers/gpu/drm/i915/i9