Re: [Intel-gfx] [PATCH i-g-t v2] tests: install test programs to libexec

2015-03-27 Thread Joonas Lahtinen
Hi, On to, 2015-03-26 at 16:14 +, Chris Wilson wrote: On Thu, Mar 26, 2015 at 06:05:27PM +0200, Joonas Lahtinen wrote: Install the test programs by default so that they can be packaged. v2: - Install more tests including scripts and their data Packaged by whom? Developers

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Add psr_ready on pipe_config

2015-03-27 Thread Sivakumar Thulasimani
On 3/27/2015 12:50 AM, Rodrigo Vivi wrote: Let's know beforehand if PSR is ready and will be enabled so we can prevent DRRS to get enabled. v2: Removing is_edp_psr func that is not used after this patch. Rename match_conditions and document it since it is now external. Moving to a

Re: [Intel-gfx] [PATCH] drm/i915: fix definition of the DRM_IOCTL_I915_GET_SPRITE_COLORKEY ioctl

2015-03-27 Thread Jani Nikula
On Thu, 26 Mar 2015, Tommi Rantala tt.rant...@gmail.com wrote: Fix definition of the DRM_IOCTL_I915_GET_SPRITE_COLORKEY ioctl, so that it is different from the DRM_IOCTL_I915_SET_SPRITE_COLORKEY ioctl. Signed-off-by: Tommi Rantala tt.rant...@gmail.com Whoa. Broken since its introduction in

Re: [Intel-gfx] [PATCH i-g-t v2] tests: install test programs to libexec

2015-03-27 Thread Joonas Lahtinen
On to, 2015-03-26 at 17:29 +, Thomas Wood wrote: On 26 March 2015 at 16:05, Joonas Lahtinen joonas.lahti...@linux.intel.com wrote: Install the test programs by default so that they can be packaged. Could you also explain why the tests should be packaged? Explained in previous e-mail.

Re: [Intel-gfx] [PATCH 09/18] drm/i915: Add functions to allocate / release gem obj for GuC

