Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/vmwgfx: Set a unique ID for each submitted command buffer

These IDs are logged by the Hypervisor when debug logging is enabled.
Having the IDs in the log makes it much easier to see when command
buffers start and finish. They can also be used by logging/tracing
in the Guest to help correlate between Guest and Hypervisor logs.

Signed-off-by: Ian Forbes <ian.forbes@broadcom.com>
Signed-off-by: Zack Rusin <zack.rusin@broadcom.com>
Link: https://patch.msgid.link/20260109155139.3259493-1-ian.forbes@broadcom.com

authored by

Ian Forbes and committed by
Zack Rusin
922f9dec 211ecfaa

+4
+4
drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c
··· 105 105 * @handle: DMA address handle for the command buffer space if @using_mob is 106 106 * false. Immutable. 107 107 * @size: The size of the command buffer space. Immutable. 108 + * @id: Monotonically increasing ID of the last cmdbuf submitted. 108 109 * @num_contexts: Number of contexts actually enabled. 109 110 */ 110 111 struct vmw_cmdbuf_man { ··· 133 132 bool has_pool; 134 133 dma_addr_t handle; 135 134 size_t size; 135 + u64 id; 136 136 u32 num_contexts; 137 137 }; 138 138 ··· 304 302 { 305 303 struct vmw_cmdbuf_man *man = header->man; 306 304 u32 val; 305 + 306 + header->cb_header->id = man->id++; 307 307 308 308 val = upper_32_bits(header->handle); 309 309 vmw_write(man->dev_priv, SVGA_REG_COMMAND_HIGH, val);