From patchwork Sat Jan 30 13:58:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanho Park X-Patchwork-Id: 8171251 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D84E79F6DA for ; Sat, 30 Jan 2016 13:59:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E2BE520398 for ; Sat, 30 Jan 2016 13:59:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BDC8B201C0 for ; Sat, 30 Jan 2016 13:59:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756825AbcA3N7b (ORCPT ); Sat, 30 Jan 2016 08:59:31 -0500 Received: from mail-pa0-f52.google.com ([209.85.220.52]:34187 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756820AbcA3N7a (ORCPT ); Sat, 30 Jan 2016 08:59:30 -0500 Received: by mail-pa0-f52.google.com with SMTP id uo6so57608956pac.1 for ; Sat, 30 Jan 2016 05:59:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=y4xIqN9kLxHG29MEh17HA3sVqX5UNwVC6c8ZSQi4wbA=; b=tVnRzSdutxqxi7IL7x2uBnbErTqrzHNCaywnRc/6GPinpLbDB2HYCmUfta1LK/Qt6P PL367Ueh5KYl0LgiIdFV81I7Al8oyLBRQmbeOtDDSPoaEcPHh/xXvhnN1aisVKAik29A cLa40JDVnbUM2+2tXo77pzeAS0VpG8exvT1QFwltA0WIJBHMhL9nlIIoGMEMqQG2gPmX zOgtEX/kf8RrJ/uLU1lfd/4zC+mFrU+/rf7+vGCte+Ut4EyYNBgjkmU8/M/dESQ998BL w8uFmO/kdB+yBQApuGRynFH/mEjfGbUEGGMYlVPBk7R15gf2AW9DS8PNdFnzusTbxIpE Vlrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=y4xIqN9kLxHG29MEh17HA3sVqX5UNwVC6c8ZSQi4wbA=; b=mpCw8YYIsKCNsLO84cWoiCEal6BCLsKa/if84KDD/X02Qvl8qT+eVB1CAfB5WA2ZG/ e+GIYBY9lczY2SmrPoP1O6bjpF/QRqj4W13ZrhRQq0vo09yClYHQRyMkjZ+8XZ3cEAzh B8M/DtJh3x/jGB8IxND15+tisBuCHwHOhclqwvt6bFh4DGfHAzKr24wEJ5t66mt7VLk/ erFb5VtjvSgpTbVlxubyqylVfJo+tXNJkcrSdXJv2tUnOC/V5/PJfYkftBAIgC1/l1x6 vKd1D30IjEuoOnLB3i2jFo1nFa9ta9B8dPT52Covqj+N5kqVhWhVS2N8bvR8XsNU+rFo Jx1g== X-Gm-Message-State: AG10YOS1WGlAQSiaxWdoa2gPeyv65IHqAwVyj1zIknEZQKagoUZwH2D0koV2mlDwfT885Q== X-Received: by 10.66.218.73 with SMTP id pe9mr22162071pac.91.1454162369722; Sat, 30 Jan 2016 05:59:29 -0800 (PST) Received: from localhost.localdomain ([182.225.40.2]) by smtp.gmail.com with ESMTPSA id ah10sm30823900pad.23.2016.01.30.05.59.26 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 30 Jan 2016 05:59:29 -0800 (PST) From: Chanho Park To: inki.dae@samsung.com Cc: dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org, Chanho Park , Joonyoung Shim , Seung-Woo Kim Subject: [PATCH] drm/exynos: add mic_bypass option for exynos542x fimd Date: Sat, 30 Jan 2016 22:58:51 +0900 Message-Id: <1454162331-23555-1-git-send-email-parkch98@gmail.com> X-Mailer: git-send-email 2.5.0 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham 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 From: Chanho Park This patch adds a mic_bypass option to bypass the mic from display out path. The mic(Mobile image compressor) compresses RGB data from fimd and send the compressed data to the mipi dsi. The bypass option can be founded from system register and the bit of the option is 11. Cc: Inki Dae Cc: Joonyoung Shim Cc: Seung-Woo Kim Signed-off-by: Chanho Park --- .../devicetree/bindings/display/exynos/samsung-fimd.txt | 2 ++ drivers/gpu/drm/exynos/exynos_drm_fimd.c | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/Documentation/devicetree/bindings/display/exynos/samsung-fimd.txt b/Documentation/devicetree/bindings/display/exynos/samsung-fimd.txt index 27c3ce0..7f90c4a 100644 --- a/Documentation/devicetree/bindings/display/exynos/samsung-fimd.txt +++ b/Documentation/devicetree/bindings/display/exynos/samsung-fimd.txt @@ -45,6 +45,8 @@ Optional Properties: Can be used in case timings cannot be provided otherwise or to override timings provided by the panel. - samsung,sysreg: handle to syscon used to control the system registers +- samsung,mic-bypass: bypass mic(mobile image compressor) from display path. + This option is only available since exynos5420. - i80-if-timings: timing configuration for lcd i80 interface support. - cs-setup: clock cycles for the active period of address signal is enabled until chip select is enabled. diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index 70194d0..4fb2952 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c @@ -94,6 +94,7 @@ struct fimd_driver_data { unsigned int lcdblk_offset; unsigned int lcdblk_vt_shift; unsigned int lcdblk_bypass_shift; + unsigned int lcdblk_mic_bypass_shift; unsigned int has_shadowcon:1; unsigned int has_clksel:1; @@ -140,6 +141,7 @@ static struct fimd_driver_data exynos5_fimd_driver_data = { .lcdblk_offset = 0x214, .lcdblk_vt_shift = 24, .lcdblk_bypass_shift = 15, + .lcdblk_mic_bypass_shift = 11, .has_shadowcon = 1, .has_vidoutcon = 1, .has_vtsel = 1, @@ -162,6 +164,7 @@ struct fimd_context { u32 i80ifcon; bool i80_if; bool suspended; + bool mic_bypass; int pipe; wait_queue_head_t wait_vsync_queue; atomic_t wait_vsync_event; @@ -461,6 +464,14 @@ static void fimd_commit(struct exynos_drm_crtc *crtc) return; } + if (ctx->mic_bypass && ctx->sysreg && regmap_update_bits(ctx->sysreg, + driver_data->lcdblk_offset, + 0x1 << driver_data->lcdblk_mic_bypass_shift, + 0x1 << driver_data->lcdblk_mic_bypass_shift)) { + DRM_ERROR("Failed to update sysreg for bypass mic.\n"); + return; + } + /* setup horizontal and vertical display size. */ val = VIDTCON2_LINEVAL(mode->vdisplay - 1) | VIDTCON2_HOZVAL(mode->hdisplay - 1) | @@ -1014,6 +1025,9 @@ static int fimd_probe(struct platform_device *pdev) if (of_property_read_bool(dev->of_node, "samsung,invert-vclk")) ctx->vidcon1 |= VIDCON1_INV_VCLK; + if (of_property_read_bool(dev->of_node, "samsung,mic-bypass")) + ctx->mic_bypass = true; + i80_if_timings = of_get_child_by_name(dev->of_node, "i80-if-timings"); if (i80_if_timings) { u32 val;