mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
drm: Introduce drm_gem_object_{get,put}()
For consistency with other reference counting APIs in the kernel, add drm_gem_object_get() and drm_gem_object_put(), as well as an unlocked variant of the latter, to reference count GEM buffer objects. Compatibility aliases are added to keep existing code working. To help speed up the transition, all the instances of the old functions in the DRM core are already replaced in this commit. The existing semantic patch for the DRM subsystem-wide conversion is extended to account for these new helpers. Reviewed-by: Sean Paul <[email protected]> Acked-by: Christian König <[email protected]> Signed-off-by: Thierry Reding <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
This commit is contained in:
parent
a4a69da06b
commit
e6b62714e8
7 changed files with 130 additions and 64 deletions
|
|
@ -32,6 +32,18 @@ expression object;
|
|||
|
|
||||
- drm_framebuffer_unreference(object)
|
||||
+ drm_framebuffer_put(object)
|
||||
|
|
||||
- drm_gem_object_reference(object)
|
||||
+ drm_gem_object_get(object)
|
||||
|
|
||||
- drm_gem_object_unreference(object)
|
||||
+ drm_gem_object_put(object)
|
||||
|
|
||||
- __drm_gem_object_unreference(object)
|
||||
+ __drm_gem_object_put(object)
|
||||
|
|
||||
- drm_gem_object_unreference_unlocked(object)
|
||||
+ drm_gem_object_put_unlocked(object)
|
||||
)
|
||||
|
||||
@r depends on report@
|
||||
|
|
@ -51,6 +63,14 @@ drm_connector_reference@p(object)
|
|||
drm_framebuffer_unreference@p(object)
|
||||
|
|
||||
drm_framebuffer_reference@p(object)
|
||||
|
|
||||
drm_gem_object_unreference@p(object)
|
||||
|
|
||||
drm_gem_object_reference@p(object)
|
||||
|
|
||||
__drm_gem_object_unreference(object)
|
||||
|
|
||||
drm_gem_object_unreference_unlocked(object)
|
||||
)
|
||||
|
||||
@script:python depends on report@
|
||||
|
|
|
|||
Loading…
Reference in a new issue