summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vmwgfx/vmwgfx_gem.c
diff options
context:
space:
mode:
authorIan Forbes <ian.forbes@broadcom.com>2025-01-10 19:53:35 +0100
committerZack Rusin <zack.rusin@broadcom.com>2025-01-14 19:01:43 +0100
commitb7d40627813799870e72729c6fc979a8a40d9ba6 (patch)
treec94466cea6913ba25f203e62a81491fb2cda8c17 /drivers/gpu/drm/vmwgfx/vmwgfx_gem.c
parentdrm/vmwgfx: Remove busy_places (diff)
downloadlinux-b7d40627813799870e72729c6fc979a8a40d9ba6.tar.xz
linux-b7d40627813799870e72729c6fc979a8a40d9ba6.zip
drm/vmwgfx: Add new keep_resv BO param
Adds a new BO param that keeps the reservation locked after creation. This removes the need to re-reserve the BO after creation which is a waste of cycles. This also fixes a bug in vmw_prime_import_sg_table where the imported reservation is unlocked twice. Signed-off-by: Ian Forbes <ian.forbes@broadcom.com> Fixes: b32233acceff ("drm/vmwgfx: Fix prime import/export") Reviewed-by: Zack Rusin <zack.rusin@broadcom.com> Signed-off-by: Zack Rusin <zack.rusin@broadcom.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250110185335.15301-1-ian.forbes@broadcom.com
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_gem.c')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_gem.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_gem.c b/drivers/gpu/drm/vmwgfx/vmwgfx_gem.c
index b9857f37ca1a..ed5015ced392 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_gem.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_gem.c
@@ -206,6 +206,7 @@ struct drm_gem_object *vmw_prime_import_sg_table(struct drm_device *dev,
.bo_type = ttm_bo_type_sg,
.size = attach->dmabuf->size,
.pin = false,
+ .keep_resv = true,
.resv = attach->dmabuf->resv,
.sg = table,