hc
2024-05-10 cde9070d9970eef1f7ec2360586c802a16230ad8
kernel/drivers/gpu/drm/vmwgfx/vmwgfx_simple_resource.c
....@@ -81,7 +81,7 @@
8181 return ret;
8282 }
8383
84
- vmw_resource_activate(&simple->res, simple->func->hw_destroy);
84
+ simple->res.hw_destroy = simple->func->hw_destroy;
8585
8686 return 0;
8787 }
....@@ -159,7 +159,8 @@
159159
160160 alloc_size = offsetof(struct vmw_user_simple_resource, simple) +
161161 func->size;
162
- account_size = ttm_round_pot(alloc_size) + VMW_IDA_ACC_SIZE;
162
+ account_size = ttm_round_pot(alloc_size) + VMW_IDA_ACC_SIZE +
163
+ TTM_OBJ_EXTRA_SIZE;
163164
164165 ret = ttm_read_lock(&dev_priv->reservation_sem, true);
165166 if (ret)
....@@ -208,7 +209,7 @@
208209 goto out_err;
209210 }
210211
211
- func->set_arg_handle(data, usimple->base.hash.key);
212
+ func->set_arg_handle(data, usimple->base.handle);
212213 out_err:
213214 vmw_resource_unreference(&res);
214215 out_ret:
....@@ -238,17 +239,17 @@
238239
239240 base = ttm_base_object_lookup(tfile, handle);
240241 if (!base) {
241
- DRM_ERROR("Invalid %s handle 0x%08lx.\n",
242
- func->res_func.type_name,
243
- (unsigned long) handle);
242
+ VMW_DEBUG_USER("Invalid %s handle 0x%08lx.\n",
243
+ func->res_func.type_name,
244
+ (unsigned long) handle);
244245 return ERR_PTR(-ESRCH);
245246 }
246247
247248 if (ttm_base_object_type(base) != func->ttm_res_type) {
248249 ttm_base_object_unref(&base);
249
- DRM_ERROR("Invalid type of %s handle 0x%08lx.\n",
250
- func->res_func.type_name,
251
- (unsigned long) handle);
250
+ VMW_DEBUG_USER("Invalid type of %s handle 0x%08lx.\n",
251
+ func->res_func.type_name,
252
+ (unsigned long) handle);
252253 return ERR_PTR(-EINVAL);
253254 }
254255