summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/virtio/virtgpu_prime.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2025-07-24 06:49:38 +1000
committerDave Airlie <airlied@redhat.com>2025-07-24 06:49:38 +1000
commit337666c522b9eca36deabf4133f7b2279155b69f (patch)
treeb4be802c43cb70fa53a3d455aec90b76c616ab0f /drivers/gpu/drm/virtio/virtgpu_prime.c
parent89be9a83ccf1f88522317ce02f854f30d6115c41 (diff)
parent15a7ca747d9538c2ad8b0c81dd4c1261e0736c82 (diff)
Merge tag 'drm-misc-fixes-2025-07-23' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes
drm-misc-fixes for v6.16-rc8/final?: - Revert all uses of drm_gem_object->dmabuf to drm_gem_object->import_attach->dmabuf. - Fix amdgpu returning BIOS cluttered VRAM after resume. - Scheduler hang fix. - Revert nouveau ioctl fix as it caused regressions. - Fix null pointer deref in nouveau. - Fix unnecessary semicolon in ti_sn_bridge_probe. Signed-off-by: Dave Airlie <airlied@redhat.com> From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Link: https://lore.kernel.org/r/72235afd-c849-49fe-9cc1-2b1781abdf08@linux.intel.com
Diffstat (limited to 'drivers/gpu/drm/virtio/virtgpu_prime.c')
-rw-r--r--drivers/gpu/drm/virtio/virtgpu_prime.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/virtio/virtgpu_prime.c b/drivers/gpu/drm/virtio/virtgpu_prime.c
index 1118a0250279..ce49282198cb 100644
--- a/drivers/gpu/drm/virtio/virtgpu_prime.c
+++ b/drivers/gpu/drm/virtio/virtgpu_prime.c
@@ -204,15 +204,16 @@ static void virtgpu_dma_buf_free_obj(struct drm_gem_object *obj)
{
struct virtio_gpu_object *bo = gem_to_virtio_gpu_obj(obj);
struct virtio_gpu_device *vgdev = obj->dev->dev_private;
+ struct dma_buf_attachment *attach = obj->import_attach;
if (drm_gem_is_imported(obj)) {
- struct dma_buf *dmabuf = obj->dma_buf;
+ struct dma_buf *dmabuf = attach->dmabuf;
dma_resv_lock(dmabuf->resv, NULL);
virtgpu_dma_buf_unmap(bo);
dma_resv_unlock(dmabuf->resv);
- dma_buf_detach(dmabuf, obj->import_attach);
+ dma_buf_detach(dmabuf, attach);
dma_buf_put(dmabuf);
}