Skip to content

Commit c7feff2

Browse files
rddunlapzackr
authored andcommitted
drm/vmwgfx: fix kernel-doc warnings in vmwgfx_drv.h
Fix 45+ kernel-doc warnings in vmwgfx_drv.h: - spell a struct name correctly - don't have structs between kernel-doc and its struct - end description of struct members with ':' - start all kernel-doc lines with " *" - mark private struct member and enum value with "private:" - add kernel-doc for enum vmw_dma_map_mode - add missing struct member comments - add missing function parameter comments - convert "/**" to "/*" for non-kernel-doc comments - add missing "Returns:" comments for several functions - correct a function parameter name to eliminate kernel-doc warnings (examples): Warning: drivers/gpu/drm/vmwgfx/vmwgfx_drv.h:128 struct vmw_bo; error: Cannot parse struct or union! Warning: drivers/gpu/drm/vmwgfx/vmwgfx_drv.h:151 struct member 'used_prio' not described in 'vmw_resource' Warning: drivers/gpu/drm/vmwgfx/vmwgfx_drv.h:151 struct member 'mob_node' not described in 'vmw_resource' Warning: drivers/gpu/drm/vmwgfx/vmwgfx_drv.h:199 bad line: SM4 device. Warning: drivers/gpu/drm/vmwgfx/vmwgfx_drv.h:270 struct member 'private' not described in 'vmw_res_cache_entry' Warning: drivers/gpu/drm/vmwgfx/vmwgfx_drv.h:280 Enum value 'vmw_dma_alloc_coherent' not described in enum 'vmw_dma_map_mode' Warning: drivers/gpu/drm/vmwgfx/vmwgfx_drv.h:280 Enum value 'vmw_dma_map_bind' not described in enum 'vmw_dma_map_mode' Warning: drivers/gpu/drm/vmwgfx/vmwgfx_drv.h:295 struct member 'addrs' not described in 'vmw_sg_table' Warning: drivers/gpu/drm/vmwgfx/vmwgfx_drv.h:295 struct member 'mode' not described in 'vmw_sg_table' vmwgfx_drv.h:309: warning: Excess struct member 'num_regions' description in 'vmw_sg_table' Warning: drivers/gpu/drm/vmwgfx/vmwgfx_drv.h:402 struct member 'filp' not described in 'vmw_sw_context' Warning: drivers/gpu/drm/vmwgfx/vmwgfx_drv.h:732 This comment starts with '/**', but isn't a kernel-doc comment. Warning: drivers/gpu/drm/vmwgfx/vmwgfx_drv.h:742 This comment starts with '/**', but isn't a kernel-doc comment. Warning: drivers/gpu/drm/vmwgfx/vmwgfx_drv.h:762 This comment starts with '/**', but isn't a kernel-doc comment. Warning: drivers/gpu/drm/vmwgfx/vmwgfx_drv.h:887 No description found for return value of 'vmw_fifo_caps' Warning: drivers/gpu/drm/vmwgfx/vmwgfx_drv.h:901 No description found for return value of 'vmw_is_cursor_bypass3_enabled' Warning: drivers/gpu/drm/vmwgfx/vmwgfx_drv.h:906 This comment starts with '/**', but isn't a kernel-doc comment. Warning: drivers/gpu/drm/vmwgfx/vmwgfx_drv.h:961 This comment starts with '/**', but isn't a kernel-doc comment. Warning: drivers/gpu/drm/vmwgfx/vmwgfx_drv.h:996 This comment starts with '/**', but isn't a kernel-doc comment. Warning: drivers/gpu/drm/vmwgfx/vmwgfx_drv.h:1082 cannot understand function prototype: 'const struct dma_buf_ops vmw_prime_dmabuf_ops;' Warning: drivers/gpu/drm/vmwgfx/vmwgfx_drv.h:1303 struct member 'do_cpy' not described in 'vmw_diff_cpy' Warning: drivers/gpu/drm/vmwgfx/vmwgfx_drv.h:1385 function parameter 'fmt' not described in 'VMW_DEBUG_KMS' Warning: drivers/gpu/drm/vmwgfx/vmwgfx_drv.h:1389 This comment starts with '/**', but isn't a kernel-doc comment. Warning: drivers/gpu/drm/vmwgfx/vmwgfx_drv.h:1426 function parameter 'vmw' not described in 'vmw_fifo_mem_read' Warning: drivers/gpu/drm/vmwgfx/vmwgfx_drv.h:1426 No description found for return value of 'vmw_fifo_mem_read' Warning: drivers/gpu/drm/vmwgfx/vmwgfx_drv.h:1441 function parameter 'fifo_reg' not described in 'vmw_fifo_mem_write' Signed-off-by: Randy Dunlap <[email protected]> Signed-off-by: Zack Rusin <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent 49973e2 commit c7feff2

1 file changed

Lines changed: 57 additions & 36 deletions

File tree

drivers/gpu/drm/vmwgfx/vmwgfx_drv.h

Lines changed: 57 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,17 @@ struct vmwgfx_hash_item {
9696

9797
struct vmw_res_func;
9898

99+
struct vmw_bo;
100+
struct vmw_bo;
101+
struct vmw_resource_dirty;
102+
99103
/**
100-
* struct vmw-resource - base class for hardware resources
104+
* struct vmw_resource - base class for hardware resources
101105
*
102106
* @kref: For refcounting.
103107
* @dev_priv: Pointer to the device private for this resource. Immutable.
104108
* @id: Device id. Protected by @dev_priv::resource_lock.
109+
* @used_prio: Priority for this resource.
105110
* @guest_memory_size: Guest memory buffer size. Immutable.
106111
* @res_dirty: Resource contains data not yet in the guest memory buffer.
107112
* Protected by resource reserved.
@@ -117,18 +122,16 @@ struct vmw_res_func;
117122
* pin-count greater than zero. It is not on the resource LRU lists and its
118123
* guest memory buffer is pinned. Hence it can't be evicted.
119124
* @func: Method vtable for this resource. Immutable.
120-
* @mob_node; Node for the MOB guest memory rbtree. Protected by
125+
* @mob_node: Node for the MOB guest memory rbtree. Protected by
121126
* @guest_memory_bo reserved.
122127
* @lru_head: List head for the LRU list. Protected by @dev_priv::resource_lock.
123128
* @binding_head: List head for the context binding list. Protected by
124129
* the @dev_priv::binding_mutex
130+
* @dirty: resource's dirty tracker
125131
* @res_free: The resource destructor.
126132
* @hw_destroy: Callback to destroy the resource on the device, as part of
127133
* resource destruction.
128134
*/
129-
struct vmw_bo;
130-
struct vmw_bo;
131-
struct vmw_resource_dirty;
132135
struct vmw_resource {
133136
struct kref kref;
134137
struct vmw_private *dev_priv;
@@ -196,8 +199,8 @@ struct vmw_surface_offset;
196199
* @quality_level: Quality level.
197200
* @autogen_filter: Filter for automatically generated mipmaps.
198201
* @array_size: Number of array elements for a 1D/2D texture. For cubemap
199-
texture number of faces * array_size. This should be 0 for pre
200-
SM4 device.
202+
* texture number of faces * array_size. This should be 0 for pre
203+
* SM4 device.
201204
* @buffer_byte_stride: Buffer byte stride.
202205
* @num_sizes: Size of @sizes. For GB surface this should always be 1.
203206
* @base_size: Surface dimension.
@@ -265,27 +268,36 @@ struct vmw_fifo_state {
265268
struct vmw_res_cache_entry {
266269
uint32_t handle;
267270
struct vmw_resource *res;
271+
/* private: */
268272
void *private;
273+
/* public: */
269274
unsigned short valid_handle;
270275
unsigned short valid;
271276
};
272277

273278
/**
274279
* enum vmw_dma_map_mode - indicate how to perform TTM page dma mappings.
280+
* @vmw_dma_alloc_coherent: Use TTM coherent pages
281+
* @vmw_dma_map_populate: Unmap from DMA just after unpopulate
282+
* @vmw_dma_map_bind: Unmap from DMA just before unbind
275283
*/
276284
enum vmw_dma_map_mode {
277-
vmw_dma_alloc_coherent, /* Use TTM coherent pages */
278-
vmw_dma_map_populate, /* Unmap from DMA just after unpopulate */
279-
vmw_dma_map_bind, /* Unmap from DMA just before unbind */
285+
vmw_dma_alloc_coherent,
286+
vmw_dma_map_populate,
287+
vmw_dma_map_bind,
288+
/* private: */
280289
vmw_dma_map_max
281290
};
282291

283292
/**
284293
* struct vmw_sg_table - Scatter/gather table for binding, with additional
285294
* device-specific information.
286295
*
296+
* @mode: which page mapping mode to use
297+
* @pages: Array of page pointers to the pages.
298+
* @addrs: DMA addresses to the pages if coherent pages are used.
287299
* @sgt: Pointer to a struct sg_table with binding information
288-
* @num_regions: Number of regions with device-address contiguous pages
300+
* @num_pages: Number of @pages
289301
*/
290302
struct vmw_sg_table {
291303
enum vmw_dma_map_mode mode;
@@ -353,6 +365,7 @@ struct vmw_ctx_validation_info;
353365
* than from user-space
354366
* @fp: If @kernel is false, points to the file of the client. Otherwise
355367
* NULL
368+
* @filp: DRM state for this file
356369
* @cmd_bounce: Command bounce buffer used for command validation before
357370
* copying to fifo space
358371
* @cmd_bounce_size: Current command bounce buffer size
@@ -729,7 +742,7 @@ extern void vmw_svga_disable(struct vmw_private *dev_priv);
729742
bool vmwgfx_supported(struct vmw_private *vmw);
730743

731744

732-
/**
745+
/*
733746
* GMR utilities - vmwgfx_gmr.c
734747
*/
735748

@@ -739,7 +752,7 @@ extern int vmw_gmr_bind(struct vmw_private *dev_priv,
739752
int gmr_id);
740753
extern void vmw_gmr_unbind(struct vmw_private *dev_priv, int gmr_id);
741754

742-
/**
755+
/*
743756
* User handles
744757
*/
745758
struct vmw_user_object {
@@ -759,7 +772,7 @@ void *vmw_user_object_map_size(struct vmw_user_object *uo, size_t size);
759772
void vmw_user_object_unmap(struct vmw_user_object *uo);
760773
bool vmw_user_object_is_mapped(struct vmw_user_object *uo);
761774

762-
/**
775+
/*
763776
* Resource utilities - vmwgfx_resource.c
764777
*/
765778
struct vmw_user_resource_conv;
@@ -819,7 +832,7 @@ static inline bool vmw_resource_mob_attached(const struct vmw_resource *res)
819832
return !RB_EMPTY_NODE(&res->mob_node);
820833
}
821834

822-
/**
835+
/*
823836
* GEM related functionality - vmwgfx_gem.c
824837
*/
825838
struct vmw_bo_params;
@@ -833,7 +846,7 @@ extern int vmw_gem_object_create_ioctl(struct drm_device *dev, void *data,
833846
struct drm_file *filp);
834847
extern void vmw_debugfs_gem_init(struct vmw_private *vdev);
835848

836-
/**
849+
/*
837850
* Misc Ioctl functionality - vmwgfx_ioctl.c
838851
*/
839852

@@ -846,7 +859,7 @@ extern int vmw_present_ioctl(struct drm_device *dev, void *data,
846859
extern int vmw_present_readback_ioctl(struct drm_device *dev, void *data,
847860
struct drm_file *file_priv);
848861

849-
/**
862+
/*
850863
* Fifo utilities - vmwgfx_fifo.c
851864
*/
852865

@@ -880,9 +893,11 @@ extern int vmw_cmd_flush(struct vmw_private *dev_priv,
880893

881894

882895
/**
883-
* vmw_fifo_caps - Returns the capabilities of the FIFO command
896+
* vmw_fifo_caps - Get the capabilities of the FIFO command
884897
* queue or 0 if fifo memory isn't present.
885898
* @dev_priv: The device private context
899+
*
900+
* Returns: capabilities of the FIFO command or %0 if fifo memory not present
886901
*/
887902
static inline uint32_t vmw_fifo_caps(const struct vmw_private *dev_priv)
888903
{
@@ -893,17 +908,19 @@ static inline uint32_t vmw_fifo_caps(const struct vmw_private *dev_priv)
893908

894909

895910
/**
896-
* vmw_is_cursor_bypass3_enabled - Returns TRUE iff Cursor Bypass 3
897-
* is enabled in the FIFO.
911+
* vmw_is_cursor_bypass3_enabled - check Cursor Bypass 3 enabled setting
912+
* in the FIFO.
898913
* @dev_priv: The device private context
914+
*
915+
* Returns: %true iff Cursor Bypass 3 is enabled in the FIFO
899916
*/
900917
static inline bool
901918
vmw_is_cursor_bypass3_enabled(const struct vmw_private *dev_priv)
902919
{
903920
return (vmw_fifo_caps(dev_priv) & SVGA_FIFO_CAP_CURSOR_BYPASS_3) != 0;
904921
}
905922

906-
/**
923+
/*
907924
* TTM buffer object driver - vmwgfx_ttm_buffer.c
908925
*/
909926

@@ -927,7 +944,7 @@ extern void vmw_piter_start(struct vmw_piter *viter,
927944
*
928945
* @viter: Pointer to the iterator to advance.
929946
*
930-
* Returns false if past the list of pages, true otherwise.
947+
* Returns: false if past the list of pages, true otherwise.
931948
*/
932949
static inline bool vmw_piter_next(struct vmw_piter *viter)
933950
{
@@ -939,7 +956,7 @@ static inline bool vmw_piter_next(struct vmw_piter *viter)
939956
*
940957
* @viter: Pointer to the iterator
941958
*
942-
* Returns the DMA address of the page pointed to by @viter.
959+
* Returns: the DMA address of the page pointed to by @viter.
943960
*/
944961
static inline dma_addr_t vmw_piter_dma_addr(struct vmw_piter *viter)
945962
{
@@ -951,14 +968,14 @@ static inline dma_addr_t vmw_piter_dma_addr(struct vmw_piter *viter)
951968
*
952969
* @viter: Pointer to the iterator
953970
*
954-
* Returns the DMA address of the page pointed to by @viter.
971+
* Returns: the DMA address of the page pointed to by @viter.
955972
*/
956973
static inline struct page *vmw_piter_page(struct vmw_piter *viter)
957974
{
958975
return viter->pages[viter->i];
959976
}
960977

961-
/**
978+
/*
962979
* Command submission - vmwgfx_execbuf.c
963980
*/
964981

@@ -993,7 +1010,7 @@ extern int vmw_execbuf_copy_fence_user(struct vmw_private *dev_priv,
9931010
int32_t out_fence_fd);
9941011
bool vmw_cmd_describe(const void *buf, u32 *size, char const **cmd);
9951012

996-
/**
1013+
/*
9971014
* IRQs and wating - vmwgfx_irq.c
9981015
*/
9991016

@@ -1016,7 +1033,7 @@ bool vmw_generic_waiter_add(struct vmw_private *dev_priv, u32 flag,
10161033
bool vmw_generic_waiter_remove(struct vmw_private *dev_priv,
10171034
u32 flag, int *waiter_count);
10181035

1019-
/**
1036+
/*
10201037
* Kernel modesetting - vmwgfx_kms.c
10211038
*/
10221039

@@ -1048,7 +1065,7 @@ extern int vmw_resource_pin(struct vmw_resource *res, bool interruptible);
10481065
extern void vmw_resource_unpin(struct vmw_resource *res);
10491066
extern enum vmw_res_type vmw_res_type(const struct vmw_resource *res);
10501067

1051-
/**
1068+
/*
10521069
* Overlay control - vmwgfx_overlay.c
10531070
*/
10541071

@@ -1063,20 +1080,20 @@ int vmw_overlay_unref(struct vmw_private *dev_priv, uint32_t stream_id);
10631080
int vmw_overlay_num_overlays(struct vmw_private *dev_priv);
10641081
int vmw_overlay_num_free_overlays(struct vmw_private *dev_priv);
10651082

1066-
/**
1083+
/*
10671084
* GMR Id manager
10681085
*/
10691086

10701087
int vmw_gmrid_man_init(struct vmw_private *dev_priv, int type);
10711088
void vmw_gmrid_man_fini(struct vmw_private *dev_priv, int type);
10721089

1073-
/**
1090+
/*
10741091
* System memory manager
10751092
*/
10761093
int vmw_sys_man_init(struct vmw_private *dev_priv);
10771094
void vmw_sys_man_fini(struct vmw_private *dev_priv);
10781095

1079-
/**
1096+
/*
10801097
* Prime - vmwgfx_prime.c
10811098
*/
10821099

@@ -1292,7 +1309,7 @@ extern void vmw_cmdbuf_irqthread(struct vmw_cmdbuf_man *man);
12921309
* @line: The current line of the blit.
12931310
* @line_offset: Offset of the current line segment.
12941311
* @cpp: Bytes per pixel (granularity information).
1295-
* @memcpy: Which memcpy function to use.
1312+
* @do_cpy: Which memcpy function to use.
12961313
*/
12971314
struct vmw_diff_cpy {
12981315
struct drm_rect rect;
@@ -1380,13 +1397,14 @@ vm_fault_t vmw_bo_vm_mkwrite(struct vm_fault *vmf);
13801397

13811398
/**
13821399
* VMW_DEBUG_KMS - Debug output for kernel mode-setting
1400+
* @fmt: format string for the args
13831401
*
13841402
* This macro is for debugging vmwgfx mode-setting code.
13851403
*/
13861404
#define VMW_DEBUG_KMS(fmt, ...) \
13871405
DRM_DEBUG_DRIVER(fmt, ##__VA_ARGS__)
13881406

1389-
/**
1407+
/*
13901408
* Inline helper functions
13911409
*/
13921410

@@ -1417,11 +1435,13 @@ static inline void vmw_fifo_resource_dec(struct vmw_private *dev_priv)
14171435

14181436
/**
14191437
* vmw_fifo_mem_read - Perform a MMIO read from the fifo memory
1420-
*
1438+
* @vmw: The device private structure
14211439
* @fifo_reg: The fifo register to read from
14221440
*
14231441
* This function is intended to be equivalent to ioread32() on
14241442
* memremap'd memory, but without byteswapping.
1443+
*
1444+
* Returns: the value read
14251445
*/
14261446
static inline u32 vmw_fifo_mem_read(struct vmw_private *vmw, uint32 fifo_reg)
14271447
{
@@ -1431,8 +1451,9 @@ static inline u32 vmw_fifo_mem_read(struct vmw_private *vmw, uint32 fifo_reg)
14311451

14321452
/**
14331453
* vmw_fifo_mem_write - Perform a MMIO write to volatile memory
1434-
*
1435-
* @addr: The fifo register to write to
1454+
* @vmw: The device private structure
1455+
* @fifo_reg: The fifo register to write to
1456+
* @value: The value to write
14361457
*
14371458
* This function is intended to be equivalent to iowrite32 on
14381459
* memremap'd memory, but without byteswapping.

0 commit comments

Comments
 (0)