Re: + drivers-gpu-drm-i915-intel_lvdsc-fix-locking-snafu.patch added to -mm tree
This patch does not work for me. With this patch applied kernel fails to read EDID data and discover proper modes. (It ends up displaying a picture looking like the BIOS bootup image). X fails to start finding no valid mode for LVDS output. Without the patch Xorg doesn't start either, being blocked in same area as listed earlier in this thread: [ 373.719792] Xorg D 1704 2295 2216 [ 373.719803] da9a1dc4 00203082 dd3f0080 dd8c0990 dd84e800 [ 373.719817] dd84ea4c dd84ea50 da9a1de8 c036950e dd8c0990 dd84ea50 dd84ea50 [ 373.719832] dd8c0990 dd84ea4c dd84f000 dd84e800 da9a1df8 c0369479 dd84f000 dd822000 [ 373.719845] Call Trace: [ 373.719855] [c036950e] __mutex_lock_slowpath+0x5e/0x90 [ 373.719864] [c0369479] mutex_lock+0x19/0x20 [ 373.719876] [c0278ed0] intel_lvds_get_modes+0x60/0x90 [ 373.719889] [c0269069] drm_helper_probe_single_connector_modes+0x89/0x220 [ 373.719898] [c036946e] ? mutex_lock+0xe/0x20 [ 373.719908] [c02674a1] drm_mode_getconnector+0x261/0x300 [ 373.719922] [c025d850] drm_ioctl+0xe0/0x2b0 [ 373.719932] [c0267240] ? drm_mode_getconnector+0x0/0x300 [ 373.719942] [c025d770] ? drm_ioctl+0x0/0x2b0 [ 373.719951] [c0174757] vfs_ioctl+0x67/0x70 [ 373.719960] [c0174d2a] do_vfs_ioctl+0x1fa/0x520 [ 373.719969] [c0158553] ? handle_mm_fault+0xd3/0x480 [ 373.719980] [c01b3f42] ? reiserfs_file_write+0x82/0xb0 [ 373.719988] [c016a675] ? vfs_write+0xe5/0x120 [ 373.719997] [c01b3ec0] ? reiserfs_file_write+0x0/0xb0 [ 373.720005] [c0175089] sys_ioctl+0x39/0x60 [ 373.720014] [c0103105] sysenter_do_call+0x12/0x25 Laptop is Acer Travelmate 660. (855GM) lspci -nn: 00:00.0 Host bridge [0600]: Intel Corporation 82852/82855 GM/GME/PM/GMV Processor to I/O Controller [8086:3580] (rev 02) 00:00.1 System peripheral [0880]: Intel Corporation 82852/82855 GM/GME/PM/GMV Processor to I/O Controller [8086:3584] (rev 02) 00:00.3 System peripheral [0880]: Intel Corporation 82852/82855 GM/GME/PM/GMV Processor to I/O Controller [8086:3585] (rev 02) 00:02.0 VGA compatible controller [0300]: Intel Corporation 82852/855GM Integrated Graphics Device [8086:3582] (rev 02) 00:02.1 Display controller [0380]: Intel Corporation 82852/855GM Integrated Graphics Device [8086:3582] (rev 02) 00:1d.0 USB Controller [0c03]: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 [8086:24c2] (rev 03) 00:1d.1 USB Controller [0c03]: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 [8086:24c4] (rev 03) 00:1d.2 USB Controller [0c03]: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3 [8086:24c7] (rev 03) 00:1d.7 USB Controller [0c03]: Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller [8086:24cd] (rev 03) 00:1e.0 PCI bridge [0604]: Intel Corporation 82801 Mobile PCI Bridge [8086:2448] (rev 83) 00:1f.0 ISA bridge [0601]: Intel Corporation 82801DBM (ICH4-M) LPC Interface Bridge [8086:24cc] (rev 03) 00:1f.1 IDE interface [0101]: Intel Corporation 82801DBM (ICH4-M) IDE Controller [8086:24ca] (rev 03) 00:1f.3 SMBus [0c05]: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller [8086:24c3] (rev 03) 00:1f.5 Multimedia audio controller [0401]: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller [8086:24c5] (rev 03) 00:1f.6 Modem [0703]: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Modem Controller [8086:24c6] (rev 03) 02:02.0 Ethernet controller [0200]: Broadcom Corporation BCM4401 100Base-T [14e4:4401] (rev 01) 02:04.0 Network controller [0280]: Intel Corporation PRO/Wireless LAN 2100 3B Mini PCI Adapter [8086:1043] (rev 04) 02:06.0 CardBus bridge [0607]: O2 Micro, Inc. OZ711EC1 SmartCardBus Controller [1217:7113] (rev 20) 02:06.1 CardBus bridge [0607]: O2 Micro, Inc. OZ711EC1 SmartCardBus Controller [1217:7113] (rev 20) 02:07.0 FireWire (IEEE 1394) [0c00]: Texas Instruments TSB43AB21 IEEE-1394a-2000 Controller (PHY/Link) [104c:8026] dmesg output: ... [0.525418] Linux agpgart interface v0.103 [0.525497] agpgart-intel :00:00.0: Intel 855GM Chipset [0.526219] agpgart-intel :00:00.0: detected 32636K stolen memory [0.527759] agpgart-intel :00:00.0: AGP aperture is 128M @ 0xe800 [0.527926] [drm] Initialized drm 1.1.0 20060810 [0.528014] pci :00:02.0: power state changed by ACPI to D0 [0.528354] ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 11 [0.528409] PCI: setting IRQ 11 as level-triggered [0.528415] pci :00:02.0: PCI INT A - Link[LNKA] - GSI 11 (level, low) - IRQ 11 [0.528490] pci :00:02.0: setting latency timer to 64 [0.609992] Switched to high resolution mode on CPU 0 [1.00] i2c-adapter i2c-0: unable to read EDID block. [1.080091] pci :00:02.0: VGA-1: no EDID data [1.425597] fbcon: inteldrmfb (fb0) is primary device [1.719256] [drm:intel_crtc_mode_set] *ERROR* Couldn't find PLL settings
Re: + drivers-gpu-drm-i915-intel_lvdsc-fix-locking-snafu.patch added to -mm tree
On Wed, Feb 04, 2009 at 07:03:57PM +0100, Bruno Prémont wrote: This patch does not work for me. With this patch applied kernel fails to read EDID data and discover proper modes. (It ends up displaying a picture looking like the BIOS bootup image). X fails to start finding no valid mode for LVDS output. I've had the same problem (at least wrt to X), but it seems to disappear when cold-booting. It even works when I boot with modeset=0, kill X, then reload the i915 module with modeset=1. Maybe the kms is a bit flakey when X played with it for too long beforehands. But kernel modesetting for the framebuffer console always works, so YMMV. -Daniel -- Daniel Vetter E-Mail: daniel.vet...@ffwll.ch Tel.: +41 (0)79 365 57 48 -- Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
Re: + drivers-gpu-drm-i915-intel_lvdsc-fix-locking-snafu.patch added to -mm tree
On Mon, 2 Feb 2009, Andrew Morton wrote: (cc's added) On Sat, 31 Jan 2009 16:25:08 +0100 Daniel Vetter dan...@ffwll.ch wrote: On Thu, Jan 29, 2009 at 01:48:25PM -0800, Andrew Morton wrote: On Thu, 29 Jan 2009 13:24:17 -0800 Jesse Barnes jbar...@virtuousgeek.org wrote: On Thursday, January 29, 2009 12:50 pm a...@linux-foundation.org wrote: So I assume that it would make sense to track this as a post-2.6.28 regression? From ac048e1734699dd98f4bdf4daf2b9592d4a4d38e Mon Sep 17 00:00:00 2001 From: Dave Airlie airl...@redhat.com Date: Tue, 3 Feb 2009 19:05:12 +1000 Subject: [PATCH] i915: fix unneeded locking in i915 LVDS get modes code. This code is always called under the lock from the higher layers, so need to go locking it here. Signed-off-by: Dave Airlie airl...@redhat.com --- drivers/gpu/drm/i915/intel_lvds.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c index b36a521..cf8da64 100644 --- a/drivers/gpu/drm/i915/intel_lvds.c +++ b/drivers/gpu/drm/i915/intel_lvds.c @@ -311,10 +311,8 @@ static int intel_lvds_get_modes(struct drm_connector *connector) if (dev_priv-panel_fixed_mode != NULL) { struct drm_display_mode *mode; - mutex_lock(dev-mode_config.mutex); mode = drm_mode_duplicate(dev, dev_priv-panel_fixed_mode); drm_mode_probed_add(connector, mode); - mutex_unlock(dev-mode_config.mutex); return 1; } -- 1.6.0.6 -- Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
Re: + drivers-gpu-drm-i915-intel_lvdsc-fix-locking-snafu.patch added to -mm tree
On Mon, Feb 02, 2009 at 10:44:48PM -0800, Andrew Morton wrote: Enabling kms works flawlessly now, but when I fire up X, the screen blanks (no more blinking cursors), then X hangs. vt-switchings doesn't work anymore, otherwise the machine looked fine (ping on the network was fine, couldn't check anything else for lack of a running sshd on the crashing machine). Twice using SysRq-T (half a minute in between) showed that Xorg was indeed stuck, both times with the exact same backtrace: Xorg D 00203246 6448 6049 6048 f1c81df0 00203046 f6322720 00203246 f1c81de0 f83fb98d f6322720 f632297c 00203046 f1d88444 00203046 f2f63cc0 f8388dae f1d88444 f1d88408 00203246 f1c81e2c c02e18ba f83fb98d f6322720 f1d88430 f1d88444 Call Trace: [f83fb98d] ? intel_lvds_get_modes+0x69/0x94 [i915] [f8388dae] ? drm_mode_getconnector+0x54/0x31f [drm] [c02e18ba] mutex_lock_nested+0x158/0x254 [f83fb98d] ? intel_lvds_get_modes+0x69/0x94 [i915] [f83fb98d] intel_lvds_get_modes+0x69/0x94 [i915] [f838a170] drm_helper_probe_single_connector_modes+0xb8/0x194 [drm] [f8388e20] drm_mode_getconnector+0xc6/0x31f [drm] [c02e13bc] ? mutex_unlock+0xd/0xf [f837f71f] drm_ioctl+0x1c1/0x23d [drm] [f8388d5a] ? drm_mode_getconnector+0x0/0x31f [drm] [f837f55e] ? drm_ioctl+0x0/0x23d [drm] [c0191277] vfs_ioctl+0x43/0x56 [c0191a34] do_vfs_ioctl+0x49f/0x4e0 [c0186c42] ? vfs_write+0xf5/0x131 [c0191aba] sys_ioctl+0x45/0x5f [c0102e91] sysenter_do_call+0x12/0x31 This is on 2.6.29-rc3-00100-gf2257b7. So I assume that it would make sense to track this as a post-2.6.28 regression? Nope. Like the previous issue it only happens when I run-time enable kernel modesetting (with # modprobe i915 modeset=1), which is not the default. I'm gonna open a new bz entry with all the details (and all the people on cc minus regression handlers). But first I'll check with CONFIG_LOCKDEP whether it's really a locking goof-up. -Daniel -- Daniel Vetter E-Mail: daniel.vet...@ffwll.ch Tel.: +41 (0)79 365 57 48 -- Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
Re: + drivers-gpu-drm-i915-intel_lvdsc-fix-locking-snafu.patch added to -mm tree
I can confirm that this patch fixes the problem. I tested with the locking validator, and it looks like locking is now fine on my hardware. Thanks everyone for tracking down this issue. -Daniel On Tue, Feb 03, 2009 at 09:58:16AM +, Dave Airlie wrote: On Mon, 2 Feb 2009, Andrew Morton wrote: (cc's added) On Sat, 31 Jan 2009 16:25:08 +0100 Daniel Vetter dan...@ffwll.ch wrote: On Thu, Jan 29, 2009 at 01:48:25PM -0800, Andrew Morton wrote: On Thu, 29 Jan 2009 13:24:17 -0800 Jesse Barnes jbar...@virtuousgeek.org wrote: On Thursday, January 29, 2009 12:50 pm a...@linux-foundation.org wrote: So I assume that it would make sense to track this as a post-2.6.28 regression? From ac048e1734699dd98f4bdf4daf2b9592d4a4d38e Mon Sep 17 00:00:00 2001 From: Dave Airlie airl...@redhat.com Date: Tue, 3 Feb 2009 19:05:12 +1000 Subject: [PATCH] i915: fix unneeded locking in i915 LVDS get modes code. This code is always called under the lock from the higher layers, so need to go locking it here. Signed-off-by: Dave Airlie airl...@redhat.com --- drivers/gpu/drm/i915/intel_lvds.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c index b36a521..cf8da64 100644 --- a/drivers/gpu/drm/i915/intel_lvds.c +++ b/drivers/gpu/drm/i915/intel_lvds.c @@ -311,10 +311,8 @@ static int intel_lvds_get_modes(struct drm_connector *connector) if (dev_priv-panel_fixed_mode != NULL) { struct drm_display_mode *mode; - mutex_lock(dev-mode_config.mutex); mode = drm_mode_duplicate(dev, dev_priv-panel_fixed_mode); drm_mode_probed_add(connector, mode); - mutex_unlock(dev-mode_config.mutex); return 1; } -- 1.6.0.6 -- Daniel Vetter E-Mail: daniel.vet...@ffwll.ch Tel.: +41 (0)79 365 57 48 -- Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
Re: + drivers-gpu-drm-i915-intel_lvdsc-fix-locking-snafu.patch added to -mm tree
(cc's added) On Sat, 31 Jan 2009 16:25:08 +0100 Daniel Vetter dan...@ffwll.ch wrote: On Thu, Jan 29, 2009 at 01:48:25PM -0800, Andrew Morton wrote: On Thu, 29 Jan 2009 13:24:17 -0800 Jesse Barnes jbar...@virtuousgeek.org wrote: On Thursday, January 29, 2009 12:50 pm a...@linux-foundation.org wrote: diff -puN drivers/gpu/drm/i915/intel_lvds.c~drivers-gpu-drm-i915-intel_lvdsc-fix-lock ing-snafu drivers/gpu/drm/i915/intel_lvds.c --- a/drivers/gpu/drm/i915/intel_lvds.c~drivers-gpu-drm-i915-intel_lvdsc-fix-lo cking-snafu +++ a/drivers/gpu/drm/i915/intel_lvds.c @@ -311,7 +311,7 @@ static int intel_lvds_get_modes(struct d if (dev_priv-panel_fixed_mode != NULL) { struct drm_display_mode *mode; - mutex_unlock(dev-mode_config.mutex); + mutex_lock(dev-mode_config.mutex); mode = drm_mode_duplicate(dev, dev_priv-panel_fixed_mode); drm_mode_probed_add(connector, mode); mutex_unlock(dev-mode_config.mutex); _ Patches currently in -mm which might be from a...@linux-foundation.org are Oops. This should go upstream asap. yup, I'll send it later today hopefully. Thanks for the speedy fix. Unfortunately it looks like the locking in this area still doesn't quite work: Enabling kms works flawlessly now, but when I fire up X, the screen blanks (no more blinking cursors), then X hangs. vt-switchings doesn't work anymore, otherwise the machine looked fine (ping on the network was fine, couldn't check anything else for lack of a running sshd on the crashing machine). Twice using SysRq-T (half a minute in between) showed that Xorg was indeed stuck, both times with the exact same backtrace: Xorg D 00203246 6448 6049 6048 f1c81df0 00203046 f6322720 00203246 f1c81de0 f83fb98d f6322720 f632297c 00203046 f1d88444 00203046 f2f63cc0 f8388dae f1d88444 f1d88408 00203246 f1c81e2c c02e18ba f83fb98d f6322720 f1d88430 f1d88444 Call Trace: [f83fb98d] ? intel_lvds_get_modes+0x69/0x94 [i915] [f8388dae] ? drm_mode_getconnector+0x54/0x31f [drm] [c02e18ba] mutex_lock_nested+0x158/0x254 [f83fb98d] ? intel_lvds_get_modes+0x69/0x94 [i915] [f83fb98d] intel_lvds_get_modes+0x69/0x94 [i915] [f838a170] drm_helper_probe_single_connector_modes+0xb8/0x194 [drm] [f8388e20] drm_mode_getconnector+0xc6/0x31f [drm] [c02e13bc] ? mutex_unlock+0xd/0xf [f837f71f] drm_ioctl+0x1c1/0x23d [drm] [f8388d5a] ? drm_mode_getconnector+0x0/0x31f [drm] [f837f55e] ? drm_ioctl+0x0/0x23d [drm] [c0191277] vfs_ioctl+0x43/0x56 [c0191a34] do_vfs_ioctl+0x49f/0x4e0 [c0186c42] ? vfs_write+0xf5/0x131 [c0191aba] sys_ioctl+0x45/0x5f [c0102e91] sysenter_do_call+0x12/0x31 This is on 2.6.29-rc3-00100-gf2257b7. So I assume that it would make sense to track this as a post-2.6.28 regression? -- Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel