From patchwork Fri Mar 28 23:05:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Renner Berthing X-Patchwork-Id: 3907671 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4A3059F2E8 for ; Fri, 28 Mar 2014 23:07:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3274120351 for ; Fri, 28 Mar 2014 23:07:23 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 977F520260 for ; Fri, 28 Mar 2014 23:07:21 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WTfrg-0007Ip-3E; Fri, 28 Mar 2014 23:07:08 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WTfrd-000759-M7; Fri, 28 Mar 2014 23:07:05 +0000 Received: from mail-lb0-x235.google.com ([2a00:1450:4010:c04::235]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WTfra-00074o-Ax for linux-arm-kernel@lists.infradead.org; Fri, 28 Mar 2014 23:07:03 +0000 Received: by mail-lb0-f181.google.com with SMTP id c11so4154812lbj.40 for ; Fri, 28 Mar 2014 16:06:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=Vod1pvffANtN+wWrWsROVW9N6d8GD3rui3tBPZMuals=; b=hjed1zKy9s6YiB/VxkqboLrJbsuZseCJt8S6eLiNdABguspY5BBNYJt1l+B5bSjan8 GACSTRXc6rT7Xum5W5zDIoa5b6P5acDMSfJQIyYzabQf/SJH4s3A8n8Qaiekg0xfMuE6 cqgicBeNjDH8efphz74qm9VwHE+uC1l0SRdVYTkRSV3LFGxi0Sdafkdpkp0myb+BwNha v25Nkm4Iz0Ldu6umlKv5m5niD+eBva5EiNrdcBa4D8Ak+9e/yfOa8sOh31ySP9PXdtAS ZAN7M+5W9dbaQOqouRxXrd4WTGuEGzosS7+qWqdPXcYM8miew9rJ6RicbTO+C/r8tc2S VGSw== X-Received: by 10.152.170.137 with SMTP id am9mr7482842lac.15.1396047997588; Fri, 28 Mar 2014 16:06:37 -0700 (PDT) Received: from localhost.localdomain (3408ds2-vbr.0.fullrate.dk. [90.184.74.58]) by mx.google.com with ESMTPSA id q8sm4605743lbr.3.2014.03.28.16.06.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 28 Mar 2014 16:06:36 -0700 (PDT) From: Emil Renner Berthing To: Greg Kroah-Hartman , Sascha Hauer Subject: [PATCH] staging: imx-drm: add LVDS666 support for parallel display Date: Sat, 29 Mar 2014 00:05:54 +0100 Message-Id: <1396047954-27175-1-git-send-email-kernel@esmil.dk> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140328_190702_571985_3556B8DF X-CRM114-Status: GOOD ( 14.10 ) X-Spam-Score: -1.9 (-) Cc: Emil Renner Berthing , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Support the LVDS666 format on the IPUv3 parallel display. This makes the screen work on my Hercules eCAFE Slim HD. Signed-off-by: Emil Renner Berthing --- .../devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt | 1 + drivers/staging/imx-drm/ipu-v3/ipu-dc.c | 9 +++++++++ drivers/staging/imx-drm/parallel-display.c | 2 ++ 3 files changed, 12 insertions(+) diff --git a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt b/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt index 3be5ce7..e75f0e5 100644 --- a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt +++ b/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt @@ -61,6 +61,7 @@ Required properties: Optional properties: - interface_pix_fmt: How this display is connected to the display interface. Currently supported types: "rgb24", "rgb565", "bgr666" + and "lvds666". - edid: verbatim EDID data block describing attached display. - ddc: phandle describing the i2c bus handling the display data channel diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c index 156bbea..9945609 100644 --- a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c +++ b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c @@ -91,6 +91,7 @@ enum ipu_dc_map { IPU_DC_MAP_RGB565, IPU_DC_MAP_GBR24, /* TVEv2 */ IPU_DC_MAP_BGR666, + IPU_DC_MAP_LVDS666, IPU_DC_MAP_BGR24, }; @@ -155,6 +156,8 @@ static int ipu_pixfmt_to_map(u32 fmt) return IPU_DC_MAP_GBR24; case V4L2_PIX_FMT_BGR666: return IPU_DC_MAP_BGR666; + case v4l2_fourcc('L', 'V', 'D', '6'): + return IPU_DC_MAP_LVDS666; case V4L2_PIX_FMT_BGR24: return IPU_DC_MAP_BGR24; default: @@ -409,6 +412,12 @@ int ipu_dc_init(struct ipu_soc *ipu, struct device *dev, ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 1, 11, 0xfc); /* green */ ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 2, 17, 0xfc); /* red */ + /* lvds666 */ + ipu_dc_map_clear(priv, IPU_DC_MAP_LVDS666); + ipu_dc_map_config(priv, IPU_DC_MAP_LVDS666, 0, 5, 0xfc); /* blue */ + ipu_dc_map_config(priv, IPU_DC_MAP_LVDS666, 1, 15, 0xfc); /* green */ + ipu_dc_map_config(priv, IPU_DC_MAP_LVDS666, 2, 21, 0xfc); /* red */ + /* bgr24 */ ipu_dc_map_clear(priv, IPU_DC_MAP_BGR24); ipu_dc_map_config(priv, IPU_DC_MAP_BGR24, 2, 7, 0xff); /* red */ diff --git a/drivers/staging/imx-drm/parallel-display.c b/drivers/staging/imx-drm/parallel-display.c index b25e787..e194f92 100644 --- a/drivers/staging/imx-drm/parallel-display.c +++ b/drivers/staging/imx-drm/parallel-display.c @@ -214,6 +214,8 @@ static int imx_pd_bind(struct device *dev, struct device *master, void *data) imxpd->interface_pix_fmt = V4L2_PIX_FMT_RGB565; else if (!strcmp(fmt, "bgr666")) imxpd->interface_pix_fmt = V4L2_PIX_FMT_BGR666; + else if (!strcmp(fmt, "lvds666")) + imxpd->interface_pix_fmt = v4l2_fourcc('L', 'V', 'D', '6'); } panel_node = of_parse_phandle(np, "fsl,panel", 0);