Skip to content

Commit cd56978

Browse files
rddunlaplumag
authored andcommitted
drm/msm: msm_gpu.h: fix all kernel-doc warnings
Correct or add kernel-doc comments to eliminate all warnings: Warning: drivers/gpu/drm/msm/msm_gpu.h:119 Incorrect use of kernel-doc format: * devfreq: devfreq instance Warning: drivers/gpu/drm/msm/msm_gpu.h:125 Incorrect use of kernel-doc format: * idle_freq: Warning: drivers/gpu/drm/msm/msm_gpu.h:136 Incorrect use of kernel-doc format: * boost_constraint: Warning: drivers/gpu/drm/msm/msm_gpu.h:144 Incorrect use of kernel-doc format: * busy_cycles: Last busy counter value, for calculating elapsed busy Warning: drivers/gpu/drm/msm/msm_gpu.h:156 Incorrect use of kernel-doc format: * idle_work: Warning: drivers/gpu/drm/msm/msm_gpu.h:163 Incorrect use of kernel-doc format: * boost_work: Warning: drivers/gpu/drm/msm/msm_gpu.h:170 struct member 'devfreq' not described in 'msm_gpu_devfreq' Warning: drivers/gpu/drm/msm/msm_gpu.h:170 struct member 'boost_freq' not described in 'msm_gpu_devfreq' Warning: drivers/gpu/drm/msm/msm_gpu.h:172 struct member 'devfreq' not described in 'msm_gpu_devfreq' Warning: drivers/gpu/drm/msm/msm_gpu.h:172 struct member 'lock' not described in 'msm_gpu_devfreq' Warning: drivers/gpu/drm/msm/msm_gpu.h:172 struct member 'governor' not described in 'msm_gpu_devfreq' Warning: drivers/gpu/drm/msm/msm_gpu.h:172 struct member 'we are continuing to sample busyness and * adjust frequency while the GPU is idle' not described in 'msm_gpu_devfreq' Warning: drivers/gpu/drm/msm/msm_gpu.h:172 struct member 'boost_freq' not described in 'msm_gpu_devfreq' Warning: drivers/gpu/drm/msm/msm_gpu.h:172 struct member 'busy_cycles' not described in 'msm_gpu_devfreq' Warning: drivers/gpu/drm/msm/msm_gpu.h:172 struct member 'time' not described in 'msm_gpu_devfreq' Warning: drivers/gpu/drm/msm/msm_gpu.h:172 struct member 'idle_time' not described in 'msm_gpu_devfreq' Warning: drivers/gpu/drm/msm/msm_gpu.h:172 struct member 'idle_work' not described in 'msm_gpu_devfreq' Warning: drivers/gpu/drm/msm/msm_gpu.h:172 struct member 'boost_work' not described in 'msm_gpu_devfreq' Warning: drivers/gpu/drm/msm/msm_gpu.h:172 struct member 'suspended' not described in 'msm_gpu_devfreq' Warning: drivers/gpu/drm/msm/msm_gpu.h:472 No description found for return value of 'msm_context_is_vmbind' Warning: drivers/gpu/drm/msm/msm_gpu.h:476 struct member 'ref' not described in 'msm_context' Warning: drivers/gpu/drm/msm/msm_gpu.h:476 struct member 'elapsed_ns' not described in 'msm_context' Warning: drivers/gpu/drm/msm/msm_gpu.h:492 expecting prototype for msm_context_is_vm_bind(). Prototype was for msm_context_is_vmbind() instead Warning: drivers/gpu/drm/msm/msm_gpu.h:523 No description found for return value of 'msm_gpu_convert_priority' Warning: drivers/gpu/drm/msm/msm_gpu.h:583 expecting prototype for struct msm_gpu_submitqueues. Prototype was for struct msm_gpu_submitqueue instead Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Patchwork: https://patchwork.freedesktop.org/patch/695671/ Link: https://lore.kernel.org/r/20251219184638.1813181-19-rdunlap@infradead.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
1 parent 010c98d commit cd56978

