summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_property.c
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2017-02-28 15:46:38 +0100
committerThierry Reding <treding@nvidia.com>2017-02-28 16:14:55 +0100
commit020a218f95bd3ceff7dd1022ff7ebc0497bc7bf9 (patch)
tree343a200b9e4373a380dad7d00dd26fb90a8338e1 /drivers/gpu/drm/drm_property.c
parent2135ea7aafa26b6bfbbd304459fdb624e82e021e (diff)
downloadop-kernel-dev-020a218f95bd3ceff7dd1022ff7ebc0497bc7bf9.zip
op-kernel-dev-020a218f95bd3ceff7dd1022ff7ebc0497bc7bf9.tar.gz
drm: Introduce drm_mode_object_{get,put}()
For consistency with other reference counting APIs in the kernel, add drm_mode_object_get() and drm_mode_object_put() to reference count DRM mode 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. A semantic patch is provided that can be used to convert all drivers to the new helpers. Reviewed-by: Sean Paul <seanpaul@chromium.org> Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Thierry Reding <treding@nvidia.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170228144643.5668-3-thierry.reding@gmail.com
Diffstat (limited to 'drivers/gpu/drm/drm_property.c')
-rw-r--r--drivers/gpu/drm/drm_property.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/drm_property.c b/drivers/gpu/drm/drm_property.c
index 411e470..15af0d4 100644
--- a/drivers/gpu/drm/drm_property.c
+++ b/drivers/gpu/drm/drm_property.c
@@ -597,7 +597,7 @@ void drm_property_unreference_blob(struct drm_property_blob *blob)
if (!blob)
return;
- drm_mode_object_unreference(&blob->base);
+ drm_mode_object_put(&blob->base);
}
EXPORT_SYMBOL(drm_property_unreference_blob);
@@ -625,7 +625,7 @@ void drm_property_destroy_user_blobs(struct drm_device *dev,
*/
struct drm_property_blob *drm_property_reference_blob(struct drm_property_blob *blob)
{
- drm_mode_object_reference(&blob->base);
+ drm_mode_object_get(&blob->base);
return blob;
}
EXPORT_SYMBOL(drm_property_reference_blob);
@@ -906,7 +906,7 @@ void drm_property_change_valid_put(struct drm_property *property,
return;
if (drm_property_type_is(property, DRM_MODE_PROP_OBJECT)) {
- drm_mode_object_unreference(ref);
+ drm_mode_object_put(ref);
} else if (drm_property_type_is(property, DRM_MODE_PROP_BLOB))
drm_property_unreference_blob(obj_to_blob(ref));
}
OpenPOWER on IntegriCloud