Commit 0e0dc448 authored by Simon Ser's avatar Simon Ser

drm/doc: demote old doc-comments in drm.h

Sphinx doesn't like old doc-comments in drm.h and generates warnings
like:

    ./include/uapi/drm/drm.h:87: warning: cannot understand function prototype: 'struct drm_clip_rect '
    ./include/uapi/drm/drm.h:97: warning: cannot understand function prototype: 'struct drm_drawable_info '
    ./include/uapi/drm/drm.h:105: warning: cannot understand function prototype: 'struct drm_tex_region '
    ...

Demote these to regular comments, because converting all of them is
quite a lot of work (also requires documenting all of the struct fields
for instance). Also many of these structures aren't really used by
modern user-space.

We can easily convert these remaining old comments to Sphinx style on a
one-by-one basis.
Signed-off-by: default avatarSimon Ser <contact@emersion.fr>
Acked-by: default avatarDaniel Vetter <daniel@ffwll.ch>
Cc: Pekka Paalanen <ppaalanen@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201222133524.160842-5-contact@emersion.fr
parent 877c39ac
...@@ -84,7 +84,7 @@ typedef unsigned int drm_context_t; ...@@ -84,7 +84,7 @@ typedef unsigned int drm_context_t;
typedef unsigned int drm_drawable_t; typedef unsigned int drm_drawable_t;
typedef unsigned int drm_magic_t; typedef unsigned int drm_magic_t;
/** /*
* Cliprect. * Cliprect.
* *
* \warning: If you change this structure, make sure you change * \warning: If you change this structure, make sure you change
...@@ -100,7 +100,7 @@ struct drm_clip_rect { ...@@ -100,7 +100,7 @@ struct drm_clip_rect {
unsigned short y2; unsigned short y2;
}; };
/** /*
* Drawable information. * Drawable information.
*/ */
struct drm_drawable_info { struct drm_drawable_info {
...@@ -108,7 +108,7 @@ struct drm_drawable_info { ...@@ -108,7 +108,7 @@ struct drm_drawable_info {
struct drm_clip_rect *rects; struct drm_clip_rect *rects;
}; };
/** /*
* Texture region, * Texture region,
*/ */
struct drm_tex_region { struct drm_tex_region {
...@@ -119,7 +119,7 @@ struct drm_tex_region { ...@@ -119,7 +119,7 @@ struct drm_tex_region {
unsigned int age; unsigned int age;
}; };
/** /*
* Hardware lock. * Hardware lock.
* *
* The lock structure is a simple cache-line aligned integer. To avoid * The lock structure is a simple cache-line aligned integer. To avoid
...@@ -131,7 +131,7 @@ struct drm_hw_lock { ...@@ -131,7 +131,7 @@ struct drm_hw_lock {
char padding[60]; /**< Pad to cache line */ char padding[60]; /**< Pad to cache line */
}; };
/** /*
* DRM_IOCTL_VERSION ioctl argument type. * DRM_IOCTL_VERSION ioctl argument type.
* *
* \sa drmGetVersion(). * \sa drmGetVersion().
...@@ -148,7 +148,7 @@ struct drm_version { ...@@ -148,7 +148,7 @@ struct drm_version {
char __user *desc; /**< User-space buffer to hold desc */ char __user *desc; /**< User-space buffer to hold desc */
}; };
/** /*
* DRM_IOCTL_GET_UNIQUE ioctl argument type. * DRM_IOCTL_GET_UNIQUE ioctl argument type.
* *
* \sa drmGetBusid() and drmSetBusId(). * \sa drmGetBusid() and drmSetBusId().
...@@ -167,7 +167,7 @@ struct drm_block { ...@@ -167,7 +167,7 @@ struct drm_block {
int unused; int unused;
}; };
/** /*
* DRM_IOCTL_CONTROL ioctl argument type. * DRM_IOCTL_CONTROL ioctl argument type.
* *
* \sa drmCtlInstHandler() and drmCtlUninstHandler(). * \sa drmCtlInstHandler() and drmCtlUninstHandler().
...@@ -182,7 +182,7 @@ struct drm_control { ...@@ -182,7 +182,7 @@ struct drm_control {
int irq; int irq;
}; };
/** /*
* Type of memory to map. * Type of memory to map.
*/ */
enum drm_map_type { enum drm_map_type {
...@@ -194,7 +194,7 @@ enum drm_map_type { ...@@ -194,7 +194,7 @@ enum drm_map_type {
_DRM_CONSISTENT = 5 /**< Consistent memory for PCI DMA */ _DRM_CONSISTENT = 5 /**< Consistent memory for PCI DMA */
}; };
/** /*
* Memory mapping flags. * Memory mapping flags.
*/ */
enum drm_map_flags { enum drm_map_flags {
...@@ -213,7 +213,7 @@ struct drm_ctx_priv_map { ...@@ -213,7 +213,7 @@ struct drm_ctx_priv_map {
void *handle; /**< Handle of map */ void *handle; /**< Handle of map */
}; };
/** /*
* DRM_IOCTL_GET_MAP, DRM_IOCTL_ADD_MAP and DRM_IOCTL_RM_MAP ioctls * DRM_IOCTL_GET_MAP, DRM_IOCTL_ADD_MAP and DRM_IOCTL_RM_MAP ioctls
* argument type. * argument type.
* *
...@@ -230,7 +230,7 @@ struct drm_map { ...@@ -230,7 +230,7 @@ struct drm_map {
/* Private data */ /* Private data */
}; };
/** /*
* DRM_IOCTL_GET_CLIENT ioctl argument type. * DRM_IOCTL_GET_CLIENT ioctl argument type.
*/ */
struct drm_client { struct drm_client {
...@@ -262,7 +262,7 @@ enum drm_stat_type { ...@@ -262,7 +262,7 @@ enum drm_stat_type {
/* Add to the *END* of the list */ /* Add to the *END* of the list */
}; };
/** /*
* DRM_IOCTL_GET_STATS ioctl argument type. * DRM_IOCTL_GET_STATS ioctl argument type.
*/ */
struct drm_stats { struct drm_stats {
...@@ -273,7 +273,7 @@ struct drm_stats { ...@@ -273,7 +273,7 @@ struct drm_stats {
} data[15]; } data[15];
}; };
/** /*
* Hardware locking flags. * Hardware locking flags.
*/ */
enum drm_lock_flags { enum drm_lock_flags {
...@@ -288,7 +288,7 @@ enum drm_lock_flags { ...@@ -288,7 +288,7 @@ enum drm_lock_flags {
_DRM_HALT_CUR_QUEUES = 0x20 /**< Halt all current queues */ _DRM_HALT_CUR_QUEUES = 0x20 /**< Halt all current queues */
}; };
/** /*
* DRM_IOCTL_LOCK, DRM_IOCTL_UNLOCK and DRM_IOCTL_FINISH ioctl argument type. * DRM_IOCTL_LOCK, DRM_IOCTL_UNLOCK and DRM_IOCTL_FINISH ioctl argument type.
* *
* \sa drmGetLock() and drmUnlock(). * \sa drmGetLock() and drmUnlock().
...@@ -298,7 +298,7 @@ struct drm_lock { ...@@ -298,7 +298,7 @@ struct drm_lock {
enum drm_lock_flags flags; enum drm_lock_flags flags;
}; };
/** /*
* DMA flags * DMA flags
* *
* \warning * \warning
...@@ -327,7 +327,7 @@ enum drm_dma_flags { ...@@ -327,7 +327,7 @@ enum drm_dma_flags {
_DRM_DMA_LARGER_OK = 0x40 /**< Larger-than-requested buffers OK */ _DRM_DMA_LARGER_OK = 0x40 /**< Larger-than-requested buffers OK */
}; };
/** /*
* DRM_IOCTL_ADD_BUFS and DRM_IOCTL_MARK_BUFS ioctl argument type. * DRM_IOCTL_ADD_BUFS and DRM_IOCTL_MARK_BUFS ioctl argument type.
* *
* \sa drmAddBufs(). * \sa drmAddBufs().
...@@ -350,7 +350,7 @@ struct drm_buf_desc { ...@@ -350,7 +350,7 @@ struct drm_buf_desc {
*/ */
}; };
/** /*
* DRM_IOCTL_INFO_BUFS ioctl argument type. * DRM_IOCTL_INFO_BUFS ioctl argument type.
*/ */
struct drm_buf_info { struct drm_buf_info {
...@@ -358,7 +358,7 @@ struct drm_buf_info { ...@@ -358,7 +358,7 @@ struct drm_buf_info {
struct drm_buf_desc __user *list; struct drm_buf_desc __user *list;
}; };
/** /*
* DRM_IOCTL_FREE_BUFS ioctl argument type. * DRM_IOCTL_FREE_BUFS ioctl argument type.
*/ */
struct drm_buf_free { struct drm_buf_free {
...@@ -366,7 +366,7 @@ struct drm_buf_free { ...@@ -366,7 +366,7 @@ struct drm_buf_free {
int __user *list; int __user *list;
}; };
/** /*
* Buffer information * Buffer information
* *
* \sa drm_buf_map. * \sa drm_buf_map.
...@@ -378,7 +378,7 @@ struct drm_buf_pub { ...@@ -378,7 +378,7 @@ struct drm_buf_pub {
void __user *address; /**< Address of buffer */ void __user *address; /**< Address of buffer */
}; };
/** /*
* DRM_IOCTL_MAP_BUFS ioctl argument type. * DRM_IOCTL_MAP_BUFS ioctl argument type.
*/ */
struct drm_buf_map { struct drm_buf_map {
...@@ -391,7 +391,7 @@ struct drm_buf_map { ...@@ -391,7 +391,7 @@ struct drm_buf_map {
struct drm_buf_pub __user *list; /**< Buffer information */ struct drm_buf_pub __user *list; /**< Buffer information */
}; };
/** /*
* DRM_IOCTL_DMA ioctl argument type. * DRM_IOCTL_DMA ioctl argument type.
* *
* Indices here refer to the offset into the buffer list in drm_buf_get. * Indices here refer to the offset into the buffer list in drm_buf_get.
...@@ -416,7 +416,7 @@ enum drm_ctx_flags { ...@@ -416,7 +416,7 @@ enum drm_ctx_flags {
_DRM_CONTEXT_2DONLY = 0x02 _DRM_CONTEXT_2DONLY = 0x02
}; };
/** /*
* DRM_IOCTL_ADD_CTX ioctl argument type. * DRM_IOCTL_ADD_CTX ioctl argument type.
* *
* \sa drmCreateContext() and drmDestroyContext(). * \sa drmCreateContext() and drmDestroyContext().
...@@ -426,7 +426,7 @@ struct drm_ctx { ...@@ -426,7 +426,7 @@ struct drm_ctx {
enum drm_ctx_flags flags; enum drm_ctx_flags flags;
}; };
/** /*
* DRM_IOCTL_RES_CTX ioctl argument type. * DRM_IOCTL_RES_CTX ioctl argument type.
*/ */
struct drm_ctx_res { struct drm_ctx_res {
...@@ -434,14 +434,14 @@ struct drm_ctx_res { ...@@ -434,14 +434,14 @@ struct drm_ctx_res {
struct drm_ctx __user *contexts; struct drm_ctx __user *contexts;
}; };
/** /*
* DRM_IOCTL_ADD_DRAW and DRM_IOCTL_RM_DRAW ioctl argument type. * DRM_IOCTL_ADD_DRAW and DRM_IOCTL_RM_DRAW ioctl argument type.
*/ */
struct drm_draw { struct drm_draw {
drm_drawable_t handle; drm_drawable_t handle;
}; };
/** /*
* DRM_IOCTL_UPDATE_DRAW ioctl argument type. * DRM_IOCTL_UPDATE_DRAW ioctl argument type.
*/ */
typedef enum { typedef enum {
...@@ -455,14 +455,14 @@ struct drm_update_draw { ...@@ -455,14 +455,14 @@ struct drm_update_draw {
unsigned long long data; unsigned long long data;
}; };
/** /*
* DRM_IOCTL_GET_MAGIC and DRM_IOCTL_AUTH_MAGIC ioctl argument type. * DRM_IOCTL_GET_MAGIC and DRM_IOCTL_AUTH_MAGIC ioctl argument type.
*/ */
struct drm_auth { struct drm_auth {
drm_magic_t magic; drm_magic_t magic;
}; };
/** /*
* DRM_IOCTL_IRQ_BUSID ioctl argument type. * DRM_IOCTL_IRQ_BUSID ioctl argument type.
* *
* \sa drmGetInterruptFromBusID(). * \sa drmGetInterruptFromBusID().
...@@ -504,7 +504,7 @@ struct drm_wait_vblank_reply { ...@@ -504,7 +504,7 @@ struct drm_wait_vblank_reply {
long tval_usec; long tval_usec;
}; };
/** /*
* DRM_IOCTL_WAIT_VBLANK ioctl argument type. * DRM_IOCTL_WAIT_VBLANK ioctl argument type.
* *
* \sa drmWaitVBlank(). * \sa drmWaitVBlank().
...@@ -517,7 +517,7 @@ union drm_wait_vblank { ...@@ -517,7 +517,7 @@ union drm_wait_vblank {
#define _DRM_PRE_MODESET 1 #define _DRM_PRE_MODESET 1
#define _DRM_POST_MODESET 2 #define _DRM_POST_MODESET 2
/** /*
* DRM_IOCTL_MODESET_CTL ioctl argument type * DRM_IOCTL_MODESET_CTL ioctl argument type
* *
* \sa drmModesetCtl(). * \sa drmModesetCtl().
...@@ -527,7 +527,7 @@ struct drm_modeset_ctl { ...@@ -527,7 +527,7 @@ struct drm_modeset_ctl {
__u32 cmd; __u32 cmd;
}; };
/** /*
* DRM_IOCTL_AGP_ENABLE ioctl argument type. * DRM_IOCTL_AGP_ENABLE ioctl argument type.
* *
* \sa drmAgpEnable(). * \sa drmAgpEnable().
...@@ -536,7 +536,7 @@ struct drm_agp_mode { ...@@ -536,7 +536,7 @@ struct drm_agp_mode {
unsigned long mode; /**< AGP mode */ unsigned long mode; /**< AGP mode */
}; };
/** /*
* DRM_IOCTL_AGP_ALLOC and DRM_IOCTL_AGP_FREE ioctls argument type. * DRM_IOCTL_AGP_ALLOC and DRM_IOCTL_AGP_FREE ioctls argument type.
* *
* \sa drmAgpAlloc() and drmAgpFree(). * \sa drmAgpAlloc() and drmAgpFree().
...@@ -548,7 +548,7 @@ struct drm_agp_buffer { ...@@ -548,7 +548,7 @@ struct drm_agp_buffer {
unsigned long physical; /**< Physical used by i810 */ unsigned long physical; /**< Physical used by i810 */
}; };
/** /*
* DRM_IOCTL_AGP_BIND and DRM_IOCTL_AGP_UNBIND ioctls argument type. * DRM_IOCTL_AGP_BIND and DRM_IOCTL_AGP_UNBIND ioctls argument type.
* *
* \sa drmAgpBind() and drmAgpUnbind(). * \sa drmAgpBind() and drmAgpUnbind().
...@@ -558,7 +558,7 @@ struct drm_agp_binding { ...@@ -558,7 +558,7 @@ struct drm_agp_binding {
unsigned long offset; /**< In bytes -- will round to page boundary */ unsigned long offset; /**< In bytes -- will round to page boundary */
}; };
/** /*
* DRM_IOCTL_AGP_INFO ioctl argument type. * DRM_IOCTL_AGP_INFO ioctl argument type.
* *
* \sa drmAgpVersionMajor(), drmAgpVersionMinor(), drmAgpGetMode(), * \sa drmAgpVersionMajor(), drmAgpVersionMinor(), drmAgpGetMode(),
...@@ -579,7 +579,7 @@ struct drm_agp_info { ...@@ -579,7 +579,7 @@ struct drm_agp_info {
unsigned short id_device; unsigned short id_device;
}; };
/** /*
* DRM_IOCTL_SG_ALLOC ioctl argument type. * DRM_IOCTL_SG_ALLOC ioctl argument type.
*/ */
struct drm_scatter_gather { struct drm_scatter_gather {
...@@ -587,7 +587,7 @@ struct drm_scatter_gather { ...@@ -587,7 +587,7 @@ struct drm_scatter_gather {
unsigned long handle; /**< Used for mapping / unmapping */ unsigned long handle; /**< Used for mapping / unmapping */
}; };
/** /*
* DRM_IOCTL_SET_VERSION ioctl argument type. * DRM_IOCTL_SET_VERSION ioctl argument type.
*/ */
struct drm_set_version { struct drm_set_version {
...@@ -597,14 +597,14 @@ struct drm_set_version { ...@@ -597,14 +597,14 @@ struct drm_set_version {
int drm_dd_minor; int drm_dd_minor;
}; };
/** DRM_IOCTL_GEM_CLOSE ioctl argument type */ /* DRM_IOCTL_GEM_CLOSE ioctl argument type */
struct drm_gem_close { struct drm_gem_close {
/** Handle of the object to be closed. */ /** Handle of the object to be closed. */
__u32 handle; __u32 handle;
__u32 pad; __u32 pad;
}; };
/** DRM_IOCTL_GEM_FLINK ioctl argument type */ /* DRM_IOCTL_GEM_FLINK ioctl argument type */
struct drm_gem_flink { struct drm_gem_flink {
/** Handle for the object being named */ /** Handle for the object being named */
__u32 handle; __u32 handle;
...@@ -613,7 +613,7 @@ struct drm_gem_flink { ...@@ -613,7 +613,7 @@ struct drm_gem_flink {
__u32 name; __u32 name;
}; };
/** DRM_IOCTL_GEM_OPEN ioctl argument type */ /* DRM_IOCTL_GEM_OPEN ioctl argument type */
struct drm_gem_open { struct drm_gem_open {
/** Name of object being opened */ /** Name of object being opened */
__u32 name; __u32 name;
...@@ -651,7 +651,7 @@ struct drm_gem_open { ...@@ -651,7 +651,7 @@ struct drm_gem_open {
#define DRM_CAP_SYNCOBJ 0x13 #define DRM_CAP_SYNCOBJ 0x13
#define DRM_CAP_SYNCOBJ_TIMELINE 0x14 #define DRM_CAP_SYNCOBJ_TIMELINE 0x14
/** DRM_IOCTL_GET_CAP ioctl argument type */ /* DRM_IOCTL_GET_CAP ioctl argument type */
struct drm_get_cap { struct drm_get_cap {
__u64 capability; __u64 capability;
__u64 value; __u64 value;
...@@ -699,7 +699,7 @@ struct drm_get_cap { ...@@ -699,7 +699,7 @@ struct drm_get_cap {
*/ */
#define DRM_CLIENT_CAP_WRITEBACK_CONNECTORS 5 #define DRM_CLIENT_CAP_WRITEBACK_CONNECTORS 5
/** DRM_IOCTL_SET_CLIENT_CAP ioctl argument type */ /* DRM_IOCTL_SET_CLIENT_CAP ioctl argument type */
struct drm_set_client_cap { struct drm_set_client_cap {
__u64 capability; __u64 capability;
__u64 value; __u64 value;
...@@ -951,7 +951,7 @@ extern "C" { ...@@ -951,7 +951,7 @@ extern "C" {
#define DRM_IOCTL_MODE_GETFB2 DRM_IOWR(0xCE, struct drm_mode_fb_cmd2) #define DRM_IOCTL_MODE_GETFB2 DRM_IOWR(0xCE, struct drm_mode_fb_cmd2)
/** /*
* Device specific ioctls should only be in their respective headers * Device specific ioctls should only be in their respective headers
* The device specific ioctl range is from 0x40 to 0x9f. * The device specific ioctl range is from 0x40 to 0x9f.
* Generic IOCTLS restart at 0xA0. * Generic IOCTLS restart at 0xA0.
...@@ -962,7 +962,7 @@ extern "C" { ...@@ -962,7 +962,7 @@ extern "C" {
#define DRM_COMMAND_BASE 0x40 #define DRM_COMMAND_BASE 0x40
#define DRM_COMMAND_END 0xA0 #define DRM_COMMAND_END 0xA0
/** /*
* Header for events written back to userspace on the drm fd. The * Header for events written back to userspace on the drm fd. The
* type defines the type of event, the length specifies the total * type defines the type of event, the length specifies the total
* length of the event (including the header), and user_data is * length of the event (including the header), and user_data is
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment