diff mbox

drm/i915: Enable GSE interrupt on BDW+

Message ID 1449008230-11869-1-git-send-email-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ville Syrjälä Dec. 1, 2015, 10:17 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

We've never actually enabled or unmasked the GSE interrupt on BDW+,
even though the interrupt handler was always prepared for it.
Let's enable it and see what happens.

Credit to Mark Kettenis who fixed this in the OpenBSD fork of the
driver. He reports that it fixed the "ACPI _BCM/_BCQ-based
brightness mechanism on a MacBookPro12,1 and a 3rd gen Lenovo X1
Carbon" for them.

References: http://lists.freedesktop.org/archives/intel-gfx/2015-December/081799.html
Reported-by: Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_irq.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Daniel Vetter Dec. 4, 2015, 10:41 a.m. UTC | #1
On Wed, Dec 02, 2015 at 12:17:10AM +0200, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> We've never actually enabled or unmasked the GSE interrupt on BDW+,
> even though the interrupt handler was always prepared for it.
> Let's enable it and see what happens.
> 
> Credit to Mark Kettenis who fixed this in the OpenBSD fork of the
> driver. He reports that it fixed the "ACPI _BCM/_BCQ-based
> brightness mechanism on a MacBookPro12,1 and a 3rd gen Lenovo X1
> Carbon" for them.
> 
> References: http://lists.freedesktop.org/archives/intel-gfx/2015-December/081799.html
> Reported-by: Mark Kettenis <mark.kettenis@xs4all.nl>
> Cc: Mark Kettenis <mark.kettenis@xs4all.nl>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Oh dear, there probably goes all our backlight fun. And how did we miss
that DE_MISC wasn't enabled for this long ... but there's indeed nothing
else interesting in there. Imo -fixes, and cc: stable as soon as someone
confirms it fixes something on our end too.

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

And big kudos to Mark!

Cheers, Daniel

> ---
>  drivers/gpu/drm/i915/i915_irq.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index e88d692583a5..ccdac24039e8 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -3655,6 +3655,7 @@ static void gen8_de_irq_postinstall(struct drm_i915_private *dev_priv)
>  	uint32_t de_pipe_enables;
>  	u32 de_port_masked = GEN8_AUX_CHANNEL_A;
>  	u32 de_port_enables;
> +	u32 de_misc_masked = GEN8_DE_MISC_GSE;
>  	enum pipe pipe;
>  
>  	if (INTEL_INFO(dev_priv)->gen >= 9) {
> @@ -3690,6 +3691,7 @@ static void gen8_de_irq_postinstall(struct drm_i915_private *dev_priv)
>  					  de_pipe_enables);
>  
>  	GEN5_IRQ_INIT(GEN8_DE_PORT_, ~de_port_masked, de_port_enables);
> +	GEN5_IRQ_INIT(GEN8_DE_MISC_, ~de_misc_masked, de_misc_masked);
>  }
>  
>  static int gen8_irq_postinstall(struct drm_device *dev)
> -- 
> 2.4.10
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula Dec. 4, 2015, 12:59 p.m. UTC | #2
On Fri, 04 Dec 2015, Daniel Vetter <daniel@ffwll.ch> wrote:
> On Wed, Dec 02, 2015 at 12:17:10AM +0200, ville.syrjala@linux.intel.com wrote:
>> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>> 
>> We've never actually enabled or unmasked the GSE interrupt on BDW+,
>> even though the interrupt handler was always prepared for it.
>> Let's enable it and see what happens.
>> 
>> Credit to Mark Kettenis who fixed this in the OpenBSD fork of the
>> driver. He reports that it fixed the "ACPI _BCM/_BCQ-based
>> brightness mechanism on a MacBookPro12,1 and a 3rd gen Lenovo X1
>> Carbon" for them.
>> 
>> References: http://lists.freedesktop.org/archives/intel-gfx/2015-December/081799.html
>> Reported-by: Mark Kettenis <mark.kettenis@xs4all.nl>
>> Cc: Mark Kettenis <mark.kettenis@xs4all.nl>
>> Cc: Jani Nikula <jani.nikula@linux.intel.com>
>> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Oh dear, there probably goes all our backlight fun. And how did we miss
> that DE_MISC wasn't enabled for this long ... but there's indeed nothing
> else interesting in there. Imo -fixes, and cc: stable as soon as someone
> confirms it fixes something on our end too.

