[drm-intel:drm-intel-nightly 922/930] include/linux/list.h:385:29: error: initialization discards 'const' qualifier from pointer target type

2016-12-16 Thread kbuild test robot
-- next part -- A non-text attachment was scrubbed... Name: .config.gz Type: application/gzip Size: 29439 bytes Desc: not available URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20161216/1aa015d6/attachment-0001.gz>

[PATCH v2 05/11] locking/ww_mutex: Add waiters in stamp order

2016-12-16 Thread Nicolai Hähnle
On 16.12.2016 21:00, Peter Zijlstra wrote: > On Fri, Dec 16, 2016 at 07:11:41PM +0100, Nicolai Hähnle wrote: >> mutex_optimistic_spin() already calls __mutex_trylock, and for the no-spin >> case, __mutex_unlock_slowpath() only calls wake_up_q() after releasing the >> wait_lock. > > mutex_optimisti

[drm-intel:drm-intel-nightly 922/930] drivers/gpu/drm/i915/i915_gem_gtt.c:2732:9: note: in expansion of macro 'list_first_entry_or_null'

2016-12-16 Thread kbuild test robot
A non-text attachment was scrubbed... Name: .config.gz Type: application/gzip Size: 27868 bytes Desc: not available URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20161216/41ebf35a/attachment-0001.gz>

[RFC 00/10] implement alternative and much simpler id allocator

2016-12-16 Thread Rasmus Villemoes
On Fri, Dec 16 2016, Matthew Wilcox wrote: > From: Andrew Morton [mailto:akpm at linux-foundation.org] >> On Thu, 8 Dec 2016 02:22:55 +0100 Rasmus Villemoes >> wrote: >> > TL;DR: these patches save 250 KB of memory, with more low-hanging >> > fruit ready to pick. >> > >> > While browsing throug

[RESEND][GIT PULL] i915/gvt KVMGT tree for 4.10

2016-12-16 Thread Zhenyu Wang
next part -- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 163 bytes Desc: not available URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20161216/92dbdf81/attachment.sig>

[RFC 00/10] implement alternative and much simpler id allocator

