From: Sonika Jindal <sonika.jindal@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH] [RFC] drm/i915: Handle HPD when it has actually occurred
Date: Mon, 6 Jul 2015 11:23:53 +0530 [thread overview]
Message-ID: <1436162033-22654-1-git-send-email-sonika.jindal@intel.com> (raw)
Writing to PCH_PORT_HOTPLUG for each interrupt is not required.
Handle it only if hpd has actually occurred like we handle other
interrupts.
Signed-off-by: Sonika Jindal <sonika.jindal@intel.com>
---
Hi,
I see we don't check for hotplug_trigger before processing the HPD for any of the platform. Is there any reason for this?
For SKL, if I let write to PCH_PORT_HOTPLUG happen for all interrupts, somehow this register gets an invalid value at one point and it zeroes it out.
If I put this check before handling HPD, hotplug behaves fine.
Please let me know if you see any issue with this approach.
Thanks,
Sonika
drivers/gpu/drm/i915/i915_irq.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index a6fbe64..2d47372 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -1760,11 +1760,12 @@ static void cpt_irq_handler(struct drm_device *dev, u32 pch_iir)
u32 dig_hotplug_reg;
u32 pin_mask, long_mask;
- dig_hotplug_reg = I915_READ(PCH_PORT_HOTPLUG);
- I915_WRITE(PCH_PORT_HOTPLUG, dig_hotplug_reg);
-
- pch_get_hpd_pins(&pin_mask, &long_mask, hotplug_trigger, dig_hotplug_reg, hpd_cpt);
- intel_hpd_irq_handler(dev, pin_mask, long_mask);
+ if (hotplug_trigger) {
+ dig_hotplug_reg = I915_READ(PCH_PORT_HOTPLUG);
+ I915_WRITE(PCH_PORT_HOTPLUG, dig_hotplug_reg);
+ pch_get_hpd_pins(&pin_mask, &long_mask, hotplug_trigger, dig_hotplug_reg, hpd_cpt);
+ intel_hpd_irq_handler(dev, pin_mask, long_mask);
+ }
if (pch_iir & SDE_AUDIO_POWER_MASK_CPT) {
int port = ffs((pch_iir & SDE_AUDIO_POWER_MASK_CPT) >>
--
1.7.10.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next reply other threads:[~2015-07-06 6:04 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-06 5:53 Sonika Jindal [this message]
2015-07-06 8:36 ` [PATCH] [RFC] drm/i915: Handle HPD when it has actually occurred Daniel Vetter
2015-07-06 8:41 ` Jindal, Sonika
2015-07-06 12:24 ` Daniel Vetter
2015-07-06 8:49 ` Ville Syrjälä
2015-07-06 9:01 ` Jindal, Sonika
2015-07-06 11:18 ` Ville Syrjälä
2015-07-07 8:52 ` [PATCH] " Sonika Jindal
2015-07-07 13:21 ` Ville Syrjälä
2015-07-08 5:10 ` Jindal, Sonika
2015-07-08 8:48 ` Ville Syrjälä
2015-07-08 11:37 ` Sonika Jindal
2015-07-08 15:18 ` Daniel Vetter
2015-10-01 14:17 ` Jani Nikula
2015-07-08 8:13 ` shuang.he
2015-07-06 10:08 ` Sonika Jindal
2015-07-07 5:55 ` shuang.he
2015-07-06 9:54 ` [PATCH] [RFC] " shuang.he
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=1436162033-22654-1-git-send-email-sonika.jindal@intel.com \
--to=sonika.jindal@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox