mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-23 08:55:56 -04:00
drm/vmwgfx: Update last_read_seqno under the fence lock
There was a possible race in vmw_update_seqno. Because of this race it was possible for last_read_seqno to go backwards. Remove this function and replace it with vmw_update_fences which now sets and returns the last_read_seqno while holding the fence lock. This serialization via the fence lock ensures that last_read_seqno is monotonic again. Signed-off-by: Ian Forbes <ian.forbes@broadcom.com> Signed-off-by: Zack Rusin <zack.rusin@broadcom.com> Link: https://lore.kernel.org/r/20250530183510.733175-1-ian.forbes@broadcom.com
This commit is contained in:
@@ -544,7 +544,7 @@ int vmw_cmd_send_fence(struct vmw_private *dev_priv, uint32_t *seqno)
|
||||
cmd_fence = (struct svga_fifo_cmd_fence *) fm;
|
||||
cmd_fence->fence = *seqno;
|
||||
vmw_cmd_commit_flush(dev_priv, bytes);
|
||||
vmw_update_seqno(dev_priv);
|
||||
vmw_fences_update(dev_priv->fman);
|
||||
|
||||
out_err:
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user