2015-03-27 Thread Daniel Vetter
On Fri, Mar 27, 2015 at 09:48:20AM +0100, Daniel Vetter wrote: On Thu, Mar 26, 2015 at 12:41:16PM -0700, yu@intel.com wrote: From: Alex Dai yu@intel.com All gem objects used by GuC are pinned to ggtt space out of range [0, WOPCM size]. In GuC address space mapping, [0, WPOCM

Re: [Intel-gfx] [PATCH 18/18] drm/i915: Notify GuC when RC6 state is changed

2015-03-27 Thread Daniel Vetter
On Thu, Mar 26, 2015 at 12:41:25PM -0700, yu@intel.com wrote: From: Alex Dai yu@intel.com Whenever RC6 state (0xA210) is changed, driver needs to notify GuC via guc_action. Issue: VIZ-4884 Change-Id: I15c661a915c670691d020471ecaccb00f7afb624 Signed-off-by: Alex Dai

Re: [Intel-gfx] [PATCH 17/18] drm/i915: Taking forcewake during GuC load.

2015-03-27 Thread Daniel Vetter
On Thu, Mar 26, 2015 at 12:41:24PM -0700, yu@intel.com wrote: From: Sagar Kamble sagar.a.kam...@intel.com Need to take forcewake before GuC loading. Please explain why and how things fall over if we're not doing this. -Daniel Issue: VIZ-4884 Change-Id:

Re: [Intel-gfx] [PATCH 18/20] drm/i915: Don't look at staged config crtc when changing DRRS state

2015-03-27 Thread Daniel Vetter
On Fri, Mar 20, 2015 at 04:18:18PM +0200, Ander Conselvan de Oliveira wrote: The function intel_dp_set_drrs_state() would decide which pipe to downclock based on the staged config for the given connector. However, the result of that function is immediate, and it uses input values from

Re: [Intel-gfx] Addressing the intel VCH on the i2c bus / R31 dithering

2015-03-27 Thread Ville Syrjälä
On Fri, Mar 27, 2015 at 09:40:56AM +0100, Daniel Vetter wrote: On Fri, Mar 27, 2015 at 09:03:35AM +0100, Thomas Richter wrote: Hi folks, hi Daniel, hi Ville, thanks again for getting my old Laptops (the R31 and the S6010) back to life. It's been quite a way, but everything looks fine

[Intel-gfx] [PATCH 1/2] drm/i915: don't register nonexisting gmbus pins for bdw

2015-03-27 Thread Jani Nikula
Signed-off-by: Jani Nikula jani.nik...@intel.com --- drivers/gpu/drm/i915/intel_i2c.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_i2c.c b/drivers/gpu/drm/i915/intel_i2c.c index cadbc17d2775..61931ca17cd9 100644 --- a/drivers/gpu/drm/i915/intel_i2c.c

[Intel-gfx] [PATCH 2/2] drm/i915: don't register nonexisting gmbus pins for skl

2015-03-27 Thread Jani Nikula
Signed-off-by: Jani Nikula jani.nik...@intel.com --- drivers/gpu/drm/i915/intel_i2c.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_i2c.c b/drivers/gpu/drm/i915/intel_i2c.c index 61931ca17cd9..9696b738a691 100644 --- a/drivers/gpu/drm/i915/intel_i2c.c

[Intel-gfx] [PATCH 44/49] drm/i915: The argument for postfix is redundant

2015-03-27 Thread Chris Wilson
We are conservative on the amount of free space available in the ring to avoid overruning the potential MI_INTERRUPT after the seqno write. Further undermining the justification for the change was that it was applied incorrectly. Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk ---

[Intel-gfx] [PATCH 24/49] drm/i915: Tidy execlist submission

2015-03-27 Thread Chris Wilson
The list handling during submission was quite confusing as the retired requests were out of order - making it much harder in future to reduce the extra lists. Simplify the submission mechanism to explicitly track the actual requests current on each port and so trim the amount of work required to

[Intel-gfx] [PATCH 15/49] drm/i915: Suppress empty lines from debugfs/i915_gem_objects

2015-03-27 Thread Chris Wilson
This is just so that I don't have to read about the batch pool on systems that are not using it! Rather than using a newline between the kernel clients and userspace clients, just distinguish the internal allocations with a '[k]' Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk ---

[Intel-gfx] [PATCH 14/49] drm/i915: Include active flag when describing objects in debugfs

2015-03-27 Thread Chris Wilson
Since we use obj-active as a hint in many places throughout the code, knowing its state in debugfs is extremely useful. Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin tvrtko.ursu...@intel.com --- drivers/gpu/drm/i915/i915_debugfs.c | 3 ++- 1 file changed, 2

[Intel-gfx] [PATCH 19/49] drm/i915: Record ring-start address in error state

2015-03-27 Thread Chris Wilson
This is mostly useful for execlists where the rings switch between contexts (and so checking that the ring's start register matches the context is important). Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk --- drivers/gpu/drm/i915/i915_drv.h | 1 +

[Intel-gfx] [PATCH 20/49] drm/i915: Use simpler form of spin_lock_irq(execlist_lock)

2015-03-27 Thread Chris Wilson
We can use the simpler spinlock form to disable interrupts as we are always outside of an irq/softirq handler. Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk --- drivers/gpu/drm/i915/intel_lrc.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git

[Intel-gfx] [PATCH 09/49] drm/i915: Split i915_gem_batch_pool into its own header

2015-03-27 Thread Chris Wilson
In the next patch, I want to use the structure elsewhere and so require it defined earlier. Rather than move the definition to an earlier location where it feels very odd, place it in its own header file. Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin

[Intel-gfx] [PATCH 27/49] drm/i915: Use a separate slab for requests

2015-03-27 Thread Chris Wilson
requests are even more frequently allocated than objects and equally benefit from having a dedicated slab. Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk --- drivers/gpu/drm/i915/i915_dma.c | 12 drivers/gpu/drm/i915/i915_drv.h | 5 -

[Intel-gfx] [PATCH 10/49] drm/i915: Tidy batch pool logic

2015-03-27 Thread Chris Wilson
Move the madvise logic out of the execbuffer main path into the relatively rare allocation path, making the execbuffer manipulation less fragile. Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk --- drivers/gpu/drm/i915/i915_cmd_parser.c | 12 +++--

[Intel-gfx] [PATCH 22/49] drm/i915: Map the execlists context regs once during pinning

2015-03-27 Thread Chris Wilson
When we pin the execlists context on queuing, it the ideal time to map the register page that we need to update when we submit the request to the hardware (and keep it around for future requests). This avoids having to do an atomic kmap on every submission. On the other hand, it does depend upon

[Intel-gfx] [PATCH 48/49] drm/i915: Eliminate vmap overhead for cmd parser

2015-03-27 Thread Chris Wilson
With a little complexity to handle cmds straddling page boundaries, we can completely avoiding having to vmap the batch and the shadow batch objects whilst running the command parser. On ivb i7-3720MQ: x11perf -dot before 54.3M, after 53.2M (max 203M) glxgears before 7110 fps, after 7300 fps

[Intel-gfx] [PATCH 31/49] drm/i915: Reduce locking in execlist command submission

2015-03-27 Thread Chris Wilson
This eliminates six needless spin lock/unlock pairs when writing out ELSP. v2: Respin with my preferred colour. Signed-off-by: Tvrtko Ursulin tvrtko.ursu...@intel.com Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk [v2] --- drivers/gpu/drm/i915/i915_drv.h | 18

[Intel-gfx] [PATCH 12/49] drm/i915: Free batch pool when idle

2015-03-27 Thread Chris Wilson
At runtime, this helps ensure that the batch pools are kept trim and fast. Then at suspend, this releases memory that we do not need to restore. It also ties into the oom-notifier to ensure that we recover as much kernel memory as possible during OOM. Signed-off-by: Chris Wilson

[Intel-gfx] [PATCH 39/49] drm/i915: Remove request-uniq

2015-03-27 Thread Chris Wilson
We already assign a unique identifier to every request: seqno. That someone felt like adding a second one without even mentioning why and tweaking ABI smells very fishy. Fixes regression from commit b3a38998f042b862f5ba4d7f2268f3a8dfb4883a Author: Nick Hoath nicholas.ho...@intel.com Date: Thu

[Intel-gfx] [PATCH 40/49] drm/i915: Cache the reset_counter for the request

2015-03-27 Thread Chris Wilson
Instead of querying the reset counter before every access to the ring, query it the first time we touch the ring, and do a final compare when submitting the request. For correctness, we need to then sanitize how the reset_counter is incremented to prevent broken submission and waiting across

[Intel-gfx] [PATCH 25/49] drm/i915: Move the execlists retirement to the right spot

2015-03-27 Thread Chris Wilson
We want to run the execlists retire-ring callback whilst we retire the requests on a particular ring. Having done so, we know that the per-ring request list is the superset of all requests and so can simplify the is-idle check. Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk ---

[Intel-gfx] [PATCH 38/49] drm/i915: Skip allocating shadow batch for 0-length batches

2015-03-27 Thread Chris Wilson
Since commit 17cabf571e50677d980e9ab2a43c5f11213003ae Author: Chris Wilson ch...@chris-wilson.co.uk Date: Wed Jan 14 11:20:57 2015 + drm/i915: Trim the command parser allocations we may then try to allocate a zero-sized object and attempt to extract its pages. Understandably this

[Intel-gfx] [PATCH 11/49] drm/i915: Split the batch pool by engine

2015-03-27 Thread Chris Wilson
I woke up one morning and found 50k objects sitting in the batch pool and every search seemed to iterate the entire list... Painting the screen in oils would provide a more fluid display. One issue with the current design is that we only check for retirements on the current ring when preparing to

Re: [Intel-gfx] [Linux v4.0-rc5] Warnings in drm_framebuffer_reference() and drm_atomic_check_only()

2015-03-27 Thread Sedat Dilek
On Fri, Mar 27, 2015 at 12:06 PM, Takashi Iwai ti...@suse.de wrote: At Fri, 27 Mar 2015 12:01:33 +0100, Sedat Dilek wrote: On Wed, Mar 25, 2015 at 3:34 PM, Takashi Iwai ti...@suse.de wrote: At Wed, 25 Mar 2015 14:26:50 +0100, Daniel Vetter wrote: On Tue, Mar 24, 2015 at 07:09:03PM

[Intel-gfx] [PATCH v4] drm/i915: Compare GGTT view structs instead of types

2015-03-27 Thread Joonas Lahtinen
To allow for views where the view type is not defined by the view type only, like it is in stereo or rotated 90 degree view, change the semantic to require the whole view structure for comparison when we match a GGTT view. This allows including parameters like offset to be included in the view

[Intel-gfx] [PATCH v2] drm/i915/bxt: map GTT as uncached

2015-03-27 Thread Imre Deak
On Broxton per specification the GTT has to be mapped as uncached. This was caught by the PTE write readback warning, which showed a corrupted PTE value with using the current write-combine mapping. v2: - add comment explaining how the problem with WC mapping manifests (Daniel) Signed-off-by:

[Intel-gfx] [PATCH v3] drm/i915: Compare GGTT view structs instead of types

2015-03-27 Thread Joonas Lahtinen
To allow for views where the view type is not defined by the view type only, like it is in stereo or rotated 90 degree view, change the semantic to require the whole view structure for comparison when we match a GGTT view. This allows including parameters like offset to be included in the view

Re: [Intel-gfx] [PATCH v3] drm/i915: Compare GGTT view structs instead of types

2015-03-27 Thread Tvrtko Ursulin
Hi, On 03/27/2015 10:03 AM, Joonas Lahtinen wrote: To allow for views where the view type is not defined by the view type only, like it is in stereo or rotated 90 degree view, change the semantic to require the whole view structure for comparison when we match a GGTT view. This allows

[Intel-gfx] [PATCH 45/49] drm/i915: Record the position of the start of the request

2015-03-27 Thread Chris Wilson
Not only does it make for good documentation and debugging aide, but it is also vital for when we want to unwind requests - such as when throwing away an incomplete request. Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk --- drivers/gpu/drm/i915/i915_gem.c | 12 +++

[Intel-gfx] [PATCH 42/49] drm/i915: Introduce an internal allocator for disposable private objects

2015-03-27 Thread Chris Wilson
Quite a few of our objects used for internal hardware programming do not benefit from being swappable or from being zero initialised. As such they do not benefit from using a shmemfs backing storage and since they are internal and never directly exposed to the user, we do not need to worry about

[Intel-gfx] [PATCH 16/49] drm/i915: Optimistically spin for the request completion

2015-03-27 Thread Chris Wilson
This provides a nice boost to mesa in swap bound scenarios (as mesa throttles itself to the previous frame and given the scenario that will complete shortly). It will also provide a good boost to systems running with semaphores disabled and so frequently waiting on the GPU as it switches rings. In

[Intel-gfx] [PATCH 28/49] drm/i915: Use the new rq-i915 field where appropriate

2015-03-27 Thread Chris Wilson
In a few cases, having a direct pointer to the drm_i915_private from the request is useful. Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk --- drivers/gpu/drm/i915/i915_gem.c | 11 --- drivers/gpu/drm/i915/intel_pm.c | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff

[Intel-gfx] A picking of low hanging fruit

2015-03-27 Thread Chris Wilson
I was looking at the performance degredation due to execlists and decided to pick a few of the easier microoptimisations. Individually they may not amount to much (except for spinning on requests!) but the volume does quickly add up, giving benefit to quite a few of our more driver bound tests.

[Intel-gfx] [PATCH 04/49] drm/i915: Add i915_gem_request_unreference__unlocked

2015-03-27 Thread Chris Wilson
We were missing a convenience stub to aquire the right mutex whilst dropping the request, so add it. Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk --- drivers/gpu/drm/i915/i915_drv.h | 13 + drivers/gpu/drm/i915/i915_gem.c | 8 ++-- 2 files changed, 15 insertions(+), 6

[Intel-gfx] [PATCH 46/49] drm/i915: Cache the execlist ctx descriptor

2015-03-27 Thread Chris Wilson
Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk --- drivers/gpu/drm/i915/intel_lrc.c| 56 + drivers/gpu/drm/i915/intel_ringbuffer.h | 3 +- 2 files changed, 31 insertions(+), 28 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_lrc.c

[Intel-gfx] [PATCH 30/49] drm/i915: Squash more pointer indirection for i915_is_gtt

2015-03-27 Thread Chris Wilson
12:58 jlahtine there're actually equally many i915_is_ggtt(vma-vm) calls 12:58 jlahtine (one less) 12:59 jlahtine so while at it I'd make it vm-is_ggtt and vma-is_ggtt 12:59 jlahtine then get rid of the whole helper, maybe 13:00 ickle you preempted my beautiful macro 13:03 ickle just don't

[Intel-gfx] [PATCH 02/49] drm/i915: Agressive downclocking on Baytrail

2015-03-27 Thread Chris Wilson
Reuse the same reclocking strategy for Baytail as on its bigger brethren, Sandybridge and Ivybridge. In particular, this makes the device quicker to reclock (both up and down) though the tendency now is to downclock more aggressively to compensate for the RPS boosts. v2: Rebase v3: Exclude

[Intel-gfx] [PATCH 17/49] drm/i915: Implement inter-engine read-read optimisations

2015-03-27 Thread Chris Wilson
Currently, we only track the last request globally across all engines. This prevents us from issuing concurrent read requests on e.g. the RCS and BCS engines (or more likely the render and media engines). Without semaphores, we incur costly stalls as we synchronise between rings - greatly

[Intel-gfx] [PATCH 29/49] drm/i915: Reduce the pointer dance of i915_is_ggtt()

2015-03-27 Thread Chris Wilson
The multiple levels of indirect do nothing but hinder the compiler and the pointer chasing turns to be quite painful but painless to fix. Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk --- drivers/gpu/drm/i915/i915_drv.h | 4 +--- drivers/gpu/drm/i915/i915_gem_gtt.c | 1 +

[Intel-gfx] [PATCH 06/49] drm/i915: Boost GPU frequency if we detect outstanding pageflips

2015-03-27 Thread Chris Wilson
If we hit a vblank and see that have a pageflip queue but not yet processed, ensure that the GPU is running at maximum in order to clear the backlog. Pageflips are only queued for the following vblank, if we miss it, there will be a visible stutter. Boosting the GPU frequency doesn't prevent us

[Intel-gfx] [PATCH 07/49] drm/i915: Deminish contribution of wait-boosting from clients

2015-03-27 Thread Chris Wilson
With boosting for missed pageflips, we have a much stronger indication of when we need to (temporarily) boost GPU frequency to ensure smooth delivery of frames. So now only allow each client to perform one RPS boost in each period of GPU activity due to stalling on results. Signed-off-by: Chris

[Intel-gfx] [PATCH 03/49] drm/i915: Fix computation of last_adjustment for RPS autotuning

2015-03-27 Thread Chris Wilson
The issue is that by computing the last_adj value after applying the clamping, we can end up with a bogus value for feeding into the next RPS autotuning step. Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk Cc: Daniel Vetter daniel.vet...@ffwll.ch Cc: Deepak S deepa...@linux.intel.com

[Intel-gfx] [PATCH 05/49] drm/i915: Fix race on unreferencing the wrong mmio-flip-request

2015-03-27 Thread Chris Wilson
As we perform the mmio-flip without any locking and then try to acquire the struct_mutex prior to dereferencing the request, it is possible for userspace to queue a new pageflip before the worker can finish clearing the old state - and then it will clear the new flip request. The result is that

[Intel-gfx] [PATCH 01/49] drm/i915: Cache last obj-pages location for i915_gem_object_get_page()

2015-03-27 Thread Chris Wilson
The biggest user of i915_gem_object_get_page() is the relocation processing during execbuffer. Typically userspace passes in a set of relocations in sorted order. Sadly, we alternate between relocations increasing from the start of the buffers, and relocations decreasing from the end. However the

[Intel-gfx] [PATCH 49/49] drm/i915: Cache last cmd descriptor when parsing

2015-03-27 Thread Chris Wilson
The cmd parser has the biggest impact on the BLT ring, because it is relatively verbose composed to the other engines as the vertex data is inline. It also typically has runs of repeating commands (again since the vertex data is inline, it typically has sequences of XY_SETUP_BLT,

[Intel-gfx] [PATCH 08/49] drm/i915: Re-enable RPS wait-boosting for all engines

2015-03-27 Thread Chris Wilson
This reverts commit ec5cc0f9b019af95e4571a9fa162d94294c8d90b Author: Chris Wilson ch...@chris-wilson.co.uk Date: Thu Jun 12 10:28:55 2014 +0100 drm/i915: Restrict GPU boost to the RCS engine The premise that media/blitter workloads are not affected by boosting is patently false with a trip

[Intel-gfx] [PATCH 47/49] drm/i915: Treat ringbuffer writes as write to normal memory

2015-03-27 Thread Chris Wilson
The hardware is documentated as treating the TAIL register update as serialising, so we can relax the barriers when filling the rings. Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk --- drivers/gpu/drm/i915/intel_lrc.h| 7 --- drivers/gpu/drm/i915/intel_ringbuffer.h | 17

[Intel-gfx] [PATCH 36/49] drm/i915: Cache the GGTT offset for the execlists context

2015-03-27 Thread Chris Wilson
The offset doesn't change once the context is pinned, but the lookup turns out to be comparatively costly as it gets repeated for every request. Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk --- drivers/gpu/drm/i915/intel_lrc.c| 22 --

[Intel-gfx] [PATCH 43/49] drm/i915: Do not zero initialise page tables

2015-03-27 Thread Chris Wilson
After we successfully allocate them, we will fill them with their initial contents (either the chain of page tables, or a pointer to the scratch page). Regression from commit 06fda602dbca9c59d87db7da71192e4b54c9f5ff Author: Ben Widawsky benjamin.widaw...@intel.com Date: Tue Feb 24 16:22:36 2015

[Intel-gfx] [PATCH 23/49] drm/i915: Remove vestigal DRI1 ring quiescing code

2015-03-27 Thread Chris Wilson
After the removal of DRI1, all access to the rings are through requests and so we can always be sure that there is a request to wait upon to free up available space. The fallback code only existed so that we could quiesce the GPU following unmediated access by DRI1. Signed-off-by: Chris Wilson

[Intel-gfx] [PATCH 33/49] drm/i915: Reduce locking in gen8 IRQ handler

2015-03-27 Thread Chris Wilson
Similar in vain in reducing the number of unrequired spinlocks used for execlist command submission (where the forcewake is required but manually controlled), we know that the IRQ registers are outside of the powerwell and so we can access them directly. Since we now have direct access exported

[Intel-gfx] [PATCH 34/49] drm/i915: Tidy gen8 IRQ handler

2015-03-27 Thread Chris Wilson
Remove some needless variables and parameter passing. Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk --- drivers/gpu/drm/i915/i915_irq.c | 113 +--- 1 file changed, 49 insertions(+), 64 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_irq.c

[Intel-gfx] [PATCH 18/49] drm/i915: Reduce frequency of unspecific HSW reg debugging

2015-03-27 Thread Chris Wilson
Delay the expensive read on the FPGA_DBG register from once per mmio to once per forcewake section when we are doing the general wellbeing check rather than the targetted error detection. This almost reduces the overhead of the debug facility (for example when submitting execlists) to zero whilst

[Intel-gfx] [PATCH 13/49] drm/i915: Split batch pool into size buckets

2015-03-27 Thread Chris Wilson
Now with the trimmed memcpy before the command parser, we try to allocate many different sizes of batches, predominantly one or two pages. We can therefore speed up searching for a good sized batch by keeping the objects of buckets of roughly the same size. v2: Add a comment about bucket sizes

[Intel-gfx] [PATCH 35/49] drm/i915: Remove request retirement before each batch

2015-03-27 Thread Chris Wilson
This reimplements the denial-of-service protection against igt from commit 227f782e4667fc622810bce8be8ccdeee45f89c2 Author: Chris Wilson ch...@chris-wilson.co.uk Date: Thu May 15 10:41:42 2014 +0100 drm/i915: Retire requests before creating a new one and transfers the stall from before

[Intel-gfx] [PATCH 41/49] drm/i915: Allocate context objects from stolen

2015-03-27 Thread Chris Wilson
As we never expose context objects directly to userspace, we can forgo allocating a first-class GEM object for them and prefer to use the limited resource of reserved/stolen memory for them. Note this means that their initial contents are undefined. However, a downside of using stolen objects for

[Intel-gfx] [PATCH 26/49] drm/i915: Map the ringbuffer using WB on LLC machines

2015-03-27 Thread Chris Wilson
If we have llc coherency, we can write directly into the ringbuffer using ordinary cached writes rather than forcing WC access. Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk --- drivers/gpu/drm/i915/intel_ringbuffer.c | 60 +++-- 1 file changed, 49

[Intel-gfx] [PATCH 37/49] drm/i915: Prefer to check for idleness in worker rather than sync-flush

2015-03-27 Thread Chris Wilson
Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk --- drivers/gpu/drm/i915/i915_gem.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index f87e7b90939c..1104a21abc08 100644 ---

[Intel-gfx] [PATCH 21/49] drm/i915: Use the global runtime-pm wakelock for a busy GPU for execlists

2015-03-27 Thread Chris Wilson
When we submit a request to the GPU, we first take the rpm wakelock, and only release it once the GPU has been idle for a small period of time after all requests have been complete. This means that we are sure no new interrupt can arrive whilst we do not hold the rpm wakelock and so can drop the

[Intel-gfx] [PATCH 32/49] drm/i915: Reduce more locking in execlist command submission

2015-03-27 Thread Chris Wilson
Slightly more extravagant than the previous patch is to use the I915_READ_FW() registers for all the bounded reads in intel_lrc_irq_handler - for even more spinlock reduction. Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk --- drivers/gpu/drm/i915/intel_lrc.c | 32

[Intel-gfx] [PATCH] drm/i915: PSR: Keep sink state consistent with source

2015-03-27 Thread Durgadoss R
BSpec recommends to keep the main link state consistent between the source and the sink. As per that, update the main link state in sink DPCD register to 'active', for Valleyview based platforms. Signed-off-by: Durgadoss R durgados...@intel.com --- drivers/gpu/drm/i915/intel_psr.c | 2 +- 1 file

Re: [Intel-gfx] [Linux v4.0-rc5] Warnings in drm_framebuffer_reference() and drm_atomic_check_only()

2015-03-27 Thread Sedat Dilek
On Wed, Mar 25, 2015 at 3:34 PM, Takashi Iwai ti...@suse.de wrote: At Wed, 25 Mar 2015 14:26:50 +0100, Daniel Vetter wrote: On Tue, Mar 24, 2015 at 07:09:03PM +0100, Sedat Dilek wrote: On Mon, Mar 23, 2015 at 9:25 AM, Daniel Vetter dan...@ffwll.ch wrote: On Mon, Mar 23, 2015 at 07:25:27AM

Re: [Intel-gfx] [Linux v4.0-rc5] Warnings in drm_framebuffer_reference() and drm_atomic_check_only()

2015-03-27 Thread Takashi Iwai
At Fri, 27 Mar 2015 12:01:33 +0100, Sedat Dilek wrote: On Wed, Mar 25, 2015 at 3:34 PM, Takashi Iwai ti...@suse.de wrote: At Wed, 25 Mar 2015 14:26:50 +0100, Daniel Vetter wrote: On Tue, Mar 24, 2015 at 07:09:03PM +0100, Sedat Dilek wrote: On Mon, Mar 23, 2015 at 9:25 AM, Daniel

Re: [Intel-gfx] [PATCH v4] drm/i915: Implement inter-engine read-read optimisations

2015-03-27 Thread Tvrtko Ursulin
On 03/26/2015 09:31 PM, Chris Wilson wrote: On Thu, Mar 26, 2015 at 05:43:33PM +, Tvrtko Ursulin wrote: -static int -i915_gem_object_wait_rendering__tail(struct drm_i915_gem_object *obj) -{ - if (!obj-active) - return 0; - - /* Manually manage the write flush as

[Intel-gfx] [PATCH] drm/i915: fix simple_return.cocci warnings

2015-03-27 Thread kbuild test robot
drivers/gpu/drm/i915/i915_gem_gtt.c:1349:1-4: WARNING: end returns can be simpified and declaration on line 1347 can be dropped Simplify a trivial if-return sequence. Possibly combine with a preceding function call. Generated by: scripts/coccinelle/misc/simple_return.cocci CC: Michel Thierry

Re: [Intel-gfx] [PATCH] drm/i915: Rip out GET_SPRITE_COLORKEY ioctl

2015-03-27 Thread Daniel Vetter
On Fri, Mar 27, 2015 at 09:10:02AM +0100, Daniel Vetter wrote: It's completely unused and Tommi noticed that the #define is borked since forever. I've done a git search in userspace and only found broken definitions and no users anywhere. Cc: Tommi Rantala tt.rant...@gmail.com

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Add psr_ready on pipe_config

2015-03-27 Thread Daniel Vetter
On Fri, Mar 27, 2015 at 11:37:09AM +0530, Sivakumar Thulasimani wrote: On 3/27/2015 12:50 AM, Rodrigo Vivi wrote: Let's know beforehand if PSR is ready and will be enabled so we can prevent DRRS to get enabled. v2: Removing is_edp_psr func that is not used after this patch. Rename

Re: [Intel-gfx] [PATCH 06/18] drm/i915: Defer default hardware context initialisation until first open

2015-03-27 Thread Daniel Vetter
On Thu, Mar 26, 2015 at 12:41:13PM -0700, yu@intel.com wrote: From: Dave Gordon david.s.gor...@intel.com In order to fully initialise the default contexts, we have to execute batchbuffer commands on the GPU engines. But we can't do that until any required firmware has been loaded, which

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Add psr_ready on pipe_config

2015-03-27 Thread Sivakumar Thulasimani
On 3/27/2015 2:02 PM, Daniel Vetter wrote: On Fri, Mar 27, 2015 at 11:37:09AM +0530, Sivakumar Thulasimani wrote: On 3/27/2015 12:50 AM, Rodrigo Vivi wrote: Let's know beforehand if PSR is ready and will be enabled so we can prevent DRRS to get enabled. v2: Removing is_edp_psr func that is

[Intel-gfx] [PATCH] drm/i915: add bxt gmbus support

2015-03-27 Thread Jani Nikula
From: A.Sunil Kamath sunil.kam...@intel.com For BXT gmbus is pulled from PCH to CPU. From implementation point of view only pin pair configuration will change. The existing implementation supports all platforms previous to GEN8 and also SKL. But for BXT pin pair configuration is completely

Re: [Intel-gfx] [PATCH 03/20] drm/i915: Allocate a drm_atomic_state for the legacy modeset code

2015-03-27 Thread Daniel Vetter
On Fri, Mar 20, 2015 at 04:18:03PM +0200, Ander Conselvan de Oliveira wrote: @@ -8924,6 +8932,11 @@ retry: else intel_crtc-new_config = NULL; fail_unlock: + if (state) { + drm_atomic_state_free(state); + state = NULL; + } I think we

Re: [Intel-gfx] [PATCH 19/20] drm/i915: Remove usage of encoder-new_crtc from clock computations

2015-03-27 Thread Daniel Vetter
On Fri, Mar 20, 2015 at 04:18:19PM +0200, Ander Conselvan de Oliveira wrote: Some of the crtc_compute_clock() still depended on encoder-new_crtc since they didn't use intel_pipe_will_have_type() and used an open coded version of that function instead. This patch replaces those with the

Re: [Intel-gfx] [PATCH] drm/i915: Add module param to test the load detect code

2015-03-27 Thread Ander Conselvan De Oliveira
Reviewed-by: Ander Conselvan de Oliveira conselv...@gmail.com On Tue, 2015-03-03 at 18:03 +0100, Daniel Vetter wrote: This is useful for writing igts to make sure we don't break this, without being forced to own a one of these dinosaurs. Suggested-by: Jesse Barnes jbar...@virtuousgeek.org

Re: [Intel-gfx] [PATCH 0/5] Finish gen6/7 ppgtt dynamic page allocations

2015-03-27 Thread Daniel Vetter
On Thu, Mar 26, 2015 at 05:43:51PM +0200, Mika Kuoppala wrote: Michel Thierry michel.thie...@intel.com writes: The first 2 patches are fixes from the previous patchset, reported by static analysis tools, while the last 2 patches complete the required work for gen6/7. I've also

Re: [Intel-gfx] [PATCH 09/18] drm/i915: Add functions to allocate / release gem obj for GuC

2015-03-27 Thread Daniel Vetter
On Thu, Mar 26, 2015 at 12:41:16PM -0700, yu@intel.com wrote: From: Alex Dai yu@intel.com All gem objects used by GuC are pinned to ggtt space out of range [0, WOPCM size]. In GuC address space mapping, [0, WPOCM size] is used internally for its Boot ROM, SRAM etc. Currently this

[Intel-gfx] [PATCH i-g-t v3] tests: install test programs to libexec

2015-03-27 Thread Joonas Lahtinen
Install the test programs by default so that they can be packaged. Tested the testdisplay test so that it still runs after modifications, as it depends on script data. Packaging is useful when building a complete software stack for a DUT from scratch. This should bring us closer to achieving a

Re: [Intel-gfx] [PATCH v3 00/20] Remove depencies on staged config for atomic transition

2015-03-27 Thread Daniel Vetter
On Fri, Mar 20, 2015 at 04:18:00PM +0200, Ander Conselvan de Oliveira wrote: Version 3 of the series with comments from Chandra addressed. I'm sending the whole series again so it goes through another round of PRTS testing. Thanks, Ander Ander Conselvan de Oliveira (19): drm/i915: Add

Re: [Intel-gfx] Addressing the intel VCH on the i2c bus / R31 dithering

2015-03-27 Thread Daniel Vetter
On Fri, Mar 27, 2015 at 09:03:35AM +0100, Thomas Richter wrote: Hi folks, hi Daniel, hi Ville, thanks again for getting my old Laptops (the R31 and the S6010) back to life. It's been quite a way, but everything looks fine now. There is one interesting observation I made, though, on my IBM

[Intel-gfx] [PATCH v4] drm/i915: add bxt gmbus support

2015-03-27 Thread Jani Nikula
From: A.Sunil Kamath sunil.kam...@intel.com For BXT gmbus is pulled from PCH to CPU. From implementation point of view only pin pair configuration will change. The existing implementation supports all platforms previous to GEN8 and also SKL. But for BXT pin pair configuration is completely

Re: [Intel-gfx] [PATCH] drm/i915: fix definition of the DRM_IOCTL_I915_GET_SPRITE_COLORKEY ioctl

2015-03-27 Thread Daniel Vetter
On Fri, Mar 27, 2015 at 08:39:56AM +0200, Jani Nikula wrote: On Thu, 26 Mar 2015, Tommi Rantala tt.rant...@gmail.com wrote: Fix definition of the DRM_IOCTL_I915_GET_SPRITE_COLORKEY ioctl, so that it is different from the DRM_IOCTL_I915_SET_SPRITE_COLORKEY ioctl. Signed-off-by: Tommi

[Intel-gfx] [PATCH] drm/i915: Rip out GET_SPRITE_COLORKEY ioctl

2015-03-27 Thread Daniel Vetter
It's completely unused and Tommi noticed that the #define is borked since forever. I've done a git search in userspace and only found broken definitions and no users anywhere. Cc: Tommi Rantala tt.rant...@gmail.com Signed-off-by: Daniel Vetter daniel.vet...@intel.com ---

Re: [Intel-gfx] [RFC 3/4] drm/i915: Interrupt driven fences

2015-03-27 Thread Daniel Vetter
On Thu, Mar 26, 2015 at 10:27:25AM -0700, Jesse Barnes wrote: On 03/26/2015 06:22 AM, Daniel Vetter wrote: On Mon, Mar 23, 2015 at 12:13:56PM +, John Harrison wrote: On 23/03/2015 09:22, Daniel Vetter wrote: On Fri, Mar 20, 2015 at 09:11:35PM +, Chris Wilson wrote: On Fri, Mar 20,

Re: [Intel-gfx] [PATCH i-g-t v3] tests: install test programs to libexec

2015-03-27 Thread Joonas Lahtinen
On pe, 2015-03-27 at 10:51 +0200, Joonas Lahtinen wrote: Install the test programs by default so that they can be packaged. Tested the testdisplay test so that it still runs after modifications, as it depends on script data. Duh, s/depends on script data/depends on a data file/. Also,

Re: [Intel-gfx] [PATCH 16/20] drm/i915: Check lane sharing between pipes B C using atomic state

2015-03-27 Thread Daniel Vetter
On Fri, Mar 20, 2015 at 04:18:16PM +0200, Ander Conselvan de Oliveira wrote: Makes that code atomic ready. Signed-off-by: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com --- drivers/gpu/drm/i915/intel_display.c | 49 ++-- 1 file

Re: [Intel-gfx] [PATCH 17/20] drm/i915: Convert intel_pipe_will_have_type() to using atomic state

2015-03-27 Thread Daniel Vetter
On Fri, Mar 20, 2015 at 04:18:17PM +0200, Ander Conselvan de Oliveira wrote: Pass a crtc_state to it and find whether the pipe has an encoder of a given type by looking at the drm_atomic_state the crtc_state points to. Until recently i9xx_get_refclk() used to be called indirectly from

Re: [Intel-gfx] [PATCH 5/5] drm/i915: add bxt gmbus support

2015-03-27 Thread Daniel Vetter
On Fri, Mar 27, 2015 at 12:20:23AM +0200, Jani Nikula wrote: From: A.Sunil Kamath sunil.kam...@intel.com For BXT gmbus is pulled from GPU to CPU. From implementation point of s/GPU/PCH/ -Daniel view only pin pair configuration will change. The existing implementation supports all platforms

Re: [Intel-gfx] [PATCH 00/18] Command submission via GuC for SKL

2015-03-27 Thread Daniel Vetter
On Thu, Mar 26, 2015 at 12:41:07PM -0700, yu@intel.com wrote: From: Alex Dai yu@intel.com This series of patch is to enable ExecList submission via GuC. Here are some key points related to this series, not in particular order. *** i915_guc_client *** We use the term client to

Re: [Intel-gfx] [PATCH 03/20] drm/i915: Allocate a drm_atomic_state for the legacy modeset code

2015-03-27 Thread Ander Conselvan De Oliveira
On Fri, 2015-03-27 at 10:01 +0100, Daniel Vetter wrote: On Fri, Mar 20, 2015 at 04:18:03PM +0200, Ander Conselvan de Oliveira wrote: @@ -8924,6 +8932,11 @@ retry: else intel_crtc-new_config = NULL; fail_unlock: + if (state) { +

Re: [Intel-gfx] [PATCH 16/49] drm/i915: Optimistically spin for the request completion

2015-03-27 Thread Tvrtko Ursulin
On 03/27/2015 11:01 AM, Chris Wilson wrote: This provides a nice boost to mesa in swap bound scenarios (as mesa throttles itself to the previous frame and given the scenario that will complete shortly). It will also provide a good boost to systems running with semaphores disabled and so

[Intel-gfx] [PATCH v6 24/49] drm/i915/bxt: DDI Hotplug interrupt setup

2015-03-27 Thread Imre Deak
From: Shashank Sharma shashank.sha...@intel.com In BXT, DDI hotplug control has been moved to CPU from PCH. This patch adds a new IRQ setup function for BXT which: 1. Checks which HPD ports are requested to be enabled by encoders. 2. Enables those ports in the hot plug control register. 3.

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

2015-03-27 Thread Tvrtko Ursulin
On 03/27/2015 11:47 AM, Chris Wilson wrote: On Fri, Mar 27, 2015 at 11:40:12AM +, Tvrtko Ursulin wrote: +/* Like above but take and hold the uncore lock for the duration. + * Must be used with I915_READ_FW and friends. + */ +void intel_uncore_forcewake_irqlock(struct drm_i915_private

[Intel-gfx] [PATCH v2 13/49] drm/i915/bxt: add bxt_init_clock_gating

2015-03-27 Thread Imre Deak
v2: - Make the condition to select between SKL and BXT consistent with the corresponding condition in init_workarounds_ring (Nick) Signed-off-by: Imre Deak imre.d...@intel.com --- drivers/gpu/drm/i915/intel_pm.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git

Re: [Intel-gfx] [PATCH] drm/i915: fix simple_return.cocci warnings

2015-03-27 Thread Michel Thierry
On 3/27/2015 11:26 AM, kbuild test robot wrote: drivers/gpu/drm/i915/i915_gem_gtt.c:1349:1-4: WARNING: end returns can be simpified and declaration on line 1347 can be dropped Simplify a trivial if-return sequence. Possibly combine with a preceding function call. Generated by:

Re: [Intel-gfx] [PATCH] drm/edid: set ELD for firmware and debugfs override EDIDs

2015-03-27 Thread Jani Nikula
On Thu, 26 Mar 2015, Daniel Vetter dan...@ffwll.ch wrote: On Thu, Mar 26, 2015 at 10:42:00AM +0200, Jani Nikula wrote: If the user supplies EDID through firmware or debugfs override, the driver callbacks are bypassed and the connector ELD does not get updated, and audio fails. Set ELD for

  1   2   >