Skip to contentSkip to conversation

drm/virtio: set non-cross device blob uuid_state

PATCH Applied David Stevens 2 participants 2 messages Aug 11, 2021 – Aug 12, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/virtio: set non-cross device blob uuid_state

Blob resources without the cross device flag don't have a uuid to share with other virtio devices. When exporting such blobs, set uuid_state to STATE_ERR so that virtgpu_virtio_get_uuid doesn't hang.

---
 drivers/gpu/drm/virtio/virtgpu_prime.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/virtio/virtgpu_prime.c +2 -0
index 807a27a16365..e45dbf14b307 100644
@@ -98,6 +98,8 @@ struct dma_buf *virtgpu_gem_prime_export(struct drm_gem_object *obj,
 		} else {
 			bo->uuid_state = STATE_ERR;
 		}
+	} else if (!(bo->blob_flags & VIRTGPU_BLOB_FLAG_USE_CROSS_DEVICE)) {
+		bo->uuid_state = STATE_ERR;
 	}
 
 	exp_info.ops = &virtgpu_dmabuf_ops.ops;
Signature · 1 line
2.32.0.605.g8dce9f2422-goog
maintainer Applied
#1 lore raw
Quoted 5 lines · David Stevens

Blob resources without the cross device flag don't have a uuid to share with other virtio devices. When exporting such blobs, set uuid_state to STATE_ERR so that virtgpu_virtio_get_uuid doesn't hang.

Pushed to drm-misc-next.

thanks,
Gerd