Commit a0f20845 authored by Christian König's avatar Christian König Committed by Alex Deucher

drm/amdgpu: nuke amdgpu_bo_list_free

The RCU grace period is harmless and avoiding it is not worth the effort
of doubling the implementation.
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarChunming  Zhou <david1.zhou@amd.com>
Reviewed-by: default avatarHuang Rui <ray.huang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 81c6dabc
...@@ -231,17 +231,6 @@ void amdgpu_bo_list_put(struct amdgpu_bo_list *list) ...@@ -231,17 +231,6 @@ void amdgpu_bo_list_put(struct amdgpu_bo_list *list)
kref_put(&list->refcount, amdgpu_bo_list_release_rcu); kref_put(&list->refcount, amdgpu_bo_list_release_rcu);
} }
void amdgpu_bo_list_free(struct amdgpu_bo_list *list)
{
unsigned i;
for (i = 0; i < list->num_entries; ++i)
amdgpu_bo_unref(&list->array[i].robj);
kvfree(list->array);
kfree(list);
}
int amdgpu_bo_create_list_entry_array(struct drm_amdgpu_bo_list_in *in, int amdgpu_bo_create_list_entry_array(struct drm_amdgpu_bo_list_in *in,
struct drm_amdgpu_bo_list_entry **info_param) struct drm_amdgpu_bo_list_entry **info_param)
{ {
...@@ -310,7 +299,7 @@ int amdgpu_bo_list_ioctl(struct drm_device *dev, void *data, ...@@ -310,7 +299,7 @@ int amdgpu_bo_list_ioctl(struct drm_device *dev, void *data,
r = idr_alloc(&fpriv->bo_list_handles, list, 1, 0, GFP_KERNEL); r = idr_alloc(&fpriv->bo_list_handles, list, 1, 0, GFP_KERNEL);
mutex_unlock(&fpriv->bo_list_lock); mutex_unlock(&fpriv->bo_list_lock);
if (r < 0) { if (r < 0) {
amdgpu_bo_list_free(list); amdgpu_bo_list_put(list);
return r; return r;
} }
......
...@@ -56,7 +56,6 @@ int amdgpu_bo_list_get(struct amdgpu_fpriv *fpriv, int id, ...@@ -56,7 +56,6 @@ int amdgpu_bo_list_get(struct amdgpu_fpriv *fpriv, int id,
void amdgpu_bo_list_get_list(struct amdgpu_bo_list *list, void amdgpu_bo_list_get_list(struct amdgpu_bo_list *list,
struct list_head *validated); struct list_head *validated);
void amdgpu_bo_list_put(struct amdgpu_bo_list *list); void amdgpu_bo_list_put(struct amdgpu_bo_list *list);
void amdgpu_bo_list_free(struct amdgpu_bo_list *list);
int amdgpu_bo_create_list_entry_array(struct drm_amdgpu_bo_list_in *in, int amdgpu_bo_create_list_entry_array(struct drm_amdgpu_bo_list_in *in,
struct drm_amdgpu_bo_list_entry **info_param); struct drm_amdgpu_bo_list_entry **info_param);
......
...@@ -967,7 +967,7 @@ void amdgpu_driver_postclose_kms(struct drm_device *dev, ...@@ -967,7 +967,7 @@ void amdgpu_driver_postclose_kms(struct drm_device *dev,
amdgpu_bo_unref(&pd); amdgpu_bo_unref(&pd);
idr_for_each_entry(&fpriv->bo_list_handles, list, handle) idr_for_each_entry(&fpriv->bo_list_handles, list, handle)
amdgpu_bo_list_free(list); amdgpu_bo_list_put(list);
idr_destroy(&fpriv->bo_list_handles); idr_destroy(&fpriv->bo_list_handles);
mutex_destroy(&fpriv->bo_list_lock); mutex_destroy(&fpriv->bo_list_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment