kernel-testers.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jesse Barnes <jbarnes-Y1mF5jBUw70BENJcbMCuUQ@public.gmane.org>
To: "Rafael J. Wysocki" <rjw-KKrjLPT3xs0@public.gmane.org>
Cc: "Linux Kernel Mailing List"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"Kernel Testers List"
	<kernel-testers-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"Dave Airlie" <airlied-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	DRI <dri-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>,
	"Michel Dänzer" <michel-otUistvHUpPR7s880joybQ@public.gmane.org>,
	"Sitsofe Wheeler"
	<sitsofe-/E1597aS9LQAvxtiuMwx3w@public.gmane.org>
Subject: Re: [Bug #12765] i915 VT switch with AIGLX causes X lock up
Date: Mon, 27 Apr 2009 09:46:51 -0700	[thread overview]
Message-ID: <20090427094651.7cc09227@hobbes> (raw)
In-Reply-To: <egHshlwQQFE.A.X4D.-qE9JB@chimera>

[-- Attachment #1: Type: text/plain, Size: 1332 bytes --]

On Sun, 26 Apr 2009 11:46:26 +0200 (CEST)
"Rafael J. Wysocki" <rjw-KKrjLPT3xs0@public.gmane.org> wrote:

> This message has been generated automatically as a part of a report
> of regressions introduced between 2.6.28 and 2.6.29.
> 
> The following bug entry is on the current list of known regressions
> introduced between 2.6.28 and 2.6.29.  Please verify if it still
> should be listed and let me know (either way).
> 
> 
> Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=12765
> Subject		: i915 VT switch with AIGLX causes X lock up
> Submitter	: Sitsofe Wheeler <sitsofe-/E1597aS9LQAvxtiuMwx3w@public.gmane.org>
> Date		: 2009-02-21 15:38 (65 days old)
> First-Bad-Commit:
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=14d200c5e5bd19219d930bbb9a5a22758c8f5bec
> References	:
> http://marc.info/?l=linux-kernel&m=123523074304955&w=4

I think we had a workaround for this (attached), but it sounds like
Robert has tracked down the root cause (search for "Broken vblanks on
Intel" on dri-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org).  Will try to get the fix
into the Intel driver soon.  Fortunately this doesn't seem to be biting
a lot of people (at least not that I've heard); I certainly have a hard
time reproducing it.

-- 
Jesse Barnes, Intel Open Source Technology Center

[-- Attachment #2: drm-vblank-wait-fix.patch --]
[-- Type: text/x-patch, Size: 1372 bytes --]

diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
index 69aa0ab..c41cba4 100644
--- a/drivers/gpu/drm/drm_irq.c
+++ b/drivers/gpu/drm/drm_irq.c
@@ -341,7 +341,7 @@ int drm_control(struct drm_device *dev, void *data,
  * vblank events since the system was booted, including lost events due to
  * modesetting activity.
  */
-u32 drm_vblank_count(struct drm_device *dev, int crtc)
+unsigned int drm_vblank_count(struct drm_device *dev, int crtc)
 {
 	return atomic_read(&dev->_vblank_count[crtc]);
 }
@@ -522,6 +522,11 @@ out:
 	return ret;
 }
 
+#define frame_after_eq(a,b)	       \
+	(typecheck(unsigned int, a) && \
+	 typecheck(unsigned int, b) && \
+	 ((int)(a) - (int)(b) >= 0))
+
 /**
  * Wait for VBLANK.
  *
@@ -589,10 +594,12 @@ int drm_wait_vblank(struct drm_device *dev, void *data,
 	DRM_DEBUG("waiting on vblank count %d, crtc %d\n",
 		  vblwait->request.sequence, crtc);
 	dev->last_vblank_wait[crtc] = vblwait->request.sequence;
+
+	/* Wait for the sequence number to pass or IRQs to get disabled */
 	DRM_WAIT_ON(ret, dev->vbl_queue[crtc], 3 * DRM_HZ,
-		    (((drm_vblank_count(dev, crtc) -
-		       vblwait->request.sequence) <= (1 << 23)) ||
-		     !dev->irq_enabled));
+		    frame_after_eq(drm_vblank_count(dev, crtc),
+				   vblwait->request.sequence) ||
+		    !dev->irq_enabled);
 
 	if (ret != -EINTR) {
 		struct timeval now;

  reply	other threads:[~2009-04-27 16:46 UTC|newest]

Thread overview: 90+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-26  9:42 2.6.30-rc3-git1: Reported regressions 2.6.28 -> 2.6.29 Rafael J. Wysocki
2009-04-26  9:42 ` [Bug #12490] ath5k related kernel panic in 2.6.29-rc1 Rafael J. Wysocki
2009-04-26  9:46 ` [Bug #12499] Problem with using bluetooth adaper connected to usb port Rafael J. Wysocki
2009-04-26  9:46 ` [Bug #12705] X200: Brightness broken since 2.6.29-rc4-58-g4c098bc Rafael J. Wysocki
2009-04-26 20:15   ` Nico Schottelius
     [not found]     ` <20090426201554.GC22487-9ll+q7fL1vOwdVNcq5OhcUB+6BGkLq7r@public.gmane.org>
2009-04-26 23:18       ` Rafael J. Wysocki
     [not found]         ` <200904270118.17292.rjw-KKrjLPT3xs0@public.gmane.org>
2009-04-30  8:00           ` Nico Schottelius
2009-04-26  9:46 ` [Bug #12681] s2ram: fails to wake up on Acer Extensa 4220 (SMP disabled) Rafael J. Wysocki
2009-04-26  9:46 ` [Bug #12899] Crash in i915.ko: i915_driver_irq_handler Rafael J. Wysocki
2009-04-26  9:46 ` [Bug #12909] boot/kernel init duration regression from 2.6.28 Rafael J. Wysocki
2009-04-26  9:46 ` [Bug #12947] r128: system hangs when X is started with DRI enabled Rafael J. Wysocki
2009-04-26 15:07   ` Angel
2009-04-26 17:43     ` Rafael J. Wysocki
     [not found]       ` <200904261943.45126.rjw-KKrjLPT3xs0@public.gmane.org>
2009-04-27 18:12         ` Jos van der Ende
     [not found]           ` <20090427201229.3491928a.seraph-qWit8jRvyhVmR6Xm/wNWPw@public.gmane.org>
2009-04-28 21:49             ` Rafael J. Wysocki
2009-04-26  9:46 ` [Bug #12836] 2.6.29-rc breaks STD using Intel 945 Rafael J. Wysocki
2009-04-26  9:46 ` [Bug #12765] i915 VT switch with AIGLX causes X lock up Rafael J. Wysocki
2009-04-27 16:46   ` Jesse Barnes [this message]
2009-04-27 22:07     ` Sitsofe Wheeler
2009-04-26  9:46 ` [Bug #12861] Xorg fails to start "Failed to allocate space for kernel memory manager" Rafael J. Wysocki
2009-04-26  9:46 ` [Bug #12980] lockup in X.org Rafael J. Wysocki
2009-04-26  9:46 ` [Bug #12971] "tg3 transmit timed out" when transmitting at high bitrate Rafael J. Wysocki
2009-04-26  9:46 ` [Bug #12961] Kernel panics in early boot: IO-APIC + timer doesn't work Rafael J. Wysocki
2009-04-26  9:46 ` [Bug #13001] PCI-DMA: Out of IOMMU space Rafael J. Wysocki
2009-04-28  8:28   ` FUJITA Tomonori
     [not found]     ` <20090428172845R.fujita.tomonori-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>
2009-04-28  9:18       ` Данила Жукоцкий
     [not found]         ` <db2b43030904280218v61fded68rc585ce9c58ba1cce-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-04-28  9:43           ` FUJITA Tomonori
     [not found]             ` <20090428184431Z.fujita.tomonori-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>
2009-05-04  5:27               ` Данила Жукоцкий
     [not found]                 ` <db2b43030905032227u73a41ec3wa511efcef6a22169-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-05-05  1:58                   ` Grant Grundler
2009-05-05  4:31                     ` adam radford
     [not found]                       ` <b1bc6a000905042131t3656f14arc98dc4a518543a86-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-05-05  5:46                         ` Данила Жукоцкий
     [not found]                           ` <db2b43030905042246j770578e0xeb8d8ce8c01853d6-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-05-06  4:39                             ` FUJITA Tomonori
2009-05-06 10:39                   ` FUJITA Tomonori
2009-04-26  9:46 ` [Bug #13003] [2.6.29 regression] ivtv driver causes strange oops'es, disrupts software suspend Rafael J. Wysocki
2009-04-27  6:46   ` Hans Verkuil
     [not found]     ` <200904270846.28726.hverkuil-qWit8jRvyhVmR6Xm/wNWPw@public.gmane.org>
2009-04-28 21:53       ` Rafael J. Wysocki
2009-04-26  9:46 ` [Bug #13025] After upgrading to kernel 2.6.29, pulseaudio stopped with some strange error Rafael J. Wysocki
2009-04-26  9:46 ` [Bug #13072] forcedeth seems to switch off eth on shutdown Rafael J. Wysocki
2009-04-26 20:52   ` Daniel Bierstedt
     [not found]   ` <1240778558.4995.4.camel@laptop.workgroup>
2009-04-26 23:20     ` Rafael J. Wysocki
2009-04-26  9:46 ` [Bug #13074] gspca_stv06xx doesn't work with Logitech QuickCam Express (046d:0840) Rafael J. Wysocki
2009-04-26  9:46 ` [Bug #13032] 2.6.29 regression: network interfaces drop after suspend/resume Rafael J. Wysocki
2009-04-26  9:46 ` [Bug #13040] DRM radeon Rafael J. Wysocki
2009-04-26  9:46 ` [Bug #13144] resume from suspend fails using video card i915 Rafael J. Wysocki
2009-04-26  9:46 ` [Bug #13100] can't anymore even do a s2ram-s2disk-s2ram cycle on acer aspire 5720G Rafael J. Wysocki
2009-04-26  9:46 ` [Bug #13112] Oops in drain_array Rafael J. Wysocki
2009-04-26 20:19   ` David Rientjes
     [not found]     ` <alpine.DEB.2.00.0904261314430.18988-X6Q0R45D7oAcqpCFd4KODRPsWskHk0ljAL8bYrjMMd8@public.gmane.org>
2009-04-27  8:52       ` Pekka Enberg
     [not found]         ` <84144f020904270152o6567e84cj914934120315bf90-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-04-27 14:04           ` Christoph Lameter
2009-04-27 16:58             ` Bart
     [not found]               ` <Pine.LNX.4.64.0904271849590.2455-Bi0AbNG1eu+dHxVRc3HrWQ@public.gmane.org>
2009-04-27 17:39                 ` Christoph Lameter
     [not found]                   ` <alpine.DEB.1.10.0904271337450.31916-k2KMSsJkWwAAvxtiuMwx3w@public.gmane.org>
2009-04-28 13:05                     ` Bart
2009-04-27 20:36                 ` David Rientjes
     [not found]                   ` <alpine.DEB.2.00.0904271327140.11650-X6Q0R45D7oAcqpCFd4KODRPsWskHk0ljAL8bYrjMMd8@public.gmane.org>
2009-04-28  6:47                     ` Jens Axboe
2009-04-28  8:11                     ` FUJITA Tomonori
     [not found]                       ` <20090428171139N.fujita.tomonori-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>
2009-04-28 12:43                         ` Bart
     [not found]                           ` <Pine.LNX.4.64.0904281425040.2455-Bi0AbNG1eu+dHxVRc3HrWQ@public.gmane.org>
2009-04-28 14:44                             ` FUJITA Tomonori
     [not found]                               ` <20090428234512P.fujita.tomonori-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>
2009-04-28 18:22                                 ` Jens Axboe
2009-04-26  9:46 ` [Bug #13172] Spontaneous reboots since 2.6.29-rc* Rafael J. Wysocki
2009-04-26  9:46 ` [Bug #13175] sata_nv incompatible with async scsi scan Rafael J. Wysocki
2009-04-26  9:46 ` [Bug #13178] Booting very slow Rafael J. Wysocki
2009-04-27  7:18   ` Martin Knoblauch
2009-04-26  9:46 ` [Bug #13183] forcedeth: no link during initialization Rafael J. Wysocki
2009-04-26  9:46 ` [Bug #13184] Left audio channel broken after resume from suspend with Intel HDA Rafael J. Wysocki
2009-04-26  9:46 ` [Bug #13186] cpufreq timer teardown problem Rafael J. Wysocki
2009-04-26 16:28   ` Mathieu Desnoyers
2009-04-26 17:45     ` Rafael J. Wysocki
     [not found]       ` <200904261945.11690.rjw-KKrjLPT3xs0@public.gmane.org>
2009-04-26 18:32         ` Mathieu Desnoyers
2009-04-26 12:47 ` 2.6.30-rc3-git1: Reported regressions 2.6.28 -> 2.6.29 Matthew Wilcox
  -- strict thread matches above, loose matches on Subject: below --
2009-06-07 10:02 2.6.30-rc8-git4: " Rafael J. Wysocki
2009-06-07 10:06 ` [Bug #12765] i915 VT switch with AIGLX causes X lock up Rafael J. Wysocki
2009-06-28 20:11   ` Sitsofe Wheeler
2009-07-20 18:11     ` Jesse Barnes
2009-05-30 19:50 2.6.30-rc7-git4: Reported regressions 2.6.28 -> 2.6.29 Rafael J. Wysocki
2009-05-30 19:55 ` [Bug #12765] i915 VT switch with AIGLX causes X lock up Rafael J. Wysocki
2009-05-31 16:12   ` Sitsofe Wheeler
     [not found]     ` <20090531161222.GA4204-Ae9UE+oIsuU@public.gmane.org>
2009-06-01 20:10       ` Rafael J. Wysocki
2009-05-24 19:27 2.6.30-rc7: Reported regressions 2.6.28 -> 2.6.29 Rafael J. Wysocki
2009-05-24 19:31 ` [Bug #12765] i915 VT switch with AIGLX causes X lock up Rafael J. Wysocki
2009-05-26 22:23   ` Sitsofe Wheeler
     [not found]     ` <20090526222352.GA1532-Ae9UE+oIsuU@public.gmane.org>
2009-05-26 23:12       ` Rafael J. Wysocki
2009-05-16 19:58 2.6.30-rc6: Reported regressions 2.6.28 -> 2.6.29 Rafael J. Wysocki
2009-05-16 20:05 ` [Bug #12765] i915 VT switch with AIGLX causes X lock up Rafael J. Wysocki
2009-05-18  7:13   ` Sitsofe Wheeler
     [not found]     ` <20090518071315.GA26870-Ae9UE+oIsuU@public.gmane.org>
2009-05-18 17:10       ` Rafael J. Wysocki
2009-04-06 18:54 2.6.29-git13: Reported regressions from 2.6.28 Rafael J. Wysocki
2009-04-06 19:05 ` [Bug #12765] i915 VT switch with AIGLX causes X lock up Rafael J. Wysocki
2009-03-21 16:28 2.6.29-rc8-git5: Reported regressions from 2.6.28 Rafael J. Wysocki
2009-03-21 16:39 ` [Bug #12765] i915 VT switch with AIGLX causes X lock up Rafael J. Wysocki
2009-03-14 19:01 2.6.29-rc8: Reported regressions from 2.6.28 Rafael J. Wysocki
2009-03-14 19:05 ` [Bug #12765] i915 VT switch with AIGLX causes X lock up Rafael J. Wysocki
2009-03-16 17:54   ` Sitsofe Wheeler
2009-03-19 13:02     ` Rafael J. Wysocki
2009-03-03 19:22 2.6.29-rc6-git7: Reported regressions from 2.6.28 Rafael J. Wysocki
2009-03-03 19:25 ` [Bug #12765] i915 VT switch with AIGLX causes X lock up Rafael J. Wysocki
2009-02-23 21:45 2.6.29-rc6: Reported regressions from 2.6.28 Rafael J. Wysocki
2009-02-23 21:48 ` [Bug #12765] i915 VT switch with AIGLX causes X lock up Rafael J. Wysocki
2009-02-26 21:43   ` Sitsofe Wheeler
     [not found]     ` <20090226214325.GA14218-ScVzN+evPNgw6GsfDNm9Eg@public.gmane.org>
2009-02-26 22:32       ` Rafael J. Wysocki

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=20090427094651.7cc09227@hobbes \
    --to=jbarnes-y1mf5jbuw70benjcbmcuuq@public.gmane.org \
    --cc=airlied-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=dri-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=kernel-testers-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=michel-otUistvHUpPR7s880joybQ@public.gmane.org \
    --cc=rjw-KKrjLPT3xs0@public.gmane.org \
    --cc=sitsofe-/E1597aS9LQAvxtiuMwx3w@public.gmane.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;
as well as URLs for NNTP newsgroup(s).