Skip to content

Commit ef40cbf

Browse files
committed
drm/core: Use recommened kerneldoc for struct member refs
I just learned that &struct_name.member_name works and looks pretty even. It doesn't (yet) link to the member directly though, which would be really good for big structures or vfunc tables (where the per-member kerneldoc tends to be long). Also some minor drive-by polish where it makes sense, I read a lot of docs ... v2: Review from Gustavo. Cc: Jani Nikula <jani.nikula@linux.intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170125062657.19270-6-daniel.vetter@ffwll.ch
1 parent 940eba2 commit ef40cbf

10 files changed

Lines changed: 33 additions & 33 deletions

File tree

‎drivers/gpu/drm/drm_auth.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@
4040
* least once successfully became the device master (either through the
4141
* SET_MASTER IOCTL, or implicitly through opening the primary device node when
4242
* no one else is the current master that time) there exists one &drm_master.
43-
* This is noted in the is_master member of &drm_file. All other clients have
44-
* just a pointer to the &drm_master they are associated with.
43+
* This is noted in &drm_file.is_master. All other clients have just a pointer
44+
* to the &drm_master they are associated with.
4545
*
4646
* In addition only one &drm_master can be the current master for a &drm_device.
4747
* It can be switched through the DROP_MASTER and SET_MASTER IOCTL, or

‎drivers/gpu/drm/drm_drv.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ void drm_minor_release(struct drm_minor *minor)
309309
* userspace the device instance can be published using drm_dev_register().
310310
*
311311
* There is also deprecated support for initalizing device instances using
312-
* bus-specific helpers and the ->load() callback. But due to
312+
* bus-specific helpers and the &drm_driver.load callback. But due to
313313
* backwards-compatibility needs the device instance have to be published too
314314
* early, which requires unpretty global locking to make safe and is therefore
315315
* only support for existing drivers not yet converted to the new scheme.
@@ -718,9 +718,9 @@ static void remove_compat_control_link(struct drm_device *dev)
718718
* Never call this twice on any device!
719719
*
720720
* NOTE: To ensure backward compatibility with existing drivers method this
721-
* function calls the ->load() method after registering the device nodes,
722-
* creating race conditions. Usage of the ->load() methods is therefore
723-
* deprecated, drivers must perform all initialization before calling
721+
* function calls the &drm_driver.load method after registering the device
722+
* nodes, creating race conditions. Usage of the &drm_driver.load methods is
723+
* therefore deprecated, drivers must perform all initialization before calling
724724
* drm_dev_register().
725725
*
726726
* RETURNS:

‎drivers/gpu/drm/drm_fops.c‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ EXPORT_SYMBOL(drm_poll);
580580
* kmalloc and @p must be the first member element.
581581
*
582582
* This is the locked version of drm_event_reserve_init() for callers which
583-
* already hold dev->event_lock.
583+
* already hold &drm_device.event_lock.
584584
*
585585
* RETURNS:
586586
*
@@ -621,7 +621,7 @@ EXPORT_SYMBOL(drm_event_reserve_init_locked);
621621
* If callers embedded @p into a larger structure it must be allocated with
622622
* kmalloc and @p must be the first member element.
623623
*
624-
* Callers which already hold dev->event_lock should use
624+
* Callers which already hold &drm_device.event_lock should use
625625
* drm_event_reserve_init_locked() instead.
626626
*
627627
* RETURNS:
@@ -677,7 +677,7 @@ EXPORT_SYMBOL(drm_event_cancel_free);
677677
*
678678
* This function sends the event @e, initialized with drm_event_reserve_init(),
679679
* to its associated userspace DRM file. Callers must already hold
680-
* dev->event_lock, see drm_send_event() for the unlocked version.
680+
* &drm_device.event_lock, see drm_send_event() for the unlocked version.
681681
*
682682
* Note that the core will take care of unlinking and disarming events when the
683683
* corresponding DRM file is closed. Drivers need not worry about whether the
@@ -717,8 +717,9 @@ EXPORT_SYMBOL(drm_send_event_locked);
717717
* @e: DRM event to deliver
718718
*
719719
* This function sends the event @e, initialized with drm_event_reserve_init(),
720-
* to its associated userspace DRM file. This function acquires dev->event_lock,
721-
* see drm_send_event_locked() for callers which already hold this lock.
720+
* to its associated userspace DRM file. This function acquires
721+
* &drm_device.event_lock, see drm_send_event_locked() for callers which already
722+
* hold this lock.
722723
*
723724
* Note that the core will take care of unlinking and disarming events when the
724725
* corresponding DRM file is closed. Drivers need not worry about whether the

‎drivers/gpu/drm/drm_irq.c‎

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ static void store_vblank(struct drm_device *dev, unsigned int pipe,
9595
*
9696
* Only to be called from drm_crtc_vblank_on().
9797
*
98-
* Note: caller must hold dev->vbl_lock since this reads & writes
98+
* Note: caller must hold &drm_device.vbl_lock since this reads & writes
9999
* device vblank fields.
100100
*/
101101
static void drm_reset_vblank_timestamp(struct drm_device *dev, unsigned int pipe)
@@ -142,7 +142,7 @@ static void drm_reset_vblank_timestamp(struct drm_device *dev, unsigned int pipe
142142
* Only necessary when going from off->on, to account for frames we
143143
* didn't get an interrupt for.
144144
*
145-
* Note: caller must hold dev->vbl_lock since this reads & writes
145+
* Note: caller must hold &drm_device.vbl_lock since this reads & writes
146146
* device vblank fields.
147147
*/
148148
static void drm_update_vblank_count(struct drm_device *dev, unsigned int pipe,
@@ -449,7 +449,7 @@ static void drm_irq_vgaarb_nokms(void *cookie, bool state)
449449
*
450450
* This is the simplified helper interface provided for drivers with no special
451451
* needs. Drivers which need to install interrupt handlers for multiple
452-
* interrupts must instead set drm_device->irq_enabled to signal the DRM core
452+
* interrupts must instead set &drm_device.irq_enabled to signal the DRM core
453453
* that vblank interrupts are available.
454454
*
455455
* Returns:
@@ -519,7 +519,7 @@ EXPORT_SYMBOL(drm_irq_install);
519519
* Calls the driver's irq_uninstall() function and unregisters the IRQ handler.
520520
* This should only be called by drivers which used drm_irq_install() to set up
521521
* their interrupt handler. Other drivers must only reset
522-
* drm_device->irq_enabled to false.
522+
* &drm_device.irq_enabled to false.
523523
*
524524
* Note that for kernel modesetting drivers it is a bug if this function fails.
525525
* The sanity checks are only to catch buggy user modesetting drivers which call
@@ -982,12 +982,11 @@ static void send_vblank_event(struct drm_device *dev,
982982
* period. This helper function implements exactly the required vblank arming
983983
* behaviour.
984984
*
985-
* NOTE: Drivers using this to send out the event in &struct drm_crtc_state
986-
* as part of an atomic commit must ensure that the next vblank happens at
987-
* exactly the same time as the atomic commit is committed to the hardware. This
988-
* function itself does **not** protect again the next vblank interrupt racing
989-
* with either this function call or the atomic commit operation. A possible
990-
* sequence could be:
985+
* NOTE: Drivers using this to send out the &drm_crtc_state.event as part of an
986+
* atomic commit must ensure that the next vblank happens at exactly the same
987+
* time as the atomic commit is committed to the hardware. This function itself
988+
* does **not** protect again the next vblank interrupt racing with either this
989+
* function call or the atomic commit operation. A possible sequence could be:
991990
*
992991
* 1. Driver commits new hardware state into vblank-synchronized registers.
993992
* 2. A vblank happens, committing the hardware state. Also the corresponding

‎drivers/gpu/drm/drm_pci.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ void drm_pci_agp_destroy(struct drm_device *dev)
223223
* Try and register, if we fail to register, backout previous work.
224224
*
225225
* NOTE: This function is deprecated, please use drm_dev_alloc() and
226-
* drm_dev_register() instead and remove your ->load() callback.
226+
* drm_dev_register() instead and remove your &drm_driver.load callback.
227227
*
228228
* Return: 0 on success or a negative error code on failure.
229229
*/

‎drivers/gpu/drm/drm_platform.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ static int drm_get_platform_dev(struct platform_device *platdev,
7474
* .load() function.
7575
*
7676
* NOTE: This function is deprecated, please use drm_dev_alloc() and
77-
* drm_dev_register() instead and remove your ->load() callback.
77+
* drm_dev_register() instead and remove your &drm_driver.load callback.
7878
*
7979
* Return: 0 on success or a negative error code on failure.
8080
*/

‎drivers/gpu/drm/drm_sysfs.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ static const struct attribute_group *connector_dev_groups[] = {
255255
* @connector: connector to add
256256
*
257257
* Create a connector device in sysfs, along with its associated connector
258-
* properties (so far, connection status, dpms, mode list & edid) and
258+
* properties (so far, connection status, dpms, mode list and edid) and
259259
* generate a hotplug event so userspace knows there's a new connector
260260
* available.
261261
*/

‎include/drm/drm_auth.h‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,18 @@ struct drm_master {
4343
struct kref refcount;
4444
struct drm_device *dev;
4545
/**
46-
* @unique: Unique identifier: e.g. busid. Protected by struct
47-
* &drm_device master_mutex.
46+
* @unique: Unique identifier: e.g. busid. Protected by
47+
* &drm_device.master_mutex.
4848
*/
4949
char *unique;
5050
/**
51-
* @unique_len: Length of unique field. Protected by &struct drm_device
52-
* master_mutex.
51+
* @unique_len: Length of unique field. Protected by
52+
* &drm_device.master_mutex.
5353
*/
5454
int unique_len;
5555
/**
56-
* @magic_map: Map of used authentication tokens. Protected by struct
57-
* &drm_device master_mutex.
56+
* @magic_map: Map of used authentication tokens. Protected by
57+
* &drm_device.master_mutex.
5858
*/
5959
struct idr magic_map;
6060
struct drm_lock_data lock;

‎include/drm/drm_drv.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ struct drm_driver {
314314
/**
315315
* @gem_free_object_unlocked: deconstructor for drm_gem_objects
316316
*
317-
* This is for drivers which are not encumbered with dev->struct_mutex
317+
* This is for drivers which are not encumbered with &drm_device.struct_mutex
318318
* legacy locking schemes. Use this hook instead of @gem_free_object.
319319
*/
320320
void (*gem_free_object_unlocked) (struct drm_gem_object *obj);

‎include/drm/drm_irq.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ struct drm_vblank_crtc {
6767
* @disable_timer: Disable timer for the delayed vblank disabling
6868
* hysteresis logic. Vblank disabling is controlled through the
6969
* drm_vblank_offdelay module option and the setting of the
70-
* max_vblank_count value in the &drm_device structure.
70+
* &drm_device.max_vblank_count value.
7171
*/
7272
struct timer_list disable_timer;
7373

@@ -92,7 +92,7 @@ struct drm_vblank_crtc {
9292
*/
9393
atomic_t refcount; /* number of users of vblank interruptsper crtc */
9494
/**
95-
* @last: Protected by dev->vbl_lock, used for wraparound handling.
95+
* @last: Protected by &drm_device.vbl_lock, used for wraparound handling.
9696
*/
9797
u32 last;
9898
/**

0 commit comments

Comments
 (0)