drm: Move LOCK_TEST_WITH_RETURN to <drm/drm_legacy.h>
Unfortunately we can't move struct drm_lock_data easily since it's embedded into struct drm_master. And figuring out where exactly this struct should be allocated isn't that simple ... Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
@@ -221,23 +221,6 @@ int drm_err(const char *func, const char *format, ...);
|
||||
|
||||
#define DRM_IF_VERSION(maj, min) (maj << 16 | min)
|
||||
|
||||
/**
|
||||
* Test that the hardware lock is held by the caller, returning otherwise.
|
||||
*
|
||||
* \param dev DRM device.
|
||||
* \param filp file pointer of the caller.
|
||||
*/
|
||||
#define LOCK_TEST_WITH_RETURN( dev, _file_priv ) \
|
||||
do { \
|
||||
if (!_DRM_LOCK_IS_HELD(_file_priv->master->lock.hw_lock->lock) || \
|
||||
_file_priv->master->lock.file_priv != _file_priv) { \
|
||||
DRM_ERROR( "%s called without lock held, held %d owner %p %p\n",\
|
||||
__func__, _DRM_LOCK_IS_HELD(_file_priv->master->lock.hw_lock->lock),\
|
||||
_file_priv->master->lock.file_priv, _file_priv); \
|
||||
return -EINVAL; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
/**
|
||||
* Ioctl function type.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user