From patchwork Wed Sep 28 21:22: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: 9354971 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 8CF9860757 for ; Wed, 28 Sep 2016 21:22:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7DA80296A3 for ; Wed, 28 Sep 2016 21:22:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 72B662977E; Wed, 28 Sep 2016 21:22:51 +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=ham 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 6BF20296A3 for ; Wed, 28 Sep 2016 21:22:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933816AbcI1VWh (ORCPT ); Wed, 28 Sep 2016 17:22:37 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:55774 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933797AbcI1VWf (ORCPT ); Wed, 28 Sep 2016 17:22:35 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id u8SLMX6t017484; Wed, 28 Sep 2016 16:22:33 -0500 Received: from DLEE70.ent.ti.com (dlemailx.itg.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id u8SLMWZK021591; Wed, 28 Sep 2016 16:22:32 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.294.0; Wed, 28 Sep 2016 16:22:32 -0500 Received: from uda0869644a.am.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id u8SLMW5E013361; Wed, 28 Sep 2016 16:22:32 -0500 From: Benoit Parrot To: Hans Verkuil CC: , Subject: [Patch 22/35] media: ti-vpe: vpdma: RGB data type yield inverted data Date: Wed, 28 Sep 2016 16:22:32 -0500 Message-ID: <20160928212232.27310-1-bparrot@ti.com> X-Mailer: git-send-email 2.9.0 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 --- 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