Skip to contentSkip to conversation

'power well on' trace in Linus current tree.

PATCH Applied Dave Jones 3 participants 5 messages Dec 13, 2013

Subsystems (2)
lore
Share & tools
lore

Dave Jones

author
#0 lore raw

I left this on overnight, and this morning this was in the log.

Dave

WARNING: CPU: 1 PID: 131 at drivers/gpu/drm/i915/intel_display.c:6309 hsw_enable_pc8_work+0x6a9/0x6d0()
Power well on
Modules linked in: tun hidp bnep rfcomm can_raw can_bcm caif_socket caif phonet af_rxrpc bluetooth can llc2 pppoe pppox ppp_generic slhc af_key rose netrom snd_seq_dummy ipt_ULOG nfnetlink nfc af_802154 irda crc_ccitt rds scsi_transport_iscsi x25 atm appletalk ipx p8023 psnap p8022 llc ax25 cfg80211 rfkill snd_hda_codec_hdmi xfs snd_hda_codec_realtek snd_hda_intel snd_hda_codec coretemp snd_hwdep hwmon snd_seq snd_seq_device x86_pkg_temp_thermal snd_pcm libcrc32c snd_page_alloc e1000e snd_timer snd kvm_intel kvm crct10dif_pclmul crc32c_intel ghash_clmulni_intel shpchp serio_raw pcspkr ptp usb_debug soundcore microcode pps_core
CPU: 1 PID: 131 Comm: kworker/1:2 Not tainted 3.13.0-rc3+ #3
Workqueue: events hsw_enable_pc8_work
 ffffffff81a98b80 ffff88023d185c98 ffffffff8174cfd8 ffff88023d185ce0
 ffff88023d185cd0 ffffffff8105414d ffff88023e28d5f8 ffff88023e288000
 ffff88024155ef50 ffff88024155ef58 0000000000000080 ffff88023d185d30
Call Trace:
 [<ffffffff8174cfd8>] dump_stack+0x4e/0x7a
 [<ffffffff8105414d>] warn_slowpath_common+0x7d/0xa0
 [<ffffffff810541bc>] warn_slowpath_fmt+0x4c/0x50
 [<ffffffff81493339>] hsw_enable_pc8_work+0x6a9/0x6d0
 [<ffffffff81076611>] process_one_work+0x211/0x6f0
 [<ffffffff810765a5>] ? process_one_work+0x1a5/0x6f0
 [<ffffffff81076c0b>] worker_thread+0x11b/0x3a0
 [<ffffffff81076af0>] ? process_one_work+0x6f0/0x6f0
 [<ffffffff8107f55f>] kthread+0xff/0x120
 [<ffffffff8107f460>] ? insert_kthread_work+0x80/0x80
 [<ffffffff817608ac>] ret_from_fork+0x7c/0xb0
 [<ffffffff8107f460>] ? insert_kthread_work+0x80/0x80
---[ end trace 23d69c0f014b7eb8 ]---

00:02.0 8086:0412 VGA compatible controller: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller (rev 06)

#1 lore raw

Hi

2013/12/13 Dave Jones <[email protected]>:

Quoted 18 lines

I left this on overnight, and this morning this was in the log.

Dave

WARNING: CPU: 1 PID: 131 at drivers/gpu/drm/i915/intel_display.c:6309 hsw_enable_pc8_work+0x6a9/0x6d0()
Power well on
Modules linked in: tun hidp bnep rfcomm can_raw can_bcm caif_socket caif phonet af_rxrpc bluetooth can llc2 pppoe pppox ppp_generic slhc af_key rose netrom snd_seq_dummy ipt_ULOG nfnetlink nfc af_802154 irda crc_ccitt rds scsi_transport_iscsi x25 atm appletalk ipx p8023 psnap p8022 llc ax25 cfg80211 rfkill snd_hda_codec_hdmi xfs snd_hda_codec_realtek snd_hda_intel snd_hda_codec coretemp snd_hwdep hwmon snd_seq snd_seq_device x86_pkg_temp_thermal snd_pcm libcrc32c snd_page_alloc e1000e snd_timer snd kvm_intel kvm crct10dif_pclmul crc32c_intel ghash_clmulni_intel shpchp serio_raw pcspkr ptp usb_debug soundcore microcode pps_core
CPU: 1 PID: 131 Comm: kworker/1:2 Not tainted 3.13.0-rc3+ #3
Workqueue: events hsw_enable_pc8_work
 ffffffff81a98b80 ffff88023d185c98 ffffffff8174cfd8 ffff88023d185ce0
 ffff88023d185cd0 ffffffff8105414d ffff88023e28d5f8 ffff88023e288000
 ffff88024155ef50 ffff88024155ef58 0000000000000080 ffff88023d185d30
