Bug 30378

Summary: [SNB] when VGA is hotplugged kernel is not generating any udev event
Product: DRI Reporter: Manjeet Singh <manjeet>
Component: DRM/IntelAssignee: Wang Zhenyu <zhenyu.z.wang>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: highest CC: jbarnes, xunx.fang, yi.sun, yuanhan.liu
Version: unspecified   
Hardware: Other   
OS: Linux (All)   
i915 platform: i915 features:
Description Flags
lspci output attached
The patch to fix this issue none

Description Manjeet Singh 2010-09-25 14:35:38 UTC
Bug description: Huron River ATI discrete [1002:6760]- 

System environment: 
-- chipset:00:00.0 Host bridge [0600]: Intel Corporation Sandy Bridge DRAM
Controller [8086:0104] (rev 07)
-- system architecture: i386-bit
-- kernel: 2.6.35-ng #1
-- Linux distribution: fedora based.
-- Machine or mobo model: Huron River discrete ATI

Reproducing steps:
Boot to fedora based linux with kernel 2.6.35.
hotplug external monitor VGA cable.

Actual results:
when VGA is hotplugged kernel is not generating a udev event at all.

Additional info:
see attached dmesh and Xorg and other log files
Comment 1 Wang Zhenyu 2010-09-25 19:04:33 UTC
Could you attach full lspci? I assume this should be ati bug instead of intel...

Gordon, please test and verify if display hotplug works on Huron river or not.
Comment 2 Gordon Jin 2010-09-25 22:19:25 UTC
VGA hotplug works on my Sandy Bridge D1 [0126], with 2.6.36-rc4 kernel.
Comment 3 Wang Zhenyu 2010-09-26 19:07:47 UTC
An easy way to identify our hotplug event is by using 'udevadm' utility, e.g

$udevadm monitor --kernel

you should see new event message when you plug in/out outputs.
Comment 4 Manjeet Singh 2010-09-27 17:43:41 UTC
Hi Wang Zhenyu,

I tried $udevadm monitor --kernel and I am not seeing any event when VGA cable is plugged in/out.

Attached is the lspci output of my system.
Comment 5 Manjeet Singh 2010-09-27 17:44:12 UTC
Created attachment 38999 [details]
lspci output attached
Comment 6 Manjeet Singh 2010-09-27 17:48:12 UTC
This is not ATI specific. I tried on UMA also and no udev events are generated. The attached lspci logs are from my UMA system.
Comment 7 Manjeet Singh 2010-09-29 14:01:58 UTC
We have added some printk s to ironlake_irq_handler code and observed that no PCH event is getting generated. But xrandr shows VGA monitor after hotplugging.

Wang Zhenyu - are seeing any udev-event with 2.6.36-rc4 kernel?
Comment 8 Manjeet Singh 2010-10-04 09:14:32 UTC
We have tested this issue on UMA with 2.6.36-rc6 kernel and no Uevent is occurring with VGA hot plug. 
-No uvent is appearing(udevadm monitor –kernel) on Huron river UMA with 2.6.36-rc6 kernel with VGA hot plug. But could switch to external monitor using xrandr after hot plug.

Question- Are you guys seeing any uevent with VGA hot plug on your boards.
Comment 9 Ian Romanick 2010-10-05 17:37:15 UTC
Using [SNB] as the tag for bugs specific to Sandybridge hardware.
Comment 10 Yuanhan Liu 2010-10-07 20:51:41 UTC
Created attachment 39278 [details] [review]
The patch to fix this issue

Hi Manjeet, 

Please try this patch. It fixed this issue on my side.

Comment 11 Wang Zhenyu 2010-10-07 21:44:27 UTC
Yuanhan, good catch!

Some comments for your patch.

We should split SDE_HOTPLUG_MASK for IBX and CPT as well. As they represent different hotplug mask bits, so we should check them differently in irq hander.

Do you really need to force CRT hotplug enable in detect? We save CRT control before detection, then restore it back, so things should be good.
Comment 12 Yuanhan Liu 2010-10-07 22:01:20 UTC
Hi Zhenyu, 

Thanks for your comments.

(In reply to comment #11)
> Do you really need to force CRT hotplug enable in detect? We save CRT control
> before detection, then restore it back, so things should be good.

Yes, just as the commnets said: 'Make sure....'. And, the HOTPLUG bit is disabled by default.

Comment 13 Chris Wilson 2010-10-08 04:36:18 UTC
Applied to drm-intel-next

commit 1510a97182b4ddb5fe3c4e8d05240f7cd6fd13e7
Author: Yuanhan Liu <yuanhan.liu@intel.com>
Date:   Fri Oct 8 10:18:01 2010 +0100

    drm/i915/crt: Make sure the hotplug interrupt is enabled
    After disabling the hotplug interrupts for VGA detection on Ironlake, be
    sure to re-enable them again afterwards.
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=30378
    Signed-off-by: Yuanhan Liu <yuanhan.liu@intel.com>
    Cc: stable@kernel.org
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

commit 2d7b8366ae4a9ec2183c30e432a4a9a495c82bcd
Author: Yuanhan Liu <yuanhan.liu@intel.com>
Date:   Fri Oct 8 10:21:06 2010 +0100

    drm/i915: Update hotplug interrupts register definitions for Sandybridge
    On Sandybridge, the bit definition for hotplug on SDE has changed, so
    update the code to new definition.
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=30378
    Cc: stable@kernel.org
    Signed-off-by: Yuanhan Liu <yuanhan.liu@intel.com>
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Comment 14 Manjeet Singh 2010-10-18 14:24:49 UTC
hotplug events are working after applying this patch.

Comment 15 Yi Sun 2011-05-05 22:41:06 UTC
Tested-by: Sun Yi <yi.sun@intel.com>
Comment 16 Jari Tahvanainen 2016-09-23 10:40:03 UTC

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.