[Intel-gfx] [PATCH] drm/i915: Fix frontbuffer tracking for PSR

2014-06-13 Thread Chris Wilson
This should enable accurate frontbuffer tracking and keep PSR disabled whilst (and only while) the scanout is being directly accessed either by the CPU or by the GPU. The important difference here is that the tracking is more accurate and we check in the re-enable worker whether the fb is still bei

Re: [Intel-gfx] [PATCH] drm/i915: Attach a PSR property on eDP

2014-06-13 Thread Chris Wilson
On Sat, Jun 14, 2014 at 01:39:45AM +0200, Daniel Vetter wrote: > On Fri, Jun 13, 2014 at 10:32 PM, Chris Wilson > wrote: > > Let userspace know the status of Panel Self-Refresh by virtue of a > > property on the appropriate connector. > > > > v2: Only attach the property if the driver is capable

Re: [Intel-gfx] [PATCH] drm/i915: Attach a PSR property on eDP

2014-06-13 Thread Daniel Vetter
On Fri, Jun 13, 2014 at 10:32 PM, Chris Wilson wrote: > Let userspace know the status of Panel Self-Refresh by virtue of a > property on the appropriate connector. > > v2: Only attach the property if the driver is capable of PSR. > > Signed-off-by: Chris Wilson Shouldn't we attach this to the cr

[Intel-gfx] [PATCH 2/2] drm/i915: update intel_dp_voltage_max comment

2014-06-13 Thread Paulo Zanoni
From: Paulo Zanoni Any comment containing "current Intel hardware supports" quickly becomes obsolete, so remove it and let people discover the information by looking at the function implementation. Signed-off-by: Paulo Zanoni --- drivers/gpu/drm/i915/intel_dp.c | 6 +- 1 file changed, 1 in

[Intel-gfx] [PATCH 1/2] drm/i915: update BDW DDI buffer translations

2014-06-13 Thread Paulo Zanoni
From: Paulo Zanoni Two BSpec updates changed the recommended values for BDW eDP and DP DDI buffer translations. Now the signal levels also match the HSW signal levels, which simplify things a little bit. It seems some DP sinks don't work properly without voltage level 0 and pre-emphasis level 3,

[Intel-gfx] [PATCH] drm/i915: Attach a PSR property on eDP

2014-06-13 Thread Chris Wilson
Let userspace know the status of Panel Self-Refresh by virtue of a property on the appropriate connector. v2: Only attach the property if the driver is capable of PSR. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_drv.h| 1 + drivers/gpu/drm/i915/intel_dp.c| 13

[Intel-gfx] [PATCH] drm/i915: Attach a PSR property on eDP

2014-06-13 Thread Chris Wilson
Let userspace know the status of Panel Self-Refresh by virtue of a property on the appropriate connector. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_drv.h| 1 + drivers/gpu/drm/i915/intel_dp.c| 13 + drivers/gpu/drm/i915/intel_drv.h | 1 + drivers/gpu/drm/i

Re: [Intel-gfx] [PATCH] drm/i915: Fix memory leak in intel_dsi_init() error path

2014-06-13 Thread Daniel Vetter
On Fri, Jun 13, 2014 at 09:51:22PM +0200, Christoph Jaeger wrote: > intel_dsi_init() bails out without freeing the memory 'intel_dsi' and > 'intel_connector' point to. Simply bail out before allocating memory. > > Picked up by Coverity - CID 1222750. > > Signed-off-by: Christoph Jaeger Queued f

[Intel-gfx] [PATCH] drm/i915: Fix memory leak in intel_dsi_init() error path

2014-06-13 Thread Christoph Jaeger
intel_dsi_init() bails out without freeing the memory 'intel_dsi' and 'intel_connector' point to. Simply bail out before allocating memory. Picked up by Coverity - CID 1222750. Signed-off-by: Christoph Jaeger --- drivers/gpu/drm/i915/intel_dsi.c | 14 +++--- 1 file changed, 7 insertions

Re: [Intel-gfx] [PATCH] drm/i915: Force PSR exit by inactivating it.

2014-06-13 Thread Chris Wilson
On Fri, Jun 13, 2014 at 05:10:03AM -0700, Rodrigo Vivi wrote: > The perfect solution for psr_exit is the hardware tracking the changes and > doing the psr exit by itself. This scenario works for HSW and BDW with some > environments like Gnome and Wayland. > > However there are many other scenarios

Re: [Intel-gfx] [PATCH] drm/i915: Force PSR exit by inactivating it.

2014-06-13 Thread Daniel Vetter
On Fri, Jun 13, 2014 at 05:10:03AM -0700, Rodrigo Vivi wrote: > The perfect solution for psr_exit is the hardware tracking the changes and > doing the psr exit by itself. This scenario works for HSW and BDW with some > environments like Gnome and Wayland. > > However there are many other scenarios

[Intel-gfx] [PATCH] drm/i915: Force PSR exit by inactivating it.

2014-06-13 Thread Rodrigo Vivi
The perfect solution for psr_exit is the hardware tracking the changes and doing the psr exit by itself. This scenario works for HSW and BDW with some environments like Gnome and Wayland. However there are many other scenarios that this isn't true. Mainly one right now is KDE users on HSW and BDW

Re: [Intel-gfx] [PATCH 02/53] drm/i915: Rename ctx->obj to ctx->render_obj