Call Trace:
 [<ffffffff8174cfd8>] dump_stack+0x4e/0x7a
 [<ffffffff8105414d>] warn_slowpath_common+0x7d/0xa0
 [<ffffffff810541bc>] warn_slowpath_fmt+0x4c/0x50
 [<ffffffff81493339>] hsw_enable_pc8_work+0x6a9/0x6d0
 [<ffffffff81076611>] process_one_work+0x211/0x6f0
Quoted 8 lines
 [<ffffffff810765a5>] ? process_one_work+0x1a5/0x6f0
 [<ffffffff81076c0b>] worker_thread+0x11b/0x3a0
 [<ffffffff81076af0>] ? process_one_work+0x6f0/0x6f0
 [<ffffffff8107f55f>] kthread+0xff/0x120
 [<ffffffff8107f460>] ? insert_kthread_work+0x80/0x80
 [<ffffffff817608ac>] ret_from_fork+0x7c/0xb0
 [<ffffffff8107f460>] ? insert_kthread_work+0x80/0x80
---[ end trace 23d69c0f014b7eb8 ]---

It looks like we need "drm/i915: get a PC8 reference when enabling the power well" in -fixes instead of -next. For completeness, we should probably also move "drm/i915: change CRTC assertion on LCPLL disable" to -fixes. My bad, I forgot to tag them as patches for -fixes. Or we could just disable PC8 by default. Daniel, how do you want to proceed?

The mentioned patches:

http://cgit.freedesktop.org/~danvet/drm-intel/commit/?h=drm-intel-next-queued&id=d62292c8f778772d1b6ec125d461c8c16fdc0417
http://cgit.freedesktop.org/~danvet/drm-intel/commit/?h=drm-intel-next-queued&id=798183c54799fbe1e5a5bfabb3a8c0505ffd2149

Quoted 8 lines

00:02.0 8086:0412 VGA compatible controller: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller (rev 06)

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

Signature · 1 line
Paulo Zanoni
#2 lore raw
Quoted 36 lines · Paulo Zanoni

Hi

2013/12/13 Dave Jones <[email protected]>:

Quoted 18 lines

I left this on overnight, and this morning this was in the log.

Dave

WARNING: CPU: 1 PID: 131 at drivers/gpu/drm/i915/intel_display.c:6309 hsw_enable_pc8_work+0x6a9/0x6d0()
Power well on
Modules linked in: tun hidp bnep rfcomm can_raw can_bcm caif_socket caif phonet af_rxrpc bluetooth can llc2 pppoe pppox ppp_generic slhc af_key rose netrom snd_seq_dummy ipt_ULOG nfnetlink nfc af_802154 irda crc_ccitt rds scsi_transport_iscsi x25 atm appletalk ipx p8023 psnap p8022 llc ax25 cfg80211 rfkill snd_hda_codec_hdmi xfs snd_hda_codec_realtek snd_hda_intel snd_hda_codec coretemp snd_hwdep hwmon snd_seq snd_seq_device x86_pkg_temp_thermal snd_pcm libcrc32c snd_page_alloc e1000e snd_timer snd kvm_intel kvm crct10dif_pclmul crc32c_intel ghash_clmulni_intel shpchp serio_raw pcspkr ptp usb_debug soundcore microcode pps_core
CPU: 1 PID: 131 Comm: kworker/1:2 Not tainted 3.13.0-rc3+ #3
Workqueue: events hsw_enable_pc8_work
 ffffffff81a98b80 ffff88023d185c98 ffffffff8174cfd8 ffff88023d185ce0
 ffff88023d185cd0 ffffffff8105414d ffff88023e28d5f8 ffff88023e288000
 ffff88024155ef50 ffff88024155ef58 0000000000000080 ffff88023d185d30
