<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/include/drm/drm_gpuvm.h, branch v6.8</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.8</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.8'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2024-01-05T00:31:54Z</updated>
<entry>
<title>Merge tag 'drm-misc-next-fixes-2024-01-04' of git://anongit.freedesktop.org/drm/drm-misc into drm-next</title>
<updated>2024-01-05T00:31:54Z</updated>
<author>
<name>Dave Airlie</name>
<email>airlied@redhat.com</email>
</author>
<published>2024-01-05T00:31:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3c064aea46d071ccf95a142be5532768a7fa6f02'/>
<id>urn:sha1:3c064aea46d071ccf95a142be5532768a7fa6f02</id>
<content type='text'>
One fix for drm/plane to avoid a use-after-free and some additional
warnings to prevent more of these occurences, a lock inversion
dependency fix and an indentation fix for drm/rockchip, and some doc
warning fixes for imagination and gpuvm.

Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;

From: Maxime Ripard &lt;mripard@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/enhl33v2oeihktta2yfyc4exvezdvm3eexcuwxkethc5ommrjo@lkidkv2kwakq
</content>
</entry>
<entry>
<title>drm/gpuvm: fix all kernel-doc warnings in include/drm/drm_gpuvm.h</title>
<updated>2024-01-02T10:49:53Z</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2023-12-31T05:48:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=200a6b3af05918ddb18832fa4d5a8f15c9dd99e0'/>
<id>urn:sha1:200a6b3af05918ddb18832fa4d5a8f15c9dd99e0</id>
<content type='text'>
Update kernel-doc comments in &lt;drm/drm_gpuvm.h&gt; to correct all
kernel-doc warnings:

drm_gpuvm.h:148: warning: Excess struct member 'addr' description in 'drm_gpuva'
drm_gpuvm.h:148: warning: Excess struct member 'offset' description in 'drm_gpuva'
drm_gpuvm.h:148: warning: Excess struct member 'obj' description in 'drm_gpuva'
drm_gpuvm.h:148: warning: Excess struct member 'entry' description in 'drm_gpuva'
drm_gpuvm.h:148: warning: Excess struct member '__subtree_last' description in 'drm_gpuva'
drm_gpuvm.h:192: warning: No description found for return value of 'drm_gpuva_invalidated'
drm_gpuvm.h:331: warning: Excess struct member 'tree' description in 'drm_gpuvm'
drm_gpuvm.h:331: warning: Excess struct member 'list' description in 'drm_gpuvm'
drm_gpuvm.h:331: warning: Excess struct member 'list' description in 'drm_gpuvm'
drm_gpuvm.h:331: warning: Excess struct member 'local_list' description in 'drm_gpuvm'
drm_gpuvm.h:331: warning: Excess struct member 'lock' description in 'drm_gpuvm'
drm_gpuvm.h:331: warning: Excess struct member 'list' description in 'drm_gpuvm'
drm_gpuvm.h:331: warning: Excess struct member 'local_list' description in 'drm_gpuvm'
drm_gpuvm.h:331: warning: Excess struct member 'lock' description in 'drm_gpuvm'
drm_gpuvm.h:352: warning: No description found for return value of 'drm_gpuvm_get'
drm_gpuvm.h:545: warning: Excess struct member 'fn' description in 'drm_gpuvm_exec'
drm_gpuvm.h:545: warning: Excess struct member 'priv' description in 'drm_gpuvm_exec'
drm_gpuvm.h:597: warning: missing initial short description on line:
 * drm_gpuvm_exec_resv_add_fence()
drm_gpuvm.h:616: warning: missing initial short description on line:
 * drm_gpuvm_exec_validate()
drm_gpuvm.h:623: warning: No description found for return value of 'drm_gpuvm_exec_validate'
drm_gpuvm.h:698: warning: Excess struct member 'gpuva' description in 'drm_gpuvm_bo'
drm_gpuvm.h:698: warning: Excess struct member 'entry' description in 'drm_gpuvm_bo'
drm_gpuvm.h:698: warning: Excess struct member 'gem' description in 'drm_gpuvm_bo'
drm_gpuvm.h:698: warning: Excess struct member 'evict' description in 'drm_gpuvm_bo'
drm_gpuvm.h:726: warning: No description found for return value of 'drm_gpuvm_bo_get'
drm_gpuvm.h:738: warning: missing initial short description on line:
 * drm_gpuvm_bo_gem_evict()
drm_gpuvm.h:740: warning: missing initial short description on line:
 * drm_gpuvm_bo_gem_evict()
drm_gpuvm.h:698: warning: Excess struct member 'evict' description in 'drm_gpuvm_bo'
drm_gpuvm.h:844: warning: Excess struct member 'addr' description in 'drm_gpuva_op_map'
drm_gpuvm.h:844: warning: Excess struct member 'range' description in 'drm_gpuva_op_map'
drm_gpuvm.h:844: warning: Excess struct member 'offset' description in 'drm_gpuva_op_map'
drm_gpuvm.h:844: warning: Excess struct member 'obj' description in 'drm_gpuva_op_map'

Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Cc: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Cc: Maxime Ripard &lt;mripard@kernel.org&gt;
Cc: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Cc: David Airlie &lt;airlied@gmail.com&gt;
Cc: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Cc: dri-devel@lists.freedesktop.org
Cc: Jonathan Corbet &lt;corbet@lwn.net&gt;
Cc: Vegard Nossum &lt;vegard.nossum@oracle.com&gt;
Signed-off-by: Maxime Ripard &lt;mripard@kernel.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20231231054856.31786-1-rdunlap@infradead.org
</content>
</entry>
<entry>
<title>Merge tag 'drm-xe-next-2023-12-21-pr1-1' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next</title>
<updated>2023-12-22T00:36:21Z</updated>
<author>
<name>Dave Airlie</name>
<email>airlied@redhat.com</email>
</author>
<published>2023-12-21T21:55:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d2197029026021ea4bc68475e5abef2213c8b01c'/>
<id>urn:sha1:d2197029026021ea4bc68475e5abef2213c8b01c</id>
<content type='text'>
Introduce a new DRM driver for Intel GPUs

Xe, is a new driver for Intel GPUs that supports both integrated and
discrete platforms. The experimental support starts with Tiger Lake.
i915 will continue be the main production driver for the platforms
up to Meteor Lake and Alchemist. Then the goal is to make this Intel
Xe driver the primary driver for Lunar Lake and newer platforms.

It uses most, if not all, of the key drm concepts, in special: TTM,
drm-scheduler, drm-exec, drm-gpuvm/gpuva and others.

Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;

[airlied: add an extra X86 check, fix a typo, fix drm_exec_init interface
change].

From: Rodrigo Vivi &lt;rodrigo.vivi@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/ZYSwLgXZUZ57qGPQ@intel.com
</content>
</entry>
<entry>
<title>drm/gpuva: Add drm_gpuva_for_each_op_reverse</title>
<updated>2023-12-21T16:40:57Z</updated>
<author>
<name>Matthew Brost</name>
<email>matthew.brost@intel.com</email>
</author>
<published>2023-08-31T14:58:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bbd52b6153731908e52f68d7c797bef7c42af4f7'/>
<id>urn:sha1:bbd52b6153731908e52f68d7c797bef7c42af4f7</id>
<content type='text'>
Add a helper to walk op list in reverse. Xe will make use of this when
unwinding GPUVA operations.

v2: (Rodrigo) reword commit message

Reviewed-by: Rodrigo Vivi &lt;rodrigo.vivi@intel.com&gt;
Signed-off-by: Matthew Brost &lt;matthew.brost@intel.com&gt;
Signed-off-by: Rodrigo Vivi &lt;rodrigo.vivi@intel.com&gt;
</content>
</entry>
<entry>
<title>Backmerge tag 'v6.7-rc5' into drm-next</title>
<updated>2023-12-12T01:32:33Z</updated>
<author>
<name>Dave Airlie</name>
<email>airlied@redhat.com</email>
</author>
<published>2023-12-12T01:32:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c1ee197d64f49c9e2a6c8e6a168083c411c1362c'/>
<id>urn:sha1:c1ee197d64f49c9e2a6c8e6a168083c411c1362c</id>
<content type='text'>
Linux 6.7-rc5

Alex requested this for some amdkfd work relying on the symbols exports.

Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm/gpuvm: Let drm_gpuvm_bo_put() report when the vm_bo object is destroyed</title>
<updated>2023-12-05T10:43:57Z</updated>
<author>
<name>Boris Brezillon</name>
<email>boris.brezillon@collabora.com</email>
</author>
<published>2023-12-04T15:14:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c50a291d621aa7abaa27b05f56d450a388b64948'/>
<id>urn:sha1:c50a291d621aa7abaa27b05f56d450a388b64948</id>
<content type='text'>
Some users need to release resources attached to the vm_bo object when
it's destroyed. In Panthor's case, we need to release the pin ref so
BO pages can be returned to the system when all GPU mappings are gone.

This could be done through a custom drm_gpuvm::vm_bo_free() hook, but
this has all sort of locking implications that would force us to expose
a drm_gem_shmem_unpin_locked() helper, not to mention the fact that
having a ::vm_bo_free() implementation without a ::vm_bo_alloc() one
seems odd. So let's keep things simple, and extend drm_gpuvm_bo_put()
to report when the object is destroyed.

Signed-off-by: Boris Brezillon &lt;boris.brezillon@collabora.com&gt;
Reviewed-by: Danilo Krummrich &lt;dakr@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20231204151406.1977285-1-boris.brezillon@collabora.com
</content>
</entry>
<entry>
<title>drm/gpuvm: fall back to drm_exec_lock_obj()</title>
<updated>2023-12-05T01:43:04Z</updated>
<author>
<name>Danilo Krummrich</name>
<email>dakr@redhat.com</email>
</author>
<published>2023-11-29T22:08:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e759f2ca29d918d3db57a61cdf838025beb03465'/>
<id>urn:sha1:e759f2ca29d918d3db57a61cdf838025beb03465</id>
<content type='text'>
Fall back to drm_exec_lock_obj() if num_fences is zero for the
drm_gpuvm_prepare_* function family.

