From: Sean Paul <seanpaul@chromium.org>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Daniel Vetter <daniel.vetter@intel.com>,
DRI Development <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 08/15] drm: Switch drm_plane_state to inline kerneldoc style
Date: Fri, 13 Jul 2018 11:08:01 -0400 [thread overview]
Message-ID: <20180713150801.GG20303@art_vandelay> (raw)
In-Reply-To: <20180709084016.23750-9-daniel.vetter@ffwll.ch>
On Mon, Jul 09, 2018 at 10:40:09AM +0200, Daniel Vetter wrote:
> For consistency and to encourage more detailed documentation. While
> doing this also beefed up a few of the comments, linking at least to
> the setup function. Plus fixed all the hyperlinks.
>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
> ---
> include/drm/drm_plane.h | 86 +++++++++++++++++++++++++++--------------
> 1 file changed, 56 insertions(+), 30 deletions(-)
>
> diff --git a/include/drm/drm_plane.h b/include/drm/drm_plane.h
> index cee9dfaaa740..1a647f8f5661 100644
> --- a/include/drm/drm_plane.h
> +++ b/include/drm/drm_plane.h
> @@ -34,31 +34,15 @@ struct drm_modeset_acquire_ctx;
>
> /**
> * struct drm_plane_state - mutable plane state
> - * @plane: backpointer to the plane
> - * @crtc_w: width of visible portion of plane on crtc
> - * @crtc_h: height of visible portion of plane on crtc
> - * @src_x: left position of visible portion of plane within
> - * plane (in 16.16)
> - * @src_y: upper position of visible portion of plane within
> - * plane (in 16.16)
> - * @src_w: width of visible portion of plane (in 16.16)
> - * @src_h: height of visible portion of plane (in 16.16)
> - * @alpha: opacity of the plane
> - * @rotation: rotation of the plane
> - * @zpos: priority of the given plane on crtc (optional)
> - * Note that multiple active planes on the same crtc can have an identical
> - * zpos value. The rule to solving the conflict is to compare the plane
> - * object IDs; the plane with a higher ID must be stacked on top of a
> - * plane with a lower ID.
> - * @normalized_zpos: normalized value of zpos: unique, range from 0 to N-1
> - * where N is the number of active planes for given crtc. Note that
> - * the driver must set drm_mode_config.normalize_zpos or call
> - * drm_atomic_normalize_zpos() to update this before it can be trusted.
> - * @src: clipped source coordinates of the plane (in 16.16)
> - * @dst: clipped destination coordinates of the plane
> - * @state: backpointer to global drm_atomic_state
> + *
> + * Please not that the destination coordinates @crtc_x, @crtc_y, @crtc_h and
> + * @crtc_w and the source coordinates @src_x, @src_y, @src_h and @src_w are the
> + * raw coordinates provided by userspace. Drivers should use
> + * drm_atomic_helper_check_plane_state() and only use the derived rectangles in
> + * @src and @dst to program the hardware.
> */
> struct drm_plane_state {
> + /** @plane: backpointer to the plane */
> struct drm_plane *plane;
>
> /**
> @@ -87,7 +71,7 @@ struct drm_plane_state {
> * preserved.
> *
> * Drivers should store any implicit fence in this from their
> - * &drm_plane_helper.prepare_fb callback. See drm_gem_fb_prepare_fb()
> + * &drm_plane_helper_funcs.prepare_fb callback. See drm_gem_fb_prepare_fb()
> * and drm_gem_fb_simple_display_pipe_prepare_fb() for suitable helpers.
> */
> struct dma_fence *fence;
> @@ -108,20 +92,60 @@ struct drm_plane_state {
> */
> int32_t crtc_y;
>
> + /** @crtc_w: width of visible portion of plane on crtc */
> + /** @crtc_h: height of visible portion of plane on crtc */
> uint32_t crtc_w, crtc_h;
>
> - /* Source values are 16.16 fixed point */
> - uint32_t src_x, src_y;
> + /**
> + * @src_x: left position of visible portion of plane within plane (in
> + * 16.16 fixed point).
> + */
> + uint32_t src_x;
> + /**
> + * @src_y: upper position of visible portion of plane within plane (in
> + * 16.16 fixed point).
> + */
> + uint32_t src_y;
> + /** @src_w: width of visible portion of plane (in 16.16) */
> + /** @src_h: height of visible portion of plane (in 16.16) */
> uint32_t src_h, src_w;
>
> - /* Plane opacity */
> + /**
> + * @alpha:
> + * Opacity of the plane with 0 as completely transparent and 0xffff as
> + * completely opaque. See drm_plane_create_alpha_property() for more
> + * details.
> + */
> u16 alpha;
>
> - /* Plane rotation */
> + /**
> + * @rotation:
> + * Rotation of the plane. See drm_plane_create_rotation_property() for
> + * more details.
> + */
> unsigned int rotation;
>
> - /* Plane zpos */
> + /**
> + * @zpos:
> + * Priority of the given plane on crtc (optional).
> + *
> + * Note that multiple active planes on the same crtc can have an
> + * identical zpos value. The rule to solving the conflict is to compare
> + * the plane object IDs; the plane with a higher ID must be stacked on
> + * top of a plane with a lower ID.
> + *
> + * See drm_plane_create_zpos_property() and
> + * drm_plane_create_zpos_immutable_property() for more details.
> + */
> unsigned int zpos;
> +
> + /**
> + * @normalized_zpos:
> + * Normalized value of zpos: unique, range from 0 to N-1 where N is the
> + * number of active planes for given crtc. Note that the driver must set
> + * &drm_mode_config.normalize_zpos or call drm_atomic_normalize_zpos() to
> + * update this before it can be trusted.
> + */
> unsigned int normalized_zpos;
>
> /**
> @@ -138,7 +162,8 @@ struct drm_plane_state {
> */
> enum drm_color_range color_range;
>
> - /* Clipped coordinates */
> + /** @src: clipped source coordinates of the plane (in 16.16) */
> + /** @dst: clipped destination coordinates of the plane */
> struct drm_rect src, dst;
>
> /**
> @@ -157,6 +182,7 @@ struct drm_plane_state {
> */
> struct drm_crtc_commit *commit;
>
> + /** @state: backpointer to global drm_atomic_state */
> struct drm_atomic_state *state;
> };
>
> --
> 2.18.0
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2018-07-13 15:08 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-09 8:40 [PATCH 00/15] bunch of kerneldocs polish and related cleanup Daniel Vetter
2018-07-09 8:40 ` [PATCH 01/15] drm: move drv test macros out of drmP.h Daniel Vetter
2018-07-12 13:52 ` Sean Paul
2018-07-09 8:40 ` [PATCH 02/15] drm: Drop drmP.h from drm_connector.c Daniel Vetter
2018-07-12 13:53 ` Sean Paul
2018-07-09 8:40 ` [PATCH 03/15] drm/doc: switch drm_connector_state to inline comments Daniel Vetter
2018-07-12 13:54 ` Sean Paul
2018-07-09 8:40 ` [PATCH 04/15] drm/doc: polish for sturct drm_connector Daniel Vetter
2018-07-12 14:01 ` Sean Paul
2018-07-09 8:40 ` [PATCH 05/15] drm: drop _mode_ from update_edit_property() Daniel Vetter
2018-07-13 14:59 ` Sean Paul
2018-07-13 16:05 ` Daniel Vetter
2018-07-09 8:40 ` [PATCH 06/15] drm: drop _mode_ from drm_mode_connector_attach_encoder Daniel Vetter
2018-07-13 15:01 ` Sean Paul
2018-07-09 8:40 ` [PATCH 07/15] drm: drop _mode_ from remaining connector functions Daniel Vetter
2018-07-13 15:05 ` Sean Paul
2018-07-09 8:40 ` [PATCH 08/15] drm: Switch drm_plane_state to inline kerneldoc style Daniel Vetter
2018-07-13 15:08 ` Sean Paul [this message]
2018-07-09 8:40 ` [PATCH 09/15] drm: switch drm_plane to inline comments Daniel Vetter
2018-07-13 15:20 ` Sean Paul
2018-07-09 8:40 ` [PATCH 10/15] drm: drop drmP.h include from drm_plane.c Daniel Vetter
2018-07-13 15:22 ` Sean Paul
2018-07-09 8:40 ` [PATCH 11/15] drm/doc: move struct drm_crtc to in-line comments Daniel Vetter
2018-07-13 15:27 ` Sean Paul
2018-07-09 8:40 ` [PATCH 12/15] drm/doc: Group the fb gem helpers better Daniel Vetter
2018-07-12 12:18 ` Noralf Trønnes
2018-07-09 8:40 ` [PATCH 13/15] drm/doc: Includ drm_of.c helpers Daniel Vetter
2018-07-13 15:28 ` Sean Paul
2018-07-09 8:40 ` [PATCH 14/15] drm/doc: use inline kerneldoc style for drm_crtc_state Daniel Vetter
2018-07-13 15:33 ` Sean Paul
2018-07-09 8:40 ` [PATCH 15/15] drm: drop drmP.h include from drm_crtc.c Daniel Vetter
2018-07-12 13:51 ` Sean Paul
2018-07-13 16:41 ` Daniel Vetter
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=20180713150801.GG20303@art_vandelay \
--to=seanpaul@chromium.org \
--cc=daniel.vetter@ffwll.ch \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.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