From patchwork Fri Feb 6 12:52:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 5791621 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6D50A9F2ED for ; Fri, 6 Feb 2015 12:52:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AEB8620148 for ; Fri, 6 Feb 2015 12:52:32 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id D2EA020142 for ; Fri, 6 Feb 2015 12:52:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F2BF76E927; Fri, 6 Feb 2015 04:52:30 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-we0-f172.google.com (mail-we0-f172.google.com [74.125.82.172]) by gabe.freedesktop.org (Postfix) with ESMTP id F0D946E925 for ; Fri, 6 Feb 2015 04:52:28 -0800 (PST) Received: by mail-we0-f172.google.com with SMTP id x3so7939589wes.3 for ; Fri, 06 Feb 2015 04:52:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=cGykKpbhC2Z1yOVtLnAI+Xsqury1kAvEleuxiOGPblM=; b=OGF6Ym+ett/tg0vTSc7HFaQwColAoi/2E8Y1y2zwmspq9ta0SG2TaVizqzEc+pnZV0 JCdO1Fw2wKIsm0vlbBHqiAjP7EE5Ae8DxKkF8yFSpfCL4ypXzjKoebzPnKH0v5j7JRyV K2dMCLFxTsFNL8xjwzx/rfACcn0OzEGFJ6JB8+U86ardKJXjiARVHgG8Cvm5XXA8Mo7F Jmw0MWWoOuzK6tQ1QmxuJeGu428CnI3Hp/+hP+rLHiODkSrzEUzeSM/Gn+/wtKJ+2o48 VjBSYsJL73Ya6VnOjgK5lHOg9KeK2/4J1rCbtEKaxVoYbNwf9722w48BKkYIshOKarZx CzQQ== X-Gm-Message-State: ALoCoQkwr+KmlEC4oBkReGos3udCmxvAVUJ5Gf0c7ijF61StHyT1FGeTZ1QJOiHawP/NHQwvVY0I X-Received: by 10.194.58.141 with SMTP id r13mr7151936wjq.144.1423227148051; Fri, 06 Feb 2015 04:52:28 -0800 (PST) Received: from lmenx321.st.com. (lya72-2-88-175-155-153.fbx.proxad.net. [88.175.155.153]) by mx.google.com with ESMTPSA id hr1sm1392601wib.1.2015.02.06.04.52.27 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 06 Feb 2015 04:52:27 -0800 (PST) From: Benjamin Gaignard To: dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, airlied@redhat.com Subject: [PATCH 3/5] drm: sti: add support of ABGR8888 for gdp plane Date: Fri, 6 Feb 2015 13:52:07 +0100 Message-Id: <1423227129-17588-4-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1423227129-17588-1-git-send-email-benjamin.gaignard@linaro.org> References: <1423227129-17588-1-git-send-email-benjamin.gaignard@linaro.org> Cc: Benjamin Gaignard X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use GDP capabilities to support DRM_FORMAT_ABGR8888 (AB24) Signed-off-by: Benjamin Gaignard --- drivers/gpu/drm/sti/sti_gdp.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/sti/sti_gdp.c b/drivers/gpu/drm/sti/sti_gdp.c index 32448d1..f018bb1 100644 --- a/drivers/gpu/drm/sti/sti_gdp.c +++ b/drivers/gpu/drm/sti/sti_gdp.c @@ -14,7 +14,9 @@ #include "sti_layer.h" #include "sti_vtg.h" +#define ALPHASWITCH BIT(6) #define ENA_COLOR_FILL BIT(8) +#define BIGNOTLITTLE BIT(23) #define WAIT_NEXT_VSYNC BIT(31) /* GDP color formats */ @@ -23,6 +25,7 @@ #define GDP_RGB888_32 0x02 #define GDP_ARGB8565 0x04 #define GDP_ARGB8888 0x05 +#define GDP_ABGR8888 (GDP_ARGB8888 | BIGNOTLITTLE | ALPHASWITCH) #define GDP_ARGB1555 0x06 #define GDP_ARGB4444 0x07 #define GDP_CLUT8 0x0B @@ -104,6 +107,7 @@ struct sti_gdp { static const uint32_t gdp_supported_formats[] = { DRM_FORMAT_XRGB8888, DRM_FORMAT_ARGB8888, + DRM_FORMAT_ABGR8888, DRM_FORMAT_ARGB4444, DRM_FORMAT_ARGB1555, DRM_FORMAT_RGB565, @@ -131,6 +135,8 @@ static int sti_gdp_fourcc2format(int fourcc) return GDP_RGB888_32; case DRM_FORMAT_ARGB8888: return GDP_ARGB8888; + case DRM_FORMAT_ABGR8888: + return GDP_ABGR8888; case DRM_FORMAT_ARGB4444: return GDP_ARGB4444; case DRM_FORMAT_ARGB1555: @@ -157,6 +163,7 @@ static int sti_gdp_get_alpharange(int format) case GDP_ARGB8565: case GDP_ARGB8888: case GDP_AYCBR8888: + case GDP_ABGR8888: return GAM_GDP_ALPHARANGE_255; } return 0;