Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3214507imu; Sat, 24 Nov 2018 00:16:26 -0800 (PST) X-Google-Smtp-Source: AJdET5cF2+mKa8z5Xs7s+pG2d4OPEBaUjBiQ5KQYcpr/uPdK4ngLPewQook8RNM8RdGTVG431jSc X-Received: by 2002:a62:824c:: with SMTP id w73mr19258419pfd.150.1543047386615; Sat, 24 Nov 2018 00:16:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543047386; cv=none; d=google.com; s=arc-20160816; b=UMIiRMy46F0M2DUBKYfqI9ATvoNKDs0Ys/d6KaOa5G/85aOXUyJJKyAZBmo/ivMhCs WruhtksXMrMuNTzMJJReIfYwANgIsBKipE5W1PeRe0gWSOZjZXiGGX89O1AGe9O0+Lhv fSn1b06lGgunozEvLG1zQeqpNe1i7E7EUOaoFvgYK2kc4vXJnsRV1A0bg+O8Y8mHH5N2 ZEbkOuAXr3rGVgASHd/lx6Xbj5rg05+2G45WHwjjIk8zX6bHimLGIhTPyqma5/nfMzse Bg/JHK/TFxbzllD4Y6cKVC0Q44Eqw6cGb3HGJ9cNeFXTXcnlETATWe6l4u5TDJ2Zp0Ym 9NFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=OxRk3dyhBSLCKVydrqmwTmXq7kVsQuXU8YTdd/ijcu4=; b=Nxp5cvFE8D2l8I7TwOqEPYgXfAuuXUWInTft8GLBQMfPi98SFd98rJdjmme5QNyTEa I9Zl/scxCYjuYV3//KTm8lXIK6dTWXvNEQJ7LkPwxBLyjIks/KzII8l4YRW37eMhzX/a fIPFWjXhAXDf0i3jgUhlSPVa7mc3siZGygsDji5Bg6n0gwDQTXZWRovcqQaYKDzoWfN+ KJI8yuUkf9gavWgStBYyvFRZ6ejDzU4HF/uR97qOBy30X860tU0SBzTl7Q1x+pWhItBA ZILqNCqs7ShrmDvR6iMOfCMzuJcx517oz/n8gbmFzCtpShDlks7Tu390TShnz/s83hRW oq4A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d17si38263710pfm.40.2018.11.24.00.16.12; Sat, 24 Nov 2018 00:16:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2408938AbeKWUK3 (ORCPT + 99 others); Fri, 23 Nov 2018 15:10:29 -0500 Received: from mail.bootlin.com ([62.4.15.54]:49407 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2502712AbeKWUK1 (ORCPT ); Fri, 23 Nov 2018 15:10:27 -0500 Received: by mail.bootlin.com (Postfix, from userid 110) id 2FA0720F87; Fri, 23 Nov 2018 10:26:58 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.2 Received: from localhost.localdomain (aaubervilliers-681-1-94-205.w90-88.abo.wanadoo.fr [90.88.35.205]) by mail.bootlin.com (Postfix) with ESMTPSA id 3622D20DF3; Fri, 23 Nov 2018 10:26:33 +0100 (CET) From: Paul Kocialkowski To: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org Cc: Maarten Lankhorst , Maxime Ripard , Sean Paul , David Airlie , Chen-Yu Tsai , Thomas Petazzoni , linux-sunxi@googlegroups.com, Daniel Vetter , Paul Kocialkowski Subject: [PATCH v2 22/43] drm/sun4i: frontend: Add support for the BGRX8888 output format Date: Fri, 23 Nov 2018 10:24:54 +0100 Message-Id: <20181123092515.2511-23-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181123092515.2511-1-paul.kocialkowski@bootlin.com> References: <20181123092515.2511-1-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This introduces support for the BGRX8888 output format for the frontend, with its associated output format value definition. Signed-off-by: Paul Kocialkowski --- drivers/gpu/drm/sun4i/sun4i_frontend.c | 4 ++++ drivers/gpu/drm/sun4i/sun4i_frontend.h | 1 + 2 files changed, 5 insertions(+) diff --git a/drivers/gpu/drm/sun4i/sun4i_frontend.c b/drivers/gpu/drm/sun4i/sun4i_frontend.c index e579fcf63ab4..7fa8fb3eb7aa 100644 --- a/drivers/gpu/drm/sun4i/sun4i_frontend.c +++ b/drivers/gpu/drm/sun4i/sun4i_frontend.c @@ -143,6 +143,10 @@ static int sun4i_frontend_drm_format_to_input_sequence(uint32_t fmt, u32 *val) static int sun4i_frontend_drm_format_to_output_fmt(uint32_t fmt, u32 *val) { switch (fmt) { + case DRM_FORMAT_BGRX8888: + *val = SUN4I_FRONTEND_OUTPUT_FMT_DATA_FMT_BGRX8888; + return 0; + case DRM_FORMAT_XRGB8888: *val = SUN4I_FRONTEND_OUTPUT_FMT_DATA_FMT_XRGB8888; return 0; diff --git a/drivers/gpu/drm/sun4i/sun4i_frontend.h b/drivers/gpu/drm/sun4i/sun4i_frontend.h index 2ee1bccf378a..800a193eebc2 100644 --- a/drivers/gpu/drm/sun4i/sun4i_frontend.h +++ b/drivers/gpu/drm/sun4i/sun4i_frontend.h @@ -32,6 +32,7 @@ #define SUN4I_FRONTEND_INPUT_FMT_DATA_PS_XRGB 1 #define SUN4I_FRONTEND_OUTPUT_FMT_REG 0x05c +#define SUN4I_FRONTEND_OUTPUT_FMT_DATA_FMT_BGRX8888 1 #define SUN4I_FRONTEND_OUTPUT_FMT_DATA_FMT_XRGB8888 2 #define SUN4I_FRONTEND_CH0_INSIZE_REG 0x100 -- 2.19.1