From: Eric Engestrom <eric.engestrom@imgtec.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Daniel Vetter <daniel.vetter@intel.com>,
Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
DRI Development <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 15/15] drm: Update kerneldoc for drm_crtc.[hc]
Date: Wed, 25 Jan 2017 14:26:09 +0000 [thread overview]
Message-ID: <20170125142609.4b5zcxusdhtlfjos@imgtec.com> (raw)
In-Reply-To: <20170125062657.19270-16-daniel.vetter@ffwll.ch>
On Wednesday, 2017-01-25 07:26:57 +0100, Daniel Vetter wrote:
> After going through all the trouble of splitting out parts from
> drm_crtc.[hc] and then properly documenting each I've entirely
> forgotten to show the same TLC for CRTCs themselves!
>
> Let's make amends asap.
>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
> Documentation/gpu/drm-kms.rst | 6 ++++++
> drivers/gpu/drm/drm_crtc.c | 21 +++++++++++++++++++++
> include/drm/drm_crtc.h | 25 +++++++++++++++++++------
> 3 files changed, 46 insertions(+), 6 deletions(-)
>
> diff --git a/Documentation/gpu/drm-kms.rst b/Documentation/gpu/drm-kms.rst
> index 35c41cf84a1b..979cee853bb1 100644
> --- a/Documentation/gpu/drm-kms.rst
> +++ b/Documentation/gpu/drm-kms.rst
> @@ -284,6 +284,12 @@ Atomic Mode Setting Function Reference
> CRTC Abstraction
> ================
>
> +.. kernel-doc:: drivers/gpu/drm/drm_crtc.c
> + :doc: overview
> +
> +CRTC Functions Reference
> +--------------------------------
> +
> .. kernel-doc:: include/drm/drm_crtc.h
> :internal:
>
> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> index 5f28e3a5a3e0..6915f897bd8e 100644
> --- a/drivers/gpu/drm/drm_crtc.c
> +++ b/drivers/gpu/drm/drm_crtc.c
> @@ -47,6 +47,27 @@
> #include "drm_internal.h"
>
> /**
> + * DOC: overview
> + *
> + * A CRTC represents the overall display pipeline. It receives pixel data from
> + * &drm_plane and blends them together. The &drm_display_mode is also attached
> + * to the CRTC, specifying display timings. On the output side the data is fed
> + * to one or more &drm_encoder, which are then each connected to one
> + * &drm_connector.
> + *
> + * To create a CRTC, a KMS drivers allocates and zeroes an instances of
> + * &struct drm_crtc (possibly as part of a larger structure) and registers it
> + * with a call to drm_crtc_init_with_planes().
> + *
> + * The CRTC is also the entry point for legacy modeset operations, see
> + * &drm_crtc_funcs.set_config, legacy plane operations, see
> + * &drm_crtc_funcs.page_flip and &drm_crtc_funcs.cursor_set2, and other legacy
> + * operations like &drm_crtc_funcs.gamma_set. For atomic drivers all these
> + * features are controlled through &drm_property and
> + * &drm_mode_config_funcs.atomic_check and &drm_mode_config_funcs.atomic_check.
> + */
> +
> +/**
> * drm_crtc_from_index - find the registered CRTC at an index
> * @dev: DRM device
> * @idx: index of registered CRTC to find for
> diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
> index 816edab054e6..d788c624f67a 100644
> --- a/include/drm/drm_crtc.h
> +++ b/include/drm/drm_crtc.h
> @@ -641,7 +641,7 @@ struct drm_crtc {
> *
> * This provides a read lock for the overall crtc state (mode, dpms
> * state, ...) and a write lock for everything which can be update
> - * without a full modeset (fb, cursor data, crtc properties ...). Full
> + * without a full modeset (fb, cursor data, crtc properties ...). A full
> * modeset also need to grab &drm_mode_config.connection_mutex.
> */
> struct drm_modeset_lock mutex;
> @@ -774,10 +774,8 @@ struct drm_crtc {
> * @connectors: array of connectors to drive with this CRTC if possible
> * @num_connectors: size of @connectors array
> *
> - * Represents a single crtc the connectors that it drives with what mode
> - * and from which framebuffer it scans out from.
> - *
> - * This is used to set modes.
> + * This represents a modeset configuration for the legacy SETCRTC ioctl and is
> + * also used internally. Atomic drivers instead use &drm_atomic_state.
> */
> struct drm_mode_set {
> struct drm_framebuffer *fb;
> @@ -832,7 +830,15 @@ int drm_crtc_force_disable_all(struct drm_device *dev);
> int drm_mode_set_config_internal(struct drm_mode_set *set);
> struct drm_crtc *drm_crtc_from_index(struct drm_device *dev, int idx);
>
> -/* Helpers */
> +/**
> + * drm_crtc_find - look up a CRTC object from its ID
> + * @dev: DRM device
> + * @id: &drm_mode_object ID
> + *
> + * This can be used to look up a CRTC from its userspace ID. Only used by
> + * drivers for legacy IOCTLs and interface, nowadays extensions to the KMS
> + * userspace interface should be done using &drm_property.
> + */
> static inline struct drm_crtc *drm_crtc_find(struct drm_device *dev,
> uint32_t id)
> {
> @@ -841,6 +847,13 @@ static inline struct drm_crtc *drm_crtc_find(struct drm_device *dev,
> return mo ? obj_to_crtc(mo) : NULL;
> }
>
> +/**
> + * drm_for_each_crtc - iterate over all encoders
s/encoder/crtc/ :)
Other than that, this and #3 (btw I know you didn't introduce any of the
typos in #3, but you can fix them :P) are:
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
> + * @crtc: a &struct drm_crtc as the loop cursor
> + * @dev: the &struct drm_device
> + *
> + * Iterate over all CRTCs of @dev.
> + */
> #define drm_for_each_crtc(crtc, dev) \
> list_for_each_entry(crtc, &(dev)->mode_config.crtc_list, head)
>
> --
> 2.11.0
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2017-01-25 14:26 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-25 6:26 [PATCH 00/15] More kerneldoc cleanup Daniel Vetter
2017-01-25 6:26 ` [PATCH 01/15] drm/kms-helpers: Use recommened kerneldoc for struct member refs Daniel Vetter
2017-01-25 12:48 ` [Intel-gfx] " Gustavo Padovan
2017-01-25 15:19 ` Daniel Vetter
2017-01-25 6:26 ` [PATCH 02/15] drm/bridge: " Daniel Vetter
2017-01-25 9:33 ` Archit Taneja
2017-01-25 12:40 ` Daniel Vetter
2017-01-25 6:26 ` [PATCH 03/15] drm/kms-core: " Daniel Vetter
2017-01-25 13:52 ` Eric Engestrom
2017-01-25 6:26 ` [PATCH 04/15] drm/gem|prime|mm: " Daniel Vetter
2017-01-25 12:51 ` Gustavo Padovan
2017-01-25 6:26 ` [PATCH 05/15] drm/core: " Daniel Vetter
2017-01-25 12:55 ` Gustavo Padovan
2017-01-25 15:23 ` Daniel Vetter
2017-01-25 6:26 ` [PATCH 06/15] drm/doc: Clarify connector overview Daniel Vetter
2017-01-25 12:57 ` [Intel-gfx] " Gustavo Padovan
2017-01-25 15:33 ` Daniel Vetter
2017-01-25 18:08 ` Gustavo Padovan
2017-01-25 6:26 ` [PATCH 07/15] drm/gma500: Nuke device_is_agp callback Daniel Vetter
2017-01-25 12:58 ` Gustavo Padovan
2017-01-26 0:11 ` Patrik Jakobsson
2017-01-25 6:26 ` [PATCH 08/15] drm/i810: drop " Daniel Vetter
2017-01-25 17:36 ` Alex Deucher
2017-01-25 6:26 ` [PATCH 09/15] drm/mga: remove " Daniel Vetter
2017-01-25 17:33 ` Alex Deucher
2017-01-25 6:26 ` [PATCH 10/15] drm: " Daniel Vetter
2017-01-25 17:34 ` Alex Deucher
2017-01-25 6:26 ` [PATCH 11/15] drm: Nuke ums vgaarb support Daniel Vetter
2017-01-25 17:40 ` Alex Deucher
2017-01-25 6:26 ` [PATCH 12/15] drm/moc: Mark legacy fields in drm_driver as such Daniel Vetter
2017-01-25 17:43 ` Alex Deucher
2017-01-25 6:26 ` [PATCH 13/15] drm/doc: Fix typos for early_unregister doc Daniel Vetter
2017-01-26 9:49 ` Daniel Vetter
2017-01-25 6:26 ` [PATCH 14/15] drm: s/drm_crtc_get_hv_timings/drm_mode_get_hv_timings/ Daniel Vetter
2017-01-25 17:31 ` Alex Deucher
2017-01-26 9:48 ` Daniel Vetter
2017-01-25 6:26 ` [PATCH 15/15] drm: Update kerneldoc for drm_crtc.[hc] Daniel Vetter
2017-01-25 14:26 ` Eric Engestrom [this message]
2017-01-25 15:36 ` 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=20170125142609.4b5zcxusdhtlfjos@imgtec.com \
--to=eric.engestrom@imgtec.com \
--cc=daniel.vetter@ffwll.ch \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@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