All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: Chen-Yu Tsai <wens@csie.org>,
	Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, narmstrong@baylibre.com,
	thomas@vitsch.nl
Subject: [PATCH v4 02/13] drm/sun4i: backend: Document the engine operations
Date: Mon, 22 Jan 2018 10:25:16 +0100	[thread overview]
Message-ID: <fdcd8ec3ae9ecd73ef089ede5218d3a41b49be05.1516613040.git-series.maxime.ripard@free-electrons.com> (raw)
In-Reply-To: <cover.671c2fcad4ca649d65bd2b9982a8361befa8bfd1.1516613040.git-series.maxime.ripard@free-electrons.com>
In-Reply-To: <cover.671c2fcad4ca649d65bd2b9982a8361befa8bfd1.1516613040.git-series.maxime.ripard@free-electrons.com>

Our operations were missing some documentation to explain what was expected
from them.

Let's make that clearer.

Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 drivers/gpu/drm/sun4i/sunxi_engine.h | 46 +++++++++++++++++++++++++++++-
 1 file changed, 46 insertions(+)

diff --git a/drivers/gpu/drm/sun4i/sunxi_engine.h b/drivers/gpu/drm/sun4i/sunxi_engine.h
index 4cb70ae65c79..b374e074c7c3 100644
--- a/drivers/gpu/drm/sun4i/sunxi_engine.h
+++ b/drivers/gpu/drm/sun4i/sunxi_engine.h
@@ -15,12 +15,58 @@ struct drm_device;
 
 struct sunxi_engine;
 
+/**
+ * struct sunxi_engine_ops - helper operations for sunXi engines
+ *
+ * These hooks are used by the common part of the DRM driver to
+ * implement the proper behaviour.
+ */
 struct sunxi_engine_ops {
+	/**
+	 * @commit:
+	 *
+	 * This callback will trigger the hardware switch to commit
+	 * the new configuration that has been setup during the next
+	 * vblank period.
+	 *
+	 * This function is optional.
+	 */
 	void (*commit)(struct sunxi_engine *engine);
+
+	/**
+	 * @layers_init:
+	 *
+	 * This callback is used to allocate, initialize and register
+	 * the layers supported by that engine.
+	 *
+	 * This function is mandatory.
+	 *
+	 * RETURNS:
+	 *
+	 * The array of struct drm_plane backing the layers, or an
+	 * error pointer on failure.
+	 */
 	struct drm_plane **(*layers_init)(struct drm_device *drm,
 					  struct sunxi_engine *engine);
 
+	/**
+	 * @apply_color_correction:
+	 *
+	 * This callback will enable the color correction in the
+	 * engine. This is useful only for the composite output.
+	 *
+	 * This function is optional.
+	 */
 	void (*apply_color_correction)(struct sunxi_engine *engine);
+
+	/**
+	 * @disable_color_correction:
+	 *
+	 * This callback will stop the color correction in the
+	 * engine. This is useful only for the composite output.
+	 *
+	 * This function is optional.
+	 */
 	void (*disable_color_correction)(struct sunxi_engine *engine);
 };
 
-- 
git-series 0.9.1

WARNING: multiple messages have this Message-ID (diff)
From: maxime.ripard@free-electrons.com (Maxime Ripard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 02/13] drm/sun4i: backend: Document the engine operations
Date: Mon, 22 Jan 2018 10:25:16 +0100	[thread overview]
Message-ID: <fdcd8ec3ae9ecd73ef089ede5218d3a41b49be05.1516613040.git-series.maxime.ripard@free-electrons.com> (raw)
In-Reply-To: <cover.671c2fcad4ca649d65bd2b9982a8361befa8bfd1.1516613040.git-series.maxime.ripard@free-electrons.com>

Our operations were missing some documentation to explain what was expected
from them.

Let's make that clearer.

Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 drivers/gpu/drm/sun4i/sunxi_engine.h | 46 +++++++++++++++++++++++++++++-
 1 file changed, 46 insertions(+)

diff --git a/drivers/gpu/drm/sun4i/sunxi_engine.h b/drivers/gpu/drm/sun4i/sunxi_engine.h
index 4cb70ae65c79..b374e074c7c3 100644
--- a/drivers/gpu/drm/sun4i/sunxi_engine.h
+++ b/drivers/gpu/drm/sun4i/sunxi_engine.h
@@ -15,12 +15,58 @@ struct drm_device;
 
 struct sunxi_engine;
 
+/**
+ * struct sunxi_engine_ops - helper operations for sunXi engines
+ *
+ * These hooks are used by the common part of the DRM driver to
+ * implement the proper behaviour.
+ */
 struct sunxi_engine_ops {
+	/**
+	 * @commit:
+	 *
+	 * This callback will trigger the hardware switch to commit
+	 * the new configuration that has been setup during the next
+	 * vblank period.
+	 *
+	 * This function is optional.
+	 */
 	void (*commit)(struct sunxi_engine *engine);
+
+	/**
+	 * @layers_init:
+	 *
+	 * This callback is used to allocate, initialize and register
+	 * the layers supported by that engine.
+	 *
+	 * This function is mandatory.
+	 *
+	 * RETURNS:
+	 *
+	 * The array of struct drm_plane backing the layers, or an
+	 * error pointer on failure.
+	 */
 	struct drm_plane **(*layers_init)(struct drm_device *drm,
 					  struct sunxi_engine *engine);
 
+	/**
+	 * @apply_color_correction:
+	 *
+	 * This callback will enable the color correction in the
+	 * engine. This is useful only for the composite output.
+	 *
+	 * This function is optional.
+	 */
 	void (*apply_color_correction)(struct sunxi_engine *engine);
+
+	/**
+	 * @disable_color_correction:
+	 *
+	 * This callback will stop the color correction in the
+	 * engine. This is useful only for the composite output.
+	 *
+	 * This function is optional.
+	 */
 	void (*disable_color_correction)(struct sunxi_engine *engine);
 };
 
-- 
git-series 0.9.1

WARNING: multiple messages have this Message-ID (diff)
From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: Chen-Yu Tsai <wens@csie.org>,
	Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: linux-arm-kernel@lists.infradead.org, thomas@vitsch.nl,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	narmstrong@baylibre.com
Subject: [PATCH v4 02/13] drm/sun4i: backend: Document the engine operations
Date: Mon, 22 Jan 2018 10:25:16 +0100	[thread overview]
Message-ID: <fdcd8ec3ae9ecd73ef089ede5218d3a41b49be05.1516613040.git-series.maxime.ripard@free-electrons.com> (raw)
In-Reply-To: <cover.671c2fcad4ca649d65bd2b9982a8361befa8bfd1.1516613040.git-series.maxime.ripard@free-electrons.com>
In-Reply-To: <cover.671c2fcad4ca649d65bd2b9982a8361befa8bfd1.1516613040.git-series.maxime.ripard@free-electrons.com>

Our operations were missing some documentation to explain what was expected
from them.

Let's make that clearer.

Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 drivers/gpu/drm/sun4i/sunxi_engine.h | 46 +++++++++++++++++++++++++++++-
 1 file changed, 46 insertions(+)

diff --git a/drivers/gpu/drm/sun4i/sunxi_engine.h b/drivers/gpu/drm/sun4i/sunxi_engine.h
index 4cb70ae65c79..b374e074c7c3 100644
--- a/drivers/gpu/drm/sun4i/sunxi_engine.h
+++ b/drivers/gpu/drm/sun4i/sunxi_engine.h
@@ -15,12 +15,58 @@ struct drm_device;
 
 struct sunxi_engine;
 
+/**
+ * struct sunxi_engine_ops - helper operations for sunXi engines
+ *
+ * These hooks are used by the common part of the DRM driver to
+ * implement the proper behaviour.
+ */
 struct sunxi_engine_ops {
+	/**
+	 * @commit:
+	 *
+	 * This callback will trigger the hardware switch to commit
+	 * the new configuration that has been setup during the next
+	 * vblank period.
+	 *
+	 * This function is optional.
+	 */
 	void (*commit)(struct sunxi_engine *engine);
+
+	/**
+	 * @layers_init:
+	 *
+	 * This callback is used to allocate, initialize and register
+	 * the layers supported by that engine.
+	 *
+	 * This function is mandatory.
+	 *
+	 * RETURNS:
+	 *
+	 * The array of struct drm_plane backing the layers, or an
+	 * error pointer on failure.
+	 */
 	struct drm_plane **(*layers_init)(struct drm_device *drm,
 					  struct sunxi_engine *engine);
 
+	/**
+	 * @apply_color_correction:
+	 *
+	 * This callback will enable the color correction in the
+	 * engine. This is useful only for the composite output.
+	 *
+	 * This function is optional.
+	 */
 	void (*apply_color_correction)(struct sunxi_engine *engine);
+
+	/**
+	 * @disable_color_correction:
+	 *
+	 * This callback will stop the color correction in the
+	 * engine. This is useful only for the composite output.
+	 *
+	 * This function is optional.
+	 */
 	void (*disable_color_correction)(struct sunxi_engine *engine);
 };
 
