From patchwork Fri Nov 18 23:20:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benoit Parrot X-Patchwork-Id: 9437611 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1FE4560238 for ; Fri, 18 Nov 2016 23:26:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0F65729A51 for ; Fri, 18 Nov 2016 23:26:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 03AD329A56; Fri, 18 Nov 2016 23:26:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A6EB529A51 for ; Fri, 18 Nov 2016 23:26:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754056AbcKRX0G (ORCPT ); Fri, 18 Nov 2016 18:26:06 -0500 Received: from lelnx194.ext.ti.com ([198.47.27.80]:14826 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753535AbcKRXVP (ORCPT ); Fri, 18 Nov 2016 18:21:15 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id uAINLETs020190; Fri, 18 Nov 2016 17:21:14 -0600 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id uAINLEEF030303; Fri, 18 Nov 2016 17:21:14 -0600 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.294.0; Fri, 18 Nov 2016 17:21:13 -0600 Received: from uda0869644a.am.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id uAINKqVx001882; Fri, 18 Nov 2016 17:21:13 -0600 From: Benoit Parrot To: , Hans Verkuil CC: , Tomi Valkeinen , Jyri Sarha , Peter Ujfalusi , Benoit Parrot Subject: [Patch v2 22/35] media: ti-vpe: vpdma: RGB data type yield inverted data Date: Fri, 18 Nov 2016 17:20:32 -0600 Message-ID: <20161118232045.24665-23-bparrot@ti.com> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20161118232045.24665-1-bparrot@ti.com> References: <20161118232045.24665-1-bparrot@ti.com> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The VPDMA RGB data type definition have been updated to match with Errata i839. But some of the ARGB definition appeared to be wrong in the document also. As they would yield RGBA instead. They have been corrected based on experimentation. Signed-off-by: Benoit Parrot Acked-by: Hans Verkuil --- drivers/media/platform/ti-vpe/vpdma_priv.h | 49 ++++++++++++++++++------------ 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/drivers/media/platform/ti-vpe/vpdma_priv.h b/drivers/media/platform/ti-vpe/vpdma_priv.h index f974a803fa27..72c7f13b4a9d 100644 --- a/drivers/media/platform/ti-vpe/vpdma_priv.h +++ b/drivers/media/platform/ti-vpe/vpdma_priv.h @@ -101,26 +101,35 @@ #define DATA_TYPE_CBY422 0x27 #define DATA_TYPE_CRY422 0x37 -#define DATA_TYPE_RGB16_565 0x0 -#define DATA_TYPE_ARGB_1555 0x1 -#define DATA_TYPE_ARGB_4444 0x2 -#define DATA_TYPE_RGBA_5551 0x3 -#define DATA_TYPE_RGBA_4444 0x4 -#define DATA_TYPE_ARGB24_6666 0x5 -#define DATA_TYPE_RGB24_888 0x6 -#define DATA_TYPE_ARGB32_8888 0x7 -#define DATA_TYPE_RGBA24_6666 0x8 -#define DATA_TYPE_RGBA32_8888 0x9 -#define DATA_TYPE_BGR16_565 0x10 -#define DATA_TYPE_ABGR_1555 0x11 -#define DATA_TYPE_ABGR_4444 0x12 -#define DATA_TYPE_BGRA_5551 0x13 -#define DATA_TYPE_BGRA_4444 0x14 -#define DATA_TYPE_ABGR24_6666 0x15 -#define DATA_TYPE_BGR24_888 0x16 -#define DATA_TYPE_ABGR32_8888 0x17 -#define DATA_TYPE_BGRA24_6666 0x18 -#define DATA_TYPE_BGRA32_8888 0x19 +/* + * The RGB data type definition below are defined + * to follow Errata i819. + * The initial values were taken from: + * VPDMA_data_type_mapping_v0.2vayu_c.pdf + * But some of the ARGB definition appeared to be wrong + * in the document also. As they would yield RGBA instead. + * They have been corrected based on experimentation. + */ +#define DATA_TYPE_RGB16_565 0x10 +#define DATA_TYPE_ARGB_1555 0x13 +#define DATA_TYPE_ARGB_4444 0x14 +#define DATA_TYPE_RGBA_5551 0x11 +#define DATA_TYPE_RGBA_4444 0x12 +#define DATA_TYPE_ARGB24_6666 0x18 +#define DATA_TYPE_RGB24_888 0x16 +#define DATA_TYPE_ARGB32_8888 0x17 +#define DATA_TYPE_RGBA24_6666 0x15 +#define DATA_TYPE_RGBA32_8888 0x19 +#define DATA_TYPE_BGR16_565 0x0 +#define DATA_TYPE_ABGR_1555 0x3 +#define DATA_TYPE_ABGR_4444 0x4 +#define DATA_TYPE_BGRA_5551 0x1 +#define DATA_TYPE_BGRA_4444 0x2 +#define DATA_TYPE_ABGR24_6666 0x8 +#define DATA_TYPE_BGR24_888 0x6 +#define DATA_TYPE_ABGR32_8888 0x7 +#define DATA_TYPE_BGRA24_6666 0x5 +#define DATA_TYPE_BGRA32_8888 0x9 #define DATA_TYPE_MV 0x3