All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm: cleanup on drm_mode_object_find
@ 2020-06-05 12:40 Ramalingam C
  2020-06-05 12:40 ` [PATCH 2/2] drm: Fix kdoc typo for drm_properties Ramalingam C
  0 siblings, 1 reply; 2+ messages in thread
From: Ramalingam C @ 2020-06-05 12:40 UTC (permalink / raw)
  To: dri-devel

Redundant wrapper for drm_mode_object_find is removed.

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
---
 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(-)

diff --git a/drivers/gpu/drm/drm_crtc_internal.h b/drivers/gpu/drm/drm_crtc_internal.h
index da96b2f64d7e..4bfde1367c1a 100644
--- a/drivers/gpu/drm/drm_crtc_internal.h
+++ b/drivers/gpu/drm/drm_crtc_internal.h
@@ -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,
diff --git a/drivers/gpu/drm/drm_framebuffer.c b/drivers/gpu/drm/drm_framebuffer.c
index 0375b3d7f8d0..023cea64e87d 100644
--- a/drivers/gpu/drm/drm_framebuffer.c
+++ b/drivers/gpu/drm/drm_framebuffer.c
@@ -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;
diff --git a/drivers/gpu/drm/drm_mode_object.c b/drivers/gpu/drm/drm_mode_object.c
index 901b078abf40..6c5e689d8b60 100644
--- a/drivers/gpu/drm/drm_mode_object.c
+++ b/drivers/gpu/drm/drm_mode_object.c
@@ -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);
 
 /**
diff --git a/drivers/gpu/drm/drm_property.c b/drivers/gpu/drm/drm_property.c
index 6ee04803c362..f1e338f909f1 100644
--- a/drivers/gpu/drm/drm_property.c
+++ b/drivers/gpu/drm/drm_property.c
@@ -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;
 	}
 
-- 
2.20.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH 2/2] drm: Fix kdoc typo for drm_properties
  2020-06-05 12:40 [PATCH 1/2] drm: cleanup on drm_mode_object_find Ramalingam C
@ 2020-06-05 12:40 ` Ramalingam C
  0 siblings, 0 replies; 2+ messages in thread
From: Ramalingam C @ 2020-06-05 12:40 UTC (permalink / raw)
  To: dri-devel

Typo in the KDoc for the DRM_MODE_PROP_SIGNED_RANGE type of
drm_properties is fixed.

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
---
 include/drm/drm_property.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/drm/drm_property.h b/include/drm/drm_property.h
index 4a0a80d658c7..5d1874b6ccfc 100644
--- a/include/drm/drm_property.h
+++ b/include/drm/drm_property.h
@@ -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().
-- 
2.20.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-06-05 12:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-05 12:40 [PATCH 1/2] drm: cleanup on drm_mode_object_find Ramalingam C
2020-06-05 12:40 ` [PATCH 2/2] drm: Fix kdoc typo for drm_properties Ramalingam C

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.