[Intel-gfx] [PATCH 5/5] drm: Nerv drm_global_mutex BKL for good drivers
Chris Wilson
chris at chris-wilson.co.uk
Wed Jan 29 17:59:19 UTC 2020
Quoting Daniel Vetter (2020-01-29 08:24:10)
> @@ -378,9 +409,10 @@ int drm_open(struct inode *inode, struct file *filp)
> if (IS_ERR(minor))
> return PTR_ERR(minor);
>
> - mutex_unlock(&drm_global_mutex);
> -
> dev = minor->dev;
> + if (drm_dev_needs_global_mutex(dev))
> + mutex_unlock(&drm_global_mutex);
Too soon, too soon.
> +
> if (!atomic_fetch_inc(&dev->open_count))
> need_setup = 1;
>
> @@ -398,13 +430,15 @@ int drm_open(struct inode *inode, struct file *filp)
> }
> }
>
> - mutex_unlock(&drm_global_mutex);
> + if (drm_dev_needs_global_mutex(dev))
> + mutex_unlock(&drm_global_mutex);
More information about the Intel-gfx
mailing list