<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/gpu/drm/drm_vma_manager.c, branch linux-5.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2018-09-04T18:00:32Z</updated>
<entry>
<title>drm: Remove "protection" around drm_vma_offset_manager_destroy()</title>
<updated>2018-09-04T18:00:32Z</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2018-09-03T09:31:55Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5ddd6582cd7ba018b7527eed1777b7d83e6d9b62'/>
<id>urn:sha1:5ddd6582cd7ba018b7527eed1777b7d83e6d9b62</id>
<content type='text'>
Using a spinlock to serialize the destroy function, within the destroy
function itself does not prevent the buggy driver from shooting
themselves in the foot - either way they still have a use-after-free
issue.

Reported-by: Jia-Ju Bai &lt;baijiaju1990@gmail.com&gt;
Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: Davidlohr Bueso &lt;dave@stgolabs.net&gt;
Cc: Liviu Dudau &lt;Liviu.Dudau@arm.com&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20180903093155.3825-1-chris@chris-wilson.co.uk
</content>
</entry>
<entry>
<title>drm: add SPDX idenitifier and clarify license</title>
<updated>2018-06-29T20:28:47Z</updated>
<author>
<name>Dirk Hohndel (VMware)</name>
<email>dirk@hohndel.org</email>
</author>
<published>2018-05-06T23:16:19Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3e2b88cbd225f0867fee6ba63ffe3c38a2e98822'/>
<id>urn:sha1:3e2b88cbd225f0867fee6ba63ffe3c38a2e98822</id>
<content type='text'>
This is dual licensed under GPL-2.0 or MIT.

