drm: cleanup on drm_mode_object_find
Subsystems (2)
PATCH 1/2 drm: cleanup on drm_mode_object_find
Redundant wrapper for drm_mode_object_find is removed.
Signed-off-by Ramalingam C <[email protected]>
--- drivers/gpu/drm/drm_crtc_internal.h | 6 ++--- drivers/gpu/drm/drm_framebuffer.c | 2 +- drivers/gpu/drm/drm_mode_object.c | 38 +++++++++++------------------ drivers/gpu/drm/drm_property.c | 6 ++--- 4 files changed, 21 insertions(+), 31 deletions(-)
drivers/gpu/drm/drm_crtc_internal.h +3 -3
@@ -144,9 +144,9 @@ int drm_mode_object_add(struct drm_device *dev, struct drm_mode_object *obj, uint32_t obj_type);void drm_mode_object_register (struct drm_device *dev,struct drm_mode_object *obj); -struct drm_mode_object *__drm_mode_object_find (struct drm_device *dev, -struct drm_file *file_priv, -uint32_t id,uint32_t type); +struct drm_mode_object *drm_mode_object_find (struct drm_device *dev, +struct drm_file *file_priv, +uint32_t id,uint32_t type);void drm_mode_object_unregister (struct drm_device *dev,struct drm_mode_object *object); int drm_mode_object_get_properties(struct drm_mode_object *obj, bool atomic,
drivers/gpu/drm/drm_framebuffer.c +1 -1
@@ -888,7 +888,7 @@ struct drm_framebuffer *drm_framebuffer_lookup(struct drm_device *dev,struct drm_mode_object *obj;struct drm_framebuffer *fb =NULL ; - obj =__drm_mode_object_find (dev, file_priv, id,DRM_MODE_OBJECT_FB ); + obj =drm_mode_object_find (dev, file_priv, id,DRM_MODE_OBJECT_FB );if (obj) fb =obj_to_fb (obj);return fb;
drivers/gpu/drm/drm_mode_object.c +14 -24
@@ -133,9 +133,20 @@ bool drm_mode_object_lease_required(uint32_t type) } } -struct drm_mode_object *__drm_mode_object_find (struct drm_device *dev, -struct drm_file *file_priv, -uint32_t id,uint32_t type) +/** +* drm_mode_object_find - look up a drm object with static lifetime +* @dev: drm device +* @file_priv: drm file +* @id: id of the mode object +* @type: type of the mode object +* +* This function is used to look up a modeset object. It will acquire a +* reference for reference counted objects. This reference must be dropped again +* by callind drm_mode_object_put(). +*/ +struct drm_mode_object *drm_mode_object_find (struct drm_device *dev, +struct drm_file *file_priv, +uint32_t id,uint32_t type) {struct drm_mode_object *obj =NULL ;
@@ -158,27 +169,6 @@ struct drm_mode_object *__drm_mode_object_find(struct drm_device *dev,return obj; } - -/** -* drm_mode_object_find - look up a drm object with static lifetime -* @dev: drm device -* @file_priv: drm file -* @id: id of the mode object -* @type: type of the mode object -* -* This function is used to look up a modeset object. It will acquire a -* reference for reference counted objects. This reference must be dropped again -* by callind drm_mode_object_put(). -*/ -struct drm_mode_object *drm_mode_object_find (struct drm_device *dev, -struct drm_file *file_priv, -uint32_t id,uint32_t type) -{ -struct drm_mode_object *obj =NULL ; - - obj =__drm_mode_object_find (dev, file_priv, id, type); -return obj; -}EXPORT_SYMBOL (drm_mode_object_find);/**
drivers/gpu/drm/drm_property.c +3 -3
@@ -656,7 +656,7 @@ struct drm_property_blob *drm_property_lookup_blob(struct drm_device *dev,struct drm_mode_object *obj;struct drm_property_blob *blob =NULL ; - obj =__drm_mode_object_find (dev,NULL , id,DRM_MODE_OBJECT_BLOB ); + obj =drm_mode_object_find (dev,NULL , id,DRM_MODE_OBJECT_BLOB );if (obj) blob =obj_to_blob (obj);return blob;
@@ -919,8 +919,8 @@ bool drm_property_change_valid_get(struct drm_property *property,if (value ==0 )return true; - *ref =__drm_mode_object_find (property->dev,NULL , value, - property->values[0 ]); + *ref =drm_mode_object_find (property->dev,NULL , value, + property->values[0 ]);return *ref !=NULL ; }
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 2/2 drm: Fix kdoc typo for drm_properties
Typo in the KDoc for the DRM_MODE_PROP_SIGNED_RANGE type of drm_properties is fixed.
Signed-off-by Ramalingam C <[email protected]>
--- include/drm/drm_property.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/drm/drm_property.h +1 -1
@@ -94,7 +94,7 @@ struct drm_property {* drm_property_create_range(). * * DRM_MODE_PROP_SIGNED_RANGE -* Range properties report their minimum and maximum admissible unsigned values. +* Range properties report their minimum and maximum admissible signed values. * The KMS core verifies that values set by application fit in that * range. The range is signed. Range properties are created using * drm_property_create_signed_range().
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel