From patchwork Tue Aug 16 09:24:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jyri Sarha X-Patchwork-Id: 9283015 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 27BDC60574 for ; Tue, 16 Aug 2016 09:24:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 178CA28888 for ; Tue, 16 Aug 2016 09:24:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 09EFA28C5A; Tue, 16 Aug 2016 09:24:59 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B332728888 for ; Tue, 16 Aug 2016 09:24:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B63856E64B; Tue, 16 Aug 2016 09:24:57 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from comal.ext.ti.com (comal.ext.ti.com [198.47.26.152]) by gabe.freedesktop.org (Postfix) with ESMTPS id 32F906E65A for ; Tue, 16 Aug 2016 09:24:56 +0000 (UTC) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id u7G9OpOA022587; Tue, 16 Aug 2016 04:24:51 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id u7G9OobR030627; Tue, 16 Aug 2016 04:24:50 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.294.0; Tue, 16 Aug 2016 04:24:49 -0500 Received: from jadmar.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id u7G9ObpK008170; Tue, 16 Aug 2016 04:24:47 -0500 From: Jyri Sarha To: , , , Subject: [PATCH 4/4] ARM: dts: am335x-boneblack: Convert BGR from LCDC to RGB in tda19988 Date: Tue, 16 Aug 2016 12:24:30 +0300 Message-ID: <3eb463f87642bfcbfa44cf4e8abc6cc8abadab18.1471334845.git.jsarha@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: MIME-Version: 1.0 Cc: Jyri Sarha , peter.ujfalusi@ti.com, tomi.valkeinen@ti.com, laurent.pinchart@ideasonboard.com 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Convert BGR from LCDC to RGB in tda19988 with video-ports property. The red and blue components are reversed between 24 and 16 bit modes on color output of am335x LCDC. On BBB the 16 bit video output is by default RGB and 24 is BGR. This patch reverts that using tda19988 so we have a 24 bit RGB mode and 16 BGR mode. The commit also adds blue-and-red-wiring = "crossed" -property to LCDC node. This change is functionally redundant as "crossed" is the default mode if the property does not exist, but it makes the reason for tda19988 video-port property mode explicit. If you want to get 16 RGB mode (and 24 BGR mode), set tda19988 video-ports -property to 0x230145 and tilcdc blue-and-red-wiring -property to "straight". Signed-off-by: Jyri Sarha --- arch/arm/boot/dts/am335x-boneblack.dts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/boot/dts/am335x-boneblack.dts b/arch/arm/boot/dts/am335x-boneblack.dts index 528559b..a745962 100644 --- a/arch/arm/boot/dts/am335x-boneblack.dts +++ b/arch/arm/boot/dts/am335x-boneblack.dts @@ -90,6 +90,14 @@ &lcdc { status = "okay"; + + /* If you want to get 16 RGB and 24 BGR mode instead of + * current 24 bit RGB and 16 BGR modes, set this property to + * "straight" and the tda19988 video-ports -property bellow + * to 0x230145 (or remove the property). + */ + blue-and-red-wiring = "crossed"; + port { lcdc_0: endpoint@0 { remote-endpoint = <&hdmi_0>; @@ -106,6 +114,9 @@ pinctrl-0 = <&nxp_hdmi_bonelt_pins>; pinctrl-1 = <&nxp_hdmi_bonelt_off_pins>; + /* Convert 24bit BGR to RGB, e.g. cross red and blue wiring */ + video-ports = <0x234501>; + #sound-dai-cells = <0>; audio-ports = < TDA998x_I2S 0x03>;