-- 
git-series 0.9.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2018-01-22  9:33 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-22  9:25 [PATCH v4 00/13] drm/sun4i: Support the Display Engine frontend Maxime Ripard
2018-01-22  9:25 ` Maxime Ripard
2018-01-22  9:25 ` [PATCH v4 01/13] drm/sun4i: backend: Move line stride setup to buffer setup function Maxime Ripard
2018-01-22  9:25   ` Maxime Ripard
2018-01-22  9:25   ` Maxime Ripard
2018-01-22  9:25 ` Maxime Ripard [this message]
2018-01-22  9:25   ` [PATCH v4 02/13] drm/sun4i: backend: Document the engine operations Maxime Ripard
2018-01-22  9:25   ` Maxime Ripard
2018-01-22  9:25 ` [PATCH v4 03/13] drm/sun4i: backend: Allow a NULL plane pointer to retrieve the format Maxime Ripard
2018-01-22  9:25   ` Maxime Ripard
2018-01-22  9:25   ` Maxime Ripard
2018-01-22  9:25 ` [PATCH v4 04/13] drm/sun4i: backend: Add a custom plane state Maxime Ripard
2018-01-22  9:25   ` Maxime Ripard
2018-01-22  9:25   ` Maxime Ripard
2018-01-22  9:25 ` [PATCH v4 05/13] drm/sun4i: engine: Add a custom crtc atomic_check Maxime Ripard
2018-01-22  9:25   ` Maxime Ripard
2018-01-22  9:25   ` Maxime Ripard
2018-01-22  9:25 ` [PATCH v4 06/13] drm/sun4i: engine: Add a VBLANK quirk callback Maxime Ripard
2018-01-22  9:25   ` Maxime Ripard
2018-01-22  9:25   ` Maxime Ripard
2018-01-22  9:25 ` [PATCH v4 07/13] drm/sun4i: engine: Create an atomic_begin callback Maxime Ripard
2018-01-22  9:25   ` Maxime Ripard
2018-01-22  9:25 ` [PATCH v4 08/13] drm/sun4i: Add a driver for the display frontend Maxime Ripard
2018-01-22  9:25   ` Maxime Ripard
2018-01-22  9:25   ` Maxime Ripard
2018-01-22 13:28   ` Chen-Yu Tsai
2018-01-22 13:28     ` Chen-Yu Tsai
2018-01-22 13:28     ` Chen-Yu Tsai
2018-01-22  9:25 ` [PATCH v4 09/13] drm/sun4i: backend: Wire in the frontend Maxime Ripard
2018-01-22  9:25   ` Maxime Ripard
2018-01-22  9:25   ` Maxime Ripard
2018-01-22  9:25 ` [PATCH v4 10/13] drm/sun4i: backend: Add a custom atomic_check for " Maxime Ripard
2018-01-22  9:25   ` Maxime Ripard
2018-01-22  9:25   ` Maxime Ripard
2018-01-22  9:25 ` [PATCH v4 11/13] drm/sun4i: backend: Use runtime_pm variant of atomic_commit_tail Maxime Ripard
2018-01-22  9:25   ` Maxime Ripard
2018-01-22  9:25   ` Maxime Ripard
2018-01-22  9:25 ` [PATCH v4 12/13] drm/sun4i: backend: Make sure we don't have a commit pending Maxime Ripard
2018-01-22  9:25   ` Maxime Ripard
2018-01-22  9:25   ` Maxime Ripard
2018-01-22  9:25 ` [PATCH v4 13/13] ARM: dts: sun8i: a33 Enable our display frontend Maxime Ripard
2018-01-22  9:25   ` Maxime Ripard
2018-01-22  9:25   ` Maxime Ripard
2018-01-22 14:27 ` [PATCH v4 00/13] drm/sun4i: Support the Display Engine frontend Maxime Ripard
2018-01-22 14:27   ` Maxime Ripard

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=fdcd8ec3ae9ecd73ef089ede5218d3a41b49be05.1516613040.git-series.maxime.ripard@free-electrons.com \
    --to=maxime.ripard@free-electrons.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=narmstrong@baylibre.com \
    --cc=thomas@vitsch.nl \
    --cc=wens@csie.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 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.