Re: [PATCH v3 2/5] drm/i915: fix HPD IRQ reenable work cancelation

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

 



On Mon, 18 Aug 2014, Imre Deak <imre.deak@xxxxxxxxx> wrote:
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index 390ccc2..8a5a03f 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -1189,8 +1189,8 @@ static void i915_hotplug_work_func(struct work_struct *work)
>  	  * some connectors */
>  	if (hpd_disabled) {
>  		drm_kms_helper_poll_enable(dev);
> -		mod_timer(&dev_priv->hotplug_reenable_timer,
> -			  jiffies + msecs_to_jiffies(I915_REENABLE_HOTPLUG_DELAY));
> +		schedule_delayed_work(&dev_priv->hotplug_reenable_work,
> +			  msecs_to_jiffies(I915_REENABLE_HOTPLUG_DELAY));
>  	}

As we discussed face to face, there's a semantic change here, and a
lesson worth repeating on the list. If the timer is pending, mod_timer()
will update the expiry time. However, if the delayed work is pending,
schedule_delayed_work() will *not* update the expiry time.

I guess you need to be bitten by this to remember... been there done
that. ;) Happily there's no need to work around this anymore since

commit 8376fe22c7e79c7e90857d39f82aeae6cad6c4b8
Author: Tejun Heo <tj@xxxxxxxxxx>
Date:   Fri Aug 3 10:30:47 2012 -0700

    workqueue: implement mod_delayed_work[_on]()

and you can use mod_delayed_work().


BR,
Jani.


-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://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