Skip to contentSkip to conversation

drm/i915: Respect num_pipes when install or reset dispaly IRQ

PATCH Superseded Wang Elaine 4 participants 6 messages Dec 9, 2016 – Dec 15, 2016

Subsystems (2)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 drm/i915: Respect num_pipes when install or reset dispaly IRQ

From: Elaine Wang <[email protected]>

Some platforms don't have display. To avoid accessing the non-existent registers, check whether num_pipes isn't zero before invoking dispaly IRQ install or reset function.

Cc Joonas Lahtinen <[email protected]>
---
 drivers/gpu/drm/i915/i915_irq.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/i915_irq.c +7 -3
index 0b119b9..81c6f45 100644
@@ -2990,8 +2990,10 @@ static void gen8_irq_reset(struct drm_device *dev)
 						   POWER_DOMAIN_PIPE(pipe)))
 			GEN8_IRQ_RESET_NDX(DE_PIPE, pipe);
 
-	GEN5_IRQ_RESET(GEN8_DE_PORT_);
-	GEN5_IRQ_RESET(GEN8_DE_MISC_);
+	if (INTEL_INFO(dev_priv)->num_pipes) {
+		GEN5_IRQ_RESET(GEN8_DE_PORT_);
+		GEN5_IRQ_RESET(GEN8_DE_MISC_);
+	}
 	GEN5_IRQ_RESET(GEN8_PCU_);
 
 	if (HAS_PCH_SPLIT(dev_priv))
@@ -3414,7 +3416,9 @@ static int gen8_irq_postinstall(struct drm_device *dev)
 		ibx_irq_pre_postinstall(dev);
 
 	gen8_gt_irq_postinstall(dev_priv);
-	gen8_de_irq_postinstall(dev_priv);
+
+	if (INTEL_INFO(dev_priv)->num_pipes)
+		gen8_de_irq_postinstall(dev_priv);
 
 	if (HAS_PCH_SPLIT(dev_priv))
 		ibx_irq_postinstall(dev);
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

✗ Fi.CI.BAT: warning for drm/i915: Respect num_pipes when install or reset dispaly IRQ

== Series Details ==

== Series Details ==

Series: drm/i915: Respect num_pipes when install or reset dispaly IRQ
URL : https://patchwork.freedesktop.org/series/16599/
State : warning

== Summary ==

Series 16599v1 drm/i915: Respect num_pipes when install or reset dispaly IRQ
https://patchwork.freedesktop.org/api/1.0/series/16599/revisions/1/mbox/

Test kms_force_connector_basic:

        Subgroup force-load-detect:
                pass       -> DMESG-WARN (fi-ivb-3770)
fi-bdw-5557u     total:247  pass:233  dwarn:0   dfail:0   fail:0   skip:14 
fi-bsw-n3050     total:247  pass:208  dwarn:0   dfail:0   fail:0   skip:39 
fi-bxt-t5700     total:247  pass:220  dwarn:0   dfail:0   fail:0   skip:27 
fi-byt-j1900     total:247  pass:220  dwarn:0   dfail:0   fail:0   skip:27 
fi-byt-n2820     total:247  pass:216  dwarn:0   dfail:0   fail:0   skip:31 
fi-hsw-4770      total:247  pass:228  dwarn:0   dfail:0   fail:0   skip:19 
fi-hsw-4770r     total:247  pass:228  dwarn:0   dfail:0   fail:0   skip:19 
fi-ilk-650       total:247  pass:195  dwarn:0   dfail:0   fail:0   skip:52 
fi-ivb-3520m     total:247  pass:226  dwarn:0   dfail:0   fail:0   skip:21 
fi-ivb-3770      total:247  pass:225  dwarn:1   dfail:0   fail:0   skip:21 
fi-kbl-7500u     total:247  pass:226  dwarn:0   dfail:0   fail:0   skip:21 
fi-skl-6260u     total:247  pass:234  dwarn:0   dfail:0   fail:0   skip:13 
fi-skl-6700hq    total:247  pass:227  dwarn:0   dfail:0   fail:0   skip:20 
fi-skl-6700k     total:247  pass:224  dwarn:3   dfail:0   fail:0   skip:20 
fi-skl-6770hq    total:247  pass:234  dwarn:0   dfail:0   fail:0   skip:13 
fi-snb-2520m     total:247  pass:216  dwarn:0   dfail:0   fail:0   skip:31 
fi-snb-2600      total:247  pass:215  dwarn:0   dfail:0   fail:0   skip:32 

