<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/drm_gem.c, branch v5.11.22</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.11.22</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.11.22'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2020-11-16T19:48:20+00:00</updated>
<entry>
<title>drm: fix some kernel-doc markups</title>
<updated>2020-11-16T19:48:20+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab+huawei@kernel.org</email>
</author>
<published>2020-11-16T10:18:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e9d2871f69212a5fb5a8c021dd0195cb502add44'/>
<id>urn:sha1:e9d2871f69212a5fb5a8c021dd0195cb502add44</id>
<content type='text'>
Some identifiers have different names between their prototypes
and the kernel-doc markup.

Others need to be fixed, as kernel-doc markups should use this format:
        identifier - description

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
Acked-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/12d4ca26f6843618200529ce5445063734d38c04.1605521731.git.mchehab+huawei@kernel.org
</content>
</entry>
<entry>
<title>drm/gem: Update internal GEM vmap/vunmap interfaces to use struct dma_buf_map</title>
<updated>2020-11-09T08:19:36+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2020-11-03T09:30:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a745fb1c26d3802caad532a4675f43a661f01fa6'/>
<id>urn:sha1:a745fb1c26d3802caad532a4675f43a661f01fa6</id>
<content type='text'>
GEM's vmap and vunmap interfaces now wrap memory pointers in struct
dma_buf_map.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Tested-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20201103093015.1063-8-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/gem: Use struct dma_buf_map in GEM vmap ops and convert GEM backends</title>
<updated>2020-11-09T08:19:24+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2020-11-03T09:30:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=49a3f51dfeeecb52c5aa28c5cb9592fe5e39bf95'/>
<id>urn:sha1:49a3f51dfeeecb52c5aa28c5cb9592fe5e39bf95</id>
<content type='text'>
This patch replaces the vmap/vunmap's use of raw pointers in GEM object
functions with instances of struct dma_buf_map. GEM backends are
converted as well. For most of them, this simply changes the returned type.

TTM-based drivers now return information about the location of the memory,
either system or I/O memory. GEM VRAM helpers and qxl now use ttm_bo_vmap()
et al. Amdgpu, nouveau and radeon use drm_gem_ttm_vmap() et al instead of
implementing their own vmap callbacks.

v7:
	* init QXL cursor to mapped BO buffer (kernel test robot)
v5:
	* update vkms after switch to shmem