1 file changed

Lines changed: 18 additions & 50 deletions

File tree

drivers/gpu/drm/msm/msm_gpu.h

Lines changed: 18 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -116,59 +116,47 @@ struct msm_gpu_fault_info {
116116
* struct msm_gpu_devfreq - devfreq related state
117117
*/
118118
struct msm_gpu_devfreq {
119-
/** devfreq: devfreq instance */
119+
/** @devfreq: devfreq instance */
120120
struct devfreq *devfreq;
121-
122-
/** lock: lock for "suspended", "busy_cycles", and "time" */
121+
/** @lock: lock for "suspended", "busy_cycles", and "time" */
123122
struct mutex lock;
124-
125123
/**
126-
* idle_freq:
127-
*
124+
* @idle_freq:
128125
* Shadow frequency used while the GPU is idle. From the PoV of
129126
* the devfreq governor, we are continuing to sample busyness and
130127
* adjust frequency while the GPU is idle, but we use this shadow
131128
* value as the GPU is actually clamped to minimum frequency while
132129
* it is inactive.
133130
*/
134131
unsigned long idle_freq;
135-
136132
/**
137-
* boost_constraint:
138-
*
133+
* @boost_freq:
139134
* A PM QoS constraint to boost min freq for a period of time
140135
* until the boost expires.
141136
*/
142137
struct dev_pm_qos_request boost_freq;
143-
144138
/**
145-
* busy_cycles: Last busy counter value, for calculating elapsed busy
139+
* @busy_cycles: Last busy counter value, for calculating elapsed busy
146140
* cycles since last sampling period.
147141
*/
148142
u64 busy_cycles;
149-
150-
/** time: Time of last sampling period. */
143+
/** @time: Time of last sampling period. */
151144
ktime_t time;
152-
153-
/** idle_time: Time of last transition to idle: */
145+
/** @idle_time: Time of last transition to idle. */
154146
ktime_t idle_time;
155-
156147
/**
157-
* idle_work:
158-
*
148+
* @idle_work:
159149
* Used to delay clamping to idle freq on active->idle transition.
160150
*/
161151
struct msm_hrtimer_work idle_work;
162-
163152
/**
164-
* boost_work:
165-
*
153+
* @boost_work:
166154
* Used to reset the boost_constraint after the boost period has
167155
* elapsed
168156
*/
169157
struct msm_hrtimer_work boost_work;
170158

171-
/** suspended: tracks if we're suspended */
159+
/** @suspended: tracks if we're suspended */
172160
bool suspended;
173161
};
174162

@@ -358,57 +346,43 @@ struct msm_gpu_perfcntr {
358346
struct msm_context {
359347
/** @queuelock: synchronizes access to submitqueues list */
360348
rwlock_t queuelock;
361-
362349
/** @submitqueues: list of &msm_gpu_submitqueue created by userspace */
363350
struct list_head submitqueues;
364-
365351
/**
366352
* @queueid:
367-
*
368353
* Counter incremented each time a submitqueue is created, used to
369354
* assign &msm_gpu_submitqueue.id
370355
*/
371356
int queueid;
372-
373357
/**
374358
* @closed: The device file associated with this context has been closed.
375-
*
376359
* Once the device is closed, any submits that have not been written
377360
* to the ring buffer are no-op'd.
378361
*/
379362
bool closed;
380-
381363
/**
382364
* @userspace_managed_vm:
383-
*
384365
* Has userspace opted-in to userspace managed VM (ie. VM_BIND) via
385366
* MSM_PARAM_EN_VM_BIND?
386367
*/
387368
bool userspace_managed_vm;
388-
389369
/**
390370
* @vm:
391-
*
392371
* The per-process GPU address-space. Do not access directly, use
393372
* msm_context_vm().
394373
*/
395374
struct drm_gpuvm *vm;
396-
397-
/** @kref: the reference count */
375+
/** @ref: the reference count */
398376
struct kref ref;
399-
400377
/**
401378
* @seqno:
402-
*
403379
* A unique per-process sequence number. Used to detect context
404380
* switches, without relying on keeping a, potentially dangling,
405381
* pointer to the previous context.
406382
*/
407383
int seqno;
408-
409384
/**
410385
* @sysprof:
411-
*
412386
* The value of MSM_PARAM_SYSPROF set by userspace. This is
413387
* intended to be used by system profiling tools like Mesa's
414388
* pps-producer (perfetto), and restricted to CAP_SYS_ADMIN.
@@ -423,40 +397,32 @@ struct msm_context {
423397
* file is closed.
424398
*/
425399
int sysprof;
426-
427400
/**
428401
* @comm: Overridden task comm, see MSM_PARAM_COMM
429402
*
430403
* Accessed under msm_gpu::lock
431404
*/
432405
char *comm;
433-
434406
/**
435407
* @cmdline: Overridden task cmdline, see MSM_PARAM_CMDLINE
436408
*
437409
* Accessed under msm_gpu::lock
438410
*/
439411
char *cmdline;
440-
441412
/**
442-
* @elapsed:
443-
*
413+
* @elapsed_ns:
444414
* The total (cumulative) elapsed time GPU was busy with rendering
445415
* from this context in ns.
446416
*/
447417
uint64_t elapsed_ns;
448-
449418
/**
450419
* @cycles:
451-
*
452420
* The total (cumulative) GPU cycles elapsed attributed to this
453421
* context.
454422
*/
455423
uint64_t cycles;
456-
457424
/**
458425
* @entities:
459-
*
460426
* Table of per-priority-level sched entities used by submitqueues
461427
* associated with this &drm_file. Because some userspace apps
462428
* make assumptions about rendering from multiple gl contexts
@@ -466,10 +432,8 @@ struct msm_context {
466432
* level.
467433
*/
468434
struct drm_sched_entity *entities[NR_SCHED_PRIORITIES * MSM_GPU_MAX_RINGS];
469-
470435
/**
471436
* @ctx_mem:
472-
*
473437
* Total amount of memory of GEM buffers with handles attached for
474438
* this context.
475439
*/
@@ -479,14 +443,16 @@ struct msm_context {
479443
struct drm_gpuvm *msm_context_vm(struct drm_device *dev, struct msm_context *ctx);
480444

481445
/**
482-
* msm_context_is_vm_bind() - has userspace opted in to VM_BIND?
446+
* msm_context_is_vmbind() - has userspace opted in to VM_BIND?
483447
*
484448
* @ctx: the drm_file context
485449
*
486450
* See MSM_PARAM_EN_VM_BIND. If userspace is managing the VM, it can
487451
* do sparse binding including having multiple, potentially partial,
488452
* mappings in the VM. Therefore certain legacy uabi (ie. GET_IOVA,
489453
* SET_IOVA) are rejected because they don't have a sensible meaning.
454+
*
455+
* Returns: %true if userspace is managing the VM, %false otherwise.
490456
*/
491457
static inline bool
492458
msm_context_is_vmbind(struct msm_context *ctx)
@@ -518,6 +484,8 @@ msm_context_is_vmbind(struct msm_context *ctx)
518484
* This allows generations without preemption (nr_rings==1) to have some
519485
* amount of prioritization, and provides more priority levels for gens
520486
* that do have preemption.
487+
*
488+
* Returns: %0 on success, %-errno on error.
521489
*/
522490
static inline int msm_gpu_convert_priority(struct msm_gpu *gpu, int prio,
523491
unsigned *ring_nr, enum drm_sched_priority *sched_prio)
@@ -541,7 +509,7 @@ static inline int msm_gpu_convert_priority(struct msm_gpu *gpu, int prio,
541509
}
542510

543511
/**
544-
* struct msm_gpu_submitqueues - Userspace created context.
512+
* struct msm_gpu_submitqueue - Userspace created context.
545513
*
546514
* A submitqueue is associated with a gl context or vk queue (or equiv)
547515
* in userspace.

0 commit comments

Comments
 (0)