diff options
author | Dave Airlie <airlied@redhat.com> | 2019-04-23 09:36:54 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2019-04-24 12:32:15 +1000 |
commit | 058ca50ce3f1d40dac4d918a91684b0af4a0c468 (patch) | |
tree | d1eb71a7daff85111cd777294365b979417fc3ff /drivers/gpu/drm/drm_auth.c | |
parent | 9b7a77435c1d87d89101484c9a96e577742d8cc2 (diff) | |
download | linux-058ca50ce3f1d40dac4d918a91684b0af4a0c468.tar.gz linux-058ca50ce3f1d40dac4d918a91684b0af4a0c468.tar.bz2 linux-058ca50ce3f1d40dac4d918a91684b0af4a0c468.zip |
drm/legacy: move lock cleanup for master into lock file (v2)
This makes it easier to remove legacy code later.
v2: move check into lock file as well.
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_auth.c')
-rw-r--r-- | drivers/gpu/drm/drm_auth.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/drivers/gpu/drm/drm_auth.c b/drivers/gpu/drm/drm_auth.c index 1669c42c40ed..ee969e9de472 100644 --- a/drivers/gpu/drm/drm_auth.c +++ b/drivers/gpu/drm/drm_auth.c @@ -274,21 +274,7 @@ void drm_master_release(struct drm_file *file_priv) if (!drm_is_current_master(file_priv)) goto out; - if (drm_core_check_feature(dev, DRIVER_LEGACY)) { - /* - * Since the master is disappearing, so is the - * possibility to lock. - */ - mutex_lock(&dev->struct_mutex); - if (master->lock.hw_lock) { - if (dev->sigdata.lock == master->lock.hw_lock) - dev->sigdata.lock = NULL; - master->lock.hw_lock = NULL; - master->lock.file_priv = NULL; - wake_up_interruptible_all(&master->lock.lock_queue); - } - mutex_unlock(&dev->struct_mutex); - } + drm_legacy_lock_master_cleanup(dev, master); if (dev->master == file_priv->master) drm_drop_master(dev, file_priv); |