Call Trace:
 [<ffffffff8174cfd8>] dump_stack+0x4e/0x7a
 [<ffffffff8105414d>] warn_slowpath_common+0x7d/0xa0
 [<ffffffff810541bc>] warn_slowpath_fmt+0x4c/0x50
 [<ffffffff81493339>] hsw_enable_pc8_work+0x6a9/0x6d0
 [<ffffffff81076611>] process_one_work+0x211/0x6f0
Quoted 8 lines
 [<ffffffff810765a5>] ? process_one_work+0x1a5/0x6f0
 [<ffffffff81076c0b>] worker_thread+0x11b/0x3a0
 [<ffffffff81076af0>] ? process_one_work+0x6f0/0x6f0
 [<ffffffff8107f55f>] kthread+0xff/0x120
 [<ffffffff8107f460>] ? insert_kthread_work+0x80/0x80
 [<ffffffff817608ac>] ret_from_fork+0x7c/0xb0
 [<ffffffff8107f460>] ? insert_kthread_work+0x80/0x80
---[ end trace 23d69c0f014b7eb8 ]---

It looks like we need "drm/i915: get a PC8 reference when enabling the power well" in -fixes instead of -next. For completeness, we should probably also move "drm/i915: change CRTC assertion on LCPLL disable" to -fixes. My bad, I forgot to tag them as patches for -fixes. Or we could just disable PC8 by default. Daniel, how do you want to proceed?

Quoted 3 lines

The mentioned patches:

http://cgit.freedesktop.org/~danvet/drm-intel/commit/?h=drm-intel-next-queued&id=d62292c8f778772d1b6ec125d461c8c16fdc0417

This one here doesn't really apply on -fixes due to Imre's power well rework. Care to send a rebased version?

Quoted 1 line

http://cgit.freedesktop.org/~danvet/drm-intel/commit/?h=drm-intel-next-queued&id=798183c54799fbe1e5a5bfabb3a8c0505ffd2149

I've tentatively moved this one to my -fixes queue, it's benign enough.

Thanks, Daniel

Quoted 15 lines
Quoted 10 lines

00:02.0 8086:0412 VGA compatible controller: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller (rev 06)

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

Signature · 1 line
Paulo Zanoni
Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
#3 lore raw

PATCH 1/1 drm/i915: get a PC8 reference when enabling the power well

From: Paulo Zanoni <[email protected]>

In the current code, at haswell_modeset_global_resources, first we decide if we want to enable/disable the power well, then we decide if we want to enable/disable PC8. On the case where we're enabling PC8 this works fine, but on the case where we disable PC8 due to a non-eDP monitor being enabled, we first enable the power well and then disable PC8. Although wrong, this doesn't seem to be causing any problems now, and we don't even see anything in dmesg. But the patches for runtime D3 turn this problem into a real bug, so we need to fix it.

This fixes the "modeset-non-lpsp" subtest from the "pm_pc8" test from intel-gpu-tools.

v2: - Rebase (i915_disable_power_well).
v3: - More reabase.
v4: - Rebase on top of -fixes instead of -nightly.

---
 drivers/gpu/drm/i915/intel_pm.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_pm.c +12 -2
index 3657ab4..26c29c1 100644
@@ -5688,6 +5688,8 @@ static void __intel_set_power_well(struct drm_device *dev, bool enable)
 	unsigned long irqflags;
 	uint32_t tmp;
 