2014-06-13 Thread Chris Wilson
On Fri, Jun 13, 2014 at 04:37:20PM +0100, oscar.ma...@intel.com wrote: > From: Oscar Mateo > > The reason for doing this will be better explained in the following > patch. For now, suffice it to say that this backing object is only > used with the render ring, so we're making this fact more expli

Re: [Intel-gfx] [PATCH 05/53] drm/i915: Move i915_gem_validate_context() to i915_gem_context.c

2014-06-13 Thread Chris Wilson
On Fri, Jun 13, 2014 at 04:37:23PM +0100, oscar.ma...@intel.com wrote: > From: Oscar Mateo > > ... and namespace appropriately. > > It looks to me like it belongs logically there. > > Signed-off-by: Oscar Mateo > --- > drivers/gpu/drm/i915/i915_drv.h| 3 +++ > drivers/gpu/drm/i91

Re: [Intel-gfx] [PATCH 02/53] drm/i915: Rename ctx->obj to ctx->render_obj

2014-06-13 Thread Daniel Vetter
On Fri, Jun 13, 2014 at 04:37:20PM +0100, oscar.ma...@intel.com wrote: > From: Oscar Mateo > > The reason for doing this will be better explained in the following > patch. For now, suffice it to say that this backing object is only > used with the render ring, so we're making this fact more expli

Re: [Intel-gfx] [PATCH 37/53] drm/i915/bdw: Implement context switching (somewhat)

