Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Randy Dunlap and committed by
Dmitry Baryshkov
cd569786 010c98df

+18 -50
+18 -50
drivers/gpu/drm/msm/msm_gpu.h
··· 116 116 * struct msm_gpu_devfreq - devfreq related state 117 117 */ 118 118 struct msm_gpu_devfreq { 119 - /** devfreq: devfreq instance */ 119 + /** @devfreq: devfreq instance */ 120 120 struct devfreq *devfreq; 121 - 122 - /** lock: lock for "suspended", "busy_cycles", and "time" */ 121 + /** @lock: lock for "suspended", "busy_cycles", and "time" */ 123 122 struct mutex lock; 124 - 125 123 /** 126 - * idle_freq: 127 - * 124 + * @idle_freq: 128 125 * Shadow frequency used while the GPU is idle. From the PoV of 129 126 * the devfreq governor, we are continuing to sample busyness and 130 127 * adjust frequency while the GPU is idle, but we use this shadow ··· 129 132 * it is inactive. 130 133 */ 131 134 unsigned long idle_freq; 132 - 133 135 /** 134 - * boost_constraint: 135 - * 136 + * @boost_freq: 136 137 * A PM QoS constraint to boost min freq for a period of time 137 138 * until the boost expires. 138 139 */ 139 140 struct dev_pm_qos_request boost_freq; 140 - 141 141 /** 142 - * busy_cycles: Last busy counter value, for calculating elapsed busy 142 + * @busy_cycles: Last busy counter value, for calculating elapsed busy 143 143 * cycles since last sampling period. 144 144 */ 145 145 u64 busy_cycles; 146 - 147 - /** time: Time of last sampling period. */ 146 + /** @time: Time of last sampling period. */ 148 147 ktime_t time; 149 - 150 - /** idle_time: Time of last transition to idle: */ 148 + /** @idle_time: Time of last transition to idle. */ 151 149 ktime_t idle_time; 152 - 153 150 /** 154 - * idle_work: 155 - * 151 + * @idle_work: 156 152 * Used to delay clamping to idle freq on active->idle transition. 157 153 */ 158 154 struct msm_hrtimer_work idle_work; 159 - 160 155 /** 161 - * boost_work: 162 - * 156 + * @boost_work: 163 157 * Used to reset the boost_constraint after the boost period has 164 158 * elapsed 165 159 */ 166 160 struct msm_hrtimer_work boost_work; 167 161 168 - /** suspended: tracks if we're suspended */ 162 + /** @suspended: tracks if we're suspended */ 169 163 bool suspended; 170 164 }; 171 165 ··· 346 358 struct msm_context { 347 359 /** @queuelock: synchronizes access to submitqueues list */ 348 360 rwlock_t queuelock; 349 - 350 361 /** @submitqueues: list of &msm_gpu_submitqueue created by userspace */ 351 362 struct list_head submitqueues; 352 - 353 363 /** 354 364 * @queueid: 355 - * 356 365 * Counter incremented each time a submitqueue is created, used to 357 366 * assign &msm_gpu_submitqueue.id 358 367 */ 359 368 int queueid; 360 - 361 369 /** 362 370 * @closed: The device file associated with this context has been closed. 363 - * 364 371 * Once the device is closed, any submits that have not been written 365 372 * to the ring buffer are no-op'd. 366 373 */ 367 374 bool closed; 368 - 369 375 /** 370 376 * @userspace_managed_vm: 371 - * 372 377 * Has userspace opted-in to userspace managed VM (ie. VM_BIND) via 373 378 * MSM_PARAM_EN_VM_BIND? 374 379 */ 375 380 bool userspace_managed_vm; 376 - 377 381 /** 378 382 * @vm: 379 - * 380 383 * The per-process GPU address-space. Do not access directly, use 381 384 * msm_context_vm(). 382 385 */ 383 386 struct drm_gpuvm *vm; 384 - 385 - /** @kref: the reference count */ 387 + /** @ref: the reference count */ 386 388 struct kref ref; 387 - 388 389 /** 389 390 * @seqno: 390 - * 391 391 * A unique per-process sequence number. Used to detect context 392 392 * switches, without relying on keeping a, potentially dangling, 393 393 * pointer to the previous context. 394 394 */ 395 395 int seqno; 396 - 397 396 /** 398 397 * @sysprof: 399 - * 400 398 * The value of MSM_PARAM_SYSPROF set by userspace. This is 401 399 * intended to be used by system profiling tools like Mesa's 402 400 * pps-producer (perfetto), and restricted to CAP_SYS_ADMIN. ··· 397 423 * file is closed. 398 424 */ 399 425 int sysprof; 400 - 401 426 /** 402 427 * @comm: Overridden task comm, see MSM_PARAM_COMM 403 428 * 404 429 * Accessed under msm_gpu::lock 405 430 */ 406 431 char *comm; 407 - 408 432 /** 409 433 * @cmdline: Overridden task cmdline, see MSM_PARAM_CMDLINE 410 434 * 411 435 * Accessed under msm_gpu::lock 412 436 */ 413 437 char *cmdline; 414 - 415 438 /** 416 - * @elapsed: 417 - * 439 + * @elapsed_ns: 418 440 * The total (cumulative) elapsed time GPU was busy with rendering 419 441 * from this context in ns. 420 442 */ 421 443 uint64_t elapsed_ns; 422 - 423 444 /** 424 445 * @cycles: 425 - * 426 446 * The total (cumulative) GPU cycles elapsed attributed to this 427 447 * context. 428 448 */ 429 449 uint64_t cycles; 430 - 431 450 /** 432 451 * @entities: 433 - * 434 452 * Table of per-priority-level sched entities used by submitqueues 435 453 * associated with this &drm_file. Because some userspace apps 436 454 * make assumptions about rendering from multiple gl contexts ··· 432 466 * level. 433 467 */ 434 468 struct drm_sched_entity *entities[NR_SCHED_PRIORITIES * MSM_GPU_MAX_RINGS]; 435 - 436 469 /** 437 470 * @ctx_mem: 438 - * 439 471 * Total amount of memory of GEM buffers with handles attached for 440 472 * this context. 441 473 */ ··· 443 479 struct drm_gpuvm *msm_context_vm(struct drm_device *dev, struct msm_context *ctx); 444 480 445 481 /** 446 - * msm_context_is_vm_bind() - has userspace opted in to VM_BIND? 482 + * msm_context_is_vmbind() - has userspace opted in to VM_BIND? 447 483 * 448 484 * @ctx: the drm_file context 449 485 * ··· 451 487 * do sparse binding including having multiple, potentially partial, 452 488 * mappings in the VM. Therefore certain legacy uabi (ie. GET_IOVA, 453 489 * SET_IOVA) are rejected because they don't have a sensible meaning. 490 + * 491 + * Returns: %true if userspace is managing the VM, %false otherwise. 454 492 */ 455 493 static inline bool 456 494 msm_context_is_vmbind(struct msm_context *ctx) ··· 484 518 * This allows generations without preemption (nr_rings==1) to have some 485 519 * amount of prioritization, and provides more priority levels for gens 486 520 * that do have preemption. 521 + * 522 + * Returns: %0 on success, %-errno on error. 487 523 */ 488 524 static inline int msm_gpu_convert_priority(struct msm_gpu *gpu, int prio, 489 525 unsigned *ring_nr, enum drm_sched_priority *sched_prio) ··· 509 541 } 510 542 511 543 /** 512 - * struct msm_gpu_submitqueues - Userspace created context. 544 + * struct msm_gpu_submitqueue - Userspace created context. 513 545 * 514 546 * A submitqueue is associated with a gl context or vk queue (or equiv) 515 547 * in userspace.