Re: [PATCH] drm: Paper over locking inversion after registration rework

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 04, 2016 at 12:15:14PM +0200, Daniel Vetter wrote:
> drm_connector_register_all requires a few too many locks because our
> connector_list locking is busted. Add another FIXME+hack to work
> around this. This should address the below lockdep splat:
> 
> Cc: Imre Deak <imre.deak@xxxxxxxxx>
> Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxxx>
> ---
>  drivers/gpu/drm/drm_connector.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
> index ef921fa09a84..d9104d8b3c6b 100644
> --- a/drivers/gpu/drm/drm_connector.c
> +++ b/drivers/gpu/drm/drm_connector.c
> @@ -401,16 +401,14 @@ int drm_connector_register_all(struct drm_device *dev)
>  	struct drm_connector *connector;
>  	int ret;
>  
> -	mutex_lock(&dev->mode_config.mutex);
> -
> -	drm_for_each_connector(connector, dev) {
> +	/* FIXME: taking the mode config mutex ends up in a clash with
> +	 * fbcon/backlight registration */
> +	list_for_each_entry(connector, &dev->mode_config.connector_list, head) {

Ok, double checked that the only time we delete from this list
(currently) is in cleanup. That's highly unlikely to be running at the
same time as the register, so

Acked-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux