From: Daniel Vetter Date: Tue, 29 Jan 2019 08:56:43 +0000 (+0100) Subject: drm/doc: Add a warning to drm_dev_is_unplugged X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=168982d243d7f8dc368e508a61a8516a23b0bbec;p=linux.git drm/doc: Add a warning to drm_dev_is_unplugged It's probably not what you want, definitely not after Noralf's work to add drm_dev_enter/exit. Cc: Noralf Trønnes Reviewed-by: Noralf Trønnes Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190129085643.16357-1-daniel.vetter@ffwll.ch --- diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h index 35af23f5fa0d0..e32c12877bc5f 100644 --- a/include/drm/drm_drv.h +++ b/include/drm/drm_drv.h @@ -643,6 +643,10 @@ void drm_dev_unplug(struct drm_device *dev); * Unplugging itself is singalled through drm_dev_unplug(). If a device is * unplugged, these two functions guarantee that any store before calling * drm_dev_unplug() is visible to callers of this function after it completes + * + * WARNING: This function fundamentally races against drm_dev_unplug(). It is + * recommended that drivers instead use the underlying drm_dev_enter() and + * drm_dev_exit() function pairs. */ static inline bool drm_dev_is_unplugged(struct drm_device *dev) {