I think this hasn't been such a big issue for us because we've mostly
moved on to native backlight, which is not affected.

Aaron, do you have any Broadwell ACPI backlight bugs open that might be
fixed by this?


BR,
Jani.


>
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>
> And big kudos to Mark!
>
> Cheers, Daniel
>
>> ---
>>  drivers/gpu/drm/i915/i915_irq.c | 2 ++
>>  1 file changed, 2 insertions(+)
>> 
>> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
>> index e88d692583a5..ccdac24039e8 100644
>> --- a/drivers/gpu/drm/i915/i915_irq.c
>> +++ b/drivers/gpu/drm/i915/i915_irq.c
>> @@ -3655,6 +3655,7 @@ static void gen8_de_irq_postinstall(struct drm_i915_private *dev_priv)
>>  	uint32_t de_pipe_enables;
>>  	u32 de_port_masked = GEN8_AUX_CHANNEL_A;
>>  	u32 de_port_enables;
>> +	u32 de_misc_masked = GEN8_DE_MISC_GSE;
>>  	enum pipe pipe;
>>  
>>  	if (INTEL_INFO(dev_priv)->gen >= 9) {
>> @@ -3690,6 +3691,7 @@ static void gen8_de_irq_postinstall(struct drm_i915_private *dev_priv)
>>  					  de_pipe_enables);
>>  
>>  	GEN5_IRQ_INIT(GEN8_DE_PORT_, ~de_port_masked, de_port_enables);
>> +	GEN5_IRQ_INIT(GEN8_DE_MISC_, ~de_misc_masked, de_misc_masked);
>>  }
>>  
>>  static int gen8_irq_postinstall(struct drm_device *dev)
>> -- 
>> 2.4.10
>> 
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Aaron Lu Dec. 7, 2015, 2:05 a.m. UTC | #3
On 12/04/2015 08:59 PM, Jani Nikula wrote:
> On Fri, 04 Dec 2015, Daniel Vetter <daniel@ffwll.ch> wrote:
>> On Wed, Dec 02, 2015 at 12:17:10AM +0200, ville.syrjala@linux.intel.com wrote:
>>> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>>>
>>> We've never actually enabled or unmasked the GSE interrupt on BDW+,
>>> even though the interrupt handler was always prepared for it.
>>> Let's enable it and see what happens.
>>>
>>> Credit to Mark Kettenis who fixed this in the OpenBSD fork of the
>>> driver. He reports that it fixed the "ACPI _BCM/_BCQ-based
>>> brightness mechanism on a MacBookPro12,1 and a 3rd gen Lenovo X1
>>> Carbon" for them.

Nice fix, thanks!

>>>
>>> References: http://lists.freedesktop.org/archives/intel-gfx/2015-December/081799.html
>>> Reported-by: Mark Kettenis <mark.kettenis@xs4all.nl>
>>> Cc: Mark Kettenis <mark.kettenis@xs4all.nl>
>>> Cc: Jani Nikula <jani.nikula@linux.intel.com>
>>> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>>
>> Oh dear, there probably goes all our backlight fun. And how did we miss
>> that DE_MISC wasn't enabled for this long ... but there's indeed nothing
>> else interesting in there. Imo -fixes, and cc: stable as soon as someone
>> confirms it fixes something on our end too.
> 
> I think this hasn't been such a big issue for us because we've mostly
> moved on to native backlight, which is not affected.
> 
> Aaron, do you have any Broadwell ACPI backlight bugs open that might be
> fixed by this?

No, not at this moment. As you have pointed, we should be using the
native interface instead of the ACPI one for those machines.
Thanks for the info :-)

Regards,
Aaron
Ville Syrjälä May 19, 2016, 11:47 a.m. UTC | #4
On Thu, May 19, 2016 at 10:02:40AM -0000, Patchwork wrote:
> == Series Details ==
> 
> Series: drm/i915: Enable GSE interrupt on BDW+ (rev2)
> URL   : https://patchwork.freedesktop.org/series/1366/
> State : failure
> 
> == Summary ==
> 
> Series 1366v2 drm/i915: Enable GSE interrupt on BDW+
> http://patchwork.freedesktop.org/api/1.0/series/1366/revisions/2/mbox
> 
> Test drv_hangman:
>         Subgroup error-state-basic:
>                 pass       -> INCOMPLETE (fi-snb-i7-2600)