2014-06-13 Thread Chris Wilson
On Fri, Jun 13, 2014 at 04:37:55PM +0100, oscar.ma...@intel.com wrote: > +static void execlists_elsp_write(struct intel_engine_cs *ring, > + struct drm_i915_gem_object *ctx_obj0, > + struct drm_i915_gem_object *ctx_obj1) > +{ > + struct

Re: [Intel-gfx] [PATCH i-g-t 1/5] kms: Add universal plane support

2014-06-13 Thread Damien Lespiau
As a small summary, I don't think we should be exposing the plane_commit() function and always go through igt_display_commit() to make hooking the atomic ioctl() easier. Loosing the plane ordering is a bit meh but should be able to live with it. The rest looks good. -- Damien

Re: [Intel-gfx] [PATCH 43/53] drm/i915/bdw: Make sure error capture keeps working with Execlists

2014-06-13 Thread Chris Wilson
On Fri, Jun 13, 2014 at 04:38:01PM +0100, oscar.ma...@intel.com wrote: > From: Oscar Mateo > > Since the ringbuffer does not belong per engine anymore, we have to > make sure that we are always recording the correct ringbuffer. > > TODO: This is only a small fix to keep basic error capture worki

Re: [Intel-gfx] [PATCH] drm/i915/vlv: disable PPGTT on early revs v3

2014-06-13 Thread Daniel Vetter
On Fri, Jun 13, 2014 at 07:45:50PM +0300, Ville Syrjälä wrote: > On Fri, Jun 13, 2014 at 09:28:33AM -0700, Jesse Barnes wrote: > > Early revs didn't have PPGTT support, so disable there. > > > > v2: add debug msg when disabling on early stepping > > v3: enable on other B3 packages as well (unteste

Re: [Intel-gfx] [PATCH 51/53] drm/i915/bdw: Document Logical Rings, LR contexts and Execlists

2014-06-13 Thread Chris Wilson
On Fri, Jun 13, 2014 at 04:38:09PM +0100, oscar.ma...@intel.com wrote: > +/** > + * intel_execlists_ctx_id() - get the Execlists Context ID > + * @ctx_obj: Logical Ring Context backing object. > + * > + * Do not confuse with ctx->id! Unfortunately we have a name overload > + * here: the old context

Re: [Intel-gfx] [PATCH] drm/i915/vlv: disable PPGTT on early revs v3

2014-06-13 Thread Ville Syrjälä
On Fri, Jun 13, 2014 at 09:28:33AM -0700, Jesse Barnes wrote: > Early revs didn't have PPGTT support, so disable there. > > v2: add debug msg when disabling on early stepping > v3: enable on other B3 packages as well (untested) (Ville) > > References: https://bugs.freedesktop.org/show_bug.cgi?id=

Re: [Intel-gfx] [PATCH 1/2] mm: Report attempts to overwrite PTE from remap_pfn_range()

2014-06-13 Thread Chris Wilson
On Fri, Jun 13, 2014 at 05:26:17PM +0100, Chris Wilson wrote: > When using remap_pfn_range() from a fault handler, we are exposed to > races between concurrent faults. Rather than hitting a BUG, report the > error back to the caller, like vm_insert_pfn(). > > Signed-off-by: Chris Wilson > Cc: And

Re: [Intel-gfx] video: X sets brightness to zero after resume

2014-06-13 Thread Kalle Valo
Hans de Goede writes: >>> If I set video.use_native_backlight=0 in kernel command line the problem >>> goes away. Or if I revert your commit 0e9f81d3b7c the problem also goes >>> away. Any ideas? >> >> Not really... >> I've added i915 people maybe they have an idea. > > This is a known issue in

Re: [Intel-gfx] [PATCH] drm/i915/vlv: disable PPGTT on early revs

2014-06-13 Thread Jesse Barnes
On Fri, 13 Jun 2014 17:02:10 +0100 Chris Wilson wrote: > On Fri, Jun 13, 2014 at 06:54:02PM +0300, Ville Syrjälä wrote: > > On Fri, Jun 13, 2014 at 08:32:38AM -0700, Jesse Barnes wrote: > > > Early revs didn't have PPGTT support, so disable there. > > > > > > References: https://bugs.freedesktop

[Intel-gfx] [PATCH 7/8] NEWS: Mention igt.cocci

2014-06-13 Thread Daniel Vetter
And also pimp the spatch file itself with usage hints. Signed-off-by: Daniel Vetter --- NEWS | 3 +++ lib/igt.cocci | 8 2 files changed, 11 insertions(+) diff --git a/NEWS b/NEWS index ee920744f4c4..33354f9d5360 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,9 @@ Release 1.8 (-

[Intel-gfx] [PATCH 8/8] tests: run igt.cocci

2014-06-13 Thread Daniel Vetter
Re-run with correct igt_fail rules. Again manually fixup missing includes for igt_core.h. Signed-off-by: Daniel Vetter --- tests/ddi_compute_wrpll.c | 12 + tests/drv_hangman.c | 14 ++ tests/gem_bad_reloc.c | 4 +- tests/gem_fence_upload.c| 18 ++

[Intel-gfx] [PATCH 6/8] lib: Introduce igt_fail_on/_f

2014-06-13 Thread Daniel Vetter
I've yet again totally screwed things up (this time automated with cocci even, but not yet pushed luckily). So finally add a new version for easier conversion and adjust the cocci script. Signed-off-by: Daniel Vetter --- lib/igt.cocci | 9 - lib/igt_core.h | 28

[Intel-gfx] [PATCH 2/8] tests: Don't use stderr for informational messages

2014-06-13 Thread Daniel Vetter
These should go to stdout instead. The next patch will clean this up with cocci, so no change from fprintf(stdout, to printf( here. Signed-off-by: Daniel Vetter --- lib/igt.cocci | 1 + tests/gem_stress.c | 2 +- tests/testdisplay.c | 34 +- 3 files chang

[Intel-gfx] [PATCH 4/8] lib/igt.cocci: Convert abort() to igt_fail

2014-06-13 Thread Daniel Vetter
abort should only be used for internal library checks - using abort() we get a "crash" result, using igt_fail we get "fail" in piglit. Signed-off-by: Daniel Vetter --- lib/igt.cocci | 7 +++ 1 file changed, 7 insertions(+) diff --git a/lib/igt.cocci b/lib/igt.cocci index 97aa43f9f057..dcb7b

[Intel-gfx] [PATCH 5/8] lib/igt.cocci: Also add rule to use igt_warn_on_f

2014-06-13 Thread Daniel Vetter
Signed-off-by: Daniel Vetter --- lib/igt.cocci | 8 1 file changed, 8 insertions(+) diff --git a/lib/igt.cocci b/lib/igt.cocci index dcb7bbc94dd0..e944c7d12f4f 100644 --- a/lib/igt.cocci +++ b/lib/igt.cocci @@ -22,6 +22,14 @@ expression list[n] Ep; - igt_skip(Ep); - } + igt_skip_on_f

[Intel-gfx] [PATCH 3/8] lib/igt.cocci: Conversion to igt logging

2014-06-13 Thread Daniel Vetter
Also update old hunks to match on igt logging instead of fprintf. v2: Don't forget about perror. Signed-off-by: Daniel Vetter --- lib/igt.cocci | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/lib/igt.cocci b/lib/igt.cocci index a5f7c2dbfbce..97

[Intel-gfx] [PATCH 1/8] tests/pm_psr_sink_crc: Fix longjmp fun

2014-06-13 Thread Daniel Vetter
igt_fixture and igt_subtests use longjmp/setjmp internally, which means local variables at the same stack frame are at risk. Best practice is to move them out right in front of the igt_main block. It would be awesome if someone could come up with a cocci patch to auto-fix this, but unfortunately m

[Intel-gfx] [PATCH] drm/i915/vlv: disable PPGTT on early revs v3

2014-06-13 Thread Jesse Barnes
Early revs didn't have PPGTT support, so disable there. v2: add debug msg when disabling on early stepping v3: enable on other B3 packages as well (untested) (Ville) References: https://bugs.freedesktop.org/show_bug.cgi?id=79669 References: https://bugs.freedesktop.org/show_bug.cgi?id=79670 Signe

Re: [Intel-gfx] [PATCH i-g-t 3/5] kms_plane: Update for universal plane changes

2014-06-13 Thread Damien Lespiau
On Thu, May 29, 2014 at 08:09:15AM -0700, Matt Roper wrote: > Recent changes in igt_kms to support universal planes have removed the > plane list order guarantees that kms_plane depended upon. Ensure that > we loop over the entire plane list properly and then selectively skip > non-overlay planes.

[Intel-gfx] [PATCH 1/2] mm: Report attempts to overwrite PTE from remap_pfn_range()

2014-06-13 Thread Chris Wilson
When using remap_pfn_range() from a fault handler, we are exposed to races between concurrent faults. Rather than hitting a BUG, report the error back to the caller, like vm_insert_pfn(). Signed-off-by: Chris Wilson Cc: Andrew Morton Cc: "Kirill A. Shutemov" Cc: Peter Zijlstra Cc: Rik van Riel

[Intel-gfx] [PATCH 2/2] drm/i915: Use remap_pfn_range() to prefault all PTE in a single pass

2014-06-13 Thread Chris Wilson
On an Ivybridge i7-3720qm with 1600MHz DDR3, with 32 fences, Upload rate for 2 linear surfaces: 8134MiB/s -> 8154MiB/s Upload rate for 2 tiled surfaces: 8625MiB/s -> 8632MiB/s Upload rate for 4 linear surfaces: 8127MiB/s -> 8134MiB/s Upload rate for 4 tiled surfaces: 8602MiB/s -> 8629MiB/s Up

Re: [Intel-gfx] [PATCH i-g-t 2/5] kms: Add igt_drm_plane_try_commit()

2014-06-13 Thread Damien Lespiau
On Thu, May 29, 2014 at 08:09:14AM -0700, Matt Roper wrote: > For some of our tests, we want to make sure that bogus plane programming > attempts fail with the expected error code. Add > igt_drm_plane_try_commit() that will just return the error code on > failure rather than failing the current su

Re: [Intel-gfx] [PATCH i-g-t 1/5] kms: Add universal plane support

2014-06-13 Thread Damien Lespiau
On Thu, May 29, 2014 at 08:09:13AM -0700, Matt Roper wrote: > Add support for universal planes. This involves revamping the existing > plane handling a bit to allow primary & cursor planes to come from the > DRM plane list, rather than always being manually added. Also, > eliminate the hard-coded

[Intel-gfx] [PATCH] drm/i915/vlv: disable PPGTT on early revs v2

2014-06-13 Thread Jesse Barnes
Early revs didn't have PPGTT support, so disable there. v2: add debug msg when disabling on early stepping References: https://bugs.freedesktop.org/show_bug.cgi?id=79669 References: https://bugs.freedesktop.org/show_bug.cgi?id=79670 Signed-off-by: Jesse Barnes --- drivers/gpu/drm/i915/i915_gem_

Re: [Intel-gfx] [PATCH] drm/i915, HD-audio: Don't continue probing when nomodeset is given

2014-06-13 Thread Takashi Iwai
At Fri, 13 Jun 2014 18:07:06 +0200, Daniel Vetter wrote: > > On Fri, Jun 13, 2014 at 05:56:02PM +0200, Takashi Iwai wrote: > > When a machine is booted with nomodeset option, i915 driver skips the > > whole initialization. Meanwhile, HD-audio tries to bind wth i915 just > > by request_symbol() wi

Re: [Intel-gfx] [PATCH] drm/i915/vlv: disable PPGTT on early revs

2014-06-13 Thread Jesse Barnes
On Fri, 13 Jun 2014 18:54:02 +0300 Ville Syrjälä wrote: > On Fri, Jun 13, 2014 at 08:32:38AM -0700, Jesse Barnes wrote: > > Early revs didn't have PPGTT support, so disable there. > > > > References: https://bugs.freedesktop.org/show_bug.cgi?id=79669 > > References: https://bugs.freedesktop.org/

[Intel-gfx] [PATCH] drm/i915: re-order ppgtt sanitize logic v2

2014-06-13 Thread Jesse Barnes
Put hw limitations first, disabling ppgtt if necessary right away. After that, check user passed args or auto-detect and do the right thing, falling back to aliasing PPGTT if the user tries to enable full PPGTT but it isn't available. v2: simplify auto-detect case since we already caught the no PP

[Intel-gfx] [PATCH] Revert "tests: Run igt.cocci over tests"

2014-06-13 Thread Daniel Vetter
This reverts commit 6903ab04e5f9048e3932eb3225e94b6a228681ba. The igt_assert conversion rule is broken and doesn't invert the check as it should. Signed-off-by: Daniel Vetter --- tests/drv_hangman.c | 14 ++ tests/kms_psr_sink_crc.c | 4 ++-- 2 files changed, 12 insertions(+),

Re: [Intel-gfx] [PATCH] drm/i915, HD-audio: Don't continue probing when nomodeset is given

2014-06-13 Thread Daniel Vetter
On Fri, Jun 13, 2014 at 05:56:02PM +0200, Takashi Iwai wrote: > When a machine is booted with nomodeset option, i915 driver skips the > whole initialization. Meanwhile, HD-audio tries to bind wth i915 just > by request_symbol() without knowing that the initialization was > skipped, and eventually

[Intel-gfx] [PATCH 2/2] drm/i915: re-order ppgtt sanitize logic

2014-06-13 Thread Jesse Barnes
Put hw limitations first, disabling ppgtt if necessary right away. After that, check user passed args or auto-detect and do the right thing, falling back to aliasing PPGTT if the user tries to enable full PPGTT but it isn't available. Signed-off-by: Jesse Barnes --- drivers/gpu/drm/i915/i915_gem

[Intel-gfx] [PATCH 1/2] drm/i915: clean up PPGTT checking logic

2014-06-13 Thread Jesse Barnes
sanitize_enable_ppgtt is the function that checks all the conditions, honoring a forced ppgtt status or doing auto-detect as necessary. Just make sure it returns the right value in all cases and use that in the macros instead of the confusing intel_enable_ppgtt() function. Signed-off-by: Jesse Ba

Re: [Intel-gfx] [PATCH] drm/i915/vlv: disable PPGTT on early revs

2014-06-13 Thread Chris Wilson
On Fri, Jun 13, 2014 at 06:54:02PM +0300, Ville Syrjälä wrote: > On Fri, Jun 13, 2014 at 08:32:38AM -0700, Jesse Barnes wrote: > > Early revs didn't have PPGTT support, so disable there. > > > > References: https://bugs.freedesktop.org/show_bug.cgi?id=79669 > > References: https://bugs.freedesktop

Re: [Intel-gfx] [PATCH] drm/i915/bdw: remove erroneous chv specific workarounds from bdw code

2014-06-13 Thread O'Rourke, Tom
>--- > >All, I intend to push this to drm-intel-fixes, any objections? > >Jani. >--- [TOR:] I have no objections. Looks good to me. ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx

[Intel-gfx] [PATCH] drm/i915, HD-audio: Don't continue probing when nomodeset is given

2014-06-13 Thread Takashi Iwai
When a machine is booted with nomodeset option, i915 driver skips the whole initialization. Meanwhile, HD-audio tries to bind wth i915 just by request_symbol() without knowing that the initialization was skipped, and eventually it hits WARN_ON() in i915_request_power_well() and i915_release_power_

Re: [Intel-gfx] [PATCH] drm/i915/vlv: disable PPGTT on early revs

2014-06-13 Thread Ville Syrjälä
On Fri, Jun 13, 2014 at 08:32:38AM -0700, Jesse Barnes wrote: > Early revs didn't have PPGTT support, so disable there. > > References: https://bugs.freedesktop.org/show_bug.cgi?id=79669 > References: https://bugs.freedesktop.org/show_bug.cgi?id=79670 > Signed-off-by: Jesse Barnes > --- > driver

[Intel-gfx] [PATCH 49/53] drm/i915: Extract render state preparation

2014-06-13 Thread oscar . mateo
From: Oscar Mateo Execlists need a new submission mechanism, so split the preparation from the submission. Signed-off-by: Oscar Mateo --- drivers/gpu/drm/i915/i915_gem_render_state.c | 27 +-- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/dr

[Intel-gfx] [PATCH 23/53] drm/i915: Generalize intel_ring_get_tail

2014-06-13 Thread oscar . mateo
From: Oscar Mateo Reusing stuff, a penny at a time. Signed-off-by: Oscar Mateo --- drivers/gpu/drm/i915/i915_gem.c | 4 ++-- drivers/gpu/drm/i915/intel_ringbuffer.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/dr

[Intel-gfx] [PATCH 36/53] drm/i915: Abstract the workload submission mechanism away

2014-06-13 Thread oscar . mateo
From: Oscar Mateo As suggested by Daniel. Signed-off-by: Oscar Mateo --- drivers/gpu/drm/i915/i915_drv.h| 26 drivers/gpu/drm/i915/i915_gem.c| 48 +++--- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 25 +++- 3 files c

[Intel-gfx] [PATCH 33/53] drm/i915: Extract the actual workload submission mechanism from execbuffer

2014-06-13 Thread oscar . mateo
From: Oscar Mateo So that we isolate the legacy ringbuffer submission mechanism, which becomes a good candidate to be abstracted away. No functional changes. Signed-off-by: Oscar Mateo --- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 298 - 1 file changed, 162 inse

[Intel-gfx] [PATCH 47/53] drm/i915/bdw: Display context backing obj & ringbuffer info in debugfs

2014-06-13 Thread oscar . mateo
From: Oscar Mateo Signed-off-by: Oscar Mateo --- drivers/gpu/drm/i915/i915_debugfs.c | 26 -- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 3ccdf0d..e5db287 100644 --- a/dri

[Intel-gfx] [PATCH 38/53] drm/i915/bdw: Write the tail pointer, LRC style

2014-06-13 Thread oscar . mateo
From: Oscar Mateo Each logical ring context has the tail pointer in the context object, so update it before submission. v2: New namespace. Signed-off-by: Oscar Mateo --- drivers/gpu/drm/i915/intel_lrc.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/drivers/gpu/drm/i

[Intel-gfx] [PATCH 29/53] drm/i915/bdw: Emission of requests with logical rings

2014-06-13 Thread oscar . mateo
From: Oscar Mateo Also known as __i915_add_request's evil twin. On seqno preallocation, we set the request context information correctly so that we can retrieve it both when we want to emit or retire the request. This is a candidate to be abstracted away (so that it replaces __i915_add_request

[Intel-gfx] [PATCH 40/53] drm/i915/bdw: Handle context switch events

2014-06-13 Thread oscar . mateo
From: Thomas Daniel Handle all context status events in the context status buffer on every context switch interrupt. We only remove work from the execlist queue after a context status buffer reports that it has completed and we only attempt to schedule new contexts on interrupt when a previously

[Intel-gfx] [PATCH 46/53] drm/i915/bdw: Display execlists info in debugfs

2014-06-13 Thread oscar . mateo
From: Oscar Mateo v2: Warn and return if LRCs are not enabled. Signed-off-by: Oscar Mateo --- drivers/gpu/drm/i915/i915_debugfs.c | 72 + drivers/gpu/drm/i915/intel_lrc.c| 6 drivers/gpu/drm/i915/intel_lrc.h| 7 3 files changed, 79 insert

[Intel-gfx] [PATCH 45/53] drm/i915/bdw: Do not call intel_runtime_pm_get() in an interrupt

2014-06-13 Thread oscar . mateo
From: Oscar Mateo Or with a spinlock grabbed, because it might sleep, which is not a nice thing to do. Instead, do the runtime_pm get/put together with the create/destroy request, and handle the forcewake get/put directly. Signed-off-by: Oscar Mateo --- drivers/gpu/drm/i915/intel_lrc.c | 26 ++

[Intel-gfx] [PATCH 43/53] drm/i915/bdw: Make sure error capture keeps working with Execlists

2014-06-13 Thread oscar . mateo
From: Oscar Mateo Since the ringbuffer does not belong per engine anymore, we have to make sure that we are always recording the correct ringbuffer. TODO: This is only a small fix to keep basic error capture working, but we need to add more information for it to be useful (e.g. dump the context

[Intel-gfx] [PATCH 22/53] drm/i915: Make ring_space more generic and outside accesible

2014-06-13 Thread oscar . mateo
From: Oscar Mateo I want to reuse it from the new logical ring code (as it seems innocent enough). Signed-off-by: Oscar Mateo --- drivers/gpu/drm/i915/intel_ringbuffer.c | 26 ++ drivers/gpu/drm/i915/intel_ringbuffer.h | 13 + 2 files changed, 19 insertions(

[Intel-gfx] [PATCH 41/53] drm/i915/bdw: Avoid non-lite-restore preemptions

2014-06-13 Thread oscar . mateo
From: Oscar Mateo In the current Execlists feeding mechanism, full preemption is not supported yet: only lite-restores are allowed (this is: the GPU simply samples a new tail pointer for the context currently in execution). But we have identified an scenario in which a full preemption occurs: 1)

[Intel-gfx] [PATCH 37/53] drm/i915/bdw: Implement context switching (somewhat)

2014-06-13 Thread oscar . mateo
From: Ben Widawsky A context switch occurs by submitting a context descriptor to the ExecList Submission Port. Given that we can now initialize a context, it's possible to begin implementing the context switch by creating the descriptor and submitting it to ELSP (actually two, since the ELSP has

[Intel-gfx] [PATCH 25/53] drm/i915/bdw: GEN-specific logical ring submit context (somewhat)

2014-06-13 Thread oscar . mateo
From: Oscar Mateo For the moment, just mark the place (we still need to do a lot of preparation before execlists are ready to start submitting things). Signed-off-by: Oscar Mateo --- drivers/gpu/drm/i915/intel_lrc.c| 11 +++ drivers/gpu/drm/i915/intel_ringbuffer.h | 6 ++

[Intel-gfx] [PATCH 34/53] drm/i915: Make move_to_active and retire_commands outside accesible

2014-06-13 Thread oscar . mateo
From: Oscar Mateo Trivial change. Signed-off-by: Oscar Mateo --- drivers/gpu/drm/i915/i915_drv.h| 6 ++ drivers/gpu/drm/i915/i915_gem_execbuffer.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i91

[Intel-gfx] [PATCH 44/53] drm/i915/bdw: Help out the ctx switch interrupt handler

2014-06-13 Thread oscar . mateo
From: Oscar Mateo If we receive a storm of requests for the same context (see gem_storedw_loop_*) we might end up iterating over too many elements in interrupt time, looking for contexts to squash together. Instead, share the burden by giving more intelligence to the queue function. At most, the

[Intel-gfx] [PATCH 27/53] drm/i915/bdw: GEN-specific logical ring emit request

2014-06-13 Thread oscar . mateo
From: Oscar Mateo Very similar to the legacy add_request, only modified to account for logical ringbuffer. Signed-off-by: Oscar Mateo --- drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_lrc.c| 61 + drivers/gpu/drm/i915/intel_r

[Intel-gfx] [PATCH 20/53] drm/i915/bdw: GEN-specific logical ring init

2014-06-13 Thread oscar . mateo
From: Oscar Mateo Logical rings do not need most of the initialization their legacy ringbuffer counterparts do: we just need the pipe control object for the render ring, enable Execlists on the hardware and a few workarounds. Signed-off-by: Oscar Mateo --- drivers/gpu/drm/i915/intel_lrc.c | 54

[Intel-gfx] [PATCH 18/53] drm/i915/bdw: New header file for LRs, LRCs and Execlists

2014-06-13 Thread oscar . mateo
From: Oscar Mateo Things are starting to get messy, and this helps a little. And some point in time, it would be a good idea to split intel_lrc.c/.h even further, but for the moment just shove everything together. Signed-off-by: Oscar Mateo --- drivers/gpu/drm/i915/i915_drv.h | 9 +

[Intel-gfx] [PATCH 39/53] drm/i915/bdw: Two-stage execlist submit process

2014-06-13 Thread oscar . mateo
From: Michel Thierry Context switch (and execlist submission) should happen only when other contexts are not active, otherwise pre-emption occurs. To assure this, we place context switch requests in a queue and those request are later consumed when the right context switch interrupt is received

[Intel-gfx] [PATCH 24/53] drm/i915: Make intel_ring_stopped outside accesible

2014-06-13 Thread oscar . mateo
From: Oscar Mateo It is generic enough to be reused. Trivial change. Signed-off-by: Oscar Mateo --- drivers/gpu/drm/i915/intel_ringbuffer.c | 2 +- drivers/gpu/drm/i915/intel_ringbuffer.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_ringbuffer

[Intel-gfx] [PATCH 28/53] drm/i915/bdw: GEN-specific logical ring emit flush

2014-06-13 Thread oscar . mateo
From: Oscar Mateo Notice that the BSD invalidate bit is no longer present in GEN8, so we can consolidate the blt and bsd ring flushes into one. Signed-off-by: Oscar Mateo --- drivers/gpu/drm/i915/intel_lrc.c| 80 + drivers/gpu/drm/i915/intel_ringbuffer.c

[Intel-gfx] [PATCH 51/53] drm/i915/bdw: Document Logical Rings, LR contexts and Execlists

2014-06-13 Thread oscar . mateo
From: Oscar Mateo Add theory of operation notes to intel_lrc.c and comments to externally visible functions. v2: Add notes on logical ring context creation. v3: Use kerneldoc. Signed-off-by: Thomas Daniel (v1) Signed-off-by: Oscar Mateo (v2, v3) --- drivers/gpu/drm/i915/intel_lrc.c | 235 +++

[Intel-gfx] [PATCH 35/53] drm/i915/bdw: Workload submission mechanism for Execlists

2014-06-13 Thread oscar . mateo
From: Oscar Mateo This is what i915_gem_do_execbuffer calls when it wants to execute some worload in an Execlists world. It's a candidate for abstracting the submission mechanism away. Signed-off-by: Oscar Mateo --- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 8 +- drivers/gpu/drm/i915/inte

[Intel-gfx] [PATCH 32/53] drm/i915/bdw: GEN-specific logical ring emit batchbuffer start

2014-06-13 Thread oscar . mateo
From: Oscar Mateo Dispatch_execbuffer's evil twin. Signed-off-by: Oscar Mateo --- drivers/gpu/drm/i915/intel_lrc.c| 29 + drivers/gpu/drm/i915/intel_ringbuffer.h | 3 +++ 2 files changed, 32 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/dri

[Intel-gfx] [PATCH 26/53] drm/i915/bdw: New logical ring submission mechanism

2014-06-13 Thread oscar . mateo
From: Oscar Mateo Well, new-ish: if all this code looks familiar, that's because it's a clone of the existing submission mechanism (with some modifications here and there to adapt it to LRCs and Execlists). And why did we do this? Execlists offer several advantages, like control over when the GP

[Intel-gfx] [PATCH 31/53] drm/i915/bdw: Interrupts with logical rings

2014-06-13 Thread oscar . mateo
From: Oscar Mateo We need to attend context switch interrupts from all rings. Also, fixed writing IMR/IER and added HWSTAM at ring init time. Notice that, if added to irq_enable_mask, the context switch interrupts would be incorrectly masked out when the user interrupts are due to no users waiti

[Intel-gfx] [PATCH 42/53] drm/i915/bdw: Make sure gpu reset still works with Execlists

2014-06-13 Thread oscar . mateo
From: Oscar Mateo If we reset a ring after a hang, we have to make sure that we clear out all queued Execlists requests. v2: The ring is, at this point, already being correctly re-programmed for Execlists, and the hangcheck counters cleared. Signed-off-by: Oscar Mateo --- drivers/gpu/drm/i915

[Intel-gfx] [PATCH 16/53] drm/i915/bdw: Skeleton for the new logical rings submission path

2014-06-13 Thread oscar . mateo
From: Oscar Mateo Execlists are indeed a brave new world with respect to workload submission to the GPU. In previous version of these series, I have tried to impact the legacy ringbuffer submission path as little as possible (mostly, passing the context around and using the correct ringbuffer wh

[Intel-gfx] [PATCH 53/53] !UPSTREAM: drm/i915: Use MMIO flips

2014-06-13 Thread oscar . mateo
From: Sourab Gupta If we want flips to work, either we create an Execlists-aware version of intel_gen7_queue_flip, or we don't place commands directly in the ringbuffer. When upstreamed, this patch should implement the second option: drm/i915: Replaced Blitter ring based flips with MMIO fli

[Intel-gfx] [PATCH 21/53] drm/i915/bdw: GEN-specific logical ring set/get seqno

2014-06-13 Thread oscar . mateo
From: Oscar Mateo No mistery here: the seqno is still retrieved from the engine's HW status page (the one in the default context. For the moment, I see no reason to worry about other context's HWS page). Signed-off-by: Oscar Mateo --- drivers/gpu/drm/i915/intel_lrc.c | 20

[Intel-gfx] [PATCH 19/53] drm/i915: Extract pipe control fini & make init outside accesible

2014-06-13 Thread oscar . mateo
From: Oscar Mateo I plan to reuse these for the new logical ring path. No functional changes. Signed-off-by: Oscar Mateo --- drivers/gpu/drm/i915/intel_ringbuffer.c | 31 ++- drivers/gpu/drm/i915/intel_ringbuffer.h | 3 +++ 2 files changed, 21 insertions(+), 13 de

[Intel-gfx] [PATCH 48/53] drm/i915/bdw: Print context state in debugfs

2014-06-13 Thread oscar . mateo
From: Ben Widawsky This has turned out to be really handy in debug so far. Update: Since writing this patch, I've gotten similar code upstream for error state. I've used it quite a bit in debugfs however, and I'd like to keep it here at least until preemption is working. Signed-off-by: Ben Wida

[Intel-gfx] [PATCH 50/53] drm/i915/bdw: Render state init for Execlists

2014-06-13 Thread oscar . mateo
From: Oscar Mateo The batchbuffer that sets the render context state is submitted in a different way, and from different places. We needed to make both the render state preparation and free functions outside accesible, and namespace accordingly. This mess is so that all LR, LRC and Execlists fun

[Intel-gfx] [PATCH 30/53] drm/i915/bdw: Ring idle and stop with logical rings

2014-06-13 Thread oscar . mateo
From: Oscar Mateo This is a hard one, since there is no direct hardware ring to control when in Execlists. We reuse intel_ring_idle here, but it should be fine as long as i915_add_request does the ring thing. Signed-off-by: Oscar Mateo --- drivers/gpu/drm/i915/intel_lrc.c | 27 +++

[Intel-gfx] [PATCH 17/53] drm/i915/bdw: Generic logical ring init and cleanup

2014-06-13 Thread oscar . mateo
From: Oscar Mateo Allocate and populate the default LRC for every ring, call gen-specific init/cleanup, init/fini the command parser and set the status page (now inside the LRC object). Stopping the ring before cleanup and initializing the seqnos is left as a TODO task (we need more infrastructu

[Intel-gfx] [PATCH 52/53] drm/i915/bdw: Enable logical ring contexts

2014-06-13 Thread oscar . mateo
From: Oscar Mateo The time has come, the Walrus said, to talk of many things. Signed-off-by: Oscar Mateo --- drivers/gpu/drm/i915/i915_drv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 89b6d5c..b62b

[Intel-gfx] [PATCH 13/53] drm/i915/bdw: Deferred creation of user-created LRCs

2014-06-13 Thread oscar . mateo
From: Oscar Mateo The backing objects for contexts created via open fd are actually empty until the user starts sending execbuffers to them. We do this because, at create time, we really don't know which engine is going to be used with the context later on. v2: As context created via ioctl can o

[Intel-gfx] [PATCH 11/53] drm/i915/bdw: Allocate ringbuffers for Logical Ring Contexts

2014-06-13 Thread oscar . mateo
From: Oscar Mateo As we have said a couple of times by now, logical ring contexts have their own ringbuffers: not only the backing pages, but the whole management struct. In a previous version of the series, this was achieved with two separate patches: drm/i915/bdw: Allocate ringbuffer backing o

[Intel-gfx] [PATCH 03/53] drm/i915: Add a dev pointer to the context

2014-06-13 Thread oscar . mateo
From: Oscar Mateo Without this, i915_gem_context_free looks obfuscated. But, also, it gives me the possibility to know which kind of context I am dealing with at freeing time (at this point we only have fake and legacy hw contexts, but soon we will have logical ring contexts as well). Signed-off

[Intel-gfx] [PATCH 15/53] drm/i915/bdw: Don't write PDP in the legacy way when using LRCs

2014-06-13 Thread oscar . mateo
From: Oscar Mateo This is mostly for correctness so that we know we are running the LR context correctly (this is, the PDPs are contained inside the context object). v2: Move the check to inside the enable PPGTT function. The switch happens in two places: the legacy context switch (that we won't

[Intel-gfx] [PATCH 05/53] drm/i915: Move i915_gem_validate_context() to i915_gem_context.c

2014-06-13 Thread oscar . mateo
From: Oscar Mateo ... and namespace appropriately. It looks to me like it belongs logically there. Signed-off-by: Oscar Mateo --- drivers/gpu/drm/i915/i915_drv.h| 3 +++ drivers/gpu/drm/i915/i915_gem_context.c| 23 +++ drivers/gpu/drm/i915/i915_gem_execbuf

[Intel-gfx] [PATCH 04/53] drm/i915: Extract ringbuffer destroy & make alloc outside accesible

2014-06-13 Thread oscar . mateo
From: Oscar Mateo We are going to start creating a lot of extra ringbuffers soon, so these functions are handy. No functional changes. Signed-off-by: Oscar Mateo --- drivers/gpu/drm/i915/intel_ringbuffer.c | 26 -- drivers/gpu/drm/i915/intel_ringbuffer.h | 4 2 f

[Intel-gfx] [PATCH 08/53] drm/i915/bdw: Macro for LRCs and module option for Execlists

2014-06-13 Thread oscar . mateo
From: Oscar Mateo GEN8 brings an expansion of the HW contexts: "Logical Ring Contexts". These expanded contexts enable a number of new abilities, especially "Execlists". The macro is defined to off until we have things in place to hope to work. In dev_priv, lrc_enabled will reflect the state of

[Intel-gfx] [PATCH 07/53] drm/i915/bdw: New file for Logical Ring Contexts and Execlists

2014-06-13 Thread oscar . mateo
From: Oscar Mateo Some legacy HW context code assumptions don't make sense for this new submission method, so we will place this stuff in a separate file. Note for reviewers: I've carefully considered the best name for this file and this was my best option (other possibilities were intel_lr_cont

[Intel-gfx] [PATCH 02/53] drm/i915: Rename ctx->obj to ctx->render_obj

2014-06-13 Thread oscar . mateo
From: Oscar Mateo The reason for doing this will be better explained in the following patch. For now, suffice it to say that this backing object is only used with the render ring, so we're making this fact more explicit. Done with the following Coccinelle patch (plus manual renaming of the struc

[Intel-gfx] [PATCH 06/53] drm/i915/bdw: Introduce one context backing object per engine

2014-06-13 Thread oscar . mateo
From: Oscar Mateo A context backing object only makes sense for a given engine (because it holds state data specific to that engine). In legacy ringbuffer sumission mode, the only MI_SET_CONTEXT we really perform is for the render engine, so one backing object is all we needed. With Execlists,

[Intel-gfx] [PATCH 01/53] drm/i915: Extract context backing object allocation

2014-06-13 Thread oscar . mateo
From: Oscar Mateo We are going to use it later to allocate our own context objects. No functional changes. Signed-off-by: Oscar Mateo --- drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/i915_gem_context.c | 54 + 2 files changed, 37 insert

[Intel-gfx] [PATCH 10/53] drm/i915/bdw: A bit more advanced context init/fini

2014-06-13 Thread oscar . mateo
From: Oscar Mateo There are a few big differences between context init and fini with the previous implementation of hardware contexts. One of them is demonstrated in this patch: we must allocate a ctx backing object for each engine. Regarding the context size, reading the register to calculate t

  1   2   >