mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 03:24:45 +01:00
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
This commit is contained in:
parent
211ecfaaef
commit
922f9dec5d
1 changed files with 4 additions and 0 deletions
|
|
@ -105,6 +105,7 @@ struct vmw_cmdbuf_context {
|
|||
* @handle: DMA address handle for the command buffer space if @using_mob is
|
||||
* false. Immutable.
|
||||
* @size: The size of the command buffer space. Immutable.
|
||||
* @id: Monotonically increasing ID of the last cmdbuf submitted.
|
||||
* @num_contexts: Number of contexts actually enabled.
|
||||
*/
|
||||
struct vmw_cmdbuf_man {
|
||||
|
|
@ -132,6 +133,7 @@ struct vmw_cmdbuf_man {
|
|||
bool has_pool;
|
||||
dma_addr_t handle;
|
||||
size_t size;
|
||||
u64 id;
|
||||
u32 num_contexts;
|
||||
};
|
||||
|
||||
|
|
@ -303,6 +305,8 @@ static int vmw_cmdbuf_header_submit(struct vmw_cmdbuf_header *header)
|
|||
struct vmw_cmdbuf_man *man = header->man;
|
||||
u32 val;
|
||||
|
||||
header->cb_header->id = man->id++;
|
||||
|
||||
val = upper_32_bits(header->handle);
|
||||
vmw_write(man->dev_priv, SVGA_REG_COMMAND_HIGH, val);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue