From patchwork Thu Apr 4 14:09:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 2393121 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id DF6943FD8C for ; Thu, 4 Apr 2013 14:11:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CA227E60E2 for ; Thu, 4 Apr 2013 07:11:25 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.8]) by gabe.freedesktop.org (Postfix) with ESMTP id A55A6E5FA8 for ; Thu, 4 Apr 2013 07:09:28 -0700 (PDT) Received: from mailbox.adnet.avionic-design.de (mailbox.avionic-design.de [109.75.18.3]) by mrelayeu.kundenserver.de (node=mrbap4) with ESMTP (Nemesis) id 0MKqum-1UNkr12skK-000LSc; Thu, 04 Apr 2013 16:09:27 +0200 Received: from localhost (localhost [127.0.0.1]) by mailbox.adnet.avionic-design.de (Postfix) with ESMTP id 2426A2A280E1; Thu, 4 Apr 2013 16:09:27 +0200 (CEST) X-Virus-Scanned: amavisd-new at avionic-design.de Received: from mailbox.adnet.avionic-design.de ([127.0.0.1]) by localhost (mailbox.avionic-design.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YDnFEp0+hPwQ; Thu, 4 Apr 2013 16:09:26 +0200 (CEST) Received: from mailman.adnet.avionic-design.de (mailman.adnet.avionic-design.de [172.20.31.172]) by mailbox.adnet.avionic-design.de (Postfix) with ESMTP id 8457B2A28124; Thu, 4 Apr 2013 16:09:20 +0200 (CEST) Received: from localhost (avionic-0098.adnet.avionic-design.de [172.20.31.233]) by mailman.adnet.avionic-design.de (Postfix) with ESMTP id 13C3F100292; Thu, 4 Apr 2013 16:09:18 +0200 (CEST) From: Thierry Reding To: dri-devel@lists.freedesktop.org Subject: [RFC 2/3] drm/tegra: Support the XBGR8888 pixelformat Date: Thu, 4 Apr 2013 16:09:19 +0200 Message-Id: <1365084560-11069-3-git-send-email-thierry.reding@avionic-design.de> X-Mailer: git-send-email 1.8.2 In-Reply-To: <1365084560-11069-1-git-send-email-thierry.reding@avionic-design.de> References: <1365084560-11069-1-git-send-email-thierry.reding@avionic-design.de> X-Provags-ID: V02:K0:DG3Hm+NtnqK7i4m10Z9JffysgKQG8h0GTEg1kD5SNap 0gnIcakXhEWfDBtMjDvnyihH6RL5/PRgcxSx7Xb3G2N+aX4N2U JN7Lt9HljWs8lEYomjB+c9JQ8J60j0ZRLPiXOZbEEwF6Mhd6LY pAqoIPtgApRMBEcZiikbXC5Q3rDSnlIjU6ow12YOWmQX9GOLv8 d6Qolex6PXmqTvovIWp2fyNDYy/PhTmN+6bLfIjyMKS/XPRFv2 /xiKCKlpTqcdlQZQPEmSNjIeI2LLrYvUSAf4aJxfdkaguWY9eo E7qaaZofx5w28kSw3QmxHokWCkkGErch8DjUd/9KsKPYebRcw3 KSwnDU0C7eWjs9EDvMMxLzcgEAMNW4hcYKtEvGH4rh0hDMYKsK IPPZ2SkXvJe1cMXFknb49pbZv7f3ZCj35ER7ZS4msIobRJiTWX 9IvBL Cc: linux-tegra@vger.kernel.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org While at it, also include the RGB565 pixelformat in the list of formats supported by overlays. Signed-off-by: Thierry Reding --- drivers/gpu/host1x/drm/dc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/host1x/drm/dc.c b/drivers/gpu/host1x/drm/dc.c index edfe0ee..14a09a4 100644 --- a/drivers/gpu/host1x/drm/dc.c +++ b/drivers/gpu/host1x/drm/dc.c @@ -108,7 +108,9 @@ static const struct drm_plane_funcs tegra_plane_funcs = { }; static const uint32_t plane_formats[] = { + DRM_FORMAT_XBGR8888, DRM_FORMAT_XRGB8888, + DRM_FORMAT_RGB565, DRM_FORMAT_UYVY, DRM_FORMAT_YUV420, DRM_FORMAT_YUV422, @@ -546,6 +548,9 @@ int tegra_dc_setup_window(struct tegra_dc *dc, unsigned int index, unsigned int tegra_dc_format(uint32_t format) { switch (format) { + case DRM_FORMAT_XBGR8888: + return WIN_COLOR_DEPTH_R8G8B8A8; + case DRM_FORMAT_XRGB8888: return WIN_COLOR_DEPTH_B8G8R8A8;