All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Imre Deak <imre.deak@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v3 2/5] drm/i915: fix HPD IRQ reenable work	cancelation
Date: Mon, 18 Aug 2014 15:25:21 +0300	[thread overview]
Message-ID: <8761hqnfwu.fsf@intel.com> (raw)
In-Reply-To: <1408362166-9543-2-git-send-email-imre.deak@intel.com>

On Mon, 18 Aug 2014, Imre Deak <imre.deak@intel.com> 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@kernel.org>
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

  reply	other threads:[~2014-08-18 12:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-18 11:42 [PATCH v3 1/5] drm/i915: take display port power domain in DP HPD handler Imre Deak
2014-08-18 11:42 ` [PATCH v3 2/5] drm/i915: fix HPD IRQ reenable work cancelation Imre Deak
2014-08-18 12:25   ` Jani Nikula [this message]
2014-08-18 12:37   ` [PATCH v4 " Imre Deak
2014-08-18 11:42 ` [PATCH v3 3/5] drm/i915: cancel hotplug and dig_port work during suspend and unload Imre Deak
2014-08-18 11:42 ` [PATCH v3 4/5] drm/i915: make sure VDD is turned off during system suspend Imre Deak
2014-08-18 11:42 ` [PATCH v3 5/5] drm/i915: don't try to retrain a DP link on an inactive CRTC Imre Deak
2014-08-18 13:35 ` [PATCH v3 1/5] drm/i915: take display port power domain in DP HPD handler Jani Nikula

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8761hqnfwu.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.