Re: [Intel-gfx] [PATCH] drm/i915: Release the forgotten connector reference

2017-02-02 Thread Joonas Lahtinen
On ke, 2017-02-01 at 19:58 +, Chris Wilson wrote: > The reference was gained in > intel_modeset_update_connector_atomic_state() [called from > intel_modeset_setup_hw_state()] and is never lost if no client ever > performs a modeset. > > [  649.836069] WARNING: CPU: 6 PID: 8865 at > drivers/gp

Re: [Intel-gfx] [PATCH] drm/i915: Release the forgotten connector reference

2017-02-02 Thread Chris Wilson
On Thu, Feb 02, 2017 at 10:08:57AM +0200, Joonas Lahtinen wrote: > On ke, 2017-02-01 at 19:58 +, Chris Wilson wrote: > > The reference was gained in > > intel_modeset_update_connector_atomic_state() [called from > > intel_modeset_setup_hw_state()] and is never lost if no client ever > > perform

Re: [Intel-gfx] [PATCH] drm/i915: Release the forgotten connector reference

2017-02-02 Thread Chris Wilson
On Wed, Feb 01, 2017 at 07:58:31PM +, Chris Wilson wrote: > The reference was gained in > intel_modeset_update_connector_atomic_state() [called from > intel_modeset_setup_hw_state()] and is never lost if no client ever > performs a modeset. > > [ 649.836069] WARNING: CPU: 6 PID: 8865 at > dr

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Enable atomic support by default on supported platforms.

2017-02-02 Thread Patchwork
== Series Details == Series: drm/i915: Enable atomic support by default on supported platforms. URL : https://patchwork.freedesktop.org/series/18970/ State : success == Summary == Series 18970v1 drm/i915: Enable atomic support by default on supported platforms. https://patchwork.freedesktop.o

Re: [Intel-gfx] [PATCH v1½ 07/13] drm/i915/dp: cache common rates with sink rates

2017-02-02 Thread Jani Nikula
On Thu, 02 Feb 2017, "Pandiyan, Dhinakaran" wrote: > On Thu, 2017-01-26 at 21:44 +0200, Jani Nikula wrote: >> Now that source rates are static and sink rates are updated whenever >> DPCD is updated, we can do and cache the intersection of them whenever >> sink rates are updated. This reduces code

Re: [Intel-gfx] [PATCH v1½ 12/13] drm/i915/dp: localize link rate index variable more

2017-02-02 Thread Jani Nikula
On Thu, 02 Feb 2017, Manasi Navare wrote: > On Thu, Jan 26, 2017 at 09:44:26PM +0200, Jani Nikula wrote: >> Localize link_rate_index to the if block, and rename to just index to >> reduce indent. >> >> Cc: Manasi Navare >> Cc: Ville Syrjälä >> Signed-off-by: Jani Nikula >> --- >> drivers/gpu/

Re: [Intel-gfx] [PATCH v1½ 03/13] drm/i915/dp: rename rate_to_index() to intel_dp_find_rate() and reuse

2017-02-02 Thread Jani Nikula
On Wed, 01 Feb 2017, "Pandiyan, Dhinakaran" wrote: > On Thu, 2017-01-26 at 21:44 +0200, Jani Nikula wrote: >> Rename the function, move it at the top, and reuse in >> intel_dp_link_rate_index(). If there was a reason in the past to use >> reverse search order here, there isn't now. >> >> Cc: Man

[Intel-gfx] [PATCH v2 4/5] drm/i915: Capture module parameters for the GPU error state

2017-02-02 Thread Chris Wilson
They include useful material such as what mode the VM address space is running in, what submission mode, extra quirks, etc. v2: Undef the right macro, use type specific pretty printers Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen #v1 --- drivers/gpu/drm/i915/i915_drv.h | 1 +

[Intel-gfx] [PATCH v2 3/5] drm/i915: Use bool i915_param.alpha_support

2017-02-02 Thread Chris Wilson
The alpha_support module option can only take one of two values, so assign it to a boolean type. The only advantage is in pretty printing via /sys/module/i915/parameters/alpha_support and elsewhere. Signed-off-by: Chris Wilson Cc: Jani Nikula Cc: Rodrigo Vivi Cc: Daniel Vetter --- drivers/gpu

[Intel-gfx] [PATCH v2 5/5] drm/i915: Show the current i915_params in debugfs/i915_capabilites

2017-02-02 Thread Chris Wilson
Alongside the hw capabilities, it is useful to know which of those have been overridden by the user setting module parameters. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_debugfs.c | 20 1 file changed, 20 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_d

[Intel-gfx] [PATCH v2 1/5] drm/i915: Generate i915_params {} using a macro

2017-02-02 Thread Chris Wilson
I want to print the struct from the error state and so would like to use the existing struct definition as the template ala DEV_INFO* v2: Use MEMBER() rather than p(). Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen --- drivers/gpu/drm/i915/i915_params.h | 81 -

[Intel-gfx] [PATCH v2 2/5] drm/i915: Convert i915_params to use shortnames for its types

2017-02-02 Thread Chris Wilson
In order to specialise a pretty printer for different types of module parameters using macro construction, the type names must be a single word. Use typedefs to construct the parameters using the modparams type shortnames. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_params.h | 78 +

