From patchwork Thu Jul 12 10:47:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: zhigang.gong@linux.intel.com X-Patchwork-Id: 1188401 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 9B267E0038 for ; Thu, 12 Jul 2012 11:13:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 828E6A0F32 for ; Thu, 12 Jul 2012 04:13:02 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id 19EE19EC6D for ; Thu, 12 Jul 2012 04:12:12 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 12 Jul 2012 04:12:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.71,315,1320652800"; d="scan'208";a="191690400" Received: from unknown (HELO desktop.x86.com) ([10.238.156.108]) by fmsmga002.fm.intel.com with ESMTP; 12 Jul 2012 04:12:11 -0700 From: zhigang.gong@linux.intel.com To: intel-gfx@lists.freedesktop.org Date: Thu, 12 Jul 2012 18:47:51 +0800 Message-Id: <1342090071-18809-2-git-send-email-zhigang.gong@linux.intel.com> X-Mailer: git-send-email 1.7.4.4 In-Reply-To: <1342090071-18809-1-git-send-email-zhigang.gong@linux.intel.com> References: <1342090071-18809-1-git-send-email-zhigang.gong@linux.intel.com> Subject: [Intel-gfx] [PATCH 2/2] uxa-glyphs: Bypass uxa glyphs operations if using glamor. X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 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+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org From: Zhigang Gong glamor_glyphs will never fallback. We don't need to keep a uxa glyphs cache picture here. Thus simply bypass the corresponding operations. Signed-off-by: Zhigang Gong --- uxa/uxa-glyphs.c | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/uxa/uxa-glyphs.c b/uxa/uxa-glyphs.c index 6bdf101..527942a 100644 --- a/uxa/uxa-glyphs.c +++ b/uxa/uxa-glyphs.c @@ -112,6 +112,9 @@ static void uxa_unrealize_glyph_caches(ScreenPtr pScreen) uxa_screen_t *uxa_screen = uxa_get_screen(pScreen); int i; + if (uxa_screen->info->flags & UXA_USE_GLAMOR) + return; + if (!uxa_screen->glyph_cache_initialized) return; @@ -211,6 +214,11 @@ bail: Bool uxa_glyphs_init(ScreenPtr pScreen) { + + uxa_screen_t *uxa_screen = uxa_get_screen(pScreen); + + if (uxa_screen->info->flags & UXA_USE_GLAMOR) + return TRUE; #if HAS_DIXREGISTERPRIVATEKEY if (!dixRegisterPrivateKey(&uxa_glyph_key, PRIVATE_GLYPH, 0)) return FALSE; @@ -307,8 +315,10 @@ uxa_glyph_unrealize(ScreenPtr screen, struct uxa_glyph *priv; uxa_screen_t *uxa_screen = uxa_get_screen(screen); - if (uxa_screen->info->flags & UXA_USE_GLAMOR) + if (uxa_screen->info->flags & UXA_USE_GLAMOR) { glamor_glyph_unrealize(screen, glyph); + return; + } /* Use Lookup in case we have not attached to this glyph. */ priv = dixLookupPrivate(&glyph->devPrivates, &uxa_glyph_key);