This machine still tends to die in this test. I guess I'll need to
continue debugging the problem on my identical machine.

> Test kms_pipe_crc_basic:
>         Subgroup hang-read-crc-pipe-a:
>                 pass       -> DMESG-WARN (ro-ivb2-i7-3770)

[  515.639629] WARNING: CPU: 7 PID: 7798 at drivers/gpu/drm/i915/intel_display.c:13509 intel_atomic_commit+0x139a/0x1440 [i915]
[  515.639631] pipe A vblank wait timed out

https://bugs.freedesktop.org/show_bug.cgi?id=95125

>         Subgroup hang-read-crc-pipe-b:
>                 pass       -> DMESG-WARN (ro-ivb2-i7-3770)

[  546.241576] WARNING: CPU: 4 PID: 7839 at drivers/gpu/drm/i915/intel_display.c:13509 intel_atomic_commit+0x139a/0x1440 [i915]
[  546.241579] pipe B vblank wait timed out

same bug

> 
> fi-bsw-n3050     total:218  pass:174  dwarn:0   dfail:0   fail:2   skip:42 
> fi-byt-n2820     total:218  pass:174  dwarn:0   dfail:0   fail:3   skip:41 
> fi-hsw-i7-4770k  total:219  pass:198  dwarn:0   dfail:0   fail:0   skip:21 
> fi-hsw-i7-4770r  total:219  pass:192  dwarn:0   dfail:0   fail:0   skip:27 
> fi-skl-i7-6700k  total:219  pass:191  dwarn:0   dfail:0   fail:0   skip:28 
> fi-snb-i7-2600   total:37   pass:27   dwarn:0   dfail:0   fail:0   skip:9  
> ro-bdw-i5-5250u  total:219  pass:181  dwarn:0   dfail:0   fail:0   skip:38 
> ro-bdw-i7-5557U  total:219  pass:206  dwarn:0   dfail:0   fail:0   skip:13 
> ro-bdw-i7-5600u  total:219  pass:187  dwarn:0   dfail:0   fail:0   skip:32 
> ro-bsw-n3050     total:219  pass:175  dwarn:0   dfail:0   fail:2   skip:42 
> ro-hsw-i3-4010u  total:218  pass:193  dwarn:0   dfail:0   fail:0   skip:25 
> ro-hsw-i7-4770r  total:219  pass:194  dwarn:0   dfail:0   fail:0   skip:25 
> ro-ilk-i7-620lm  total:219  pass:151  dwarn:0   dfail:0   fail:1   skip:67 
> ro-ilk1-i5-650   total:214  pass:151  dwarn:0   dfail:0   fail:2   skip:61 
> ro-ivb-i7-3770   total:219  pass:183  dwarn:0   dfail:0   fail:0   skip:36 
> ro-ivb2-i7-3770  total:219  pass:185  dwarn:2   dfail:0   fail:0   skip:32 
> ro-skl-i7-6700hq total:214  pass:189  dwarn:0   dfail:0   fail:0   skip:25 
> ro-snb-i7-2620M  total:219  pass:177  dwarn:0   dfail:0   fail:1   skip:41 
> fi-bdw-i7-5557u failed to connect after reboot
> 
> Results at /archive/results/CI_IGT_test/RO_Patchwork_937/
> 
> a2499a0 drm-intel-nightly: 2016y-05m-18d-17h-17m-55s UTC integration manifest
> 42bb644 drm/i915: Enable GSE interrupt on BDW+
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index e88d692583a5..ccdac24039e8 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -3655,6 +3655,7 @@  static void gen8_de_irq_postinstall(struct drm_i915_private *dev_priv)
 	uint32_t de_pipe_enables;
 	u32 de_port_masked = GEN8_AUX_CHANNEL_A;
 	u32 de_port_enables;
+	u32 de_misc_masked = GEN8_DE_MISC_GSE;
 	enum pipe pipe;
 
 	if (INTEL_INFO(dev_priv)->gen >= 9) {
@@ -3690,6 +3691,7 @@  static void gen8_de_irq_postinstall(struct drm_i915_private *dev_priv)
 					  de_pipe_enables);
 
 	GEN5_IRQ_INIT(GEN8_DE_PORT_, ~de_port_masked, de_port_enables);
+	GEN5_IRQ_INIT(GEN8_DE_MISC_, ~de_misc_masked, de_misc_masked);
 }
 
 static int gen8_irq_postinstall(struct drm_device *dev)