Otherwise dma_resv_reserve_fences() would actually allocate slots even
though num_fences is zero.

Cc: Christian König &lt;christian.koenig@amd.com&gt;
Acked-by: Donald Robson &lt;donald.robson@imgtec.com&gt;
Signed-off-by: Danilo Krummrich &lt;dakr@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20231129220835.297885-2-dakr@redhat.com
</content>
</entry>
<entry>
<title>drm/gpuvm: Fix deprecated license identifier</title>
<updated>2023-11-28T10:19:26Z</updated>
<author>
<name>Thomas Hellström</name>
<email>thomas.hellstrom@linux.intel.com</email>
</author>
<published>2023-11-06T11:48:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b9c02e1052650af56d4487efa5fade3fb70e3653'/>
<id>urn:sha1:b9c02e1052650af56d4487efa5fade3fb70e3653</id>
<content type='text'>
"GPL-2.0-only" in the license header was incorrectly changed to the
now deprecated "GPL-2.0". Fix.

Cc: Maxime Ripard &lt;mripard@kernel.org&gt;
Cc: Danilo Krummrich &lt;dakr@redhat.com&gt;
Reported-by: David Edelsohn &lt;dje.gcc@gmail.com&gt;
Closes: https://lore.kernel.org/dri-devel/5lfrhdpkwhpgzipgngojs3tyqfqbesifzu5nf4l5q3nhfdhcf2@25nmiq7tfrew/T/#m5c356d68815711eea30dd94cc6f7ea8cd4344fe3
Fixes: f7749a549b4f ("drm/gpuvm: Dual-licence the drm_gpuvm code GPL-2.0 OR MIT")
Signed-off-by: Thomas Hellström &lt;thomas.hellstrom@linux.intel.com&gt;
Acked-by: Maxime Ripard &lt;mripard@kernel.org&gt;
Acked-by: Danilo Krummrich &lt;dakr@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20231106114827.62492-1-thomas.hellstrom@linux.intel.com
</content>
</entry>
<entry>
<title>drm/gpuvm: Helper to get range of unmap from a remap op.</title>
<updated>2023-11-23T08:01:45Z</updated>
<author>
<name>Donald Robson</name>
<email>donald.robson@imgtec.com</email>
</author>
<published>2023-11-22T16:34:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a191f73d85484f804284674c14f2d9f572c18adb'/>
<id>urn:sha1:a191f73d85484f804284674c14f2d9f572c18adb</id>
<content type='text'>
Determining the start and range of the unmap stage of a remap op is a
common piece of code currently implemented by multiple drivers. Add a
helper for this.

Changes since v7:
- Renamed helper to drm_gpuva_op_remap_to_unmap_range()
- Improved documentation

Changes since v6:
- Remove use of __always_inline

Signed-off-by: Donald Robson &lt;donald.robson@imgtec.com&gt;
Signed-off-by: Sarah Walker &lt;sarah.walker@imgtec.com&gt;
Reviewed-by: Danilo Krummrich &lt;dakr@redhat.com&gt;
Link: https://lore.kernel.org/r/8a0a5b5eeec459d3c60fcdaa5a638ad14a18a59e.1700668843.git.donald.robson@imgtec.com
Signed-off-by: Maxime Ripard &lt;mripard@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/gpuvm: track/lock/validate external/evicted objects</title>
<updated>2023-11-13T17:19:33Z</updated>
<author>
<name>Danilo Krummrich</name>
<email>dakr@redhat.com</email>
</author>
<published>2023-11-08T00:12:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=50c1a36f594bb3dd33f3f9386c5d960cd12327d8'/>
<id>urn:sha1:50c1a36f594bb3dd33f3f9386c5d960cd12327d8</id>
<content type='text'>
Currently the DRM GPUVM offers common infrastructure to track GPU VA
allocations and mappings, generically connect GPU VA mappings to their
backing buffers and perform more complex mapping operations on the GPU VA
space.

However, there are more design patterns commonly used by drivers, which
can potentially be generalized in order to make the DRM GPUVM represent
a basis for GPU-VM implementations. In this context, this patch aims
at generalizing the following elements.

1) Provide a common dma-resv for GEM objects not being used outside of
   this GPU-VM.

2) Provide tracking of external GEM objects (GEM objects which are
   shared with other GPU-VMs).

3) Provide functions to efficiently lock all GEM objects dma-resv the
   GPU-VM contains mappings of.

4) Provide tracking of evicted GEM objects the GPU-VM contains mappings
   of, such that validation of evicted GEM objects is accelerated.

5) Provide some convinience functions for common patterns.

Big thanks to Boris Brezillon for his help to figure out locking for
drivers updating the GPU VA space within the fence signalling path.

Acked-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Boris Brezillon &lt;boris.brezillon@collabora.com&gt;
Reviewed-by: Thomas Hellström &lt;thomas.hellstrom@linux.intel.com&gt;
Suggested-by: Matthew Brost &lt;matthew.brost@intel.com&gt;
Signed-off-by: Danilo Krummrich &lt;dakr@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20231108001259.15123-12-dakr@redhat.com
</content>
</entry>
</feed>
