Re: [PATCH] drm: Don't block the kworker waiting for mode_config.lock in output_poll()

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

 



On Tuesday, 2016-12-06 11:37:15 +0000, Chris Wilson wrote:
> If we cannot acquire the mode_config.lock immediately, just back off and

s/mode_config.lock/mode_config.mutex lock/ ?

> queue a new attempt after the poll interval. This is mostly to stop the
> hung task spam when the system is deadlocked, but it will also lessen
> the load (in such extreme cases).
> 
> Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>

Reviewed-by: Eric Engestrom <eric.engestrom@xxxxxxxxxx>

> ---
>  drivers/gpu/drm/drm_probe_helper.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c
> index ff9ba6f35248..0bf629354297 100644
> --- a/drivers/gpu/drm/drm_probe_helper.c
> +++ b/drivers/gpu/drm/drm_probe_helper.c
> @@ -394,7 +394,11 @@ static void output_poll_execute(struct work_struct *work)
>  	if (!drm_kms_helper_poll)
>  		goto out;
>  
> -	mutex_lock(&dev->mode_config.mutex);
> +	if (!mutex_trylock(&dev->mode_config.mutex)) {
> +		repoll = true;
> +		goto out;
> +	}
> +
>  	drm_for_each_connector(connector, dev) {
>  
>  		/* Ignore forced connectors. */
> -- 
> 2.11.0
> 
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux