From patchwork Thu Jun 9 21:19:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 69733 Delivered-To: patch@linaro.org Received: by 10.140.106.246 with SMTP id e109csp534086qgf; Thu, 9 Jun 2016 14:19:35 -0700 (PDT) X-Received: by 10.66.172.49 with SMTP id az17mr14549373pac.104.1465507175145; Thu, 09 Jun 2016 14:19:35 -0700 (PDT) Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTP id vx8si9401828pac.107.2016.06.09.14.19.34; Thu, 09 Jun 2016 14:19:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id ECBE56EC7D; Thu, 9 Jun 2016 21:19:30 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-oi0-f66.google.com (mail-oi0-f66.google.com [209.85.218.66]) by gabe.freedesktop.org (Postfix) with ESMTPS id C3A1E6EC7D for ; Thu, 9 Jun 2016 21:19:28 +0000 (UTC) Received: by mail-oi0-f66.google.com with SMTP id e205so4508001oig.0 for ; Thu, 09 Jun 2016 14:19:28 -0700 (PDT) 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=8WNTfW8w37dI5Fk4CTUgU6dgaJl8Lt+F33WBmkm1J64=; b=O8yWRIOi0CVgIDGOfAUCxYi9a4/xd4QJIx4mBWo8Tj4WENEkXaFRGU9w8fpnlkOdQT ZSEoa0qUk+35+NlyJpwKI7pkZ+L4tEaVyzJIytu/f1q4+/QkB90t1lVWwgv5JAPt+/wj RyE3s8DCa1Jx4SPI7hyCemJuMkouOBI1yHO2+84p2hNnWgPpEwNifh3sDXBYVdGhaVSx HnRJN33Df6eYpepEQgjo6PlK7Uj1MPToZSqHBquuE9gjIpRPwjB5wn9sSFkLCJSW1lh9 6Y4KyXi9+RiTJ8DWFBJpFYhEE8J7aWmPwAEo5QJCoaUI7W/EqIWF9FzGwbruENPUCGCi 45PA== X-Gm-Message-State: ALyK8tKKrdqAwtE0yNTmrnncM/Ly0qJe0E9GvqrPfHVmtdui7u0qrE51PvXwrUI9/AGkNA== X-Received: by 10.202.69.4 with SMTP id s4mr2324776oia.45.1465507167715; Thu, 09 Jun 2016 14:19:27 -0700 (PDT) Received: from rob-hp-laptop.herring.priv (72-48-98-129.dyn.grandenetworks.net. [72.48.98.129]) by smtp.googlemail.com with ESMTPSA id e184sm3736463oia.11.2016.06.09.14.19.27 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 09 Jun 2016 14:19:27 -0700 (PDT) From: Rob Herring To: Eric Anholt Subject: [PATCH 2/2] drm: vc4: enable XBGR8888 and ABGR8888 pixel formats Date: Thu, 9 Jun 2016 16:19:25 -0500 Message-Id: <1465507165-16345-2-git-send-email-robh@kernel.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1465507165-16345-1-git-send-email-robh@kernel.org> References: <1465507165-16345-1-git-send-email-robh@kernel.org> Cc: dri-devel@lists.freedesktop.org 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" DRM_FORMAT_XBGR8888 and DRM_FORMAT_ABGR8888 are 2 of the native formats used in Android, so enable them for VC4. There seems to be no logic behind HVS_PIXEL_ORDER_xxxx naming, but HVS_PIXEL_ORDER_ARGB seems to work correctly. Signed-off-by: Rob Herring --- drivers/gpu/drm/vc4/vc4_plane.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c index 4037b52..b12deef 100644 --- a/drivers/gpu/drm/vc4/vc4_plane.c +++ b/drivers/gpu/drm/vc4/vc4_plane.c @@ -94,6 +94,14 @@ static const struct hvs_format { .pixel_order = HVS_PIXEL_ORDER_ABGR, .has_alpha = true, }, { + .drm = DRM_FORMAT_ABGR8888, .hvs = HVS_PIXEL_FORMAT_RGBA8888, + .pixel_order = HVS_PIXEL_ORDER_ARGB, .has_alpha = true, + }, + { + .drm = DRM_FORMAT_XBGR8888, .hvs = HVS_PIXEL_FORMAT_RGBA8888, + .pixel_order = HVS_PIXEL_ORDER_ARGB, .has_alpha = false, + }, + { .drm = DRM_FORMAT_RGB565, .hvs = HVS_PIXEL_FORMAT_RGB565, .pixel_order = HVS_PIXEL_ORDER_XRGB, .has_alpha = false, },