+	WARN_ON(dev_priv->pc8.enabled);
+
 	tmp = I915_READ(HSW_PWR_WELL_DRIVER);
 	is_enabled = tmp & HSW_PWR_WELL_STATE_ENABLED;
 	enable_requested = tmp & HSW_PWR_WELL_ENABLE_REQUEST;
@@ -5747,16 +5749,24 @@ static void __intel_set_power_well(struct drm_device *dev, bool enable)
 static void __intel_power_well_get(struct drm_device *dev,
 				   struct i915_power_well *power_well)
 {
-	if (!power_well->count++)
+	struct drm_i915_private *dev_priv = dev->dev_private;
+
+	if (!power_well->count++) {
+		hsw_disable_package_c8(dev_priv);
 		__intel_set_power_well(dev, true);
+	}
 }
 
 static void __intel_power_well_put(struct drm_device *dev,
 				   struct i915_power_well *power_well)
 {
+	struct drm_i915_private *dev_priv = dev->dev_private;
+
 	WARN_ON(!power_well->count);
-	if (!--power_well->count && i915_disable_power_well)
+	if (!--power_well->count && i915_disable_power_well) {
 		__intel_set_power_well(dev, false);
+		hsw_enable_package_c8(dev_priv);
+	}
 }
 
 void intel_display_power_get(struct drm_device *dev,
Signature · 1 line
1.8.3.1
#4 lore raw

Re: [PATCH] drm/i915: get a PC8 reference when enabling the power well

Quoted 11 lines · Paulo Zanoni

From: Paulo Zanoni <[email protected]>

In the current code, at haswell_modeset_global_resources, first we decide if we want to enable/disable the power well, then we decide if we want to enable/disable PC8. On the case where we're enabling PC8 this works fine, but on the case where we disable PC8 due to a non-eDP monitor being enabled, we first enable the power well and then disable PC8. Although wrong, this doesn't seem to be causing any problems now, and we don't even see anything in dmesg. But the patches for runtime D3 turn this problem into a real bug, so we need to fix it.

Quoted 8 lines

This fixes the "modeset-non-lpsp" subtest from the "pm_pc8" test from intel-gpu-tools.

v2: - Rebase (i915_disable_power_well).
v3: - More reabase.
v4: - Rebase on top of -fixes instead of -nightly.

Applied to -fixes, thanks.
-Daniel

Quoted 51 lines
---
 drivers/gpu/drm/i915/intel_pm.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_pm.c +12 -2
index 3657ab4..26c29c1 100644
@@ -5688,6 +5688,8 @@ static void __intel_set_power_well(struct drm_device *dev, bool enable)
 	unsigned long irqflags;
 	uint32_t tmp;
 
+	WARN_ON(dev_priv->pc8.enabled);
+
 	tmp = I915_READ(HSW_PWR_WELL_DRIVER);
 	is_enabled = tmp & HSW_PWR_WELL_STATE_ENABLED;
 	enable_requested = tmp & HSW_PWR_WELL_ENABLE_REQUEST;
@@ -5747,16 +5749,24 @@ static void __intel_set_power_well(struct drm_device *dev, bool enable)
 static void __intel_power_well_get(struct drm_device *dev,
 				   struct i915_power_well *power_well)
 {
-	if (!power_well->count++)
+	struct drm_i915_private *dev_priv = dev->dev_private;
+
+	if (!power_well->count++) {
+		hsw_disable_package_c8(dev_priv);
 		__intel_set_power_well(dev, true);
+	}
 }
 
 static void __intel_power_well_put(struct drm_device *dev,
 				   struct i915_power_well *power_well)
 {
+	struct drm_i915_private *dev_priv = dev->dev_private;
+
 	WARN_ON(!power_well->count);
-	if (!--power_well->count && i915_disable_power_well)
+	if (!--power_well->count && i915_disable_power_well) {
 		__intel_set_power_well(dev, false);
+		hsw_enable_package_c8(dev_priv);
+	}
 }
 
 void intel_display_power_get(struct drm_device *dev,
Signature · 6 lines
1.8.3.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch