mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kamal Mostafa <kamal@canonical.com>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	kernel-team@lists.ubuntu.com
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Mika Kuoppala <mika.kuoppala@intel.com>,
	Guenter Roeck <linux@roeck-us.net>,
	Kamal Mostafa <kamal@canonical.com>
Subject: [PATCH 06/75] Partially revert "drm/i915: unconditionally use mt forcewake on hsw/ivb"
Date: Tue, 30 Jul 2013 08:16:35 -0700	[thread overview]
Message-ID: <1375197464-27962-7-git-send-email-kamal@canonical.com> (raw)
In-Reply-To: <1375197464-27962-1-git-send-email-kamal@canonical.com>

3.8.13.6 -stable review patch.  If anyone has any objections, please let me know.

------------------

From: Guenter Roeck <linux@roeck-us.net>

commit c11e5f35ab490bd30591563816fbc83526521777 upstream.

This patch partially reverts commit 36ec8f877481449bdfa072e6adf2060869e2b970 for
IvyBridge CPUs.

The original commit results in repeated 'Timed out waiting for forcewake old
ack to clear' messages on a Supermicro C7H61 board (BIOS version 2.00 and 2.00b)
with i7-3770K CPU. It ultimately results in a hangup if the system is highly
loaded. Reverting the commit for IvyBridge CPUs fixes the issue.

Issue a warning if the CPU is IvyBridge and mt forcewake is disabled, since
this condition can result in secondary issues.

