mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Rosin <peda@axentia.se>
To: linux-kernel@vger.kernel.org
Cc: Peter Rosin <peda@axentia.se>,
	Daniel Vetter <daniel.vetter@intel.com>,
	Jani Nikula <jani.nikula@linux.intel.com>,
	Sean Paul <seanpaul@chromium.org>,
	David Airlie <airlied@linux.ie>,
	dri-devel@lists.freedesktop.org,
	Boris Brezillon <boris.brezillon@free-electrons.com>
Subject: [PATCH v4 01/14] drm/atomic: export drm_atomic_replace_property_blob
Date: Thu,  6 Jul 2017 14:20:35 +0200	[thread overview]
Message-ID: <1499343648-29695-2-git-send-email-peda@axentia.se> (raw)
In-Reply-To: <1499343648-29695-1-git-send-email-peda@axentia.se>

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

  reply	other threads:[~2017-07-06 12:19 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-06 12:20 [PATCH v4 00/14] improve the fb_setcmap helper Peter Rosin
2017-07-06 12:20 ` Peter Rosin [this message]
2017-07-11  8:01   ` [PATCH v4 01/14] drm/atomic: export drm_atomic_replace_property_blob Daniel Vetter
2017-07-11 12:06     ` Peter Rosin
2017-07-06 12:20 ` [PATCH v4 02/14] drm/atomic-helper: update lut props directly in ..._legacy_gamma_set Peter Rosin
2017-07-11  8:02   ` Daniel Vetter
2017-07-11 13:08     ` Peter Rosin
2017-07-06 12:20 ` [PATCH v4 03/14] drm/fb-helper: separate the fb_setcmap helper into atomic and legacy paths Peter Rosin
2017-07-11  8:10   ` Daniel Vetter
2017-07-11 12:12     ` Peter Rosin
2017-07-12  7:03       ` Daniel Vetter
2017-07-12  7:47         ` Peter Rosin
2017-07-13 12:42           ` Daniel Vetter
2017-07-06 12:20 ` [PATCH v4 04/14] drm: amd: remove dead code and pointless local lut storage Peter Rosin
2017-07-06 12:20 ` [PATCH v4 05/14] drm: armada: remove dead empty functions Peter Rosin
2017-07-06 12:20 ` [PATCH v4 06/14] drm: ast: remove dead code and pointless local lut storage Peter Rosin
2017-07-06 12:20 ` [PATCH v4 07/14] drm: cirrus: " Peter Rosin
2017-07-06 12:20 ` [PATCH v4 08/14] drm: gma500: " Peter Rosin
2017-07-06 12:20 ` [PATCH v4 09/14] drm: i915: " Peter Rosin
2017-07-06 12:20 ` [PATCH v4 10/14] drm: mgag200: " Peter Rosin
2017-07-06 12:20 ` [PATCH v4 11/14] drm: nouveau: " Peter Rosin
2017-07-06 12:20 ` [PATCH v4 12/14] drm: radeon: " Peter Rosin
2017-07-06 12:20 ` [PATCH v4 13/14] drm: stm: " Peter Rosin
2017-07-06 12:20 ` [PATCH v4 14/14] drm: remove unused and redundant callbacks Peter Rosin
2017-07-11  8:13   ` Daniel Vetter
2017-07-11 12:13     ` Peter Rosin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1499343648-29695-2-git-send-email-peda@axentia.se \
    --to=peda@axentia.se \
    --cc=airlied@linux.ie \
    --cc=boris.brezillon@free-electrons.com \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=seanpaul@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®