<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/virtio/virtgpu_prime.c, branch v6.18.22</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.22</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.22'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-07-17T10:26:19+00:00</updated>
<entry>
<title>Revert "drm/virtio: Use dma_buf from GEM object instance"</title>
<updated>2025-07-17T10:26:19+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2025-07-15T15:58:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0ecfb8ddb953605cadd806de5b62e632c8e0e49e'/>
<id>urn:sha1:0ecfb8ddb953605cadd806de5b62e632c8e0e49e</id>
<content type='text'>
This reverts commit 415cb45895f43015515473fbc40563ca5eec9a7c.

The dma_buf field in struct drm_gem_object is not stable over the
object instance's lifetime. The field becomes NULL when user space
releases the final GEM handle on the buffer object. This resulted
in a NULL-pointer deref.

Workarounds in commit 5307dce878d4 ("drm/gem: Acquire references on
GEM handles for framebuffers") and commit f6bfc9afc751 ("drm/framebuffer:
Acquire internal references on GEM handles") only solved the problem
partially. They especially don't work for buffer objects without a DRM
framebuffer associated.

Hence, this revert to going back to using .import_attach-&gt;dmabuf.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Simona Vetter &lt;simona.vetter@ffwll.ch&gt;
Acked-by: Christian König &lt;christian.koenig@amd.com&gt;
Acked-by: Zack Rusin &lt;zack.rusin@broadcom.com&gt;
Link: https://lore.kernel.org/r/20250715155934.150656-3-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/virtio: Use dma_buf from GEM object instance</title>
<updated>2025-04-16T07:05:03+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2025-04-14T13:12:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=415cb45895f43015515473fbc40563ca5eec9a7c'/>
<id>urn:sha1:415cb45895f43015515473fbc40563ca5eec9a7c</id>
<content type='text'>
Avoid dereferencing struct drm_gem_object.import_attach for the
imported dma-buf. The dma_buf field in the GEM object instance refers
to the same buffer. Prepares to make import_attach optional.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt;
Signed-off-by: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt;
Link: https://lore.kernel.org/r/20250414131507.566072-3-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/virtio: Test for imported buffers with drm_gem_is_imported()</title>
<updated>2025-04-16T07:05:03+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2025-04-14T13:12:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=964f2a5c0e4f8fdf533bf8a287344a1aaadd0c92'/>
<id>urn:sha1:964f2a5c0e4f8fdf533bf8a287344a1aaadd0c92</id>
<content type='text'>
Instead of testing import_attach for imported GEM buffers, invoke
drm_gem_is_imported() to do the test. The helper tests the dma_buf
itself while import_attach is just an artifact of the import. Prepares
to make import_attach optional.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt;
Signed-off-by: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt;
Link: https://lore.kernel.org/r/20250414131507.566072-2-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>Merge tag 'drm-misc-next-2025-04-09' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next</title>
<updated>2025-04-14T05:29:49+00:00</updated>
<author>
<name>Dave Airlie</name>
<email>airlied@redhat.com</email>
</author>
<published>2025-04-14T05:29:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=683058df13c7de4cf29fb4a929d431ca12313966'/>
<id>urn:sha1:683058df13c7de4cf29fb4a929d431ca12313966</id>
<content type='text'>
drm-misc-next for v6.16-rc1:

UAPI Changes:
- Add ASAHI uapi header!
- Add apple fourcc modifiers.
- Add capset virtio definitions to UAPI.
- Extend EXPORT_SYNC_FILE for timeline syncobjs.

Cross-subsystem Changes:
- Adjust DMA-BUF sg handling to not cache map on attach.
- Update drm/ci, hlcdc, virtio, maintainers.
- Update fbdev todo.
- Allow setting dma-device for dma-buf import.
- Export efi_mem_desc_lookup to make efidrm build as a module.

Core Changes:
- Update drm scheduler docs.
- Use the correct resv object in TTM delayed destroy.
- Fix compiler warning with panic qr code, and other small fixes.
- drm/ci updates.
- Add debugfs file for listing all bridges.
- Small fixes to drm/client, ttm tests.
- Add documentation to display/hdmi.
- Add kunit tests for bridges.
- Dont fail managed device probing if connector polling fails.
- Create Kconfig.debug for drm core.
- Add tests for the drm scheduler.
- Add and use new access helpers for DPCPD.
- Add generic and optimized conversions for format-helper.
- Begin refcounting panel for improving lifetime handling.
- Unify simpledrm and ofdrm sysfb, and add extra features.
- Split hdmi audio in bridge to make DP audio work.

Driver Changes:
- Convert drivers to use devm_platform_ioremap_resource().
- Assorted small fixes to imx/legacy-bridg, gma500, pl111, nouveau, vc4,
  vmwgfx, ast, mxsfb, xlnx, accel/qaic, v3d, bridge/imx8qxp-ldb, ofdrm,
  bridge/fsl-ldb, udl, bridge/ti-sn65dsi86, bridge/anx7625, cirrus-qemu,
  bridge/cdns-dsi, panel/sharp, panel/himax, bridge/sil902x, renesas,
  imagination, various panels.
- Allow attaching more display to vkms.
- Add Powertip PH128800T004-ZZA01 panel.
- Add rotation quirk for ZOTAC panel.
- Convert bridge/tc358775 to atomic.
- Remove deprecated panel calls from synaptics, novatek, samsung panels.
- Refactor shmem helper page pinning and accel drivers using it.
- Add dmabuf support to accel/amdxdna.
- Use 4k page table format for panfrost/mediatek.
- Add common powerup/down dp link helper and use it.
- Assorted compiler warning fixes.
- Support dma-buf import for renesas

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

# Conflicts:
#	include/drm/drm_kunit_helpers.h
From: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Link: https://lore.kernel.org/r/e147ff95-697b-4067-9e2e-7cbd424e162a@linux.intel.com
</content>
</entry>
<entry>
<title>Merge drm/drm-fixes into drm-misc-fixes</title>
<updated>2025-04-08T08:15:47+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2025-04-08T08:15:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1260ed77798502de9c98020040d2995008de10cc'/>
<id>urn:sha1:1260ed77798502de9c98020040d2995008de10cc</id>
<content type='text'>
Backmerging to get updates from v6.15-rc1.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
</content>
</entry>
<entry>
<title>drm/virtio: Fix flickering issue seen with imported dmabufs</title>
<updated>2025-03-26T20:59:41+00:00</updated>
<author>
<name>Vivek Kasireddy</name>
<email>vivek.kasireddy@intel.com</email>
</author>
<published>2025-03-25T20:10:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3d50e61a17b642af060566acb0eabe3c0eb3ef1f'/>
<id>urn:sha1:3d50e61a17b642af060566acb0eabe3c0eb3ef1f</id>
<content type='text'>
We need to save the reservation object pointer associated with the
imported dmabuf in the newly created GEM object to allow
drm_gem_plane_helper_prepare_fb() to extract the exclusive fence
from it and attach it to the plane state during prepare phase.
This is needed to ensure that drm_atomic_helper_wait_for_fences()
correctly waits for the relevant fences (move, etc) associated with
the reservation object, thereby implementing proper synchronization.

Otherwise, artifacts or slight flickering can be seen when apps
are dragged across the screen when running Gnome (Wayland). This
problem is mostly seen with dGPUs in the case where the FBs are
allocated in VRAM but need to be migrated to System RAM as they
are shared with virtio-gpu.

Fixes: ca77f27a2665 ("drm/virtio: Import prime buffers from other devices as guest blobs")
Cc: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Cc: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt;
Cc: Gurchetan Singh &lt;gurchetansingh@chromium.org&gt;
Cc: Chia-I Wu &lt;olvaffe@gmail.com&gt;
Signed-off-by: Vivek Kasireddy &lt;vivek.kasireddy@intel.com&gt;
Reviewed-by: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt;
Signed-off-by: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt;
[dmitry.osipenko@collabora.com: Moved assignment before object_init()]
Link: https://patchwork.freedesktop.org/patch/msgid/20250325201021.1315080-1-vivek.kasireddy@intel.com

</content>
</entry>
<entry>
<title>dma-buf: drop caching of sg_tables</title>
<updated>2025-03-06T14:21:36+00:00</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2025-02-11T16:20:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b72f66f22c0e39ae6684c43fead774c13db24e73'/>
<id>urn:sha1:b72f66f22c0e39ae6684c43fead774c13db24e73</id>
<content type='text'>
That was purely for the transition from static to dynamic dma-buf
handling and can be removed again now.

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Simona Vetter &lt;simona.vetter@ffwll.ch&gt;
Reviewed-by: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20250211163109.12200-5-christian.koenig@amd.com
</content>
</entry>
<entry>
<title>drm/virtio: Fix UAF in virtgpu_dma_buf_free_obj()</title>
<updated>2025-01-19T12:12:28+00:00</updated>
<author>
<name>Vivek Kasireddy</name>
<email>vivek.kasireddy@intel.com</email>
</author>
<published>2024-12-12T05:54:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=db8b2c0e2abc90d1025fd7f6d4461b21b1d3248e'/>
<id>urn:sha1:db8b2c0e2abc90d1025fd7f6d4461b21b1d3248e</id>
<content type='text'>
Fix the following issues identified by Smatch static checker:
- The call to dma_buf_put(attach-&gt;dmabuf) after dma_buf_detach()
  leads to a UAF bug as dma_buf_detach() frees the attach object.
  Fix this by extracting the dmabuf object from attach and using
  that in the call to dma_buf_put().

- The resv object is extracted from attach before checking to see
  if attach is valid (that is !NULL) or not. Although, attach would
  very likely be valid, fix this by making sure that the resv object
  is used only after ensuring that attach is valid.

Fixes: 2885e575abc7 ("drm/virtio: Add helpers to initialize and free the imported object")
Fixes: ca77f27a2665 ("drm/virtio: Import prime buffers from other devices as guest blobs")
Cc: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Cc: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt;
Cc: Gurchetan Singh &lt;gurchetansingh@chromium.org&gt;
Cc: Chia-I Wu &lt;olvaffe@gmail.com&gt;
Reported-by: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Signed-off-by: Vivek Kasireddy &lt;vivek.kasireddy@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20241212055421.775759-1-vivek.kasireddy@intel.com
Reviewed-by: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt;
Tested-by: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt;
Signed-off-by: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt;
[dmitry.osipenko@collabora.com: Edited commit title]
</content>
</entry>
<entry>
<title>drm/virtio: Factor out common dmabuf unmapping code</title>
<updated>2025-01-09T13:53:24+00:00</updated>
<author>
<name>Dmitry Osipenko</name>
<email>dmitry.osipenko@collabora.com</email>
</author>
<published>2024-12-02T05:39:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2ef1c8c5de40316ba65051940e587157385e10c0'/>
<id>urn:sha1:2ef1c8c5de40316ba65051940e587157385e10c0</id>
<content type='text'>
Move out dmabuf detachment and unmapping into separate function. This
removes duplicated code and there is no need to check the GEM's kref now,
since both bo-&gt;attached and bo-&gt;sgt are unset under held reservation lock.

Signed-off-by: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt;
Acked-by: Vivek Kasireddy &lt;vivek.kasireddy@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20241202053955.2451321-1-dmitry.osipenko@collabora.com
</content>
</entry>
<entry>
<title>drm/virtio: Set missing bo-&gt;attached flag</title>
<updated>2025-01-09T13:53:19+00:00</updated>
<author>
<name>Dmitry Osipenko</name>
<email>dmitry.osipenko@collabora.com</email>
</author>
<published>2024-11-29T15:53:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ffda6454267d0b870f3a09945a7ce88137b914a6'/>
<id>urn:sha1:ffda6454267d0b870f3a09945a7ce88137b914a6</id>
<content type='text'>
VirtIO-GPU driver now supports detachment of shmem BOs from host, but
doing it only for imported dma-bufs. Mark all shmem BOs as attached, not
just dma-bufs. This is a minor correction since detachment of a non-dmabuf
BOs not supported today.

Signed-off-by: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt;
Acked-by: Vivek Kasireddy &lt;vivek.kasireddy@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20241129155357.2265357-1-dmitry.osipenko@collabora.com
</content>
</entry>
</feed>