de43f4e755c6bf50ad53b4ccacedf9850f42eda4 drm-tip: 2016y-12m-09d-09h-01m-58s UTC integration manifest ef0b9fd drm/i915: Respect num_pipes when install or reset dispaly IRQ

== Logs ==

For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_3248/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw

Re: ✗ Fi.CI.BAT: warning for drm/i915: Respect num_pipes when install or reset dispaly IRQ

The failed case is KBL hang. This patch shouldn't impact platforms that have non-zero num_pipes. So the KBL hang isn't a regression caused by this patch. According to below kernel log before hang
(https://intel-gfx-ci.01.org/CI/Patchwork_3266/fi-kbl-7500u/dmesg-during.log),
It should be the same issue as Bug 98670 - [BAT] WARN_ON(dev_priv->gt.awake) during drv_module_reload_basic (https://bugs.freedesktop.org/show_bug.cgi?id=98670),

[   25.000193] ------------[ cut here ]------------
[   25.000227] WARNING: CPU: 3 PID: 6396 at drivers/gpu/drm/i915/i915_gem.c:4241 i915_gem_suspend+0x181/0x190 [i915]
[   25.000228] WARN_ON(dev_priv->gt.awake)
[   25.000229] Modules linked in:
[   25.000231]  i915(-) snd_hda_codec_hdmi snd_hda_codec_realtek x86_pkg_temp_thermal intel_powerclamp snd_hda_codec_generic coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hda_codec snd_hwdep snd_hda_core snd_pcm mei_me mei e1000e ptp pps_core i2c_hid [last unloaded: snd_hda_intel]
[   25.000249] CPU: 3 PID: 6396 Comm: drv_module_relo Tainted: G     U          4.9.0-rc8-CI-Patchwork_3266+ #1
[   25.000250] Hardware name: GIGABYTE GB-BKi7A-7500/MFLP7AP-00, BIOS F1 07/27/2016
[   25.000252]  ffffc90000547d18 ffffffff81435bf5 ffffc90000547d68 0000000000000000
[   25.000256]  ffffc90000547d58 ffffffff8107e4d6 0000109100000000 ffff880257a30000
[   25.000259]  0000000000000000 ffff880257a30068 ffffffffa01370c0 0000000000000000
[   25.000263] Call Trace:
[   25.000268]  [<ffffffff81435bf5>] dump_stack+0x67/0x92
[   25.000271]  [<ffffffff8107e4d6>] __warn+0xc6/0xe0
[   25.000274]  [<ffffffff8107e53a>] warn_slowpath_fmt+0x4a/0x50
[   25.000298]  [<ffffffffa0049a21>] i915_gem_suspend+0x181/0x190 [i915]
[   25.000314]  [<ffffffffa0006f4e>] i915_driver_unload+0x1e/0x190 [i915]
[   25.000331]  [<ffffffffa0010b24>] i915_pci_remove+0x14/0x20 [i915]
[   25.000334]  [<ffffffff81485954>] pci_device_remove+0x34/0xb0
[   25.000339]  [<ffffffff81584d8c>] __device_release_driver+0x9c/0x150
[   25.000340]  [<ffffffff81585906>] driver_detach+0xb6/0xc0
[   25.000343]  [<ffffffff81584823>] bus_remove_driver+0x53/0xd0
[   25.000345]  [<ffffffff815863c7>] driver_unregister+0x27/0x50
[   25.000347]  [<ffffffff814842f5>] pci_unregister_driver+0x25/0x70
[   25.000375]  [<ffffffffa00f55e4>] i915_exit+0x1a/0x71 [i915]
[   25.000378]  [<ffffffff8111a863>] SyS_delete_module+0x193/0x1e0
[   25.000380]  [<ffffffff81823d6e>] entry_SYSCALL_64_fastpath+0x1c/0xb1
Quoted 47 lines

-----Original Message-----
From: Intel-gfx [mailto:[email protected]] On Behalf Of Patchwork
Sent: Friday, December 9, 2016 6:53 PM
To: Wang, Elaine <[email protected]>
Cc: [email protected]
Subject: [Intel-gfx] ✗ Fi.CI.BAT: warning for drm/i915: Respect num_pipes when install or reset dispaly IRQ

== Series Details ==

Series: drm/i915: Respect num_pipes when install or reset dispaly IRQ
URL : https://patchwork.freedesktop.org/series/16599/
State : warning

== Summary ==

Series 16599v1 drm/i915: Respect num_pipes when install or reset dispaly IRQ
https://patchwork.freedesktop.org/api/1.0/series/16599/revisions/1/mbox/

Test kms_force_connector_basic:

        Subgroup force-load-detect:
                pass       -> DMESG-WARN (fi-ivb-3770)
fi-bdw-5557u     total:247  pass:233  dwarn:0   dfail:0   fail:0   skip:14
fi-bsw-n3050     total:247  pass:208  dwarn:0   dfail:0   fail:0   skip:39
fi-bxt-t5700     total:247  pass:220  dwarn:0   dfail:0   fail:0   skip:27
fi-byt-j1900     total:247  pass:220  dwarn:0   dfail:0   fail:0   skip:27
fi-byt-n2820     total:247  pass:216  dwarn:0   dfail:0   fail:0   skip:31
fi-hsw-4770      total:247  pass:228  dwarn:0   dfail:0   fail:0   skip:19
fi-hsw-4770r     total:247  pass:228  dwarn:0   dfail:0   fail:0   skip:19
fi-ilk-650       total:247  pass:195  dwarn:0   dfail:0   fail:0   skip:52
fi-ivb-3520m     total:247  pass:226  dwarn:0   dfail:0   fail:0   skip:21
fi-ivb-3770      total:247  pass:225  dwarn:1   dfail:0   fail:0   skip:21
fi-kbl-7500u     total:247  pass:226  dwarn:0   dfail:0   fail:0   skip:21
fi-skl-6260u     total:247  pass:234  dwarn:0   dfail:0   fail:0   skip:13
fi-skl-6700hq    total:247  pass:227  dwarn:0   dfail:0   fail:0   skip:20
fi-skl-6700k     total:247  pass:224  dwarn:3   dfail:0   fail:0   skip:20
fi-skl-6770hq    total:247  pass:234  dwarn:0   dfail:0   fail:0   skip:13
fi-snb-2520m     total:247  pass:216  dwarn:0   dfail:0   fail:0   skip:31
fi-snb-2600      total:247  pass:215  dwarn:0   dfail:0   fail:0   skip:32

de43f4e755c6bf50ad53b4ccacedf9850f42eda4 drm-tip: 2016y-12m-09d-09h- 01m-58s UTC integration manifest ef0b9fd drm/i915: Respect num_pipes when install or reset dispaly IRQ

Quoted 7 lines

== Logs ==

For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_3248/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

maintainer Reviewed-by on v2 1/1
#3 lore raw
In reply to Wang Elaine
Quoted 8 lines · Wang Elaine

From: Elaine Wang <[email protected]>

Some platforms don't have display. To avoid accessing the non-existent registers, check whether num_pipes isn't zero before invoking dispaly IRQ install or reset function.

Cc Joonas Lahtinen <[email protected]>

Seems straightforward to me. A-b from Ville?

Regards, Joonas

Signature · 7 lines
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#4 lore raw
Quoted 11 lines · Joonas Lahtinen
Quoted 8 lines · Wang Elaine

From: Elaine Wang <[email protected]>

Some platforms don't have display. To avoid accessing the non-existent registers, check whether num_pipes isn't zero before invoking dispaly IRQ install or reset function.

Cc Joonas Lahtinen <[email protected]>

Seems straightforward to me. A-b from Ville?

Once upon a time we used HAS_PCH_NOP(). How does that differ? -Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#5 lore raw
Quoted 8 lines · Joonas Lahtinen
Quoted 7 lines · Wang Elaine
Quoted 6 lines

From: Elaine Wang <[email protected]>

Some platforms don't have display. To avoid accessing the non-existent registers, check whether num_pipes isn't zero before invoking dispaly IRQ install or reset function.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Cc Joonas Lahtinen <[email protected]>

Seems straightforward to me. A-b from Ville?

Once upon a time we used HAS_PCH_NOP(). How does that differ? -Chris

There is no difference. HAS_PCH_NOP() is equal to INTEL_INFO(dev_priv)->num_pipes == 0. Let me modify the patch and use ! HAS_PCH_NOP() instead.
Thanks,
Elaine

Quoted 7 lines

--
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx