From patchwork Wed Sep 2 14:57:33 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhenyu Wang X-Patchwork-Id: 45150 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 n8272KuU008995 for ; Wed, 2 Sep 2009 07:02:20 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8FD9C9E8A8; Wed, 2 Sep 2009 00:02:20 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from azsmga101.ch.intel.com (mga07.intel.com [143.182.124.22]) by gabe.freedesktop.org (Postfix) with ESMTP id 3080E9E81E for ; Wed, 2 Sep 2009 00:02:18 -0700 (PDT) Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 02 Sep 2009 00:02:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.44,271,1249282800"; d="scan'208";a="183124292" Received: from debian-t61.sh.intel.com (HELO localhost.localdomain) ([10.239.36.165]) by azsmga001.ch.intel.com with ESMTP; 02 Sep 2009 00:02:17 -0700 From: Zhenyu Wang To: intel-gfx@lists.freedesktop.org Date: Wed, 2 Sep 2009 22:57:33 +0800 Message-Id: <1251903453-12710-1-git-send-email-zhenyuw@linux.intel.com> X-Mailer: git-send-email 1.5.3.8 Subject: [Intel-gfx] [PATCH] Make DGA optional 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: , MIME-Version: 1.0 Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org As DGA is optional in xserver, we should check this too instead of always trying to init DGA. Found when update xserver to 6fffcd5825454a7fe58ffbcfb219f007cf38e731, but not update xf86dgaproto, which caused X fails to start. Signed-off-by: Zhenyu Wang --- src/i810_driver.c | 2 ++ src/i830_driver.c | 5 ++++- 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/src/i810_driver.c b/src/i810_driver.c index a08a500..7961c3d 100644 --- a/src/i810_driver.c +++ b/src/i810_driver.c @@ -2024,7 +2024,9 @@ I810ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) } #endif +#ifdef XFreeXDGA I810DGAInit(pScreen); +#endif if (!xf86InitFBManager(pScreen, &(pI810->FbMemBox))) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, diff --git a/src/i830_driver.c b/src/i830_driver.c index 7e0ebf3..4334de6 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -2733,7 +2733,10 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) xf86SetBlackWhitePixels(pScreen); - xf86DiDGAInit (pScreen, pI830->LinearAddr + pScrn->fbOffset); +#ifdef XFreeXDGA + if (!pI830->use_drm_mode) + xf86DiDGAInit (pScreen, pI830->LinearAddr + pScrn->fbOffset); +#endif if (!I830AccelInit(pScreen)) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR,