History

drm/virtio: Extend blob UAPI with deferred-mapping hinting

If userspace never maps GEM object, then BO wastes hostmem space because VirtIO-GPU driver maps VRAM BO at the BO's creating time. Make mappings on-demand by adding new RESOURCE_CREATE_BLOB IOCTL/UAPI hinting flag telling that host mapping should be deferred until first mapping is made when the flag is set by userspace.

Dmitry Osipenko committed 6 months ago

Commit 4c26e161 parent d989f134 files · +32 −5Browse files

Showing the changes to include/uapi (1 of 4 files). Show all

Unified · Split

include/uapi/drm/virtgpu_drm.h+4−0
@@ -200,6 +200,10 @@ struct drm_virtgpu_resource_create_blob { · 199 unmodified lines
200200 __u32 cmd_size;
201201 __u64 cmd;
202202 __u64 blob_id;
203+
204+#define DRM_VIRTGPU_BLOB_FLAG_HINT_DEFER_MAPPING 0x0001
205+ __u32 blob_hints;
206+ __u32 pad2;
203207 };
204208
205209 #define VIRTGPU_CONTEXT_PARAM_CAPSET_ID 0x0001