Spelling out _unlocked for each and every driver is a annoying.
Especially if we consider how many drivers, do not know (or need to)
about the horror stories involving struct_mutex.
Just drop the suffix. It makes the API cleaner.
Done via the following script:
__from=drm_gem_object_put_unlocked
__to=drm_gem_object_put
for __file in $(git grep --name-only $__from); do
sed -i "s/$__from/$__to/g" $__file;
done
Cc: Eric Anholt <eric@anholt.net>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-34-emil.l.velikov@gmail.com
bo->madv = VC4_MADV_WILLNEED;
ret = drm_gem_handle_create(file_priv, &bo->base.base, &args->handle);
- drm_gem_object_put_unlocked(&bo->base.base);
+ drm_gem_object_put(&bo->base.base);
return ret;
}
bo->madv = VC4_MADV_WILLNEED;
ret = drm_gem_handle_create(file_priv, &bo->base.base, &args->handle);
- drm_gem_object_put_unlocked(&bo->base.base);
+ drm_gem_object_put(&bo->base.base);
return ret;
}
/* The mmap offset was set up at BO allocation time. */
args->offset = drm_vma_node_offset_addr(&gem_obj->vma_node);
- drm_gem_object_put_unlocked(gem_obj);
+ drm_gem_object_put(gem_obj);
return 0;
}
ret = drm_gem_handle_create(file_priv, &bo->base.base, &args->handle);
fail:
- drm_gem_object_put_unlocked(&bo->base.base);
+ drm_gem_object_put(&bo->base.base);
return ret;
}
bo = to_vc4_bo(gem_obj);
bo->t_format = t_format;
- drm_gem_object_put_unlocked(gem_obj);
+ drm_gem_object_put(gem_obj);
return 0;
}
else
args->modifier = DRM_FORMAT_MOD_NONE;
- drm_gem_object_put_unlocked(gem_obj);
+ drm_gem_object_put(gem_obj);
return 0;
}
ret = -ENOMEM;
mutex_unlock(&vc4->bo_lock);
- drm_gem_object_put_unlocked(gem_obj);
+ drm_gem_object_put(gem_obj);
return ret;
}
unsigned int i;
for (i = 0; i < state->user_state.bo_count; i++)
- drm_gem_object_put_unlocked(state->bo[i]);
+ drm_gem_object_put(state->bo[i]);
kfree(state);
}
fail_put_bo:
/* Release any reference to acquired objects. */
for (i = 0; i < exec->bo_count && exec->bo[i]; i++)
- drm_gem_object_put_unlocked(&exec->bo[i]->base);
+ drm_gem_object_put(&exec->bo[i]->base);
fail:
kvfree(handles);
struct vc4_bo *bo = to_vc4_bo(&exec->bo[i]->base);
vc4_bo_dec_usecnt(bo);
- drm_gem_object_put_unlocked(&exec->bo[i]->base);
+ drm_gem_object_put(&exec->bo[i]->base);
}
kvfree(exec->bo);
}
struct vc4_bo *bo = list_first_entry(&exec->unref_list,
struct vc4_bo, unref_head);
list_del(&bo->unref_head);
- drm_gem_object_put_unlocked(&bo->base.base);
+ drm_gem_object_put(&bo->base.base);
}
/* Free up the allocation of any bin slots we used. */
ret = vc4_wait_for_seqno_ioctl_helper(dev, bo->seqno,
&args->timeout_ns);
- drm_gem_object_put_unlocked(gem_obj);
+ drm_gem_object_put(gem_obj);
return ret;
}
* the overflow allocation registers. Now free the object.
*/
if (vc4->bin_bo) {
- drm_gem_object_put_unlocked(&vc4->bin_bo->base.base);
+ drm_gem_object_put(&vc4->bin_bo->base.base);
vc4->bin_bo = NULL;
}
ret = 0;
out_put_gem:
- drm_gem_object_put_unlocked(gem_obj);
+ drm_gem_object_put(gem_obj);
return ret;
}
mode_cmd_local.modifier[0] = DRM_FORMAT_MOD_NONE;
}
- drm_gem_object_put_unlocked(gem_obj);
+ drm_gem_object_put(gem_obj);
mode_cmd = &mode_cmd_local;
}
struct vc4_bo, unref_head);
list_del(&bo->unref_head);
- drm_gem_object_put_unlocked(&bo->base.base);
+ drm_gem_object_put(&bo->base.base);
}
return ret;
if (WARN_ON_ONCE(!vc4->bin_bo))
return;
- drm_gem_object_put_unlocked(&vc4->bin_bo->base.base);
+ drm_gem_object_put(&vc4->bin_bo->base.base);
vc4->bin_bo = NULL;
}