Add the support for IGDNG to disable VGA plane reliably
diff mbox

Message ID 203E2E09541FF645B6118C2E0503C25E01B9CBA921@pdsmsx503.ccr.corp.intel.com
State Not Applicable
Headers show

Commit Message

Wang, Quanxian Aug. 10, 2009, 6:09 a.m. UTC
From: Wang, Quanxian <quanxian.wang@intel.com>

Add the support for IGDNG to disable VGA plane reliably(enhance commit db9f5915ce8121)
Also based on the spec, the sleep second should be 100us instead of 30us from IGDNG spec.

Signed-off-by: Wang, Quanxian <quanxian.wang@intel.com>

---
src/i830_display.c |    9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

Comments

Zhenyu Wang Aug. 10, 2009, 7:43 a.m. UTC | #1
On 2009.08.10 14:09:56 +0800, Wang, Quanxian wrote:
> Add the support for IGDNG to disable VGA plane reliably(enhance commit db9f5915ce8121)
> Also based on the spec, the sleep second should be 100us instead of 30us from IGDNG spec.
> 
> src/i830_display.c |    9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
> 

Quanxian, we won't support ums for IGDNG in upstream, but you can freely do your
backport driver, and your patch looks ok with me.
Wang, Quanxian Aug. 11, 2009, 1:01 a.m. UTC | #2
That is fine. Thanks.

Zhenyu, is it possible to port this code to KMS. Our customer from Novell comes across such issue(different product based on G4X). It causes CPU lockup and system crashed at all. 

Quanxian  

>-----Original Message-----
>From: Zhenyu Wang [mailto:zhenyuw@linux.intel.com] 
>Sent: 2009年8月10日 15:44
>To: Wang, Quanxian
>Cc: intel-gfx@lists.freedesktop.org; Ma, Ling
>Subject: Re: Add the support for IGDNG to disable VGA plane reliably
>
>On 2009.08.10 14:09:56 +0800, Wang, Quanxian wrote:
>> Add the support for IGDNG to disable VGA plane 
>reliably(enhance commit db9f5915ce8121)
>> Also based on the spec, the sleep second should be 100us 
>instead of 30us from IGDNG spec.
>> 
>> src/i830_display.c |    9 +++++++--
>> 1 file changed, 7 insertions(+), 2 deletions(-)
>> 
>
>Quanxian, we won't support ums for IGDNG in upstream, but you 
>can freely do your
>backport driver, and your patch looks ok with me.
>
>-- 
>Open Source Technology Center, Intel ltd.
>
>$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
>

Patch
diff mbox

diff --git a/src/i830_display.c b/src/i830_display.c
index 59ededc..6be624e 100644
--- a/src/i830_display.c
+++ b/src/i830_display.c
@@ -1089,14 +1089,19 @@  i830_disable_vga_plane (xf86CrtcPtr crtc)
     OUTREG8(SRX, 1);
     sr01 = INREG8(SRX + 1);
     OUTREG8(SRX + 1, sr01 | (1 << 5));
-    usleep(30);
+    usleep(100);
     /* disable center mode on 965GM and G4X platform */
     if (IS_I965GM(pI830) || IS_G4X(pI830))
         vgacntrl &= ~(3 << 24);

     vgacntrl |= VGA_DISP_DISABLE;

-    OUTREG(VGACNTRL, vgacntrl);
+    if (IS_IGDNG(pI830))
+    {
+       OUTREG(CPU_VGACNTRL, vgacntrl);
+    } else {
+       OUTREG(VGACNTRL, vgacntrl);
+    }
     i830WaitForVblank(pScrn);

 }