From patchwork Thu Feb 11 14:04:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanho Park X-Patchwork-Id: 8279871 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 252949F6DA for ; Thu, 11 Feb 2016 14:07:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 276FF202D1 for ; Thu, 11 Feb 2016 14:07:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 10880201E4 for ; Thu, 11 Feb 2016 14:07:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751857AbcBKOGR (ORCPT ); Thu, 11 Feb 2016 09:06:17 -0500 Received: from mail-pf0-f177.google.com ([209.85.192.177]:33808 "EHLO mail-pf0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751740AbcBKOFH (ORCPT ); Thu, 11 Feb 2016 09:05:07 -0500 Received: by mail-pf0-f177.google.com with SMTP id x65so30017875pfb.1 for ; Thu, 11 Feb 2016 06:05:07 -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=pYyKQMW4xuzxVKFLa7eUMqVOhshQlcujAZHd+uAh8bo=; b=An3KCh7c5nyrzpcj4ZxgLmHQv0mCwNtt+Kbehum9Vg1ISPpQHaUBacloxLNZo2zE44 uc3Jw/py3XDDqO8cJ380E9kFQN3k6MOaotCoamiLpPaLISOc7a18L3hO9bOhvWub02dY gh4Sj0prefwibweY1Y71RjNYJSr5MDVPLgTLB5zysDaqJ6P6gfBOozGiTzSctBIPubK4 MAbIhWYKY9YbRHD9bwzJwysAd/8uErMOcAO5W9acOsDtY8yJBitUEbSwSP9pAAachOmR EVf8oqv5WCznfOxOM2oU+Zo3QTfHGPB9SGb7FQz2MxQdcfBXTFrqZayOOGfh3cNAoqgH oFpg== 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=pYyKQMW4xuzxVKFLa7eUMqVOhshQlcujAZHd+uAh8bo=; b=XC9pmeEjkLA6+6Avh109AuAMFByywDstnaT4fyp/6fflDOBxvNmaLRZcqKNs4OThBC wdCHPvJ+uZJ3SbqtLQkoTw2BPwzUfN9AbDEIx/24mCLyRK2mY57JsIBfBL+ETI5oRrWx eHnFPYeL6lmxldDE6xRjWbgaQUOe9nfZ2SVApLMdm/av2d7M1xoi0r1UM9OSvVVNMU0F EFpFV2qeAOaBWK8MOOYAkaF1BQDGto8qMdss7+prgSeQo7yoIfvjpCv6Vx0eVAEXj2+M zl7yGoys5loj+UYTkXRTX89DJPhTPmOHFe2TAM3PauQ1LiqtvSo/sY1nKtdwTkuMgi23 Z7AQ== X-Gm-Message-State: AG10YOTur11y/5u32gwyd/uv3tNCBy6PHEFC6l56JiOuooMD74ZCX+e+RAXVQ31psEzSUg== X-Received: by 10.98.33.70 with SMTP id h67mr65758051pfh.54.1455199506912; Thu, 11 Feb 2016 06:05:06 -0800 (PST) Received: from localhost.localdomain ([182.225.40.2]) by smtp.gmail.com with ESMTPSA id m86sm12725956pfi.27.2016.02.11.06.05.03 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 11 Feb 2016 06:05:05 -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: [PATCHv2] drm/exynos: add mic_bypass option for exynos542x fimd Date: Thu, 11 Feb 2016 23:04:44 +0900 Message-Id: <1455199484-4039-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=-7.0 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 --- Change from v1: - the option is only valid if lcdblk_mic_bypass_shift is assigned .../devicetree/bindings/display/exynos/samsung-fimd.txt | 2 ++ drivers/gpu/drm/exynos/exynos_drm_fimd.c | 15 +++++++++++++++ 2 files changed, 17 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..1076b51 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,10 @@ 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->driver_data->lcdblk_mic_bypass_shift) + ctx->mic_bypass = true; + i80_if_timings = of_get_child_by_name(dev->of_node, "i80-if-timings"); if (i80_if_timings) { u32 val;