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: 44480 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9730C21529 for ; Fri, 6 Feb 2015 12:52:37 +0000 (UTC) Received: by mail-wi0-f200.google.com with SMTP id fb4sf1616504wid.3 for ; Fri, 06 Feb 2015 04:52:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:subject:date :message-id:in-reply-to:references:cc:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :mime-version:content-type:content-transfer-encoding:errors-to :sender:x-original-sender:x-original-authentication-results :mailing-list; bh=gYzkdhb28BtXLskZ06LYDLDeOl6F3oX1aVu9ZECgJEE=; b=m21lfVqNqAz0zbv6nL6TQTajLteQjuyquUP43KXwiZ+faCEX72mfSuA56kCJ4Im2zE e651+f7XODqBVPgUC6zyXhVUKUoa0dqlQQ/W+HJhZbG/op3hTpb+BJ2lkQza1bMs94na 0hs2zorkeqVLNBdSOByjoFao2aOBKlOyg4/bwdxTsv0xEOevRBvUtCC1FIDIavlmc10X zJH+PO2BbIkEwaR/LYRAe6StxTT45ggT5Y9XzZiR3cPtHyNTsVIou7tUk0IeCgVXCd3E a1O1WB/xRLOQCtob2lkdoelQ7eI5+GOnkob+SD1Tw4aqVFkdd0N/ZY9GHoBVPnqkXAUM jezw== X-Gm-Message-State: ALoCoQmq+1GmSTBc/TaCZ8XKLQOCG6xtjQox/Idacn9KX/Fvf8TZugRX9vXuHQ6wUPNkV8Azd/PM X-Received: by 10.112.99.37 with SMTP id en5mr424234lbb.17.1423227156682; Fri, 06 Feb 2015 04:52:36 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.21.99 with SMTP id u3ls286423lae.29.gmail; Fri, 06 Feb 2015 04:52:36 -0800 (PST) X-Received: by 10.152.2.167 with SMTP id 7mr2497503lav.114.1423227156471; Fri, 06 Feb 2015 04:52:36 -0800 (PST) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id p6si1257747lbo.141.2015.02.06.04.52.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Feb 2015 04:52:36 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by labpn19 with SMTP id pn19so901926lab.2 for ; Fri, 06 Feb 2015 04:52:36 -0800 (PST) X-Received: by 10.152.28.227 with SMTP id e3mr2465386lah.117.1423227156236; Fri, 06 Feb 2015 04:52:36 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp1781955lbj; Fri, 6 Feb 2015 04:52:35 -0800 (PST) X-Received: by 10.66.254.1 with SMTP id ae1mr5468548pad.107.1423227152610; Fri, 06 Feb 2015 04:52:32 -0800 (PST) Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTP id pc8si10293423pbb.41.2015.02.06.04.52.31; Fri, 06 Feb 2015 04:52:32 -0800 (PST) Received-SPF: none (google.com: dri-devel-bounces@lists.freedesktop.org does not designate permitted sender hosts) client-ip=131.252.210.177; 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-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: 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-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: benjamin.gaignard@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 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;