2016-12-16 Thread Matthew Wilcox
From: Rasmus Villemoes [mailto:li...@rasmusvillemoes.dk] > On Fri, Dec 16 2016, Matthew Wilcox wrote: > > Thanks for your work on this; you've really put some effort into > > proving your work has value. My motivation was purely aesthetic, but > > you've got some genuine savings here (admittedly

[PATCH v2 05/11] locking/ww_mutex: Add waiters in stamp order

2016-12-16 Thread Peter Zijlstra
On Fri, Dec 16, 2016 at 07:11:41PM +0100, Nicolai Hähnle wrote: > mutex_optimistic_spin() already calls __mutex_trylock, and for the no-spin > case, __mutex_unlock_slowpath() only calls wake_up_q() after releasing the > wait_lock. mutex_optimistic_spin() is a no-op when !CONFIG_MUTEX_SPIN_ON_OWNE

[PATCH v3 04/38] lib: Add a simple prime number generator

2016-12-16 Thread Chris Wilson
On Fri, Dec 16, 2016 at 07:25:16PM +, Chris Wilson wrote: > +static void __exit primes_exit(void) > +{ > + const struct primes *p; > + > + mutex_lock(&lock); > + p = rcu_dereference_protected(primes, lockdep_is_held(&lock)); > + if (p != &small_primes) { > + kfree_rc

[alsa-devel][PATCH] ASoC: hdmi-codec: use unsigned type to structure members with bit-field instead of signed type

2016-12-16 Thread Takashi Sakamoto
Oops. This is not a patch for alsa-lib, but for Linux kernel. I'm sorry to confuse you... On Dec 16 2016 18:26, Takashi Sakamoto wrote: > This is a fix for Linux 4.10-rc1. > > In C language specification, a bit-field is interpreted as a signed or > unsigned integer type consisting of the specified

[PATCH v3 38/38] drm: kselftest for drm_mm and bottom-up allocation

2016-12-16 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 +

[PATCH v3 37/38] drm: Improve drm_mm search (and fix topdown allocation) with rbtrees

2016-12-16 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

[PATCH v3 36/38] drm: Use drm_mm_insert_node_in_range_generic() for everyone

2016-12-16 Thread Chris Wilson
Remove a superfluous helper as drm_mm_insert_node is equivalent to insert_node_in_range with a range of (0, U64_MAX). Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen --- drivers/gpu/drm/drm_mm.c | 166 --- include/drm/drm_mm.h | 90 +

[PATCH v3 35/38] drm: Apply range restriction after color adjustment when allocation

2016-12-16 Thread Chris Wilson
mm->color_adjust() compares the hole with its neighbouring nodes. They only abutt before we restrict the hole, so we have to apply color_adjust before we apply the range restriction. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen --- drivers/gpu/drm/drm_mm.c | 16 ++-- 1 f

[PATCH v3 34/38] drm: Wrap drm_mm_node.hole_follows

2016-12-16 Thread Chris Wilson
Insulate users from changed to the internal hole tracking within struct drm_mm_node by using an accessor for hole_follows. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen --- drivers/gpu/drm/drm_mm.c| 12 ++-- drivers/gpu/drm/i915/i915_vma.c | 4 ++-- d

[PATCH v3 33/38] drm: Apply tight eviction scanning to color_adjust

2016-12-16 Thread Chris Wilson
Using mm->color_adjust makes the eviction scanner much tricker since we don't know the actual neighbours of the target hole until after it is created (after scanning is complete). To work out whether we need to evict the neighbours because they impact upon the hole, we have to then check the hole a

[PATCH v3 32/38] drm: Simplify drm_mm scan-list manipulation

2016-12-16 Thread Chris Wilson
Since we mandate a strict reverse-order of drm_mm_scan_remove_block() after drm_mm_scan_add_block() we can further simplify the list manipulations when generating the temporary scan-hole. v2: Highlight the games being played with the lists to track the scan holes without allocation. Signed-off-by

[PATCH v3 31/38] drm: Optimise power-of-two alignments in drm_mm_scan_add_block()

2016-12-16 Thread Chris Wilson
For power-of-two alignments, we can avoid the 64bit divide and do a simple bitwise add instead. v2: s/alignment_mask/remainder_mask/ Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen --- drivers/gpu/drm/drm_mm.c | 9 - include/drm/drm_mm.h | 1 + 2 files changed, 9 insertion

[PATCH v3 30/38] drm: Compute tight evictions for drm_mm_scan

2016-12-16 Thread Chris Wilson
Compute the minimal required hole during scan and only evict those nodes that overlap. This enables us to reduce the number of nodes we need to evict to the bare minimum. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen --- drivers/gpu/drm/drm_mm.c| 60 ++

[PATCH v3 29/38] drm: Fix application of color vs range restriction when scanning drm_mm

2016-12-16 Thread Chris Wilson
The range restriction should be applied after the color adjustment, or else we may inadvertently apply the color adjustment to the restricted hole (and not against its neighbours). Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen --- drivers/gpu/drm/drm_mm.c | 15 +-- 1 file

[PATCH v3 28/38] drm: Unconditionally do the range check in drm_mm_scan_add_block()

2016-12-16 Thread Chris Wilson
Doing the check is trivial (low cost in comparison to overall eviction) and helps simplify the code. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen --- drivers/gpu/drm/drm_mm.c | 53 +++ drivers/gpu/drm/i915/i915_gem_evict.c | 10 ++- i

[PATCH v3 27/38] drm: Rename prev_node to hole in drm_mm_scan_add_block()

2016-12-16 Thread Chris Wilson
Acknowledging that we were building up the hole was more useful to me when reading the code, than knowing the relationship between this node and the previous node. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen --- drivers/gpu/drm/drm_mm.c | 16 1 file changed, 8 inse

[PATCH v3 26/38] drm: Extract struct drm_mm_scan from struct drm_mm

2016-12-16 Thread Chris Wilson
The scan state occupies a large proportion of the struct drm_mm and is rarely used and only contains temporary state. That makes it suitable to moving to its struct and onto the stack of the callers. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen --- drivers/gpu/drm/drm_mm.c

[PATCH v3 25/38] drm: Add asserts to catch overflow in drm_mm_init() and drm_mm_init_scan()

2016-12-16 Thread Chris Wilson
A simple assert to ensure that we don't overflow start + size when initialising the drm_mm, or its scanner. In future, we may want to switch to tracking the value of ranges (rather than size) so that we can cover the full u64, for example like resource tracking. Signed-off-by: Chris Wilson Revie

[PATCH v3 24/38] drm: Simplify drm_mm_clean()

2016-12-16 Thread Chris Wilson
Since commit ea7b1dd44867 ("drm: mm: track free areas implicitly"), to test whether there are any nodes allocated within the range manager, we merely have to ask whether the node_list is empty. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen --- drivers/gpu/drm/drm_mm.c | 19 +-

[PATCH v3 23/38] drm: Detect overflow in drm_mm_reserve_node()

2016-12-16 Thread Chris Wilson
Protect ourselves from a caller passing in node.start + node.size that will overflow and trick us into reserving that node. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen --- drivers/gpu/drm/drm_mm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/

[PATCH v3 22/38] drm: Fix kerneldoc for drm_mm_scan_remove_block()

2016-12-16 Thread Chris Wilson
The nodes must be removed in the *reverse* order. This is correct in the overview, but backwards in the function description. Whilst here add Intel's copyright statement and tweak some formatting. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen --- drivers/gpu/drm/drm_mm.c | 34 +++

[PATCH v3 21/38] drm: Promote drm_mm alignment to u64

2016-12-16 Thread Chris Wilson
In places (e.g. i915.ko), the alignment is exported to userspace as u64 and there now exists hardware for which we can indeed utilize a u64 alignment. As such, we need to keep 64bit integers throughout when handling alignment. Testcase: igt/drm_mm/align64 Testcase: igt/gem_exec_alignment Signed-of

[PATCH v3 20/38] drm/i915: Build DRM range manager selftests for CI

2016-12-16 Thread Chris Wilson
Build the struct drm_mm selftests so that we can trivially run them within our CI. "Enable debug, become developer." - Joonas Lahtinen Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen --- drivers/gpu/drm/i915/Kconfig.debug | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu

[PATCH v3 19/38] drm: kselftest for drm_mm and restricted color eviction

2016-12-16 Thread Chris Wilson
Check that after applying the driver's color adjustment, restricted eviction scanning find a suitable hole. 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 | 116 +

[PATCH v3 18/38] drm: kselftest for drm_mm and color eviction

2016-12-16 Thread Chris Wilson
Check that after applying the driver's color adjustment, eviction scanning find a suitable hole. 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 | 156 +++ 2 f

[PATCH v3 17/38] drm: kselftest for drm_mm and color adjustment

2016-12-16 Thread Chris Wilson
Check that after applying the driver's color adjustment, fitting of the node and its alignment are still correct. v2: s/no_color_touching/separate_adjacent_colors/ Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen --- drivers/gpu/drm/selftests/drm_mm_selftests.h | 1 + drivers/gpu/drm

[PATCH v3 16/38] drm: kselftest for drm_mm and top-down allocation

2016-12-16 Thread Chris Wilson
Check that if we request top-down allocation from drm_mm_insert_node() we receive the next available hole from the top. 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 | 119 +

[PATCH v3 15/38] drm: kselftest for drm_mm and range restricted eviction

2016-12-16 Thread Chris Wilson
Check that we add arbitrary blocks to a restrited eviction scanner in order to find the first minimal hole that matches our request. 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 |

[PATCH v3 14/38] drm: kselftest for drm_mm and eviction

2016-12-16 Thread Chris Wilson
Check that we add arbitrary blocks to the eviction scanner in order to find the first minimal hole that matches our request. v2: Refactor out some common eviction code for later Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen --- drivers/gpu/drm/selftests/drm_mm_selftests.h | 1 + d

[PATCH v3 13/38] drm: kselftest for drm_mm and alignment

2016-12-16 Thread Chris Wilson
Check that we can request alignment to any power-of-two or prime using a plain drm_mm_node_insert(), and also handle a reasonable selection of primes. v2: Exercise all allocation flags Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen --- drivers/gpu/drm/selftests/drm_mm_selftests.h |

[PATCH v3 12/38] drm: kselftest for drm_mm_insert_node_in_range()

2016-12-16 Thread Chris Wilson
Exercise drm_mm_insert_node_in_range(), check that we only allocate from the specified range. v2: Use all allocation flags 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 | 264 +

[PATCH v3 11/38] drm: kselftest for drm_mm_replace_node()

2016-12-16 Thread Chris Wilson
Reuse drm_mm_insert_node() with a temporary node to exercise drm_mm_replace_node(). We use the previous test in order to exercise the various lists following replacement. v2: Check that we copy across the important (user) details of the node. The internal details (such as lists and hole tracking)

[PATCH v3 10/38] drm: kselftest for drm_mm_insert_node()

2016-12-16 Thread Chris Wilson
Exercise drm_mm_insert_node(), check that we can't overfill a range and that the lists are correct after reserving/removing. v2: Extract helpers for the repeated tests v3: Iterate over all allocation flags Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen --- drivers/gpu/drm/selftests/d

[PATCH v3 09/38] drm: kselftest for drm_mm_reserve_node()

2016-12-16 Thread Chris Wilson
Exercise drm_mm_reserve_node(), check that we can't reserve an already occupied range and that the lists are correct after reserving/removing. v2: Check for invalid node reservation. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen --- drivers/gpu/drm/selftests/drm_mm_selftests.h | 1

[PATCH v3 08/38] drm: kselftest for drm_mm_debug()

2016-12-16 Thread Chris Wilson
Simple test to just exercise calling the debug dumper on the drm_mm. 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 | 35 2 files changed, 36 insertions(+

[PATCH v3 07/38] drm: kselftest for drm_mm_init()

2016-12-16 Thread Chris Wilson
Simple first test to just exercise initialisation of struct drm_mm. 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 | 114 +++ 2 files changed, 115 insertions(

[PATCH v3 06/38] drm: Add some kselftests for the DRM range manager (struct drm_mm)

2016-12-16 Thread Chris Wilson
First we introduce a smattering of infrastructure for writing selftests. The idea is that we have a test module that exercises a particular portion of the exported API, and that module provides a set of tests that can either be run as an ensemble via kselftest or individually via an igt harness (in

[PATCH v3 05/38] drm: Add a simple generator of random permutations

2016-12-16 Thread Chris Wilson
When testing, we want a random but yet reproducible order in which to process elements. Here we create an array which is a random (using the Tausworthe PRNG) permutation of the order in which to execute. Note these are simple helpers intended to be merged upstream in lib/ v2: Tidier code by David

[PATCH v3 04/38] lib: Add a simple prime number generator

2016-12-16 Thread Chris Wilson
Prime numbers are interesting for testing components that use multiplies and divides, such as testing DRM's struct drm_mm alignment computations. v2: Move to lib/, add selftest v3: Fix initial constants (exclude 0/1 from being primes) v4: More RCU markup to keep 0day/sparse happy Signed-off-by: C

[PATCH v3 03/38] drm: Compile time enabling for asserts in drm_mm

2016-12-16 Thread Chris Wilson
Use CONFIG_DRM_DEBUG_MM to conditionally enable the internal and validation checking using BUG_ON. Ideally these paths should all be exercised by CI selftests (with the asserts enabled). Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen --- drivers/gpu/drm/drm_mm.c | 45 +

[PATCH v3 02/38] drm: Use drm_mm_nodes() as shorthand for the list of nodes under struct drm_mm

2016-12-16 Thread Chris Wilson
Fairly commonly we want to inspect the node list on the struct drm_mm, which is buried within an embedded node. Bring it to the surface with a bit of syntatic sugar. Note this was intended to be split from commit ad579002c8ec ("drm: Add drm_mm_for_each_node_safe()") before being applied, but my ti

[PATCH v3 01/38] drm/i915: Use the MRU stack search after evicting

2016-12-16 Thread Chris Wilson
When we evict from the GTT to make room for an object, the hole we create is put onto the MRU stack inside the drm_mm range manager. On the next search pass, we can speed up a PIN_HIGH allocation by referencing that stack for the new hole. v2: Pull together the 3 identical implements (ahem, a coup

drm_mm fixes, take 3, final?

2016-12-16 Thread Chris Wilson
With a lot of polish applied, Joonas has reviewed the series - all but for [04/38] "lib: Add a simple prime number generator" [lib/prime_numbers.c]. Anyone feel like poking around at a bit of number theory? Other than it would appear to be ready for Daniel to sort out the merge between drm-misc/i9

[PATCH] drm/amdgpu: Don't save new cursor size before updating CUR_SIZE register.

2016-12-16 Thread Deucher, Alexander
> -Original Message- > From: Liviu Dudau [mailto:liviu at dudau.co.uk] > Sent: Friday, December 16, 2016 2:11 PM > To: Daenzer, Michel; Deucher, Alexander > Cc: Koenig, Christian; David Airlie; dri-devel at lists.freedesktop.org; amd- > gfx at lists.freedesktop.org; Liviu Dudau > Subject: [

[RFC 00/10] implement alternative and much simpler id allocator

2016-12-16 Thread Matthew Wilcox
From: Andrew Morton [mailto:a...@linux-foundation.org] > On Thu, 8 Dec 2016 02:22:55 +0100 Rasmus Villemoes > wrote: > > TL;DR: these patches save 250 KB of memory, with more low-hanging > > fruit ready to pick. > > > > While browsing through the lib/idr.c code, I noticed that the code at > > the

[PATCH v2 05/11] locking/ww_mutex: Add waiters in stamp order

2016-12-16 Thread Nicolai Hähnle
On 16.12.2016 18:20, Peter Zijlstra wrote: > On Fri, Dec 16, 2016 at 03:19:43PM +0100, Nicolai Hähnle wrote: @@ -716,7 +775,20 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass, spin_unlock_mutex(&lock->wait_lock, flags); sche

[PATCH v2 05/11] locking/ww_mutex: Add waiters in stamp order

2016-12-16 Thread Nicolai Hähnle
On 16.12.2016 18:15, Peter Zijlstra wrote: > On Fri, Dec 16, 2016 at 03:19:43PM +0100, Nicolai Hähnle wrote: >> The concern about picking up a handoff that we didn't request is real, >> though it cannot happen in the first iteration. Perhaps this __mutex_trylock >> can be moved to the end of the l

[PATCH] drm/amdgpu: Don't save new cursor size before updating CUR_SIZE register.

2016-12-16 Thread Liviu Dudau
Commit 7c83d7abc999 ("drm/amdgpu: Only update the CUR_SIZE register when necessary") did not cleanup correctly the old code for DCE v6 and v8. As a consequence, cursor updates stopped working for my Radeon R9 1002:67b0 dual-monitor setup. Fixes: 7c83d7abc999 ("drm/amdgpu: Only update the CUR_SIZE

Radeon X200M device suspend problem

2016-12-16 Thread Michel Dänzer
On 16/12/16 01:29 AM, Dmitriy Kryuk wrote: > I have a laptop with a Radeon X200M card in it. I use Radeon DRM driver > for graphics, and it makes the system hang with display off when trying > to suspend (either to disk or to RAM). Using /sys/power/pm_test > interface revealed that it freezes when

[alsa-lib][PATCH] ASoC: hdmi-codec: use unsigned type to structure members with bit-field instead of signed type

2016-12-16 Thread Takashi Sakamoto
This is a fix for Linux 4.10-rc1. In C language specification, a bit-field is interpreted as a signed or unsigned integer type consisting of the specified number of bits. In GCC manual, the range of a signed bit field of N bits is from -(2^N) / 2 to ((2^N) / 2) - 1 https://www.gnu.org/software/gn

[PATCH v2 05/11] locking/ww_mutex: Add waiters in stamp order

2016-12-16 Thread Peter Zijlstra
On Fri, Dec 16, 2016 at 03:19:43PM +0100, Nicolai Hähnle wrote: > >>@@ -716,7 +775,20 @@ __mutex_lock_common(struct mutex *lock, long state, > >>unsigned int subclass, > >>spin_unlock_mutex(&lock->wait_lock, flags); > >>schedule_preempt_disabled(); > >> > >>- if

[PATCH v2 05/11] locking/ww_mutex: Add waiters in stamp order

2016-12-16 Thread Peter Zijlstra
On Fri, Dec 16, 2016 at 03:19:43PM +0100, Nicolai Hähnle wrote: > The concern about picking up a handoff that we didn't request is real, > though it cannot happen in the first iteration. Perhaps this __mutex_trylock > can be moved to the end of the loop? See below... > >>@@ -728,7 +800,7 @@ __mu

[PATCH 1/2] drm: exynos: Perform initialization/cleanup at probe/remove time

2016-12-16 Thread Daniel Stone
Hey Laurent, On 13 December 2016 at 19:34, Laurent Pinchart wrote: > From: Laurent Pinchart > > The drm driver .load() operation is prone to race conditions as it > initializes the driver after registering the device nodes. Its usage is > deprecated, inline it in the probe function and call drm_

Issue with DRM and "reimplement IDR and IDA using the radix tree"

2016-12-16 Thread Thierry Reding
ave slipped in there. > > > > Not sure how this could be fixed, so reporting the issue for now in case > > it is not known yet. I can confirm Alex' findings, though the symptoms seem to be slightly different, which may be related to me testing on next-20161216 rather than ne

[PATCH] drm/nouveau: use designated initializers

2016-12-16 Thread Kees Cook
Prepare to mark sensitive kernel structures for randomization by making sure they're using designated initializers. These were identified during allyesconfig builds of x86, arm, and arm64, with most initializer fixes extracted from grsecurity. Signed-off-by: Kees Cook --- drivers/gpu/drm/nouveau

[PATCH] drm/vmwgfx: use designated initializers

2016-12-16 Thread Kees Cook
Prepare to mark sensitive kernel structures for randomization by making sure they're using designated initializers. These were identified during allyesconfig builds of x86, arm, and arm64, with most initializer fixes extracted from grsecurity. Signed-off-by: Kees Cook --- drivers/gpu/drm/vmwgfx/

[PATCH] drm/amdgpu: use designated initializers

2016-12-16 Thread Kees Cook
Prepare to mark sensitive kernel structures for randomization by making sure they're using designated initializers. These were identified during allyesconfig builds of x86, arm, and arm64, with most initializer fixes extracted from grsecurity. Signed-off-by: Kees Cook --- drivers/gpu/drm/amd/amd

[PATCH] drm/ttm: use designated initializers

2016-12-16 Thread Kees Cook
Prepare to mark sensitive kernel structures for randomization by making sure they're using designated initializers. These were identified during allyesconfig builds of x86, arm, and arm64, with most initializer fixes extracted from grsecurity. Signed-off-by: Kees Cook --- drivers/gpu/drm/ttm/ttm

[PATCH] drm/ttm: use designated initializers

2016-12-16 Thread Kees Cook
Prepare to mark sensitive kernel structures for randomization by making sure they're using designated initializers. These were identified during allyesconfig builds of x86, arm, and arm64, with most initializer fixes extracted from grsecurity. Signed-off-by: Kees Cook --- drivers/gpu/drm/virtio/

[PATCH 0/2] drm: link status property and DP link training failure handling

2016-12-16 Thread Jani Nikula
On Fri, 16 Dec 2016, Daniel Vetter wrote: > On Fri, Dec 16, 2016 at 12:29:05PM +0200, Jani Nikula wrote: >> The two remaining patches from [1], rebased. >> >> BR, >> Jani. >> >> >> [1] >> http://mid.mail-archive.com/1480984058-552-1-git-send-email-manasi.d.navare >> at intel.com > > Just for

[PATCH v2 29/40] drm: Rename prev_node to hole in drm_mm_scan_add_block()

2016-12-16 Thread Joonas Lahtinen
On pe, 2016-12-16 at 07:47 +, Chris Wilson wrote: > Acknowledging that we were building up the hole was more useful to me > when reading the code, than knowing the relationship between this node > and the previous node. > > Signed-off-by: Chris Wilson I'm not purely against, so if you think

[PATCH v2 21/40] drm: kselftest for drm_mm and restricted color eviction

2016-12-16 Thread Joonas Lahtinen
On pe, 2016-12-16 at 07:46 +, Chris Wilson wrote: > Check that after applying the driver's color adjustment, restricted > eviction scanning find a suitable hole. > > Signed-off-by: Chris Wilson   > +static int igt_color_evict_range(void *ignored) > +{ > + for (mode = evict_modes; mo

[PATCH v2 20/40] drm: kselftest for drm_mm and color eviction

2016-12-16 Thread Joonas Lahtinen
On pe, 2016-12-16 at 07:46 +, Chris Wilson wrote: > Check that after applying the driver's color adjustment, eviction > scanning find a suitable hole. > > Signed-off-by: Chris Wilson > +static int evict_color(struct drm_mm *mm, > +        struct evict_node *nodes, > +

[PATCH v2 35/40] drm: Apply tight eviction scanning to color_adjust

2016-12-16 Thread Joonas Lahtinen
On pe, 2016-12-16 at 07:47 +, Chris Wilson wrote: > Using mm->color_adjust makes the eviction scanner much tricker since we > don't know the actual neighbours of the target hole until after it is > created (after scanning is complete). To work out whether we need to > evict the neighbours becau

[PATCH v2 14/40] drm: kselftest for drm_mm_insert_node_in_range()

2016-12-16 Thread Joonas Lahtinen
On pe, 2016-12-16 at 07:46 +, Chris Wilson wrote: > Exercise drm_mm_insert_node_in_range(), check that we only allocate from > the specified range. > > v2: Use all allocation flags > > Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Regards, Joonas -- Joonas Lahtinen Open Source

[PATCH v2 12/40] drm: kselftest for drm_mm_insert_node()

2016-12-16 Thread Joonas Lahtinen
On pe, 2016-12-16 at 07:46 +, Chris Wilson wrote: > Exercise drm_mm_insert_node(), check that we can't overfill a range and > that the lists are correct after reserving/removing. > > v2: Extract helpers for the repeated tests > v3: Iterate over all allocation flags > > Signed-off-by: Chris Wi

[PATCH v4 22/22] drm: omapdrm: Perform initialization/cleanup at probe/remove time

2016-12-16 Thread Laurent Pinchart
Hi Tomi, On Friday 16 Dec 2016 14:44:26 Tomi Valkeinen wrote: > On 14/12/16 02:27, Laurent Pinchart wrote: > > The drm driver .load() operation is prone to race conditions as it > > initializes the driver after registering the device nodes. Its usage is > > deprecated, inline it in the probe funct

[PATCH v2 05/11] locking/ww_mutex: Add waiters in stamp order

2016-12-16 Thread Peter Zijlstra
On Fri, Dec 16, 2016 at 03:19:43PM +0100, Nicolai Hähnle wrote: > Hi Peter and Chris, > > (trying to combine the handoff discussion here) > > On 06.12.2016 17:55, Peter Zijlstra wrote: > >On Thu, Dec 01, 2016 at 03:06:48PM +0100, Nicolai Hähnle wrote: > >>@@ -693,8 +748,12 @@ __mutex_lock_commo

[PATCH v2 39/40] drm: Improve drm_mm search (and fix topdown allocation) with rbtrees

2016-12-16 Thread Joonas Lahtinen
On pe, 2016-12-16 at 07:47 +, Chris Wilson wrote: > 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 effic

[PATCH v2 36/40] drm: Wrap drm_mm_node.hole_follows

2016-12-16 Thread Joonas Lahtinen
On pe, 2016-12-16 at 13:31 +, Chris Wilson wrote: > On Fri, Dec 16, 2016 at 03:04:31PM +0200, Joonas Lahtinen wrote: > > > > On pe, 2016-12-16 at 07:47 +, Chris Wilson wrote: > > > > > > Insulate users from changed to the internal hole tracking within > > > > changes ^ >

[kbuild-all] [Intel-gfx] [PATCH] drm: Convert all helpers to drm_connector_list_iter

2016-12-16 Thread Fengguang Wu
OR on next-20161215] >> [cannot apply to v4.9] >> [if your patch is applied to the wrong git tree, please drop us a note to >> help improve the system] >> >> url: >> https://github.com/0day-ci/linux/commits/Daniel-Vetter/drm-Convert-all-helpers-to-drm_c

[PATCH v2 05/11] locking/ww_mutex: Add waiters in stamp order

2016-12-16 Thread Nicolai Hähnle
On 01.12.2016 16:59, Chris Wilson wrote: > On Thu, Dec 01, 2016 at 03:06:48PM +0100, Nicolai Hähnle wrote: >> @@ -677,15 +722,25 @@ __mutex_lock_common(struct mutex *lock, long state, >> unsigned int subclass, >> debug_mutex_lock_common(lock, &waiter); >> debug_mutex_add_waiter(lock, &w

[PATCH v2 05/11] locking/ww_mutex: Add waiters in stamp order

2016-12-16 Thread Nicolai Hähnle
Hi Peter and Chris, (trying to combine the handoff discussion here) On 06.12.2016 17:55, Peter Zijlstra wrote: > On Thu, Dec 01, 2016 at 03:06:48PM +0100, Nicolai Hähnle wrote: >> @@ -693,8 +748,12 @@ __mutex_lock_common(struct mutex *lock, long state, >> unsigned int subclass, >>

[PATCH v2 27/40] drm: Add asserts to catch overflow in drm_mm_init() and drm_mm_init_scan()

2016-12-16 Thread Joonas Lahtinen
On pe, 2016-12-16 at 07:47 +, Chris Wilson wrote: > A simple assert to ensure that we don't overflow start + size when > initialising the drm_mm, or its scanner. > > In future, we may want to switch to tracking the value of ranges (rather > than size) so that we can cover the full u64, for exa

[PATCH v2 34/40] drm: Simplify drm_mm scan-list manipulation

2016-12-16 Thread Joonas Lahtinen
On pe, 2016-12-16 at 07:47 +, Chris Wilson wrote: > Since we mandate a strict reverse-order of drm_mm_scan_remove_block() > after drm_mm_scan_add_block() we can further simplify the list > manipulations when generating the temporary scan-hole. > > v2: Highlight the games being played with the

[PATCH v2 36/40] drm: Wrap drm_mm_node.hole_follows

2016-12-16 Thread Joonas Lahtinen
On pe, 2016-12-16 at 07:47 +, Chris Wilson wrote: > Insulate users from changed to the internal hole tracking within changes ^ > struct drm_mm_node by using an accessor for hole_follows. > > Signed-off-by: Chris Wilson The function name could be soemthing beginning with drm

[PATCH v2 38/40] drm: Use drm_mm_insert_node_in_range_generic() for everyone

2016-12-16 Thread Joonas Lahtinen
On pe, 2016-12-16 at 07:47 +, Chris Wilson wrote: > Remove a superfluous helper as drm_mm_insert_node is equivalent to > insert_node_in_range with a range of (0, U64_MAX). > > Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Regards, Joonas -- Joonas Lahtinen Open Source Technolog

[PATCH v2 12/40] drm: kselftest for drm_mm_insert_node()

2016-12-16 Thread Chris Wilson
On Fri, Dec 16, 2016 at 04:02:12PM +0200, Joonas Lahtinen wrote: > On pe, 2016-12-16 at 07:46 +, Chris Wilson wrote: > > Exercise drm_mm_insert_node(), check that we can't overfill a range and > > that the lists are correct after reserving/removing. > > > > v2: Extract helpers for the repeated

[PATCH v2 37/40] drm: Apply range restriction after color adjustment when allocation

2016-12-16 Thread Joonas Lahtinen
On pe, 2016-12-16 at 07:47 +, Chris Wilson wrote: > mm->color_adjust() compares the hole with its neighbouring nodes. They > only abutt before we restrict the hole, so we have to apply color_adjust > before we apply the range restriction. > > Signed-off-by: Chris Wilson Reviewed-by: Joonas L

[PATCH v2 20/40] drm: kselftest for drm_mm and color eviction

2016-12-16 Thread Chris Wilson
On Fri, Dec 16, 2016 at 04:38:12PM +0200, Joonas Lahtinen wrote: > On pe, 2016-12-16 at 07:46 +, Chris Wilson wrote: > > Check that after applying the driver's color adjustment, eviction > > scanning find a suitable hole. > > > > Signed-off-by: Chris Wilson > > > > > +static int evict_colo

[PATCH 0/2] drm: link status property and DP link training failure handling

2016-12-16 Thread Daniel Vetter
On Fri, Dec 16, 2016 at 12:29:05PM +0200, Jani Nikula wrote: > The two remaining patches from [1], rebased. > > BR, > Jani. > > > [1] > http://mid.mail-archive.com/1480984058-552-1-git-send-email-manasi.d.navare > at intel.com Just for the record, I think the only thing missing here is the Xo

[PATCH v2 04/40] drm: Constify the drm_mm API

2016-12-16 Thread Daniel Vetter
On Fri, Dec 16, 2016 at 07:46:42AM +, Chris Wilson wrote: > Mark up the pointers as constant through the API where appropriate. > > Signed-off-by: Chris Wilson Ok merged this and the patch right before, then Chris told me on irc that I need to stop because he's mixing a v3 of this series. -D

[PATCH v4 22/22] drm: omapdrm: Perform initialization/cleanup at probe/remove time

2016-12-16 Thread Tomi Valkeinen
_free_priv: > + destroy_workqueue(priv->wq); > + kfree(priv); > +err_disconnect_dssdevs: > + omap_disconnect_dssdevs(); > +err_crtc_uninit: > + omap_crtc_pre_uninit(); > + return ret; > } > > -static int pdev_remove(struct platform_device *device) > +static int pdev_remove(struct platform_device *pdev) > { > + struct drm_device *ddev = platform_get_drvdata(pdev); > + struct omap_drm_private *priv = ddev->dev_private; > + > DBG(""); > > - drm_put_dev(platform_get_drvdata(device)); > + drm_dev_unregister(ddev); > + > + drm_kms_helper_poll_fini(ddev); > + > + if (priv->fbdev) > + omap_fbdev_free(ddev); > + > + drm_mode_config_cleanup(ddev); > + > + omap_drm_irq_uninstall(ddev); > + omap_gem_deinit(ddev); > + > + drm_dev_unref(ddev); > + > + destroy_workqueue(priv->wq); > + kfree(priv); > > omap_disconnect_dssdevs(); > omap_crtc_pre_uninit(); > The old code calls drm_vblank_cleanup(), and the probe's error handling calls that, but not remove. Is that correct? Tomi -- next part -- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20161216/7cdff755/attachment.sig>

[PATCH v2 05/11] locking/ww_mutex: Add waiters in stamp order

2016-12-16 Thread Nicolai Hähnle
On 06.12.2016 16:36, Peter Zijlstra wrote: > On Thu, Dec 01, 2016 at 03:06:48PM +0100, Nicolai Hähnle wrote: >> +static inline int __sched >> +__ww_mutex_add_waiter(struct mutex_waiter *waiter, >> + struct mutex *lock, >> + struct ww_acquire_ctx *ww_ctx) >> +{ >>

[Intel-gfx] [PATCH v2 03/40] drm: Add drm_mm_for_each_node_safe()

2016-12-16 Thread Daniel Vetter
On Fri, Dec 16, 2016 at 11:06:25AM +0200, Joonas Lahtinen wrote: > On pe, 2016-12-16 at 07:46 +, Chris Wilson wrote: > > A complement to drm_mm_for_each_node(), wraps list_for_each_entry_safe() > > for walking the list of nodes safe against removal. > > > > Most of the diff is about __drm_mm

[PATCH v4 20/22] drm: omapdrm: Remove global variables

2016-12-16 Thread Tomi Valkeinen
guess the current implementation is better. Reviewed-by: Tomi Valkeinen Tomi -- next part -- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20161216/16a89e89/attachment-0001.sig>

[PATCH v4 3/5] drm: bridge: Link encoder and bridge in core code

2016-12-16 Thread Daniel Vetter
On Fri, Dec 16, 2016 at 02:29:00PM +0100, Daniel Vetter wrote: > On Fri, Dec 16, 2016 at 02:05:48PM +0530, Archit Taneja wrote: > > Hi, > > > > On 12/14/2016 03:29 PM, Laurent Pinchart wrote: > > > Instead of linking encoders and bridges in every driver (and getting it > > > wrong half of the time

[PATCH v4 3/5] drm: bridge: Link encoder and bridge in core code

2016-12-16 Thread Daniel Vetter
On Fri, Dec 16, 2016 at 02:05:48PM +0530, Archit Taneja wrote: > Hi, > > On 12/14/2016 03:29 PM, Laurent Pinchart wrote: > > Instead of linking encoders and bridges in every driver (and getting it > > wrong half of the time, as many drivers forget to set the drm_bridge > > encoder pointer), do so

[PATCH] drm: Use drm_mm_nodes() as shorthand for the list of nodes under struct drm_mm

2016-12-16 Thread Chris Wilson
Fairly commonly we want to inspect the node list on the struct drm_mm, which is buried within an embedded node. Bring it to the surface with a bit of syntatic sugar. Note this was intended to be split from commit ad579002c8ec ("drm: Add drm_mm_for_each_node_safe()") before being applied, but my ti

[PATCH 1/3] drm/hisilicon: Fix spelling of clock in hisi-ade.txt

2016-12-16 Thread Peter Meerwald-Stadler
Signed-off-by: Peter Meerwald-Stadler Cc: Xinliang Liu Cc: Xinwei Kong Cc: trivial at kernel.org --- Documentation/devicetree/bindings/display/hisilicon/hisi-ade.txt |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/display/hisilicon/hisi-a

[PATCH v2 35/40] drm: Apply tight eviction scanning to color_adjust

2016-12-16 Thread Chris Wilson
On Fri, Dec 16, 2016 at 04:14:30PM +0200, Joonas Lahtinen wrote: > On pe, 2016-12-16 at 07:47 +, Chris Wilson wrote: > > Using mm->color_adjust makes the eviction scanner much tricker since we > > don't know the actual neighbours of the target hole until after it is > > created (after scanning

[PATCH v4 19/22] drm: omapdrm: Simplify IRQ wait implementation

2016-12-16 Thread Tomi Valkeinen
gs); > - } > + list_for_each_entry_safe(wait, n, &priv->wait_list, node) { > + if (wait->irqmask & irqstatus) > + omap_irq_wait_irq(wait); > } > spin_unlock_irqrestore(&list_lock, flags); > > @@ -275,7 +251,7 @@ int omap_drm_irq_install(struct drm_device *dev) > unsigned int i; > int ret; > > - INIT_LIST_HEAD(&priv->irq_list); > + INIT_LIST_HEAD(&priv->wait_list); > > priv->irq_mask = DISPC_IRQ_OCP_ERR; > > With the function rename change: Reviewed-by: Tomi Valkeinen Tomi -- next part -- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20161216/b8d02d52/attachment.sig>

[PATCH 2/3] drm: Fix spelling of clock in drm_connector.h

2016-12-16 Thread Peter Meerwald-Stadler
Signed-off-by: Peter Meerwald-Stadler Cc: Daniel Vetter Cc: Jani Nikula Cc: trivial at kernel.org --- include/drm/drm_connector.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h index ac9d7d8..819fcae 100644 --- a/

[PATCH v2 04/11] locking/ww_mutex: Set use_ww_ctx even when locking without a context

2016-12-16 Thread Nicolai Hähnle
On 06.12.2016 16:25, Peter Zijlstra wrote: > On Thu, Dec 01, 2016 at 03:06:47PM +0100, Nicolai Hähnle wrote: > >> @@ -640,10 +640,11 @@ __mutex_lock_common(struct mutex *lock, long state, >> unsigned int subclass, >> struct mutex_waiter waiter; >> unsigned long flags; >> bool first

[PATCH v4 3/5] drm: bridge: Link encoder and bridge in core code

2016-12-16 Thread Archit Taneja
Hi, On 12/14/2016 03:29 PM, Laurent Pinchart wrote: > Instead of linking encoders and bridges in every driver (and getting it > wrong half of the time, as many drivers forget to set the drm_bridge > encoder pointer), do so in core code. The drm_bridge_attach() function > needs the encoder and opti

  1   2   3   >