<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/gpu/drm/vgem, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/gpu/drm/vgem?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/gpu/drm/vgem?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-04-07T10:53:53Z</updated>
<entry>
<title>dma-buf: specify usage while adding fences to dma_resv obj v7</title>
<updated>2022-04-07T10:53:53Z</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2021-11-09T10:08:18Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=73511edf8b196e6f1ccda0fdf294ff57aa2dc9db'/>
<id>urn:sha1:73511edf8b196e6f1ccda0fdf294ff57aa2dc9db</id>
<content type='text'>
Instead of distingting between shared and exclusive fences specify
the fence usage while adding fences.

Rework all drivers to use this interface instead and deprecate the old one.

v2: some kerneldoc comments suggested by Daniel
v3: fix a missing case in radeon
v4: rebase on nouveau changes, fix lockdep and temporary disable warning
v5: more documentation updates
v6: separate internal dma_resv changes from this patch, avoids to
    disable warning temporary, rebase on upstream changes
v7: fix missed case in lima driver, minimize changes to i915_gem_busy_ioctl

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220407085946.744568-3-christian.koenig@amd.com
</content>
</entry>
<entry>
<title>dma-buf: add enum dma_resv_usage v4</title>
<updated>2022-04-07T10:53:53Z</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2021-11-09T10:08:18Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=7bc80a5462c37eab58a9ea386064307c0f447fd1'/>
<id>urn:sha1:7bc80a5462c37eab58a9ea386064307c0f447fd1</id>
<content type='text'>
This change adds the dma_resv_usage enum and allows us to specify why a
dma_resv object is queried for its containing fences.

Additional to that a dma_resv_usage_rw() helper function is added to aid
retrieving the fences for a read or write userspace submission.

This is then deployed to the different query functions of the dma_resv
object and all of their users. When the write paratermer was previously
true we now use DMA_RESV_USAGE_WRITE and DMA_RESV_USAGE_READ otherwise.

v2: add KERNEL/OTHER in separate patch
v3: some kerneldoc suggestions by Daniel
v4: some more kerneldoc suggestions by Daniel, fix missing cases lost in
    the rebase pointed out by Bas.

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220407085946.744568-2-christian.koenig@amd.com
</content>
</entry>
<entry>
<title>dma-buf/drivers: make reserving a shared slot mandatory v4</title>
<updated>2022-04-06T15:38:25Z</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2021-11-16T14:20:45Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=c8d4c18bfbc4ab467188dbe45cc8155759f49d9e'/>
<id>urn:sha1:c8d4c18bfbc4ab467188dbe45cc8155759f49d9e</id>
<content type='text'>
Audit all the users of dma_resv_add_excl_fence() and make sure they
reserve a shared slot also when only trying to add an exclusive fence.

This is the next step towards handling the exclusive fence like a
shared one.

v2: fix missed case in amdgpu
v3: and two more radeon, rename function
v4: add one more case to TTM, fix i915 after rebase

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220406075132.3263-2-christian.koenig@amd.com
</content>
</entry>
<entry>
<title>drm: Return error codes from struct drm_driver.gem_create_object</title>
<updated>2021-12-02T10:12:39Z</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2021-11-30T09:52:55Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=4ff22f487f8c26b99cbe1678344595734c001a39'/>
<id>urn:sha1:4ff22f487f8c26b99cbe1678344595734c001a39</id>
<content type='text'>
GEM helper libraries use struct drm_driver.gem_create_object to let
drivers override GEM object allocation. On failure, the call returns
NULL.

Change the semantics to make the calls return a pointer-encoded error.
This aligns the callback with its callers. Fixes the ingenic driver,
which already returns an error pointer.

Also update the callers to handle the involved types more strictly.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Steven Price &lt;steven.price@arm.com&gt;
Acked-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20211130095255.26710-1-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/vgem: use shmem helpers</title>
<updated>2021-08-12T19:41:10Z</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2021-08-12T13:14:12Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=45d9c8dde4cd8589f9180309ec60f0da2ce486e4'/>
<id>urn:sha1:45d9c8dde4cd8589f9180309ec60f0da2ce486e4</id>
<content type='text'>
Aside from deleting lots of code the real motivation here is to switch
the mmap over to VM_PFNMAP, to be more consistent with what real gpu
drivers do. They're all VM_PFNMAP, which means get_user_pages doesn't
work, and even if you try and there's a struct page behind that,
touching it and mucking around with its refcount can upset drivers
real bad.

v2: Review from Thomas:
- sort #include
- drop more dead code that I didn't spot somehow

v3: select DRM_GEM_SHMEM_HELPER to make it build (intel-gfx-ci)

