From: Zhigang Gong Subject: [PATCH 1/4] glamor: Added flags to indicate whether to use glamor in UXA. Date: Mon, 14 Nov 2011 20:09:01 +0800 Message-ID: <1321272544-29722-1-git-send-email-zhigang.gong@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by gabe.freedesktop.org (Postfix) with ESMTP id 025CE9E796 for ; Mon, 14 Nov 2011 04:20:47 -0800 (PST) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org Added two new flags UXA_USE_GLAMOR and UXA_USE_GLAMOR_ONLY. When UXA_USE_GLAMOR or UXA_USE_GLAMOR_ONLY is set, then it will use GLAMOR to perform rendering operations by default. If GLAMOR failed to accelerate the operation and UXA_USE_GLAMOR is set, it then continue to the normal UXA code path to do the rendering. If the UXA_USE_GLAMOR_ONLY is set, it then jump to fallback path directly and avoid the UXA acceleration code. Signed-off-by: Zhigang Gong --- uxa/uxa.h | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/uxa/uxa.h b/uxa/uxa.h index e001c53..21e6f2a 100644 --- a/uxa/uxa.h +++ b/uxa/uxa.h @@ -543,6 +543,22 @@ typedef struct _UxaDriver { */ #define UXA_TWO_BITBLT_DIRECTIONS (1 << 2) +/** + * UXA_USE_GLAMOR indicates to use glamor acceleration to perform rendering + * as first choice. And if glamor fail to accelerate the rendering, then goto + * normal path to do the rendering. + */ +#define UXA_USE_GLAMOR (1 << 3) + +/** + * UXA_USE_GLAMOR_ONLY indicates to use glamor acceleration to perform rendering. + * And if glamor fail to accelerate the rendering, then goto fallback to + * use CPU to do the rendering. + */ +#define UXA_USE_GLAMOR_ONLY (1 << 4) + +#define UXA_GLAMOR_FLAGS (UXA_USE_GLAMOR | UXA_USE_GLAMOR_ONLY) + /** @} */ /** @name UXA CreatePixmap hint flags -- 1.7.4.4