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: Reserve fence slots on buffer objects in cotables

The buffer objects created by cotables were missing fence reservations.
They are created from vmw_validation_res_validate which makes them miss
the ttm_eu_reserve_buffers which is called from vmw_validation_bo_reserve.

Cotables are the only resources which create a buffer object in the
create callback so make sure the code also reserves the slots.

Signed-off-by: Zack Rusin <zackr@vmware.com>
Co-developed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Fixes: c8d4c18bfbc4 ("dma-buf/drivers: make reserving a shared slot mandatory v4")
Link: https://patchwork.freedesktop.org/patch/msgid/20220422161342.1142584-1-zack@kde.org

+4
+4
drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c
··· 478 478 vmw_bo_unreference(&old_buf); 479 479 res->id = vcotbl->type; 480 480 481 + ret = dma_resv_reserve_fences(bo->base.resv, 1); 482 + if (unlikely(ret)) 483 + goto out_wait; 484 + 481 485 /* Release the pin acquired in vmw_bo_init */ 482 486 ttm_bo_unpin(bo); 483 487