From: Jani Nikula <jani.nikula@linux.intel.com>
To: Daniel Vetter <daniel@ffwll.ch>, Sonika Jindal <sonika.jindal@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Handle HPD when it has actually occurred
Date: Thu, 01 Oct 2015 17:17:49 +0300 [thread overview]
Message-ID: <871tdebrle.fsf@intel.com> (raw)
In-Reply-To: <20150708151849.GQ7568@phenom.ffwll.local>
On Wed, 08 Jul 2015, Daniel Vetter <daniel@ffwll.ch> wrote:
> On Wed, Jul 08, 2015 at 05:07:47PM +0530, Sonika Jindal wrote:
>> Writing to PCH_PORT_HOTPLUG for each interrupt is not required.
>> Handle it only if hpd has actually occurred like we handle other
>> interrupts.
>> v2: Make few variables local to if block (Ville)
>> v3: Add check for ibx/cpt both (Ville).
>> While at it, remove the redundant check for hotplug_trigger from
>> pch_get_hpd_pins
>> v4: Indentation (Ville)
>>
>> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>> Signed-off-by: Sonika Jindal <sonika.jindal@intel.com>
>
> Queued for -next, thanks for the patch.
This patch, i.e.
commit aaf5ec2e51ab1d9c5e962b4728a1107ed3ff7a3e
Author: Sonika Jindal <sonika.jindal@intel.com>
Date: Wed Jul 8 17:07:47 2015 +0530
drm/i915: Handle HPD when it has actually occurred
causes *tons* of
[drm:gen8_irq_handler [i915]] *ERROR* The master control interrupt lied (SDE)!
at boot. Suspiciously this happens a lot when doing native AUX on the DP
monitor.
Bug with dmesg is at https://bugs.freedesktop.org/show_bug.cgi?id=92084
BR,
Jani.
> -Daniel
>
>> ---
>> drivers/gpu/drm/i915/i915_irq.c | 32 +++++++++++++++++---------------
>> 1 file changed, 17 insertions(+), 15 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
>> index a6fbe64..a897f68 100644
>> --- a/drivers/gpu/drm/i915/i915_irq.c
>> +++ b/drivers/gpu/drm/i915/i915_irq.c
>> @@ -1266,9 +1266,6 @@ static void pch_get_hpd_pins(u32 *pin_mask, u32 *long_mask,
>> *pin_mask = 0;
>> *long_mask = 0;
>>
>> - if (!hotplug_trigger)
>> - return;
>> -
>> for_each_hpd_pin(i) {
>> if ((hpd[i] & hotplug_trigger) == 0)
>> continue;
>> @@ -1658,14 +1655,17 @@ static void ibx_irq_handler(struct drm_device *dev, u32 pch_iir)
>> struct drm_i915_private *dev_priv = dev->dev_private;
>> int pipe;
>> u32 hotplug_trigger = pch_iir & SDE_HOTPLUG_MASK;
>> - 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);
>> + if (hotplug_trigger) {
>> + u32 dig_hotplug_reg, pin_mask, long_mask;
>>
>> - pch_get_hpd_pins(&pin_mask, &long_mask, hotplug_trigger, dig_hotplug_reg, hpd_ibx);
>> - intel_hpd_irq_handler(dev, 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_ibx);
>> + intel_hpd_irq_handler(dev, pin_mask, long_mask);
>> + }
>>
>> if (pch_iir & SDE_AUDIO_POWER_MASK) {
>> int port = ffs((pch_iir & SDE_AUDIO_POWER_MASK) >>
>> @@ -1757,14 +1757,16 @@ static void cpt_irq_handler(struct drm_device *dev, u32 pch_iir)
>> struct drm_i915_private *dev_priv = dev->dev_private;
>> int pipe;
>> u32 hotplug_trigger = pch_iir & SDE_HOTPLUG_MASK_CPT;
>> - 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);
>> + if (hotplug_trigger) {
>> + u32 dig_hotplug_reg, pin_mask, long_mask;
>>
>> - pch_get_hpd_pins(&pin_mask, &long_mask, hotplug_trigger, dig_hotplug_reg, hpd_cpt);
>> - intel_hpd_irq_handler(dev, 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 (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
>
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-10-01 14:14 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-06 5:53 [PATCH] [RFC] drm/i915: Handle HPD when it has actually occurred Sonika Jindal
2015-07-06 8:36 ` 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 [this message]
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=871tdebrle.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=daniel@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=sonika.jindal@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox