diff mbox series

drm: document drm_mode_modeinfo

Message ID BBtyuxgs3DvcrMtbRyb7KBEWUviGy1dtWO61eB4@cp3-web-016.plabs.ch (mailing list archive)
State New, archived
Headers show
Series drm: document drm_mode_modeinfo | expand

Commit Message

Simon Ser Nov. 20, 2020, 9:46 a.m. UTC
This allows `struct drm_mode_modeinfo` references to be linkified.

Some descriptions are borrowed from struct drm_display_mode.

Signed-off-by: Simon Ser <contact@emersion.fr>
Cc: Daniel Vetter <daniel@ffwll.ch>
---
 include/uapi/drm/drm_mode.h | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

Comments

Daniel Vetter Nov. 20, 2020, 10:09 a.m. UTC | #1
On Fri, Nov 20, 2020 at 10:46 AM Simon Ser <contact@emersion.fr> wrote:
>
> This allows `struct drm_mode_modeinfo` references to be linkified.
>
> Some descriptions are borrowed from struct drm_display_mode.
>
> Signed-off-by: Simon Ser <contact@emersion.fr>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> ---
>  include/uapi/drm/drm_mode.h | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
>
> diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
> index 3979389fcc4f..900b6f87d5c8 100644
> --- a/include/uapi/drm/drm_mode.h
> +++ b/include/uapi/drm/drm_mode.h
> @@ -218,6 +218,24 @@ extern "C" {
>  #define DRM_MODE_CONTENT_PROTECTION_DESIRED     1
>  #define DRM_MODE_CONTENT_PROTECTION_ENABLED     2
>
> +/**
> + * struct drm_mode_modeinfo - Display mode information.
> + * @clock: pixel clock in kHz
> + * @hdisplay: horizontal display size
> + * @hsync_start: horizontal sync start
> + * @hsync_end: horizontal sync end
> + * @htotal: horizontal total size
> + * @hskew: horizontal skew
> + * @vdisplay: vertical display size
> + * @vsync_start: vertical sync start
> + * @vsync_end: vertical sync end
> + * @vtotal: vertical total size
> + * @vscan: vertical scan
> + * @vrefresh: approximate vertical refresh rate in Hz
> + * @flags: bitmask of misc. flags, see DRM_MODE_FLAG_* defines
> + * @type: bitmask of type flags, see DRM_MODE_TYPE_* defines
> + * @name: string describing the mode resolution

Since if you look at this following random links it's not clear this
is the uapi version.

So maybe add something like "This is the userspace API display mode
information structure. For the kernel version seee struct
drm_display_mode". And a similar comment in reverse in the
kernel-internal struct.

With that added: Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

> + */
>  struct drm_mode_modeinfo {
>         __u32 clock;
>         __u16 hdisplay;
> --
> 2.29.2
>
>
diff mbox series

Patch

diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
index 3979389fcc4f..900b6f87d5c8 100644
--- a/include/uapi/drm/drm_mode.h
+++ b/include/uapi/drm/drm_mode.h
@@ -218,6 +218,24 @@  extern "C" {
 #define DRM_MODE_CONTENT_PROTECTION_DESIRED     1
 #define DRM_MODE_CONTENT_PROTECTION_ENABLED     2
 
+/**
+ * struct drm_mode_modeinfo - Display mode information.
+ * @clock: pixel clock in kHz
+ * @hdisplay: horizontal display size
+ * @hsync_start: horizontal sync start
+ * @hsync_end: horizontal sync end
+ * @htotal: horizontal total size
+ * @hskew: horizontal skew
+ * @vdisplay: vertical display size
+ * @vsync_start: vertical sync start
+ * @vsync_end: vertical sync end
+ * @vtotal: vertical total size
+ * @vscan: vertical scan
+ * @vrefresh: approximate vertical refresh rate in Hz
+ * @flags: bitmask of misc. flags, see DRM_MODE_FLAG_* defines
+ * @type: bitmask of type flags, see DRM_MODE_TYPE_* defines
+ * @name: string describing the mode resolution
+ */
 struct drm_mode_modeinfo {
 	__u32 clock;
 	__u16 hdisplay;