v2: Only revert patch for Ivybridge CPUs
    Issue info message if mt forcewake is disabled on Ivybridge

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=60541
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66139
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 31 ++++++++++++++++++++++++++++++-
 1 file changed, 30 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 253bcf3..e8c7ade 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4411,9 +4411,38 @@ void intel_gt_init(struct drm_device *dev)
 	if (IS_VALLEYVIEW(dev)) {
 		dev_priv->gt.force_wake_get = vlv_force_wake_get;
 		dev_priv->gt.force_wake_put = vlv_force_wake_put;
-	} else if (IS_IVYBRIDGE(dev) || IS_HASWELL(dev)) {
+	} else if (IS_HASWELL(dev)) {
 		dev_priv->gt.force_wake_get = __gen6_gt_force_wake_mt_get;
 		dev_priv->gt.force_wake_put = __gen6_gt_force_wake_mt_put;
+	} else if (IS_IVYBRIDGE(dev)) {
+		u32 ecobus;
+
+		/* IVB configs may use multi-threaded forcewake */
+
+		/* A small trick here - if the bios hasn't configured
+		 * MT forcewake, and if the device is in RC6, then
+		 * force_wake_mt_get will not wake the device and the
+		 * ECOBUS read will return zero. Which will be
+		 * (correctly) interpreted by the test below as MT
+		 * forcewake being disabled.
+		 */
+		mutex_lock(&dev->struct_mutex);
+		__gen6_gt_force_wake_mt_get(dev_priv);
+		ecobus = I915_READ_NOTRACE(ECOBUS);
+		__gen6_gt_force_wake_mt_put(dev_priv);
+		mutex_unlock(&dev->struct_mutex);
+
+		if (ecobus & FORCEWAKE_MT_ENABLE) {
+			dev_priv->gt.force_wake_get =
+						__gen6_gt_force_wake_mt_get;
+			dev_priv->gt.force_wake_put =
+						__gen6_gt_force_wake_mt_put;
+		} else {
+			DRM_INFO("No MT forcewake available on Ivybridge, this can result in issues\n");
+			DRM_INFO("when using vblank-synced partial screen updates.\n");
+			dev_priv->gt.force_wake_get = __gen6_gt_force_wake_get;
+			dev_priv->gt.force_wake_put = __gen6_gt_force_wake_put;
+		}
 	} else if (IS_GEN6(dev)) {
 		dev_priv->gt.force_wake_get = __gen6_gt_force_wake_get;
 		dev_priv->gt.force_wake_put = __gen6_gt_force_wake_put;
-- 
1.8.1.2


  parent reply	other threads:[~2013-07-30 15:19 UTC|newest]

Thread overview: 76+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-30 15:16 [ 3.8.y.z extended stable ] Linux 3.8.13.6 stable review Kamal Mostafa
2013-07-30 15:16 ` [PATCH 01/75] xen/blkback: Check device permissions before allowing OP_DISCARD Kamal Mostafa
2013-07-30 15:16 ` [PATCH 02/75] ASoC: sglt5000: Fix the default value of CHIP_SSS_CTRL Kamal Mostafa
2013-07-30 15:16 ` [PATCH 03/75] ASoC: sglt5000: Fix SGTL5000_PLL_FRAC_DIV_MASK Kamal Mostafa
2013-07-30 15:16 ` [PATCH 04/75] drm/i915: Correct obj->mm_list link to dev_priv->dev_priv->mm.inactive_list Kamal Mostafa
2013-07-30 15:16 ` [PATCH 05/75] drm/i915: fix up ring cleanup for the i830/i845 CS tlb w/a Kamal Mostafa
2013-07-30 15:16 ` Kamal Mostafa [this message]
2013-07-30 15:16 ` [PATCH 07/75] drm/i915: Fix write-read race with multiple rings Kamal Mostafa
2013-07-30 15:16 ` [PATCH 08/75] drm/i915: merge {i965, sandybridge}_write_fence_reg() Kamal Mostafa
2013-07-30 15:16 ` [PATCH 09/75] drm/i915: Fix incoherence with fence updates on Sandybridge+ Kamal Mostafa
2013-07-30 15:16 ` [PATCH 10/75] Revert "drm/i915: Workaround incoherence between fences and LLC across multiple CPUs" Kamal Mostafa
2013-07-30 15:16 ` [PATCH 11/75] drm/i915: rename sdvox_reg to hdmi_reg on HDMI context Kamal Mostafa
2013-07-30 15:16 ` [PATCH 12/75] drm/i915: don't setup hdmi for port D edp in ddi_init Kamal Mostafa
2013-07-30 15:16 ` [PATCH 13/75] drm/i915: Preserve the DDI_A_4_LANES bit from the bios Kamal Mostafa
2013-07-30 15:16 ` [PATCH 14/75] drm/radeon/hdmi: make sure we have an afmt block assigned Kamal Mostafa
2013-07-30 15:16 ` [PATCH 15/75] drm/radeon: allocate SA bo in the requested domain Kamal Mostafa
2013-07-30 15:16 ` [PATCH 16/75] drm/radeon: allow selection of alignment in the sub-allocator Kamal Mostafa
2013-07-30 15:16 ` [PATCH 17/75] ACPI / memhotplug: Fix a stale pointer in error path Kamal Mostafa
2013-07-30 15:16 ` [PATCH 18/75] PM / Sleep: avoid 'autosleep' in shutdown progress Kamal Mostafa
2013-07-30 15:16 ` [PATCH 19/75] ext4: fix error handling in ext4_ext_truncate() Kamal Mostafa
2013-07-30 15:16 ` [PATCH 20/75] radeon kms: do not flush uninitialized hotplug work Kamal Mostafa
2013-07-30 15:16 ` [PATCH 21/75] ALSA: asihpi: Fix unlocked snd_pcm_stop() call Kamal Mostafa
2013-07-30 15:16 ` [PATCH 22/75] ALSA: atiixp: " Kamal Mostafa
2013-07-30 15:16 ` [PATCH 23/75] ALSA: 6fire: " Kamal Mostafa
2013-07-30 15:16 ` [PATCH 24/75] ALSA: ua101: " Kamal Mostafa
2013-07-30 15:16 ` [PATCH 25/75] ALSA: usx2y: " Kamal Mostafa
2013-07-30 15:16 ` [PATCH 26/75] ALSA: pxa2xx: " Kamal Mostafa
2013-07-30 15:16 ` [PATCH 27/75] ASoC: atmel: " Kamal Mostafa
2013-07-30 15:16 ` [PATCH 28/75] ASoC: s6000: " Kamal Mostafa
2013-07-30 15:16 ` [PATCH 29/75] [media] saa7134: " Kamal Mostafa
2013-07-30 15:16 ` [PATCH 30/75] staging: line6: " Kamal Mostafa
2013-07-30 15:17 ` [PATCH 31/75] x86, suspend: Handle CPUs which fail to #GP on RDMSR Kamal Mostafa
2013-07-30 15:17 ` [PATCH 32/75] ALSA: hda - Add new GPU codec ID to snd-hda Kamal Mostafa
2013-07-30 18:42 ` [PATCH 33/75] drm/i915: fix long-standing SNB regression in power consumption after resume v2 Kamal Mostafa
2013-07-30 18:44 ` [PATCH 34/75] ACPI / video: ignore BIOS initial backlight value for Fujitsu E753 Kamal Mostafa
2013-07-30 18:44 ` [PATCH 35/75] arm64: mm: don't treat user cache maintenance faults as writes Kamal Mostafa
2013-07-30 18:44 ` [PATCH 36/75] Btrfs: fix lock leak when resuming snapshot deletion Kamal Mostafa
2013-07-30 18:44 ` [PATCH 37/75] Btrfs: re-add root to dead root list if we stop dropping it Kamal Mostafa
2013-07-30 18:44 ` [PATCH 38/75] drm/i915: inverted brightness quirk for Acer Aspire 4736Z Kamal Mostafa
2013-07-30 18:44 ` [PATCH 39/75] drm/i915: quirk no PCH_PWM_ENABLE for Dell XPS13 backlight Kamal Mostafa
2013-07-30 18:44 ` [PATCH 40/75] drm/i915: Serialize almost all register access Kamal Mostafa
2013-07-30 18:44 ` [PATCH 41/75] drm/i915: fix up gt init sequence fallout Kamal Mostafa
2013-07-30 18:44 ` [PATCH 42/75] powerpc/modules: Module CRC relocation fix causes perf issues Kamal Mostafa
2013-07-30 18:44 ` [PATCH 43/75] [PATCH] sparc32: vm_area_struct access for old Sun SPARCs Kamal Mostafa
2013-07-30 18:44 ` [PATCH 44/75] sparc64 address-congruence property Kamal Mostafa
2013-07-30 18:44 ` [PATCH 45/75] sparc: tsb must be flushed before tlb Kamal Mostafa
2013-07-30 18:44 ` [PATCH 46/75] bridge: fix switched interval for MLD Query types Kamal Mostafa
2013-07-30 18:44 ` [PATCH 47/75] ipv4: Fixed MD5 key lookups when adding/ removing MD5 to/ from TCP sockets Kamal Mostafa
2013-07-30 18:44 ` [PATCH 48/75] ipv6: don't call addrconf_dst_alloc again when enable lo Kamal Mostafa
2013-07-30 18:44 ` [PATCH 49/75] macvtap: fix recovery from gup errors Kamal Mostafa
2013-07-30 18:44 ` [PATCH 50/75] ipv6: ip6_sk_dst_check() must not assume ipv6 dst Kamal Mostafa
2013-07-30 18:44 ` [PATCH 51/75] af_key: fix info leaks in notify messages Kamal Mostafa
2013-07-30 18:44 ` [PATCH 52/75] sh_eth: fix unhandled RFE interrupt Kamal Mostafa
2013-07-30 18:44 ` [PATCH 53/75] neighbour: fix a race in neigh_destroy() Kamal Mostafa
2013-07-30 18:44 ` [PATCH 54/75] x25: Fix broken locking in ioctl error paths Kamal Mostafa
2013-07-30 18:44 ` [PATCH 55/75] net: Swap ver and type in pppoe_hdr Kamal Mostafa
2013-07-30 18:45 ` [PATCH 56/75] vti: remove duplicated code to fix a memory leak Kamal Mostafa
2013-07-30 18:45 ` [PATCH 57/75] ipv6,mcast: always hold idev->lock before mca_lock Kamal Mostafa
2013-07-30 18:45 ` [PATCH 58/75] l2tp: add missing .owner to struct pppox_proto Kamal Mostafa
2013-07-30 18:45 ` [PATCH 59/75] ipv6: call udp_push_pending_frames when uncorking a socket with AF_INET pending data Kamal Mostafa
2013-07-30 18:45 ` [PATCH 60/75] ipv6: ip6_append_data_mtu did not care about pmtudisc and frag_size Kamal Mostafa
2013-07-30 18:45 ` [PATCH 61/75] sunvnet: vnet_port_remove must call unregister_netdev Kamal Mostafa
2013-07-30 18:45 ` [PATCH 62/75] ifb: fix rcu_sched self-detected stalls Kamal Mostafa
2013-07-30 18:45 ` [PATCH 63/75] tuntap: correctly linearize skb when zerocopy is used Kamal Mostafa
2013-07-30 18:45 ` [PATCH 64/75] macvtap: " Kamal Mostafa
2013-07-30 18:45 ` [PATCH 65/75] ipv6: in case of link failure remove route directly instead of letting it expire Kamal Mostafa
2013-07-30 18:45 ` [PATCH 66/75] 9p: fix off by one causing access violations and memory corruption Kamal Mostafa
2013-07-30 18:45 ` [PATCH 67/75] dummy: fix oops when loading the dummy failed Kamal Mostafa
2013-07-30 18:45 ` [PATCH 68/75] ifb: fix oops when loading the ifb failed Kamal Mostafa
2013-07-30 18:45 ` [PATCH 69/75] ipv6: only static routes qualify for equal cost multipathing Kamal Mostafa
2013-07-30 18:45 ` [PATCH 70/75] atl1e: fix dma mapping warnings Kamal Mostafa
2013-07-30 18:45 ` [PATCH 71/75] atl1e: unmap partially mapped skb on dma error and free skb Kamal Mostafa
2013-07-30 18:45 ` [PATCH 72/75] ipv4: set transport header earlier Kamal Mostafa
2013-07-30 18:45 ` [PATCH 73/75] tuntap: do not zerocopy if iov needs more pages than MAX_SKB_FRAGS Kamal Mostafa
2013-07-30 18:45 ` [PATCH 74/75] macvtap: " Kamal Mostafa
2013-07-30 18:45 ` [PATCH 75/75] vlan: fix a race in egress prio management Kamal Mostafa

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=1375197464-27962-7-git-send-email-kamal@canonical.com \
    --to=kamal@canonical.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=jbarnes@virtuousgeek.org \
    --cc=kernel-team@lists.ubuntu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=mika.kuoppala@intel.com \
    --cc=stable@vger.kernel.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

all inboxes | Powered by JetHome®