diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-01-23 15:14:15 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-03-13 12:48:39 +0100 |
commit | 63951385052f7974155fa38f962f0f4e9847f90a (patch) | |
tree | 3dcfa46b90b55c3ed6ae7097e824da416f3eef96 /drivers/gpu/drm/drm_crtc.c | |
parent | 3ec0db819315c765b3c7bbf7e9dee2fe1f186f47 (diff) |
drm/doc: Repleace LOCKING kerneldoc sections in drm_modes.c
There's not really any value in stating that no locking is needed. And
even if the comment is useful, a check for the right mutex at the
beginning of the function is better since that can't be ingored as
easily as a bit of documentation.
Note that drm_mode_probed_add in drm_crtc.c is also changed, the next
patch will move this into drm_modes.c
v2: Don't add locking WARN_ONs where it is not strictly required (i.e.
the two functions to validate/prune mode lists).
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/drm_crtc.c')
-rw-r--r-- | drivers/gpu/drm/drm_crtc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index ea620f4cf6c7..353ff6398c36 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -730,6 +730,8 @@ EXPORT_SYMBOL(drm_crtc_index); void drm_mode_probed_add(struct drm_connector *connector, struct drm_display_mode *mode) { + WARN_ON(!mutex_is_locked(&connector->dev->mode_config.mutex)); + list_add_tail(&mode->head, &connector->probed_modes); } EXPORT_SYMBOL(drm_mode_probed_add); |