From patchwork Mon Aug 10 06:09:56 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wang, Quanxian" X-Patchwork-Id: 40351 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n7A6CQou019283 for ; Mon, 10 Aug 2009 06:12:26 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7DE6C9EB11; Sun, 9 Aug 2009 23:12:25 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga14.intel.com (mga14.intel.com [143.182.124.37]) by gabe.freedesktop.org (Postfix) with ESMTP id 55C969E75E for ; Sun, 9 Aug 2009 23:12:22 -0700 (PDT) Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga102.ch.intel.com with ESMTP; 09 Aug 2009 23:12:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.43,351,1246863600"; d="scan'208";a="174011303" Received: from pgsmsx603.gar.corp.intel.com ([10.221.43.87]) by azsmga001.ch.intel.com with ESMTP; 09 Aug 2009 23:12:21 -0700 Received: from pdsmsx602.ccr.corp.intel.com (172.16.12.184) by pgsmsx603.gar.corp.intel.com (10.221.43.87) with Microsoft SMTP Server (TLS) id 8.1.358.0; Mon, 10 Aug 2009 14:10:02 +0800 Received: from pdsmsx503.ccr.corp.intel.com ([172.16.12.95]) by pdsmsx602.ccr.corp.intel.com ([172.16.12.184]) with mapi; Mon, 10 Aug 2009 14:09:58 +0800 From: "Wang, Quanxian" To: "intel-gfx@lists.freedesktop.org" Date: Mon, 10 Aug 2009 14:09:56 +0800 Thread-Topic: Add the support for IGDNG to disable VGA plane reliably Thread-Index: AcoZgS8henMDwFOJQDGHr6qpNyGsPg== Message-ID: <203E2E09541FF645B6118C2E0503C25E01B9CBA921@pdsmsx503.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Cc: "Ma, Ling" , "Wang, Zhenyu Z" Subject: [Intel-gfx] Add the support for IGDNG to disable VGA plane reliably X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.9 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org From: Wang, Quanxian 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 --- src/i830_display.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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); }