lkml.org 
[lkml]   [2017]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v4 01/14] drm/atomic: export drm_atomic_replace_property_blob
Date
While at it, add some words in the kernel-doc about the 'replaced' arg and
remove a faulty kernel-doc comment on the return value.

Also remove a redundant return statement.

Signed-off-by: Peter Rosin <peda@axentia.se>
---
drivers/gpu/drm/drm_atomic.c | 17 +++++++++--------
include/drm/drm_atomic.h | 4 ++++
2 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
index 09ca662..b7d9696 100644
--- a/drivers/gpu/drm/drm_atomic.c
+++ b/drivers/gpu/drm/drm_atomic.c
@@ -414,13 +414,15 @@ EXPORT_SYMBOL(drm_atomic_set_mode_prop_for_crtc);
* @new_blob: the new blob to replace with
* @replaced: whether the blob has been replaced
*
- * RETURNS:
- * Zero on success, error code on failure
+ * Note that you are required to initialize @replaced to false before the
+ * call, since it is only set to true when the blob property is changed and
+ * not set to false when the property is not changed. This enables a series
+ * of calls to be made where you are interested in if any property is
+ * replaced, but not care so much about exactly which of them was replaced.
*/
-static void
-drm_atomic_replace_property_blob(struct drm_property_blob **blob,
- struct drm_property_blob *new_blob,
- bool *replaced)
+void drm_atomic_replace_property_blob(struct drm_property_blob **blob,
+ struct drm_property_blob *new_blob,
+ bool *replaced)
{
struct drm_property_blob *old_blob = *blob;

@@ -432,9 +434,8 @@ drm_atomic_replace_property_blob(struct drm_property_blob **blob,
drm_property_blob_get(new_blob);
*blob = new_blob;
*replaced = true;
-
- return;
}
+EXPORT_SYMBOL(drm_atomic_replace_property_blob);

static int
drm_atomic_replace_property_blob_from_id(struct drm_device *dev,
diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h
index dcc8e0c..8b32ea5 100644
--- a/include/drm/drm_atomic.h
+++ b/include/drm/drm_atomic.h
@@ -321,6 +321,10 @@ int drm_atomic_connector_set_property(struct drm_connector *connector,
struct drm_connector_state *state, struct drm_property *property,
uint64_t val);

+void drm_atomic_replace_property_blob(struct drm_property_blob **blob,
+ struct drm_property_blob *new_blob,
+ bool *replaced);
+
void * __must_check
drm_atomic_get_private_obj_state(struct drm_atomic_state *state,
void *obj,
--
2.1.4
\
 
 \ /
  Last update: 2017-07-06 14:20    [W:0.158 / U:4.868 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site