v4:
	* use ttm_bo_vmap(), drm_gem_ttm_vmap(), et al. (Daniel, Christian)
	* fix a trailing { in drm_gem_vmap()
	* remove several empty functions instead of converting them (Daniel)
	* comment uses of raw pointers with a TODO (Daniel)
	* TODO list: convert more helpers to use struct dma_buf_map

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Acked-by: Christian König &lt;christian.koenig@amd.com&gt;
Tested-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20201103093015.1063-7-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>Merge drm/drm-next into drm-misc-next</title>
<updated>2020-11-02T10:17:54+00:00</updated>
<author>
<name>Maxime Ripard</name>
<email>maxime@cerno.tech</email>
</author>
<published>2020-11-02T10:17:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c489573b5b6ce6442ad4658d9d5ec77839b91622'/>
<id>urn:sha1:c489573b5b6ce6442ad4658d9d5ec77839b91622</id>
<content type='text'>
Daniel needs -rc2 in drm-misc-next to merge some patches

Signed-off-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
</content>
</entry>
<entry>
<title>drm/shme-helpers: Fix dma_buf_mmap forwarding bug</title>
<updated>2020-10-28T11:27:41+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2020-10-27T21:49:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f49a51bfdc8ea717c97ccd4cc98b7e6daaa5553a'/>
<id>urn:sha1:f49a51bfdc8ea717c97ccd4cc98b7e6daaa5553a</id>
<content type='text'>
When we forward an mmap to the dma_buf exporter, they get to own
everything. Unfortunately drm_gem_mmap_obj() overwrote
vma-&gt;vm_private_data after the driver callback, wreaking the
exporter complete. This was noticed because vb2_common_vm_close blew
up on mali gpu with panfrost after commit 26d3ac3cb04d
("drm/shmem-helpers: Redirect mmap for imported dma-buf").

Unfortunately drm_gem_mmap_obj also acquires a surplus reference that
we need to drop in shmem helpers, which is a bit of a mislayer
situation. Maybe the entire dma_buf_mmap forwarding should be pulled
into core gem code.

Note that the only two other drivers which forward mmap in their own
code (etnaviv and exynos) get this somewhat right by overwriting the
gem mmap code. But they seem to still have the leak. This might be a
good excuse to move these drivers over to shmem helpers completely.

Reviewed-by: Boris Brezillon &lt;boris.brezillon@collabora.com&gt;
Acked-by: Christian König &lt;christian.koenig@amd.com&gt;
Cc: Christian König &lt;christian.koenig@amd.com&gt;
Cc: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
Cc: Lucas Stach &lt;l.stach@pengutronix.de&gt;
Cc: Russell King &lt;linux+etnaviv@armlinux.org.uk&gt;
Cc: Christian Gmeiner &lt;christian.gmeiner@gmail.com&gt;
Cc: Inki Dae &lt;inki.dae@samsung.com&gt;
Cc: Joonyoung Shim &lt;jy0922.shim@samsung.com&gt;
Cc: Seung-Woo Kim &lt;sw0312.kim@samsung.com&gt;
Cc: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
Fixes: 26d3ac3cb04d ("drm/shmem-helpers: Redirect mmap for imported dma-buf")
Cc: Boris Brezillon &lt;boris.brezillon@collabora.com&gt;
Cc: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Cc: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Cc: Rob Herring &lt;robh@kernel.org&gt;
Cc: dri-devel@lists.freedesktop.org
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Cc: &lt;stable@vger.kernel.org&gt; # v5.9+
Reported-and-tested-by: piotr.oniszczuk@gmail.com
Cc: piotr.oniszczuk@gmail.com
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20201027214922.3566743-1-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>drm: Remove obsolete GEM and PRIME callbacks from struct drm_driver</title>
<updated>2020-09-25T07:21:48+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2020-09-23T10:21:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d693def4fd1c23f1ca5aed1afb9993b3a2069ad2'/>
<id>urn:sha1:d693def4fd1c23f1ca5aed1afb9993b3a2069ad2</id>
<content type='text'>
Several GEM and PRIME callbacks have been deprecated in favor of
per-instance GEM object functions. Remove the callbacks as they are
now unused. The only exception is .gem_prime_mmap, which is still
in use by several drivers.

What is also gone is gem_vm_ops in struct drm_driver. All drivers now
use struct drm_gem_object_funcs.vm_ops instead.

While at it, the patch also improves error handling around calls
to .free and .get_sg_table callbacks.

v3:
	* restore default call to drm_gem_prime_export() in
	  drm_gem_prime_handle_to_fd()
	* return -ENOSYS if get_sg_table is not set
	* drop all checks for obj-&gt;funcs
	* clean up TODO list and documentation
v2:
	* update related TODO item (Sam)

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Acked-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Acked-by: Christian König &lt;christian.koenig@amd.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200923102159.24084-23-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>Merge tag 'drm-misc-fixes-2020-08-04' of git://anongit.freedesktop.org/drm/drm-misc into drm-next</title>
<updated>2020-08-11T02:00:30+00:00</updated>
<author>
<name>Dave Airlie</name>
<email>airlied@redhat.com</email>
</author>
<published>2020-08-11T01:59:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=15f9d8b8cf668f24c59322020d267500c48d7383'/>
<id>urn:sha1:15f9d8b8cf668f24c59322020d267500c48d7383</id>
<content type='text'>
 * backmerge from drm-fixes at v5.8-rc7
 * add orientation quirk for ASUS T103HAF
 * drm/omap: force runtime PM suspend on system suspend
 * drm/tidss: fix modeset init for DPI panels
 * re-added docs for drm_gem_flink_ioctl()
 * ttm: fix page-offset calculation within TTM

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

From: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200804125510.GA29670@linux-uq9g
</content>
</entry>
<entry>
<title>Merge tag 'v5.8' into drm-next</title>
<updated>2020-08-11T01:58:31+00:00</updated>
<author>
<name>Dave Airlie</name>
<email>airlied@redhat.com</email>
</author>
<published>2020-08-11T01:58:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c44264f9f729fd63bd6a81a6ac5cd6cd49af09e5'/>
<id>urn:sha1:c44264f9f729fd63bd6a81a6ac5cd6cd49af09e5</id>
<content type='text'>
I need to backmerge 5.8 as I've got a bunch of fixes sitting
on an rc7 base that I want to land.

Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm: re-add deleted doc for drm_gem_open_ioctl</title>
<updated>2020-07-31T09:17:24+00:00</updated>
<author>
<name>Steve Cohen</name>
<email>cohens@codeaurora.org</email>
</author>
<published>2020-07-29T05:35:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a9e10b169e65f0f7061233ebe843a4b4f488dbae'/>
<id>urn:sha1:a9e10b169e65f0f7061233ebe843a4b4f488dbae</id>
<content type='text'>
Add back the removed documentation for drm_gem_open_ioctl.
This patch is submitted in response to [1].

[1] https://lore.kernel.org/linux-arm-msm/20200728085244.GY6419@phenom.ffwll.local/

Signed-off-by: Steve Cohen &lt;cohens@codeaurora.org&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/1596000952-27621-1-git-send-email-cohens@codeaurora.org
</content>
</entry>
<entry>
<title>drm: hold gem reference until object is no longer accessed</title>
<updated>2020-07-27T20:05:51+00:00</updated>
<author>
<name>Steve Cohen</name>
<email>cohens@codeaurora.org</email>
</author>
<published>2020-07-20T22:30:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8490d6a7e0a0a6fab5c2d82d57a3937306660864'/>
<id>urn:sha1:8490d6a7e0a0a6fab5c2d82d57a3937306660864</id>
<content type='text'>
A use-after-free in drm_gem_open_ioctl can happen if the
GEM object handle is closed between the idr lookup and
retrieving the size from said object since a local reference
is not being held at that point. Hold the local reference
while the object can still be accessed to fix this and
plug the potential security hole.

Signed-off-by: Steve Cohen &lt;cohens@codeaurora.org&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/1595284250-31580-1-git-send-email-cohens@codeaurora.org
</content>
</entry>
</feed>