[Intel-gfx] [PATCH 01/46] drm: Provide a driver hook for drm_dev_release()

2017-02-02 Thread Chris Wilson
Some state is coupled into the device lifetime outside of the load/unload timeframe and requires teardown during final unreference from drm_dev_release(). For example, dmabufs hold both a device and module reference and may live longer than expected (i.e. the current pattern of the driver tearing d

[Intel-gfx] [PATCH 04/46] drm/i915: Flush the freed object queue on device release

2017-02-02 Thread Chris Wilson
As dmabufs may live beyond the PCI device removal, we need to flush the freed object worker on device release, and include a warning in case there is a leak. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_gem.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/i915

[Intel-gfx] [PATCH 09/46] drm/i915: Add unit tests for the breadcrumb rbtree, wakeups

2017-02-02 Thread Chris Wilson
Third retroactive test, make sure that the seqno waiters are woken. v2: Smattering of comments, rearrange code Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/selftests/intel_breadcrumbs.c | 201 + 1 file changed, 201 insertions(+) diff --git a/drivers/gpu/drm/i915/sel

[Intel-gfx] [PATCH 06/46] drm/i915: Add some selftests for sg_table manipulation

2017-02-02 Thread Chris Wilson
Start exercising the scattergather lists, especially looking at iteration after coalescing. v2: Comment on the peculiarity of table construction (i.e. why this sg_table might be interesting). v3: Added one __func__ to identify expect_pfn_sg() Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin ---

[Intel-gfx] [PATCH 10/46] drm/i915: Mock the GEM device for self-testing

2017-02-02 Thread Chris Wilson
A simulacrum of drm_i915_private to let us pretend interactions with the device. v2: Tidy init error paths Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld --- drivers/gpu/drm/i915/i915_drv.c | 4 + drivers/gpu/drm/i915/i915_gem.c | 1 + drivers/gpu/d

[Intel-gfx] [PATCH 08/46] drm/i915: Add unit tests for the breadcrumb rbtree, completion

2017-02-02 Thread Chris Wilson
Second retroactive test, make sure that the waiters are removed from the global wait-tree when their seqno completes. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/selftests/intel_breadcrumbs.c | 107 + drivers/gpu/drm/i915/selftests/mock_e

[Intel-gfx] [PATCH 03/46] drm/i915: Unbind any residual objects/vma from the Global GTT on shutdown

2017-02-02 Thread Chris Wilson
We may unload the PCI device before all users (such as dma-buf) are completely shutdown. This may leave VMA in the global GTT which we want to revoke, whilst keeping the objects themselves around to service the dma-buf. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_gem_gtt.c | 9

[Intel-gfx] [PATCH 02/46] drm/i915: Split device release from unload

2017-02-02 Thread Chris Wilson
We may need to keep our memory management alive after we have unloaded the physical pci device. For example, if we have exported an object via dmabuf, that will keep the device around but the pci device may be removed before the dmabuf itself is released, use of the pci hardware will be revoked, bu

[Intel-gfx] [PATCH 05/46] drm/i915: Provide a hook for selftests

2017-02-02 Thread Chris Wilson
Some pieces of code are independent of hardware but are very tricky to exercise through the normal userspace ABI or via debugfs hooks. Being able to create mock unit tests and execute them through CI is vital. Start by adding a central point where we can execute unit tests and a parameter to enable

[Intel-gfx] [PATCH 12/46] drm/i915: Mock infrastructure for request emission

2017-02-02 Thread Chris Wilson
Create a fake engine that runs requests using a timer to simulate hw. v2: Prevent leaks of ctx->name along error paths Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/i915_gem_context.c| 4 + drivers/gpu/drm/i915/selftests/intel_breadcrumbs.c | 1

[Intel-gfx] [PATCH 07/46] drm/i915: Add unit tests for the breadcrumb rbtree, insert/remove

2017-02-02 Thread Chris Wilson
First retroactive test, make sure that the waiters are in global seqno order after random inserts and removals. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/intel_breadcrumbs.c | 21 +++ drivers/gpu/drm/i915/intel_engine_cs.c | 4 + d

[Intel-gfx] Moah selftests

2017-02-02 Thread Chris Wilson
Fewer wide ranging review comments, lots more r-b, we seem to be settling on a compromise... -Chris ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx

[Intel-gfx] [PATCH 20/46] drm/i915: Live testing of empty requests

2017-02-02 Thread Chris Wilson
Primarily to emphasize the difference between just advancing the breadcrumb using a bare request and the overhead of dispatching an execbuffer. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/selftests/i915_gem_request.c | 155 ++ 1 file changed, 155 insertions(+) diff

[Intel-gfx] [PATCH 16/46] drm/i915: Add a simple fence selftest to i915_gem_request

2017-02-02 Thread Chris Wilson
Do a quick selftest on in the interoperability of dma_fence_wait on a i915_gem_request. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/selftests/i915_gem_request.c | 49 +++ 1 file changed, 49 insertions(+) diff --git a/drivers/gpu/drm/i915

[Intel-gfx] [PATCH 18/46] drm/i915: Test simultaneously submitting requests to all engines

2017-02-02 Thread Chris Wilson
Use a recursive-batch to busy spin on each to ensure that each is being run simultaneously. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen --- drivers/gpu/drm/i915/selftests/i915_gem_request.c | 173 ++ 1 file changed, 173 insertions(+) diff --git a/drivers/gpu/dr

[Intel-gfx] [PATCH 22/46] drm/i915: Add a live seftest for GEM objects

2017-02-02 Thread Chris Wilson
Starting with a placeholder test just to reassure that we can create a test object, Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld --- drivers/gpu/drm/i915/selftests/i915_gem_object.c | 49 ++ .../gpu/drm/i915/selftests/i915_live_selftests.h | 1 + 2 files change

[Intel-gfx] [PATCH 13/46] drm/i915: Create a fake object for testing huge allocations

2017-02-02 Thread Chris Wilson
We would like to be able to exercise huge allocations even on memory constrained devices. To do this we create an object that allocates only a few pages and remaps them across its whole range - each page is reused multiple times. We can therefore pretend we are rendering into a much larger object.

[Intel-gfx] [PATCH 11/46] drm/i915: Mock a GGTT for self-testing

2017-02-02 Thread Chris Wilson
A very simple mockery, just a random manager and timeline. Useful for inserting objects and ordering retirement; and not much else. v2: mock_fini_ggtt() to complement mock_init_ggtt(). Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld --- drivers/gpu/drm/i915/i915_gem_gtt.c |

[Intel-gfx] [PATCH 24/46] drm/i915: Test exhaustion of the mmap space

2017-02-02 Thread Chris Wilson
An unlikely error condition that we can simulate by stealing most of the range before trying to insert new objects. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld --- drivers/gpu/drm/i915/selftests/i915_gem_object.c | 138 +++ 1 file changed, 138 insertions(+) diff -

[Intel-gfx] [PATCH 19/46] drm/i915: Test request ordering between engines

2017-02-02 Thread Chris Wilson
A request on one engine with a dependency on a request on another engine must wait for completion of the first request before starting. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/selftests/i915_gem_request.c | 137 ++ 1 file changed, 137 insertions(+) diff --git a/

[Intel-gfx] [PATCH 14/46] drm/i915: Add selftests for i915_gem_request

2017-02-02 Thread Chris Wilson
Simple starting point for adding seltests for i915_gem_request, first mock a device (with engines and contexts) that allows us to construct and execute a request, along with waiting for the request to complete. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/i91

[Intel-gfx] [PATCH 26/46] drm/i915: Move uncore selfchecks to live selftest infrastructure

2017-02-02 Thread Chris Wilson
Now that the kselftest infrastructure exists, put it to use and add to it the existing consistency checks on the fw register lookup tables. v2: s/tabke/table/ Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Matthew Auld --- drivers/gpu/drm/i915/intel_uncore.c| 52 +

[Intel-gfx] [PATCH 27/46] drm/i915: Test all fw tables during mock selftests

2017-02-02 Thread Chris Wilson
In addition to just testing the fw table we load, during the initial mock testing we can test that all tables are valid (so the testing is not limited to just the platforms that load that particular table). Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Matthew Auld --- .../gpu/dr

[Intel-gfx] [PATCH 21/46] drm/i915: Add selftests for object allocation, phys

2017-02-02 Thread Chris Wilson
The phys object is a rarely used device (only very old machines require a chunk of physically contiguous pages for a few hardware interactions). As such, it is not exercised by CI and to combat that we want to add a test that exercises the phys object on all platforms. Signed-off-by: Chris Wilson

[Intel-gfx] [PATCH 15/46] drm/i915: Add a simple request selftest for waiting

2017-02-02 Thread Chris Wilson
A trivial kselftest to submit a request and wait upon it. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/selftests/i915_gem_request.c | 46 +++ 1 file changed, 46 insertions(+) diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_request.c

[Intel-gfx] [PATCH 17/46] drm/i915: Simple selftest to exercise live requests

2017-02-02 Thread Chris Wilson
Just create several batches of requests and expect it to not fall over! Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen --- drivers/gpu/drm/i915/selftests/i915_gem_request.c | 147 + .../gpu/drm/i915/selftests/i915_live_selftests.h | 1 + 2 files changed, 148 i

[Intel-gfx] [PATCH 32/46] drm/i915: Exercise filling the top/bottom portions of the ppgtt

2017-02-02 Thread Chris Wilson
Allocate objects with varying number of pages (which should hopefully consist of a mixture of contiguous page chunks and so coalesced sg lists) and check that the sg walkers in insert_pages cope. v2: Check both small <-> large Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/selftests/i915_

[Intel-gfx] [PATCH 25/46] drm/i915: Test coherency of and barriers between cache domains

2017-02-02 Thread Chris Wilson
Write into an object using WB, WC, GTT, and GPU paths and make sure that our internal API is sufficient to ensure coherent reads and writes. v2: Avoid invalid free upon allocation error Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld --- drivers/gpu/drm/i915/i915_gem.c

[Intel-gfx] [PATCH 28/46] drm/i915: Sanity check all registers for matching fw domains

2017-02-02 Thread Chris Wilson
Add a late selftest that walks over all forcewake registers (those below 0x4) and uses the mmio debug register to check to see if any are unclaimed. This is possible if we fail to wake the appropriate powerwells for the register. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld --- dri

[Intel-gfx] [PATCH 33/46] drm/i915: Exercise filling the top/bottom portions of the global GTT

2017-02-02 Thread Chris Wilson
Same test as previously for the per-process GTT instead applied to the global GTT. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen --- drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 61 ++- 1 file changed, 60 insertions(+), 1 deletion(-) diff --git a/drivers/g

[Intel-gfx] [PATCH 31/46] drm/i915: Add initial selftests for i915_gem_gtt

2017-02-02 Thread Chris Wilson
Simple starting point for adding selftests for i915_gem_gtt, first try creating a ppGTT and filling it. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld --- drivers/gpu/drm/i915/i915_gem_gtt.c| 1 + drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 97 ++

[Intel-gfx] [PATCH 36/46] drm/i915: Test creation of VMA

2017-02-02 Thread Chris Wilson
Simple test to exercise creation and lookup of VMA within an object. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen --- drivers/gpu/drm/i915/i915_vma.c| 3 + .../gpu/drm/i915/selftests/i915_mock_selftests.h | 1 + drivers/gpu/drm/i915/selftests/i915_vma.c

[Intel-gfx] [PATCH 39/46] drm/i915: Test creation of partial VMA

2017-02-02 Thread Chris Wilson
Mock testing to ensure we can create and lookup partial VMA. v2: Named phases Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen --- drivers/gpu/drm/i915/selftests/i915_vma.c | 192 ++ 1 file changed, 192 insertions(+) diff --git a/drivers/gpu/drm/i915/selfte

[Intel-gfx] [PATCH 34/46] drm/i915: Fill different pages of the GTT

2017-02-02 Thread Chris Wilson
Exercise filling different pages of the GTT v2: Walk all holes until we timeout Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen --- drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 89 +++ 1 file changed, 89 insertions(+) diff --git a/drivers/gpu/drm/i915/selft

[Intel-gfx] [PATCH 40/46] drm/i915: Live testing for context execution

2017-02-02 Thread Chris Wilson
Check we can create and execution within a context. v2: Write one set of dwords through each context/engine to exercise more contexts within the same time period. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_gem_context.c| 1 + drivers/gpu/drm/i915/selftests/i915_gem_

[Intel-gfx] [PATCH 29/46] drm/i915: Add some mock tests for dmabuf interop

2017-02-02 Thread Chris Wilson
Check that we can create both dmabuf and objects from dmabuf. v2: Cleanups, correct include, fix unpin on dead path and prevent explosion on dmabuf init failure Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld --- drivers/gpu/drm/i915/i915_gem_dmabuf.c | 5 + drivers/gpu/drm

[Intel-gfx] [PATCH 30/46] drm/i915: Add a live dmabuf selftest

2017-02-02 Thread Chris Wilson
Though we have good coverage of our dmabuf interface through the mock tests, we also want to check the heavy module unload paths of the live i915 driver. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/selftests/i915_gem_dmabuf.c | 9 + drivers/gpu/drm/i915/selftests/i915_live_s

[Intel-gfx] [PATCH 23/46] drm/i915: Test partial mappings

2017-02-02 Thread Chris Wilson
Create partial mappings to cover a large object, investigating tiling (fenced regions) and VMA reuse. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld --- drivers/gpu/drm/i915/selftests/i915_gem_object.c | 293 +++ 1 file changed, 293 insertions(+) diff --git a/drivers

[Intel-gfx] [PATCH 35/46] drm/i915: Exercise filling and removing random ranges from the live GTT

2017-02-02 Thread Chris Wilson
Test the low-level i915_address_space interfaces to sanity check the live insertion/removal of address ranges. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld --- drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 93 +++ 1 file changed, 93 insertions(+) diff --git a

[Intel-gfx] [PATCH 38/46] drm/i915: Verify page layout for rotated VMA

2017-02-02 Thread Chris Wilson
Exercise creating rotated VMA and checking the page order within. v2: Be more creative in rotated params Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/selftests/i915_vma.c | 179 ++ 1 file changed, 179 insertions(+) diff --git a/drivers/gpu/drm/i915/selftests

[Intel-gfx] [PATCH 37/46] drm/i915: Exercise i915_vma_pin/i915_vma_insert

2017-02-02 Thread Chris Wilson
High-level testing of the struct drm_mm by verifying our handling of weird requests to i915_vma_pin. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen --- drivers/gpu/drm/i915/i915_vma.c | 4 +- drivers/gpu/drm/i915/i915_vma.h | 4 +- drivers/gpu/drm/i915/selftest

[Intel-gfx] [PATCH 43/46] drm/i915: Add mock exercise for i915_gem_gtt_insert

2017-02-02 Thread Chris Wilson
i915_gem_gtt_insert should allocate from the available free space in the GTT, evicting as necessary to create space. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen --- drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 208 ++ 1 file changed, 208 insertions(+) di

[Intel-gfx] [PATCH 41/46] drm/i915: Initial selftests for exercising eviction

2017-02-02 Thread Chris Wilson
Very simple tests to just ask eviction to find some free space in a full GTT and one with some available space. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld --- drivers/gpu/drm/i915/i915_gem_evict.c | 4 + drivers/gpu/drm/i915/selftests/i915_gem_evict.c| 260

Re: [Intel-gfx] [PATCH 05/46] drm/i915: Provide a hook for selftests

2017-02-02 Thread Chris Wilson
On Thu, Feb 02, 2017 at 09:08:24AM +, Chris Wilson wrote: > Some pieces of code are independent of hardware but are very tricky to > exercise through the normal userspace ABI or via debugfs hooks. Being > able to create mock unit tests and execute them through CI is vital. > Start by adding a c

[Intel-gfx] [PATCH 46/46] drm/i915: Add initial selftests for hang detection and resets

2017-02-02 Thread Chris Wilson
Check that we can reset the GPU and continue executing from the next request. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_drv.h| 4 +- drivers/gpu/drm/i915/intel_hangcheck.c | 4 + .../gpu/drm/i915/selftests/i915_live_selftests.h | 1 + drive

[Intel-gfx] [PATCH 45/46] drm/i915: Exercise manipulate of single pages in the GGTT

2017-02-02 Thread Chris Wilson
Move a single page of an object around within the GGTT and check coherency of writes and reads. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 91 +++ 1 file changed, 91 insertions(+) diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_g

[Intel-gfx] [PATCH 42/46] drm/i915: Add mock exercise for i915_gem_gtt_reserve

2017-02-02 Thread Chris Wilson
i915_gem_gtt_reserve should put the node exactly as requested in the GTT, evicting as required. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen --- drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 195 + .../gpu/drm/i915/selftests/i915_mock_selftests.h | 1 +

[Intel-gfx] [PATCH 44/46] drm/i915: Add mock tests for GTT/VMA handling

2017-02-02 Thread Chris Wilson
Use the live tests against the mock ppgtt for quick testing on all platforms of the VMA layer. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 43 +++ 1 file changed, 43 insertions(+) diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_gt

[Intel-gfx] [PATCH igt] intel-ci: Add all driver selftests to BAT

2017-02-02 Thread Chris Wilson
These are meant to be fast and sensitive to new (and old) bugs... Signed-off-by: Chris Wilson Cc: Petri Latvala --- tests/intel-ci/fast-feedback.testlist | 19 +++ 1 file changed, 19 insertions(+) diff --git a/tests/intel-ci/fast-feedback.testlist b/tests/intel-ci/fast-feedbac

Re: [Intel-gfx] [PATCH 01/46] drm: Provide a driver hook for drm_dev_release()

2017-02-02 Thread Laurent Pinchart
Hi Chris, Thank you for the patch. On Thursday 02 Feb 2017 09:08:20 Chris Wilson wrote: > Some state is coupled into the device lifetime outside of the > load/unload timeframe and requires teardown during final unreference > from drm_dev_release(). For example, dmabufs hold both a device and > mo

[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [v2,1/5] drm/i915: Generate i915_params {} using a macro

2017-02-02 Thread Patchwork
== Series Details == Series: series starting with [v2,1/5] drm/i915: Generate i915_params {} using a macro URL : https://patchwork.freedesktop.org/series/18973/ State : success == Summary == Series 18973v1 Series without cover letter https://patchwork.freedesktop.org/api/1.0/series/18973/revi

[Intel-gfx] [PATCH v6] drm: Provide a driver hook for drm_dev_release()

2017-02-02 Thread Chris Wilson
Some state is coupled into the device lifetime outside of the load/unload timeframe and requires teardown during final unreference from drm_dev_release(). For example, dmabufs hold both a device and module reference and may live longer than expected (i.e. the current pattern of the driver tearing d

Re: [Intel-gfx] [PATCH v2 1/5] drm/i915: Generate i915_params {} using a macro

2017-02-02 Thread Jani Nikula
On Thu, 02 Feb 2017, Chris Wilson wrote: > I want to print the struct from the error state and so would like to use > the existing struct definition as the template ala DEV_INFO* > > v2: Use MEMBER() rather than p(). > > Signed-off-by: Chris Wilson > Reviewed-by: Joonas Lahtinen I've been telli

Re: [Intel-gfx] [PATCH v6] drm: Provide a driver hook for drm_dev_release()

2017-02-02 Thread Daniel Vetter
On Thu, Feb 02, 2017 at 09:36:32AM +, Chris Wilson wrote: > Some state is coupled into the device lifetime outside of the > load/unload timeframe and requires teardown during final unreference > from drm_dev_release(). For example, dmabufs hold both a device and > module reference and may live

[Intel-gfx] [PATCH] drm/i915: fix i915 running as dom0 under Xen

2017-02-02 Thread Juergen Gross
Commit 920cf4194954ec ("drm/i915: Introduce an internal allocator for disposable private objects") introduced a regression for the kernel running as Xen dom0: when switching to graphics mode a GPU HANG occurred. Reason seems to be a missing adaption similar to that done in commit 7453c549f5f648 ("

Re: [Intel-gfx] [PATCH 4/6] drm: scrambling support in drm layer

2017-02-02 Thread Ville Syrjälä
On Thu, Feb 02, 2017 at 11:18:51AM +0530, Sharma, Shashank wrote: > Regards > > Shashank > > > On 2/1/2017 10:02 PM, Ville Syrjälä wrote: > > On Wed, Feb 01, 2017 at 06:14:39PM +0530, Shashank Sharma wrote: > >> HDMI 2.0 spec mandates scrambling for modes with pixel clock higher > >> than 340Mhz

Re: [Intel-gfx] [PATCH 2/7] drm/i915: add DisplayPort amp unmute for LPE audio mode

2017-02-02 Thread Takashi Iwai
On Tue, 31 Jan 2017 22:36:44 +0100, Takashi Iwai wrote: > > From: Pierre-Louis Bossart > > Enable unmute/mute amp notification. This doesn't seem to affect > HDMI support so this is done unconditionally. > > An earlier version of this patch set a chicken bit at address 0x62F38 > prior to the mu

[Intel-gfx] [PATCH] drm/i915/dp: Read link status more times when EQ not done

2017-02-02 Thread Lee, Shawn C
From: "Lee, Shawn C" When user space link status, display driver read DPCD register 0x202, 0x203 and 0x204 to identify sink status. When PSR exit is ongoing before EQ done. Panel will report EQ & symbol lock not done. Both of them are under progressing at the same time to cause this issue. This

Re: [Intel-gfx] [PATCH 5/6] drm/i915: enable scrambling

2017-02-02 Thread Ville Syrjälä
On Thu, Feb 02, 2017 at 11:23:19AM +0530, Sharma, Shashank wrote: > Regards > > Shashank > > > On 2/1/2017 10:06 PM, Ville Syrjälä wrote: > > On Wed, Feb 01, 2017 at 06:14:40PM +0530, Shashank Sharma wrote: > >> Geminilake platform has a native HDMI 2.0 controller, and is > >> capable of driving

Re: [Intel-gfx] [PATCH v2 1/5] drm/i915: Generate i915_params {} using a macro

2017-02-02 Thread Chris Wilson
On Thu, Feb 02, 2017 at 11:37:06AM +0200, Jani Nikula wrote: > On Thu, 02 Feb 2017, Chris Wilson wrote: > > I want to print the struct from the error state and so would like to use > > the existing struct definition as the template ala DEV_INFO* > > > > v2: Use MEMBER() rather than p(). > > > > Si

Re: [Intel-gfx] [PATCH 2/7] drm/i915: add DisplayPort amp unmute for LPE audio mode

2017-02-02 Thread Ville Syrjälä
On Thu, Feb 02, 2017 at 10:57:30AM +0100, Takashi Iwai wrote: > On Tue, 31 Jan 2017 22:36:44 +0100, > Takashi Iwai wrote: > > > > From: Pierre-Louis Bossart > > > > Enable unmute/mute amp notification. This doesn't seem to affect > > HDMI support so this is done unconditionally. > > > > An earl

Re: [Intel-gfx] [PATCH 2/7] drm/i915: add DisplayPort amp unmute for LPE audio mode

2017-02-02 Thread Takashi Iwai
On Thu, 02 Feb 2017 11:06:05 +0100, Ville Syrjälä wrote: > > On Thu, Feb 02, 2017 at 10:57:30AM +0100, Takashi Iwai wrote: > > On Tue, 31 Jan 2017 22:36:44 +0100, > > Takashi Iwai wrote: > > > > > > From: Pierre-Louis Bossart > > > > > > Enable unmute/mute amp notification. This doesn't seem to

Re: [Intel-gfx] [PATCH 4/6] drm: scrambling support in drm layer

2017-02-02 Thread Sharma, Shashank
Regards Shashank On 2/2/2017 3:21 PM, Ville Syrjälä wrote: On Thu, Feb 02, 2017 at 11:18:51AM +0530, Sharma, Shashank wrote: Regards Shashank On 2/1/2017 10:02 PM, Ville Syrjälä wrote: On Wed, Feb 01, 2017 at 06:14:39PM +0530, Shashank Sharma wrote: HDMI 2.0 spec mandates scrambling for

Re: [Intel-gfx] [PATCH 4/6] drm: scrambling support in drm layer

2017-02-02 Thread Ville Syrjälä
On Thu, Feb 02, 2017 at 03:46:55PM +0530, Sharma, Shashank wrote: > Regards > > Shashank > > > On 2/2/2017 3:21 PM, Ville Syrjälä wrote: > > On Thu, Feb 02, 2017 at 11:18:51AM +0530, Sharma, Shashank wrote: > >> Regards > >> > >> Shashank > >> > >> > >> On 2/1/2017 10:02 PM, Ville Syrjälä wrote:

[Intel-gfx] [PATCH v8] drm/i915/scheduler: emulate a scheduler for guc

2017-02-02 Thread Chris Wilson
This emulates execlists on top of the GuC in order to defer submission of requests to the hardware. This deferral allows time for high priority requests to gazump their way to the head of the queue, however it nerfs the GuC by converting it back into a simple execlist (where the CPU has to wake up

Re: [Intel-gfx] [PATCH 4/6] drm: scrambling support in drm layer

2017-02-02 Thread Sharma, Shashank
Regards Shashank On 2/2/2017 3:58 PM, Ville Syrjälä wrote: On Thu, Feb 02, 2017 at 03:46:55PM +0530, Sharma, Shashank wrote: Regards Shashank On 2/2/2017 3:21 PM, Ville Syrjälä wrote: On Thu, Feb 02, 2017 at 11:18:51AM +0530, Sharma, Shashank wrote: Regards Shashank On 2/1/2017 10:02

Re: [Intel-gfx] [PATCH 5/6] drm/i915: enable scrambling

2017-02-02 Thread Sharma, Shashank
Regards Shashank On 2/2/2017 3:32 PM, Ville Syrjälä wrote: On Thu, Feb 02, 2017 at 11:23:19AM +0530, Sharma, Shashank wrote: Regards Shashank On 2/1/2017 10:06 PM, Ville Syrjälä wrote: On Wed, Feb 01, 2017 at 06:14:40PM +0530, Shashank Sharma wrote: Geminilake platform has a native HDMI

Re: [Intel-gfx] [PATCH] drm/i915: fix i915 running as dom0 under Xen

2017-02-02 Thread Daniel Vetter
On Thu, Feb 02, 2017 at 10:47:11AM +0100, Juergen Gross wrote: > Commit 920cf4194954ec ("drm/i915: Introduce an internal allocator for > disposable private objects") introduced a regression for the kernel > running as Xen dom0: when switching to graphics mode a GPU HANG > occurred. > > Reason seem

Re: [Intel-gfx] [PATCH 2/4] drm/i915/lspcon: Fix resume time initialization due to unasserted HPD

2017-02-02 Thread Sharma, Shashank
Reviewed-by: Shashank Sharma Regards Shashank On 1/29/2017 9:43 PM, Imre Deak wrote: On Sun, Jan 29, 2017 at 10:33:07AM +0530, Sharma, Shashank wrote: Regards Shashank On 1/28/2017 1:47 PM, Imre Deak wrote: On Sat, Jan 28, 2017 at 10:32:03AM +0530, Sharma, Shashank wrote: Regards Shashank

Re: [Intel-gfx] [PATCH 3/4] drm/i915/lspcon: Remove DPCD compare based resume time workaround

2017-02-02 Thread Sharma, Shashank
Reviewed-by: Shashank Sharma Regards Shashank On 1/28/2017 1:49 PM, Imre Deak wrote: On Sat, Jan 28, 2017 at 10:36:16AM +0530, Sharma, Shashank wrote: Regards Shashank On 1/27/2017 3:09 PM, Imre Deak wrote: This effectively reverts commit 489375c866c111f16cea93b2467ebe59c9022cc7 Author: Imr

Re: [Intel-gfx] [PATCH] drm/i915: fix i915 running as dom0 under Xen

2017-02-02 Thread Chris Wilson
On Thu, Feb 02, 2017 at 11:48:21AM +0100, Daniel Vetter wrote: > On Thu, Feb 02, 2017 at 10:47:11AM +0100, Juergen Gross wrote: > > Commit 920cf4194954ec ("drm/i915: Introduce an internal allocator for > > disposable private objects") introduced a regression for the kernel > > running as Xen dom0:

Re: [Intel-gfx] [PATCH] drm/i915/dp: Read link status more times when EQ not done

2017-02-02 Thread Jani Nikula
On Thu, 02 Feb 2017, "Lee, Shawn C" wrote: > From: "Lee, Shawn C" > > When user space link status, display driver read DPCD register > 0x202, 0x203 and 0x204 to identify sink status. When PSR exit > is ongoing before EQ done. Panel will report EQ & symbol lock > not done. Both of them are under p

[Intel-gfx] [PATCH i-g-t v2] tests/kms_plane_multiple: Test only with maximum number of planes

2017-02-02 Thread Mika Kahola
To be more suitable for BAT testing, let's modify the test such a way that it only uses the maximum number of available planes. This reduces the total number of subtests. v2: Fix broken kms_plane_multiple --list-subtests (Petri) Cc: Petri Latvala Cc: Robert Foss Signed-off-by: Mika Kahola ---

Re: [Intel-gfx] [PATCH 1/6] drm: Add SCDC helpers

2017-02-02 Thread Jani Nikula
On Wed, 01 Feb 2017, Shashank Sharma wrote: > From: Thierry Reding > > SCDC is a mechanism defined in the HDMI 2.0 specification that allows > the source and sink devices to communicate. > > This commit introduces helpers to access the SCDC and provides the > symbolic names for the various regist

[Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [v6] drm: Provide a driver hook for drm_dev_release() (rev2)

2017-02-02 Thread Patchwork
== Series Details == Series: series starting with [v6] drm: Provide a driver hook for drm_dev_release() (rev2) URL : https://patchwork.freedesktop.org/series/18974/ State : failure == Summary == CC [M] drivers/gpu/drm/i915/gvt/firmware.o CC [M] drivers/gpu/drm/i915/gvt/trace_points.o

Re: [Intel-gfx] [PATCH] drm/i915: Release the forgotten connector reference

2017-02-02 Thread Daniel Vetter
On Thu, Feb 02, 2017 at 08:16:23AM +, Chris Wilson wrote: > On Thu, Feb 02, 2017 at 10:08:57AM +0200, Joonas Lahtinen wrote: > > On ke, 2017-02-01 at 19:58 +, Chris Wilson wrote: > > > The reference was gained in > > > intel_modeset_update_connector_atomic_state() [called from > > > intel_m

[Intel-gfx] [PATCH v4 2/2] drm: kselftest for drm_mm and bottom-up allocation

2017-02-02 Thread Chris Wilson
Check that if we request bottom-up allocation from drm_mm_insert_node() we receive the next available hole from the bottom. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen --- drivers/gpu/drm/selftests/drm_mm_selftests.h | 1 + drivers/gpu/drm/selftests/test-drm_mm.c | 100 +

[Intel-gfx] [PATCH v4 1/2] drm: Improve drm_mm search (and fix topdown allocation) with rbtrees

2017-02-02 Thread Chris Wilson
The drm_mm range manager claimed to support top-down insertion, but it was neither searching for the top-most hole that could fit the allocation request nor fitting the request to the hole correctly. In order to search the range efficiently, we create a secondary index for the holes using either t

Re: [Intel-gfx] [PATCH 1/6] drm: Add SCDC helpers

2017-02-02 Thread Sharma, Shashank
Sure, Thanks for the information, will add that in V2. Regards Shashank -Original Message- From: Jani Nikula [mailto:jani.nik...@linux.intel.com] Sent: Thursday, February 2, 2017 4:55 PM To: Sharma, Shashank ; dri-de...@lists.freedesktop.org; intel-gfx@lists.freedesktop.org; ville.sy

Re: [Intel-gfx] [PATCH] drm/i915: fix i915 running as dom0 under Xen

2017-02-02 Thread Tvrtko Ursulin
On 02/02/2017 09:47, Juergen Gross wrote: Commit 920cf4194954ec ("drm/i915: Introduce an internal allocator for disposable private objects") introduced a regression for the kernel running as Xen dom0: when switching to graphics mode a GPU HANG occurred. Reason seems to be a missing adaption sim

[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: fix i915 running as dom0 under Xen

2017-02-02 Thread Patchwork
== Series Details == Series: drm/i915: fix i915 running as dom0 under Xen URL : https://patchwork.freedesktop.org/series/18979/ State : failure == Summary == Series 18979v1 drm/i915: fix i915 running as dom0 under Xen https://patchwork.freedesktop.org/api/1.0/series/18979/revisions/1/mbox/ Te

Re: [Intel-gfx] [PATCH] drm/i915: fix i915 running as dom0 under Xen

2017-02-02 Thread Chris Wilson
On Thu, Feb 02, 2017 at 12:11:29PM +, Tvrtko Ursulin wrote: > > On 02/02/2017 09:47, Juergen Gross wrote: > >Commit 920cf4194954ec ("drm/i915: Introduce an internal allocator for > >disposable private objects") introduced a regression for the kernel > >running as Xen dom0: when switching to gr

Re: [Intel-gfx] [PATCH 5/6] drm/i915: enable scrambling

2017-02-02 Thread Ville Syrjälä
On Thu, Feb 02, 2017 at 04:15:21PM +0530, Sharma, Shashank wrote: > Regards > > Shashank > > > On 2/2/2017 3:32 PM, Ville Syrjälä wrote: > > On Thu, Feb 02, 2017 at 11:23:19AM +0530, Sharma, Shashank wrote: > >> Regards > >> > >> Shashank > >> > >> > >> On 2/1/2017 10:06 PM, Ville Syrjälä wrote:

Re: [Intel-gfx] [PATCH] drm/i915: Release the forgotten connector reference

2017-02-02 Thread Chris Wilson
On Thu, Feb 02, 2017 at 12:35:26PM +0100, Daniel Vetter wrote: > On Thu, Feb 02, 2017 at 08:16:23AM +, Chris Wilson wrote: > > On Thu, Feb 02, 2017 at 10:08:57AM +0200, Joonas Lahtinen wrote: > > > On ke, 2017-02-01 at 19:58 +, Chris Wilson wrote: > > > > The reference was gained in > > > >

Re: [Intel-gfx] [PATCH v2 03/38] drm/i915: Add some selftests for sg_table manipulation

2017-02-02 Thread Tvrtko Ursulin
On 01/02/2017 11:34, Chris Wilson wrote: On Wed, Feb 01, 2017 at 11:17:39AM +, Tvrtko Ursulin wrote: + + for (npages = npages_funcs; *npages; npages++) { + prandom_seed_state(&prng, + i915

Re: [Intel-gfx] [PATCH 09/46] drm/i915: Add unit tests for the breadcrumb rbtree, wakeups

2017-02-02 Thread Tvrtko Ursulin
On 02/02/2017 09:08, Chris Wilson wrote: Third retroactive test, make sure that the seqno waiters are woken. v2: Smattering of comments, rearrange code v3: Fix assert. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/selftests/intel_breadcrumbs.c | 201 + 1 file ch

Re: [Intel-gfx] [PATCH 38/46] drm/i915: Verify page layout for rotated VMA

2017-02-02 Thread Tvrtko Ursulin
On 02/02/2017 09:08, Chris Wilson wrote: Exercise creating rotated VMA and checking the page order within. v2: Be more creative in rotated params v3: ... Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/selftests/i915_vma.c | 179 ++ 1 file changed, 179 ins

Re: [Intel-gfx] [PATCH 09/46] drm/i915: Add unit tests for the breadcrumb rbtree, wakeups

2017-02-02 Thread Chris Wilson
On Thu, Feb 02, 2017 at 12:49:58PM +, Tvrtko Ursulin wrote: > > On 02/02/2017 09:08, Chris Wilson wrote: > >+static bool wait_for_ready(struct igt_wakeup *w) > >+{ > >+DEFINE_WAIT(ready); > >+ > >+if (atomic_dec_and_test(w->done)) > >+wake_up_atomic_t(w->done); > >+ > >+

  1   2   >