Bug 67733

Summary: [Baytrail-M] VGA can't hotplug
Product: DRI Reporter: kobeqin <kobe.qin>
Component: DRM/IntelAssignee: Chris Wilson <chris>
Status: CLOSED FIXED QA Contact: Intel GFX Bugs mailing list <intel-gfx-bugs>
Severity: critical    
Priority: high    
Version: unspecified   
Hardware: Other   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description kobeqin 2013-08-04 06:05:50 UTC
Test Environment, 

Platform: Baytrail-M 
00:00.0 Host bridge [0600]: Intel Corporation ValleyView SSA-CUnit [8086:0f00] (rev 06)
00:02.0 VGA compatible controller [0300]: Intel Corporation ValleyView Gen7 [8086:0f31] (rev 06)

Driver version:
OSD: 			Fedora Release 19.x86_64
Kernel_version: 	kernel-3.11.0rc2_drmintelfixes_61c254_20130731_+-6401.x86_64.rpm
Libdrm:         (master)libdrm-2.4.46-2-gfea5408098c3c3057958e85ea9d7146f0b08749e
Mesa:           (9.2)9b8ad643629fad1724e01c8fbb3289e43d42e1c1
Xserver:                (server-1.13-branch)xorg-server-1.13.4
Xf86_video_intel:               (master)2.21.13-35-g493763301e995d02cb838d14348da46dd26444af
Cairo:          (master)3cd6c5966aca1d202744fe44083800bc2a4a831d
Libva:          (master)d2dbc3f69c69e5933e7b3da429c0fb0cae5b98b0
Libva_intel_driver:             (master)8bf807539c1790d6eee531373131672d38c82b31
OpenCL:         (master)
Kernel:         (drm-intel-fixes) 61c2542b3b8e70fc1b82880c3ef7e2f930875b97

BIOS version:
BBAYCRB_X64_R_SPI_0040_40_SEC_1040

Description:
VGA can't light up after un-hotpluging and hotpluging

Reproduce step:
1. Plug a VGA to system
2. Boot up
3. Un-hotplug and hotplug VGA
Comment 1 Chris Wilson 2013-08-04 08:16:48 UTC
This requires a drm.debug=6 dmesg.
Comment 2 Daniel Vetter 2013-08-04 16:59:55 UTC
Jesse is the Batrail owner.
Comment 3 kobeqin 2013-08-05 09:51:06 UTC
This bug is reported on BIOS v47. We do a further verification, rollback BIOS to v40 and find this bug can't duplicate on BIOS v40.
Comment 4 Chris Wilson 2013-08-11 11:24:15 UTC
Try:

diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
index b5a3875..7475200 100644
--- a/drivers/gpu/drm/i915/intel_crt.c
+++ b/drivers/gpu/drm/i915/intel_crt.c
@@ -688,7 +688,7 @@ static void intel_crt_reset(struct drm_connector *connector)
        struct drm_i915_private *dev_priv = dev->dev_private;
        struct intel_crt *crt = intel_attached_crt(connector);
 
-       if (HAS_PCH_SPLIT(dev)) {
+       if (HAS_PCH_SPLIT(dev) || IS_VALLEYVIEW(dev)) {
                u32 adpa;
 
                adpa = I915_READ(crt->adpa_reg);
Comment 5 kobeqin 2013-08-14 06:21:55 UTC
(In reply to comment #4)
> Try:
> 
> diff --git a/drivers/gpu/drm/i915/intel_crt.c
> b/drivers/gpu/drm/i915/intel_crt.c
> index b5a3875..7475200 100644
> --- a/drivers/gpu/drm/i915/intel_crt.c
> +++ b/drivers/gpu/drm/i915/intel_crt.c
> @@ -688,7 +688,7 @@ static void intel_crt_reset(struct drm_connector
> *connector)
>         struct drm_i915_private *dev_priv = dev->dev_private;
>         struct intel_crt *crt = intel_attached_crt(connector);
>  
> -       if (HAS_PCH_SPLIT(dev)) {
> +       if (HAS_PCH_SPLIT(dev) || IS_VALLEYVIEW(dev)) {
>                 u32 adpa;
>  
>                 adpa = I915_READ(crt->adpa_reg);

Verify with this patch, VGA hotplug can work.
Comment 6 Daniel Vetter 2013-08-14 10:15:21 UTC
I think we might want to just use a gen >= 5 check for clarity. Luckily VGA is dying out, so we don't need to ponder forward compatibility issues.
Comment 7 Chris Wilson 2013-08-26 15:04:36 UTC
(In reply to comment #6)
> I think we might want to just use a gen >= 5 check for clarity. Luckily VGA
> is dying out, so we don't need to ponder forward compatibility issues.

Poke.
Comment 8 Daniel Vetter 2013-08-27 09:27:20 UTC
Fixed with

commit 6190e2f8f69695117ead2010b2c411b5183396a1
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Aug 26 19:51:06 2013 -0300

    drm/i915: Apply the force-detect VGA w/a to Valleyview
Comment 9 Elizabeth 2017-10-06 14:44:20 UTC
Closing old verified.

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.