<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/include/drm/drm_vma_manager.h, branch linux-5.11.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.11.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.11.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2019-04-24T21:20:23Z</updated>
<entry>
<title>drm: increase drm mmap_range size to 1TB</title>
<updated>2019-04-24T21:20:23Z</updated>
<author>
<name>Philip Yang</name>
<email>Philip.Yang@amd.com</email>
</author>
<published>2019-04-17T22:15:19Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6b622063451d0756f5f3c5380fd7569afae1c377'/>
<id>urn:sha1:6b622063451d0756f5f3c5380fd7569afae1c377</id>
<content type='text'>
After patch "drm: Use the same mmap-range offset and size for GEM and
TTM", application failed to create bo of system memory because drm
mmap_range size decrease to 64GB from original 1TB. This is not big
enough for applications. Increase the drm mmap_range size to 1TB.

Reviewed-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Philip Yang &lt;Philip.Yang@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190417221507.933-1-Philip.Yang@amd.com
(cherry picked from commit 96354b5ca4ac74d2e47e75987283963001b517f6)
</content>
</entry>
<entry>
<title>drm: Use the same mmap-range offset and size for GEM and TTM</title>
<updated>2019-03-19T20:03:53Z</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2019-02-07T08:59:31Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=bf141a88b329d12c9aaea4f7e7a8fdbd2dfe987d'/>
<id>urn:sha1:bf141a88b329d12c9aaea4f7e7a8fdbd2dfe987d</id>
<content type='text'>
GEM defines DRM_FILE_PAGE_OFFSET_{START,SIZE} constants for the
mmap-able range of addresses. TTM can use them as well.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Acked-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/i915: Prevent writing into a read-only object via a GGTT mmap</title>
<updated>2018-07-13T15:14:04Z</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2018-07-12T18:53:13Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3e977ac6179b39faa3c0eda5fce4f00663ae298d'/>
<id>urn:sha1:3e977ac6179b39faa3c0eda5fce4f00663ae298d</id>
<content type='text'>
If the user has created a read-only object, they should not be allowed
to circumvent the write protection by using a GGTT mmapping. Deny it.

Also most machines do not support read-only GGTT PTEs, so again we have
to reject attempted writes. Fortunately, this is known a priori, so we
can at least reject in the call to create the mmap (with a sanity check
in the fault handler).

v2: Check the vma-&gt;vm_flags during mmap() to allow readonly access.
v3: Remove VM_MAYWRITE to curtail mprotect()

Testcase: igt/gem_userptr_blits/readonly_mmap*
Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: Jon Bloomfield &lt;jon.bloomfield@intel.com&gt;
Cc: Joonas Lahtinen &lt;joonas.lahtinen@linux.intel.com&gt;
Cc: Matthew Auld &lt;matthew.william.auld@gmail.com&gt;
Cc: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Reviewed-by: Matthew Auld &lt;matthew.william.auld@gmail.com&gt; #v1
Reviewed-by: Jon Bloomfield &lt;jon.bloomfield@intel.com&gt;
Reviewed-by: Joonas Lahtinen &lt;joonas.lahtinen@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20180712185315.3288-4-chris@chris-wilson.co.uk
</content>
</entry>
<entry>
<title>drm/vma-manager: drm_vma_node_start() constify argument</title>
<updated>2017-11-11T10:19:37Z</updated>
<author>
<name>Noralf Trønnes</name>
<email>noralf@tronnes.org</email>
</author>
<published>2017-11-07T19:13:37Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=bf38b0550359ee7a78244d17ed49d3c557cceb01'/>
<id>urn:sha1:bf38b0550359ee7a78244d17ed49d3c557cceb01</id>
<content type='text'>
Constify argument so functions calling into this take a const argument.

Reviewed-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Signed-off-by: Noralf Trønnes &lt;noralf@tronnes.org&gt;
Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20171107191348.17555-2-noralf@tronnes.org
</content>
</entry>
<entry>
<title>drm: Extract drm_prime.h</title>
<updated>2017-03-09T15:18:02Z</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2017-03-08T14:12:35Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c6bb9baa03b1ed413ebd449d9d7f9389fda1f309'/>
<id>urn:sha1:c6bb9baa03b1ed413ebd449d9d7f9389fda1f309</id>
<content type='text'>
Plus a little bit more documentation.

v2: Untangle the missing forward decls to make drm_prime|gem.h
free-standing.

Reviewed-by: Gustavo Padovan &lt;gustavo.padovan@collabora.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20170308141257.12119-3-daniel.vetter@ffwll.ch
</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/vma_manage: Drop has_offset</title>
<updated>2016-04-20T10:58:53Z</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2016-03-30T09:40:52Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f74418a400c62f382228842fd0ce8a05f9069d8c'/>
<id>urn:sha1:f74418a400c62f382228842fd0ce8a05f9069d8c</id>
<content type='text'>
It's racy, creating mmap offsets is a slowpath, so better to remove it
to avoid drivers doing broken things.

The only user is i915, and it's ok there because everything (well
almost) is protected by dev-&gt;struct_mutex in i915-gem.

While at it add a note in the create_mmap_offset kerneldoc that
drivers must release it again. And then I also noticed that
drm_gem_object_release entirely lacks kerneldoc.

Cc: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/1459330852-27668-14-git-send-email-daniel.vetter@ffwll.ch
</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>gpu/doc: Convert to markdown harder</title>
<updated>2015-10-16T13:50:59Z</updated>
<author>
<name>Lukas Wunner</name>
<email>lukas@wunner.de</email>
</author>
<published>2015-10-12T07:10:33Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f71a6d6095782186c10c720d9ed813b68275d30d'/>
<id>urn:sha1:f71a6d6095782186c10c720d9ed813b68275d30d</id>
<content type='text'>
This snippet...

    * Lock VMA manager for extended lookups. Only *_locked() VMA function calls
    * are allowed while holding this lock. All other contexts are blocked from VMA
    * until the lock is released via drm_vma_offset_unlock_lookup().

...causes markdown-enabled kernel-doc to barf:

    debian/build/build-doc/Documentation/DocBook/gpu.aux.xml:3247: parser error : Opening and ending tag mismatch: emphasis line 3247 and function
       *&lt;function&gt;&lt;emphasis&gt;locked&lt;/function&gt; VMA function calls are allowed while
                                             ^
    /root/airlied/debian/build/build-doc/Documentation/DocBook/gpu.aux.xml:3249: parser error : Opening and ending tag mismatch: function line 3249 and emphasis
       released via &lt;function&gt;drm&lt;/emphasis&gt;vma_offset_unlock_lookup&lt;/function&gt;.
                                            ^
    unable to parse /root/airlied/debian/build/build-doc/Documentation/DocBook/gpu.aux.xml

A quick workaround is to replace *_locked() by X_locked().

Cc: Danilo Cesar Lemes de Paula &lt;danilo.cesar@collabora.co.uk&gt;
Signed-off-by: Lukas Wunner &lt;lukas@wunner.de&gt;
[danvet: Just drop the X_ too, the usual style is _unlocked, except
that _ seems to be what annoys markdown.]
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
</entry>
</feed>