Signed-off-by: Dirk Hohndel (VMware) &lt;dirk@hohndel.org&gt;
Signed-off-by: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Signed-off-by: David Airlie &lt;airlied@linux.ie&gt;
Acked-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20180506231626.115996-2-dirk@hohndel.org
</content>
</entry>
<entry>
<title>drm/drm_vma_manager.c: Remove useless goto statement</title>
<updated>2017-11-02T09:44:08Z</updated>
<author>
<name>Liviu Dudau</name>
<email>Liviu.Dudau@arm.com</email>
</author>
<published>2017-11-01T14:44:58Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7fb50b957be10e631f649eca8bd66a0b89795149'/>
<id>urn:sha1:7fb50b957be10e631f649eca8bd66a0b89795149</id>
<content type='text'>
Commit db2395eccf08i ("drm: Convert drm_vma_manager to embedded
interval-tree in drm_mm") removed a line in drm_vma_offset_add() function that
makes checking the result of calling drm_mm_insert_node() and the goto
call redundant. Rework the function (as suggested by Chris Wilson) to
eliminate the need for the goto and associated label.

v2: rewrite function to remove all goto statements.

Fixes: db2395eccf08i ("drm: Convert drm_vma_manager to embedded interval-tree in drm_mm")
Cc: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Signed-off-by: Liviu Dudau &lt;liviu.dudau@arm.com&gt;
Reviewed-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20171101144458.5353-1-Liviu.Dudau@arm.com
</content>
</entry>
<entry>
<title>lib/interval_tree: fast overlap detection</title>
<updated>2017-09-09T01:26:49Z</updated>
<author>
<name>Davidlohr Bueso</name>
<email>dave@stgolabs.net</email>
</author>
<published>2017-09-08T23:15:08Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f808c13fd3738948e10196496959871130612b61'/>
<id>urn:sha1:f808c13fd3738948e10196496959871130612b61</id>
<content type='text'>
Allow interval trees to quickly check for overlaps to avoid unnecesary
tree lookups in interval_tree_iter_first().

As of this patch, all interval tree flavors will require using a
'rb_root_cached' such that we can have the leftmost node easily
available.  While most users will make use of this feature, those with
special functions (in addition to the generic insert, delete, search
calls) will avoid using the cached option as they can do funky things
with insertions -- for example, vma_interval_tree_insert_after().

[jglisse@redhat.com: fix deadlock from typo vm_lock_anon_vma()]
  Link: http://lkml.kernel.org/r/20170808225719.20723-1-jglisse@redhat.com
Link: http://lkml.kernel.org/r/20170719014603.19029-12-dave@stgolabs.net
Signed-off-by: Davidlohr Bueso &lt;dbueso@suse.de&gt;
Signed-off-by: Jérôme Glisse &lt;jglisse@redhat.com&gt;
Acked-by: Christian König &lt;christian.koenig@amd.com&gt;
Acked-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Acked-by: Doug Ledford &lt;dledford@redhat.com&gt;
Acked-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Cc: David Airlie &lt;airlied@linux.ie&gt;
Cc: Jason Wang &lt;jasowang@redhat.com&gt;
Cc: Christian Benvenuti &lt;benve@cisco.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>drm: Improve drm_mm search (and fix topdown allocation) with rbtrees</title>
<updated>2017-02-03T10:10:32Z</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2017-02-02T21:04:38Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4e64e5539d152e202ad6eea2b6f65f3ab58d9428'/>
<id>urn:sha1:4e64e5539d152e202ad6eea2b6f65f3ab58d9428</id>
<content type='text'>
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 their size or their address. This index
allows us to find the smallest hole or the hole at the bottom or top of
the range efficiently, whilst keeping the hole stack to rapidly service
evictions.

v2: Search for holes both high and low. Rename flags to mode.
v3: Discover rb_entry_safe() and use it!
v4: Kerneldoc for enum drm_mm_insert_mode.

Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Reviewed-by: Joonas Lahtinen &lt;joonas.lahtinen@linux.intel.com&gt;
Cc: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Cc: "Christian König" &lt;christian.koenig@amd.com&gt;
Cc: David Airlie &lt;airlied@linux.ie&gt;
Cc: Russell King &lt;rmk+kernel@armlinux.org.uk&gt;
Cc: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Cc: Jani Nikula &lt;jani.nikula@linux.intel.com&gt;
Cc: Sean Paul &lt;seanpaul@chromium.org&gt;
Cc: Lucas Stach &lt;l.stach@pengutronix.de&gt;
Cc: Christian Gmeiner &lt;christian.gmeiner@gmail.com&gt;
Cc: Rob Clark &lt;robdclark@gmail.com&gt;
Cc: Thierry Reding &lt;thierry.reding@gmail.com&gt;
Cc: Stephen Warren &lt;swarren@wwwdotorg.org&gt;
Cc: Alexandre Courbot &lt;gnurou@gmail.com&gt;
Cc: Eric Anholt &lt;eric@anholt.net&gt;
Cc: Sinclair Yeh &lt;syeh@vmware.com&gt;
Cc: Thomas Hellstrom &lt;thellstrom@vmware.com&gt;
Reviewed-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Reviewed-by: Sinclair Yeh &lt;syeh@vmware.com&gt; # vmwgfx
Reviewed-by: Lucas Stach &lt;l.stach@pengutronix.de&gt; #etnaviv
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20170202210438.28702-1-chris@chris-wilson.co.uk
</content>
</entry>
<entry>
<title>drm: use drm_file to tag vm-bos</title>
<updated>2016-09-19T09:22:08Z</updated>
<author>
<name>David Herrmann</name>
<email>dh.herrmann@gmail.com</email>
</author>
<published>2016-09-01T12:48:33Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d9a1f0b4eb6080dc42bb6373ab9abb0314cea41e'/>
<id>urn:sha1:d9a1f0b4eb6080dc42bb6373ab9abb0314cea41e</id>
<content type='text'>
Rather than using "struct file*", use "struct drm_file*" as tag VM tag for
BOs. This will pave the way for "struct drm_file*" without any "struct
file*" back-pointer.

Signed-off-by: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20160901124837.680-3-dh.herrmann@gmail.com
</content>
</entry>
<entry>
<title>drm: Convert drm_vma_manager to embedded interval-tree in drm_mm</title>
<updated>2016-08-08T08:05:17Z</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2016-08-03T15:04:10Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=db2395eccf0829de5eb54625167f6cbc3faa1418'/>
<id>urn:sha1:db2395eccf0829de5eb54625167f6cbc3faa1418</id>
<content type='text'>
Having added an interval-tree to struct drm_mm, we can replace the
auxiliary rb-tree inside the drm_vma_manager with it.

Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Cc: dri-devel@lists.freedesktop.org
Reviewed-by: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/1470236651-678-2-git-send-email-chris@chris-wilson.co.uk
</content>
</entry>
<entry>
<title>drm/doc: Switch to sphinx/rst fixed-width quoting</title>
<updated>2016-06-03T18:58:24Z</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2016-05-31T20:55:13Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=da5335b8bd4aabc2362e2b3d5af7df49d7ec89e6'/>
<id>urn:sha1:da5335b8bd4aabc2362e2b3d5af7df49d7ec89e6</id>
<content type='text'>
Just fallout from switching from asciidoc to sphinx/rst.

v2: Found more. Also s/\//#/ in the vgpu ascii-art - sphinx treats
those as comments and switch to variable-width, which wreaks the
layout.

v3: Undo some of the hacks, rebasing onto latest version of Jani's
series fixed it.

Acked-by: Liviu Dudau &lt;Liviu.Dudau@arm.com&gt;
Acked-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
</content>
</entry>
<entry>
<title>drm/gem: Use kref_get_unless_zero for the weak mmap references</title>
<updated>2015-10-19T09:00:44Z</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2015-10-15T09:33:43Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2225cfe46bcc7558d9e371d1bc117df2df1fbacd'/>
<id>urn:sha1:2225cfe46bcc7558d9e371d1bc117df2df1fbacd</id>
<content type='text'>
Compared to wrapping the final kref_put with dev-&gt;struct_mutex this
allows us to only acquire the offset manager look both in the final
cleanup and in the lookup. Which has the upside that no locks leak out
of the core abstractions. But it means that we need to hold a
temporary reference to the object while checking mmap constraints, to
make sure the object doesn't disappear. Extended the critical region
would have worked too, but would result in more leaky locking.

Also, this is the final bit which required dev-&gt;struct_mutex in gem
core, now modern drivers can be completely struct_mutex free!

This needs a new drm_vma_offset_exact_lookup_locked and makes both
drm_vma_offset_exact_lookup and drm_vma_offset_lookup unused.

v2: Don't leak object references in failure paths (David).

v3: Add a comment from Chris explaining how the ordering works, with
the slight adjustment that I dropped any mention of struct_mutex since
with this patch it's now immaterial ot core gem.

Cc: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Reviewed-by: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Reviewed-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Link: http://mid.gmane.org/1444901623-18918-1-git-send-email-daniel.vetter@ffwll.ch
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
</content>
</entry>
<entry>
<title>mm: remove rest usage of VM_NONLINEAR and pte_file()</title>
<updated>2015-02-10T22:30:31Z</updated>
<author>
<name>Kirill A. Shutemov</name>
<email>kirill.shutemov@linux.intel.com</email>
</author>
<published>2015-02-10T22:10:04Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0661a33611fca12570cba48d9344ce68834ee86c'/>
<id>urn:sha1:0661a33611fca12570cba48d9344ce68834ee86c</id>
<content type='text'>
One bit in -&gt;vm_flags is unused now!

Signed-off-by: Kirill A. Shutemov &lt;kirill.shutemov@linux.intel.com&gt;
Cc: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Cc: Michal Hocko &lt;mhocko@suse.cz&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
