summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
diff options
context:
space:
mode:
authorMaaz Mombasawala <maaz.mombasawala@broadcom.com>2024-01-26 21:08:01 +0100
committerZack Rusin <zack.rusin@broadcom.com>2024-01-30 20:18:18 +0100
commit9840d28f25143da23e0e7ecb1a3b8109987406ee (patch)
treea4ba1d8222edef91649278b9b675eac746909592 /drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
parentdrm/vmwgfx: Refactor drm connector probing for display modes (diff)
downloadlinux-9840d28f25143da23e0e7ecb1a3b8109987406ee.tar.xz
linux-9840d28f25143da23e0e7ecb1a3b8109987406ee.zip
drm/vmwgfx: Make all surfaces shareable
There is no real need to have a separate pool for shareable and non-shareable surfaces. Make all surfaces shareable, regardless of whether the drm_vmw_surface_flag_shareable has been specified. Signed-off-by: Maaz Mombasawala <maaz.mombasawala@broadcom.com> Reviewed-by: Martin Krastev <martin.krastev@broadcom.com> Signed-off-by: Zack Rusin <zack.rusin@broadcom.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240126200804.732454-3-zack.rusin@broadcom.com
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_surface.c')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_surface.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c b/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
index 10498725034c..e7a744dfcecf 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
@@ -832,8 +832,6 @@ int vmw_surface_define_ioctl(struct drm_device *dev, void *data,
srf->snooper.image = NULL;
}
- user_srf->prime.base.shareable = false;
- user_srf->prime.base.tfile = NULL;
if (drm_is_primary_client(file_priv))
user_srf->master = drm_file_get_master(file_priv);
@@ -847,10 +845,10 @@ int vmw_surface_define_ioctl(struct drm_device *dev, void *data,
goto out_unlock;
/*
- * A gb-aware client referencing a shared surface will
- * expect a backup buffer to be present.
+ * A gb-aware client referencing a surface will expect a backup
+ * buffer to be present.
*/
- if (dev_priv->has_mob && req->shareable) {
+ if (dev_priv->has_mob) {
struct vmw_bo_params params = {
.domain = VMW_BO_DOMAIN_SYS,
.busy_domain = VMW_BO_DOMAIN_SYS,
@@ -869,8 +867,9 @@ int vmw_surface_define_ioctl(struct drm_device *dev, void *data,
}
tmp = vmw_resource_reference(&srf->res);
- ret = ttm_prime_object_init(tfile, res->guest_memory_size, &user_srf->prime,
- req->shareable, VMW_RES_SURFACE,
+ ret = ttm_prime_object_init(tfile, res->guest_memory_size,
+ &user_srf->prime,
+ VMW_RES_SURFACE,
&vmw_user_surface_base_release);
if (unlikely(ret != 0)) {
@@ -1549,8 +1548,6 @@ vmw_gb_surface_define_internal(struct drm_device *dev,
tmp = vmw_resource_reference(res);
ret = ttm_prime_object_init(tfile, res->guest_memory_size, &user_srf->prime,
- req->base.drm_surface_flags &
- drm_vmw_surface_flag_shareable,
VMW_RES_SURFACE,
&vmw_user_surface_base_release);
@@ -2052,8 +2049,6 @@ int vmw_gb_surface_define(struct vmw_private *dev_priv,
}
*srf_out = &user_srf->srf;
- user_srf->prime.base.shareable = false;
- user_srf->prime.base.tfile = NULL;
srf = &user_srf->srf;
srf->metadata = *req;