v4: I got tricked by 0cf2ef46c6c0 ("drm/shmem-helper: Use cached
mappings by default"), and we need WC in vgem because vgem doesn't
have explicit begin/end cpu access ioctls.

Also add a comment why exactly vgem has to use wc.

v5: Don't set obj-&gt;base.funcs, it will default to drm_gem_shmem_funcs
(Thomas)

v6: vgem also needs an MMU for remapping

v7: I absolutely butchered the rebases over the vgem mmap change and
revert and broke the patch. Actually go back to v6 from before the
vgem mmap changes.

Cc: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Acked-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Cc: John Stultz &lt;john.stultz@linaro.org&gt;
Cc: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
Cc: "Christian König" &lt;christian.koenig@amd.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Cc: Melissa Wen &lt;melissa.srw@gmail.com&gt;
Cc: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210812131412.2487363-4-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>dma-buf: drop the _rcu postfix on function names v3</title>
<updated>2021-06-06T09:19:51Z</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2021-06-02T11:01:15Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=d3fae3b3daac09961ab871a25093b0ae404282d5'/>
<id>urn:sha1:d3fae3b3daac09961ab871a25093b0ae404282d5</id>
<content type='text'>
The functions can be called both in _rcu context as well
as while holding the lock.

v2: add some kerneldoc as suggested by Daniel
v3: fix indentation

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Jason Ekstrand &lt;jason@jlekstrand.net&gt;
Acked-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210602111714.212426-7-christian.koenig@amd.com
</content>
</entry>
<entry>
<title>drm/vgem/vgem_drv: Standard comment blocks should not use kernel-doc format</title>
<updated>2021-06-03T08:32:49Z</updated>
<author>
<name>Lee Jones</name>
<email>lee.jones@linaro.org</email>
</author>
<published>2021-05-26T08:47:22Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=4a888ba03fd97d1cb0253581973533965bf348c4'/>
<id>urn:sha1:4a888ba03fd97d1cb0253581973533965bf348c4</id>
<content type='text'>
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/vgem/vgem_drv.c:47: warning: expecting prototype for This is vgem, a (non-hardware(). Prototype was for DRIVER_NAME() instead

Cc: David Airlie &lt;airlied@linux.ie&gt;
Cc: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Cc: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
Cc: "Christian König" &lt;christian.koenig@amd.com&gt;
Cc: Adam Jackson &lt;ajax@redhat.com&gt;
Cc: Ben Widawsky &lt;ben@bwidawsk.net&gt;
Cc: dri-devel@lists.freedesktop.org
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210526084726.552052-31-lee.jones@linaro.org
</content>
</entry>
<entry>
<title>drm/prime: split array import functions v4</title>
<updated>2020-11-30T14:00:45Z</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2020-10-08T10:57:32Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=c67e62790f5c156705fb162da840c6d89d0af6e0'/>
<id>urn:sha1:c67e62790f5c156705fb162da840c6d89d0af6e0</id>
<content type='text'>
Mapping the imported pages of a DMA-buf into an userspace process
doesn't work as expected.

But we have reoccurring requests on this approach, so split the
functions for this and  document that dma_buf_mmap() needs to be used
instead.

v2: split it into two functions
v3: rebased on latest changes
v4: update commit message a bit

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Acked-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/403838/
</content>
</entry>
<entry>
<title>mm: introduce vma_set_file function v5</title>
<updated>2020-11-19T09:36:36Z</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2020-09-14T13:09:33Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=295992fb815e791d14b18ef7cdbbaf1a76211a31'/>
<id>urn:sha1:295992fb815e791d14b18ef7cdbbaf1a76211a31</id>
<content type='text'>
Add the new vma_set_file() function to allow changing
vma-&gt;vm_file with the necessary refcount dance.

v2: add more users of this.
v3: add missing EXPORT_SYMBOL, rebase on mmap cleanup,
    add comments why we drop the reference on two occasions.
v4: make it clear that changing an anonymous vma is illegal.
v5: move vma_set_file to mm/util.c

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt; (v2)
Reviewed-by: Jason Gunthorpe &lt;jgg@nvidia.com&gt;
Acked-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Link: https://patchwork.freedesktop.org/patch/399360/
</content>
</entry>
<entry>
<title>drm/vgem: replace idr_init() by idr_init_base()</title>
<updated>2020-11-10T14:22:28Z</updated>
<author>
<name>Deepak R Varma</name>
<email>mh12gx2825@gmail.com</email>
</author>
<published>2020-11-05T17:36:46Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=05854d482a5fe6a497be2e134805cb188a9ea361'/>
<id>urn:sha1:05854d482a5fe6a497be2e134805cb188a9ea361</id>
<content type='text'>
idr_init() uses base 0 which is an invalid identifier. The new function
idr_init_base allows IDR to set the ID lookup from base 1. This avoids
all lookups that otherwise starts from 0 since 0 is always unused.

References: commit 6ce711f27500 ("idr: Make 1-based IDRs more efficient")

Signed-off-by: Deepak R Varma &lt;mh12gx2825@gmail.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20201105173646.GA41732@localhost
</content>
</entry>
</feed>
