* gen6_gt_force_wake issue @ 2011-10-05 7:27 Nicolas Kalkhof 2011-10-05 18:44 ` [PATCH] drm/i915: forcewake warning fixes in debugfs Ben Widawsky 0 siblings, 1 reply; 7+ messages in thread From: Nicolas Kalkhof @ 2011-10-05 7:27 UTC (permalink / raw) To: intel-gfx Hello, current xf86-video-intel git crashex X frequently on my machine (see kernel log). Any Workarounds/Ideas? Regards, Nico Oct 5 08:58:53 gonzo kernel: WARNING: at drivers/gpu/drm/i915/i915_drv.c:372 gen6_gt_force_wake_put+0x1f/0x45 [i915]() Oct 5 08:58:53 gonzo kernel: Hardware name: 4236NGG Oct 5 08:58:53 gonzo kernel: Modules linked in: i915 fbcon font bitblit softcursor drm_kms_helper drm fb fbdev snd_hda_codec_conexant thinkpad_acpi iwlagn cfbcopyarea nvram intel_agp intel_gtt snd_hda_intel agpgart video backlight e1000e cfbimgblt cfbfillrect snd_hda_codec Oct 5 08:58:53 gonzo kernel: Pid: 3358, comm: cat Tainted: G W 3.1.0-rc9 #4 Oct 5 08:58:53 gonzo kernel: Call Trace: Oct 5 08:58:53 gonzo kernel: [<ffffffff8102fc96>] ? warn_slowpath_common+0x78/0x8c Oct 5 08:58:53 gonzo kernel: [<ffffffffa01094c0>] ? gen6_gt_force_wake_put+0x1f/0x45 [i915] Oct 5 08:58:53 gonzo kernel: [<ffffffffa0112795>] ? i915_delayfreq_table+0x4c/0x95 [i915] Oct 5 08:58:53 gonzo kernel: [<ffffffff810baa2d>] ? seq_read+0x16e/0x355 Oct 5 08:58:53 gonzo kernel: [<ffffffff810a1efa>] ? vfs_read+0xac/0x126 Oct 5 08:58:53 gonzo kernel: [<ffffffff810a1fb9>] ? sys_read+0x45/0x6e Oct 5 08:58:53 gonzo kernel: [<ffffffff813b3cfb>] ? system_call_fastpath+0x16/0x1b ___________________________________________________________ SMS schreiben mit WEB.DE FreeMail - einfach, schnell und kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] drm/i915: forcewake warning fixes in debugfs 2011-10-05 7:27 gen6_gt_force_wake issue Nicolas Kalkhof @ 2011-10-05 18:44 ` Ben Widawsky 2011-10-08 21:32 ` Daniel Vetter 0 siblings, 1 reply; 7+ messages in thread From: Ben Widawsky @ 2011-10-05 18:44 UTC (permalink / raw) To: intel-gfx; +Cc: Ben Widawsky Some more unsafe debugfs access are fixed with this patch. I tested all reads, but didn't thoroughly test the writes. Cc: "Nicolas Kalkhof" <nkalkhof@web.de> Signed-off-by: Ben Widawsky <ben@bwidawsk.net> --- drivers/gpu/drm/i915/i915_debugfs.c | 57 +++++++++++++++++++++++++++++++---- 1 files changed, 51 insertions(+), 6 deletions(-) --- Can you please try this patch to see if it helps? diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 3c395a5..de233df 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -635,11 +635,16 @@ static int i915_ringbuffer_info(struct seq_file *m, void *data) struct drm_device *dev = node->minor->dev; drm_i915_private_t *dev_priv = dev->dev_private; struct intel_ring_buffer *ring; + int ret; ring = &dev_priv->ring[(uintptr_t)node->info_ent->data]; if (ring->size == 0) return 0; + ret = mutex_lock_interruptible(&dev->struct_mutex); + if (ret) + return ret; + seq_printf(m, "Ring %s:\n", ring->name); seq_printf(m, " Head : %08x\n", I915_READ_HEAD(ring) & HEAD_ADDR); seq_printf(m, " Tail : %08x\n", I915_READ_TAIL(ring) & TAIL_ADDR); @@ -653,6 +658,8 @@ static int i915_ringbuffer_info(struct seq_file *m, void *data) seq_printf(m, " Control : %08x\n", I915_READ_CTL(ring)); seq_printf(m, " Start : %08x\n", I915_READ_START(ring)); + mutex_unlock(&dev->struct_mutex); + return 0; } @@ -841,7 +848,16 @@ static int i915_rstdby_delays(struct seq_file *m, void *unused) struct drm_info_node *node = (struct drm_info_node *) m->private; struct drm_device *dev = node->minor->dev; drm_i915_private_t *dev_priv = dev->dev_private; - u16 crstanddelay = I915_READ16(CRSTANDVID); + u16 crstanddelay; + int ret; + + ret = mutex_lock_interruptible(&dev->struct_mutex); + if (ret) + return ret; + + crstanddelay = I915_READ16(CRSTANDVID); + + mutex_unlock(&dev->struct_mutex); seq_printf(m, "w/ctx: %d, w/o ctx: %d\n", (crstanddelay >> 8) & 0x3f, (crstanddelay & 0x3f)); @@ -939,7 +955,11 @@ static int i915_delayfreq_table(struct seq_file *m, void *unused) struct drm_device *dev = node->minor->dev; drm_i915_private_t *dev_priv = dev->dev_private; u32 delayfreq; - int i; + int ret, i; + + ret = mutex_lock_interruptible(&dev->struct_mutex); + if (ret) + return ret; for (i = 0; i < 16; i++) { delayfreq = I915_READ(PXVFREQ_BASE + i * 4); @@ -947,6 +967,8 @@ static int i915_delayfreq_table(struct seq_file *m, void *unused) (delayfreq & PXVFREQ_PX_MASK) >> PXVFREQ_PX_SHIFT); } + mutex_unlock(&dev->struct_mutex); + return 0; } @@ -961,13 +983,19 @@ static int i915_inttoext_table(struct seq_file *m, void *unused) struct drm_device *dev = node->minor->dev; drm_i915_private_t *dev_priv = dev->dev_private; u32 inttoext; - int i; + int ret, i; + + ret = mutex_lock_interruptible(&dev->struct_mutex); + if (ret) + return ret; for (i = 1; i <= 32; i++) { inttoext = I915_READ(INTTOEXT_BASE_ILK + i * 4); seq_printf(m, "INTTOEXT%02d: 0x%08x\n", i, inttoext); } + mutex_unlock(&dev->struct_mutex); + return 0; } @@ -976,9 +1004,19 @@ static int i915_drpc_info(struct seq_file *m, void *unused) struct drm_info_node *node = (struct drm_info_node *) m->private; struct drm_device *dev = node->minor->dev; drm_i915_private_t *dev_priv = dev->dev_private; - u32 rgvmodectl = I915_READ(MEMMODECTL); - u32 rstdbyctl = I915_READ(RSTDBYCTL); - u16 crstandvid = I915_READ16(CRSTANDVID); + u32 rgvmodectl, rstdbyctl; + u16 crstandvid; + int ret; + + ret = mutex_lock_interruptible(&dev->struct_mutex); + if (ret) + return ret; + + rgvmodectl = I915_READ(MEMMODECTL); + rstdbyctl = I915_READ(RSTDBYCTL); + crstandvid = I915_READ16(CRSTANDVID); + + mutex_unlock(&dev->struct_mutex); seq_printf(m, "HD boost: %s\n", (rgvmodectl & MEMMODE_BOOST_EN) ? "yes" : "no"); @@ -1166,9 +1204,16 @@ static int i915_gfxec(struct seq_file *m, void *unused) struct drm_info_node *node = (struct drm_info_node *) m->private; struct drm_device *dev = node->minor->dev; drm_i915_private_t *dev_priv = dev->dev_private; + int ret; + + ret = mutex_lock_interruptible(&dev->struct_mutex); + if (ret) + return ret; seq_printf(m, "GFXEC: %ld\n", (unsigned long)I915_READ(0x112f4)); + mutex_unlock(&dev->struct_mutex); + return 0; } -- 1.7.7 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/i915: forcewake warning fixes in debugfs 2011-10-05 18:44 ` [PATCH] drm/i915: forcewake warning fixes in debugfs Ben Widawsky @ 2011-10-08 21:32 ` Daniel Vetter 2011-10-23 10:13 ` Daniel Vetter 0 siblings, 1 reply; 7+ messages in thread From: Daniel Vetter @ 2011-10-08 21:32 UTC (permalink / raw) To: Ben Widawsky; +Cc: intel-gfx On Wed, Oct 05, 2011 at 11:44:54AM -0700, Ben Widawsky wrote: > Some more unsafe debugfs access are fixed with this patch. I tested all reads, > but didn't thoroughly test the writes. > > Cc: "Nicolas Kalkhof" <nkalkhof@web.de> > Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> -- Daniel Vetter Mail: daniel@ffwll.ch Mobile: +41 (0)79 365 57 48 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/i915: forcewake warning fixes in debugfs 2011-10-08 21:32 ` Daniel Vetter @ 2011-10-23 10:13 ` Daniel Vetter 2011-10-23 19:21 ` Keith Packard 2011-11-03 16:23 ` Keith Packard 0 siblings, 2 replies; 7+ messages in thread From: Daniel Vetter @ 2011-10-23 10:13 UTC (permalink / raw) To: Ben Widawsky, Keith Packard; +Cc: intel-gfx Hi Keith, This patch isn't in your -next pull request. Please consider merging for 3.2. Yours, Daniel On Sat, Oct 08, 2011 at 11:32:34PM +0200, Daniel Vetter wrote: > On Wed, Oct 05, 2011 at 11:44:54AM -0700, Ben Widawsky wrote: > > Some more unsafe debugfs access are fixed with this patch. I tested all reads, > > but didn't thoroughly test the writes. > > > > Cc: "Nicolas Kalkhof" <nkalkhof@web.de> > > Signed-off-by: Ben Widawsky <ben@bwidawsk.net> > > Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> > -- > Daniel Vetter > Mail: daniel@ffwll.ch > Mobile: +41 (0)79 365 57 48 -- Daniel Vetter Mail: daniel@ffwll.ch Mobile: +41 (0)79 365 57 48 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/i915: forcewake warning fixes in debugfs 2011-10-23 10:13 ` Daniel Vetter @ 2011-10-23 19:21 ` Keith Packard 2011-10-23 20:25 ` Ben Widawsky 2011-11-03 16:23 ` Keith Packard 1 sibling, 1 reply; 7+ messages in thread From: Keith Packard @ 2011-10-23 19:21 UTC (permalink / raw) To: Daniel Vetter, Ben Widawsky; +Cc: intel-gfx [-- Attachment #1.1: Type: text/plain, Size: 333 bytes --] On Sun, 23 Oct 2011 12:13:43 +0200, Daniel Vetter <daniel@ffwll.ch> wrote: > Hi Keith, > > This patch isn't in your -next pull request. Please consider merging for > 3.2. I didn't ever see a reply from Nicolas that it fixed his problem; would be nice to know whether this actually worked... -- keith.packard@intel.com [-- Attachment #1.2: Type: application/pgp-signature, Size: 827 bytes --] [-- Attachment #2: Type: text/plain, Size: 159 bytes --] _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/i915: forcewake warning fixes in debugfs 2011-10-23 19:21 ` Keith Packard @ 2011-10-23 20:25 ` Ben Widawsky 0 siblings, 0 replies; 7+ messages in thread From: Ben Widawsky @ 2011-10-23 20:25 UTC (permalink / raw) To: Keith Packard; +Cc: intel-gfx On Sun, 23 Oct 2011 12:21:38 -0700 Keith Packard <keithp@keithp.com> wrote: > On Sun, 23 Oct 2011 12:13:43 +0200, Daniel Vetter <daniel@ffwll.ch> wrote: > > Hi Keith, > > > > This patch isn't in your -next pull request. Please consider merging for > > 3.2. > > I didn't ever see a reply from Nicolas that it fixed his problem; would > be nice to know whether this actually worked... > I highly doubt it fixed his problem. The problem I was trying to fix was to remove the spurious warnings we get, which was most likely the case here. This patch does that correctly. Ben ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/i915: forcewake warning fixes in debugfs 2011-10-23 10:13 ` Daniel Vetter 2011-10-23 19:21 ` Keith Packard @ 2011-11-03 16:23 ` Keith Packard 1 sibling, 0 replies; 7+ messages in thread From: Keith Packard @ 2011-11-03 16:23 UTC (permalink / raw) To: Daniel Vetter, Ben Widawsky; +Cc: intel-gfx [-- Attachment #1.1: Type: text/plain, Size: 239 bytes --] On Sun, 23 Oct 2011 12:13:43 +0200, Daniel Vetter <daniel@ffwll.ch> wrote: > Hi Keith, > > This patch isn't in your -next pull request. Please consider merging for > 3.2. I've merged this to -next. -- keith.packard@intel.com [-- Attachment #1.2: Type: application/pgp-signature, Size: 827 bytes --] [-- Attachment #2: Type: text/plain, Size: 159 bytes --] _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-11-03 16:23 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-10-05 7:27 gen6_gt_force_wake issue Nicolas Kalkhof 2011-10-05 18:44 ` [PATCH] drm/i915: forcewake warning fixes in debugfs Ben Widawsky 2011-10-08 21:32 ` Daniel Vetter 2011-10-23 10:13 ` Daniel Vetter 2011-10-23 19:21 ` Keith Packard 2011-10-23 20:25 ` Ben Widawsky 2011-11-03 16:23 ` Keith Packard
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox