All of lore.kernel.org
 help / color / mirror / Atom feed
From: Egbert Eich <eich@freedesktop.org>
To: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Egbert Eich <eich@suse.de>,
	Daniel Vetter <daniel.vetter@intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v3 5/7] drm/i915: Add Reenable Timer to turn Hotplug Detection back on (v3)
Date: Thu, 11 Apr 2013 15:10:03 +0200	[thread overview]
Message-ID: <20130411131003.GA17947@debian> (raw)
In-Reply-To: <8738uxpcrg.fsf@intel.com>

On Thu, Apr 11, 2013 at 01:44:51PM +0300, Jani Nikula wrote:
> > +
> > +	spin_lock_irqsave(&dev_priv->irq_lock, irqflags);
> > +	for (i = (HPD_NONE + 1); i < HPD_NUM_PINS; i++) {
> > +		struct drm_connector *connector;
> > +
> > +		if (dev_priv->hpd_stats[i].hpd_mark != HPD_MARK_DISABLED)
> 
> I think this is wrong, skipping HPD_DISABLED.

Right, this was indeed wrong.

> 
> > +			continue;
> > +
> > +		dev_priv->hpd_stats[i].hpd_mark = HPD_ENABLED;
> > +
> > +		list_for_each_entry(connector, &mode_config->connector_list, head) {
> > +			struct intel_connector *intel_connector = to_intel_connector(connector);
> > +
> > +			if (intel_connector->encoder->hpd_pin == i) {
> > +				if (connector->polled != intel_connector->polled)
> > +					DRM_DEBUG_DRIVER("Reenabling HPD on connector %s\n",
> > +							 drm_get_connector_name(connector));
> > +				connector->polled = intel_connector->polled;
> > +				if (!connector->polled)
> > +					connector->polled = DRM_CONNECTOR_POLL_HPD;
> > +			}
> > +		}
> > +		dev_priv->display.hpd_irq_setup(dev);
> 
> You don't need to call this at each iteration, do you?

Right, you are right here as well.
> 
> > +	}
> 
> In fact, couldn't you just call intel_hpd_init(), or modify it to do
> what you want? Keep it simple.

Well, intel_hpd_init() is initializing every to dev_priv->hpd_stats[i].hpd_mark
to HPD_ENABLED. Can we rule out that the timer runs between the interrupt
handler and the worker - as in this state this variable might me set to
HPD_MARK_DISABLED?
In fact it would probably not even hurt if we changed the HPD_MARK_DISABLED
to HPD_ENABLED as in a storm condition this condition will soon reappear but
I'd rather avoid it.
Of course we could pass an argument to the function to distinguish both
conditions. This is a simplification which can still be introduced - when
I'm in fact able to do some testing.

Thanks a lot for the review!

Cheers,
	Egbert.

  reply	other threads:[~2013-04-11 13:10 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-09  9:24 [PATCH v3 0/7] Add HPD interrupt storm detection Egbert Eich
2013-04-09  9:24 ` [PATCH v3 1/7] drm/i915: Add HPD IRQ storm detection (v4) Egbert Eich
2013-04-11  9:32   ` Jani Nikula
2013-04-11 10:46     ` Daniel Vetter
2013-04-16  9:50     ` Egbert Eich
2013-04-16 11:34     ` Egbert Eich
2013-04-16 11:36       ` [PATCH 1/7] drm/i915: Add HPD IRQ storm detection (v5) Egbert Eich
2013-04-16 11:36         ` [PATCH 2/7] drm/i915: (re)init HPD interrupt storm statistics Egbert Eich
2013-04-16 11:36         ` [PATCH 3/7] drm/i915: Mask out the HPD irq bits before setting them individually Egbert Eich
2013-04-16 11:36         ` [PATCH 4/7] drm/i915: Disable HPD interrupt on pin when irq storm is detected (v3) Egbert Eich
2013-04-16 11:36         ` [PATCH 5/7] drm/i915: Add Reenable Timer to turn Hotplug Detection back on (v4) Egbert Eich
2013-04-16 18:07           ` Daniel Vetter
2013-04-16 20:22             ` Egbert Eich
2013-04-16 20:26               ` Daniel Vetter
2013-04-16 11:36         ` [PATCH 6/7] drm/i915: Add bit field to record which pins have received HPD events (v3) Egbert Eich
2013-04-16 11:37         ` [PATCH 7/7] drm/i915: Only reprobe display on encoder which has received an HPD event (v2) Egbert Eich
2013-04-09  9:24 ` [PATCH v3 2/7] drm/i915: (re)init HPD interrupt storm statistics Egbert Eich
2013-04-11  9:54   ` Jani Nikula
2013-04-09  9:24 ` [PATCH v3 3/7] drm/i915: Mask out the HPD irq bits before setting them individually Egbert Eich
2013-04-11  9:56   ` Jani Nikula
2013-04-09  9:24 ` [PATCH v3 4/7] drm/i915: Disable HPD interrupt on pin when irq storm is detected (v2) Egbert Eich
2013-04-11 10:13   ` Jani Nikula
2013-04-11 13:25     ` [PATCH v3] drm/i915: Disable HPD interrupt on pin when irq storm is detected (v3) Egbert Eich
2013-04-11 14:20       ` Jani Nikula
2013-04-09  9:24 ` [PATCH v3 5/7] drm/i915: Add Reenable Timer to turn Hotplug Detection back on (v3) Egbert Eich
2013-04-11 10:44   ` Jani Nikula
2013-04-11 13:10     ` Egbert Eich [this message]
2013-04-11 14:48       ` Jani Nikula
2013-04-11 13:28     ` [PATCH v4] drm/i915: Add Reenable Timer to turn Hotplug Detection back on (v4) Egbert Eich
2013-04-11 14:30       ` Jani Nikula
2013-04-09  9:24 ` [PATCH v3 6/7] drm/i915: Add bit field to record which pins have received HPD events (v2) Egbert Eich
2013-04-11 13:21   ` Jani Nikula
2013-04-11 13:34     ` Egbert Eich
2013-04-11 13:57     ` [PATCH v3] drm/i915: Add bit field to record which pins have received HPD events (v3) Egbert Eich
2013-04-11 14:03       ` [PATCH v3 Update] " Egbert Eich
2013-04-11 15:00         ` Jani Nikula
2013-04-09  9:24 ` [PATCH v3 7/7] drm/i915: Only reprobe display on encoder which has received an HPD event Egbert Eich
2013-04-11 13:35   ` Jani Nikula
     [not found] <Message-ID: <87wqs9nqbb.fsf@intel.com>
2013-04-11 14:00 ` [PATCH v2] drm/i915: Only reprobe display on encoder which has received an HPD event (v2) Egbert Eich
2013-04-11 15:06   ` Jani Nikula
2013-04-23 12:26     ` Daniel Vetter

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=20130411131003.GA17947@debian \
    --to=eich@freedesktop.org \
    --cc=daniel.vetter@intel.com \
    --cc=eich@suse.de \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    /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.