From patchwork Fri Feb 1 15:42:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10793099 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A40C513B4 for ; Fri, 1 Feb 2019 15:46:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8F90F32203 for ; Fri, 1 Feb 2019 15:46:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 835033220B; Fri, 1 Feb 2019 15:46:58 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,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 314B63220E for ; Fri, 1 Feb 2019 15:46:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730318AbfBAPnE (ORCPT ); Fri, 1 Feb 2019 10:43:04 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:35910 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730283AbfBAPnC (ORCPT ); Fri, 1 Feb 2019 10:43:02 -0500 Received: by mail-lj1-f195.google.com with SMTP id g11-v6so6211199ljk.3 for ; Fri, 01 Feb 2019 07:43:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rS6sGbJP+zjY5kJm8iT11B1WuOcwYEUOTtJGe88GIrs=; b=bdX9sXiywy0BGPdJwc5OTztIqQo0WTncpb/ZlqVFxOTBr0j9Hc/hOb3la6YN6Krgxq BJY376aZ5qf4y4aNLn3kGIXsqow0XD6fQnpCsjs++yoDdrMR77yh8ZJThJo0lBUp+5ID EdgNlkBPPGibaIaBvITW1dJxiVrNqSlL1Fpy8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rS6sGbJP+zjY5kJm8iT11B1WuOcwYEUOTtJGe88GIrs=; b=dyTJWODdgrWFUA298oY8r6LdAHlpiez+hCKPBDajUlFLaDHCY+XT3U3camIEZJubH+ DO25qreM6WMXsjPKW/YTP2Aso4WpLQlYAcz6tFTBsArexOToCLURvPpPYwpnDoXb5dWF MAd06K82LgqCTPdfMfBf6r20VCuRsTPLO4CnsINLE7mWtkfp9g3sLB0OohuXbqFYVX7z 1v7+iz//aiqlkMjctFmG49aZ24GsTjngtt4sDBNArr1GQiESJaZjDeI30BeurBosshXF Ky1gJCfj3TXDD/vY5My9QuALMp9HrmhMDxBs3YVIAJkdMIKSZqRE01M4TDCP4W0FJEUP xs0Q== X-Gm-Message-State: AJcUukdb6g5r8ZkhVUxz8RhEjHCcdJhohNJVSMnThVFVb+3eDPOqb8bX SiIBVT72tE2AXdjFYhsJ0BqA2w== X-Google-Smtp-Source: ALg8bN6wZLRx3APZR1H/AYjNK+cdvIN3IPrZAwkaLn+hv3CJ4/x48AjmcKpGiIL9oGehk6sBp0t6Dg== X-Received: by 2002:a2e:4218:: with SMTP id p24-v6mr31408690lja.58.1549035780689; Fri, 01 Feb 2019 07:43:00 -0800 (PST) Received: from localhost.localdomain ([217.76.202.68]) by smtp.gmail.com with ESMTPSA id i13-v6sm1305712ljg.82.2019.02.01.07.42.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Feb 2019 07:43:00 -0800 (PST) From: Jagan Teki To: Maxime Ripard , David Airlie , Daniel Vetter , Chen-Yu Tsai , Michael Turquette , Rob Herring , Mark Rutland Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, Michael Trimarchi , linux-amarula@amarulasolutions.com, linux-sunxi@googlegroups.com, Jagan Teki Subject: [PATCH v7 09/23] drm/sun4i: sun6i_mipi_dsi: Enable HBP, HSA_HSE for burst mode Date: Fri, 1 Feb 2019 21:12:18 +0530 Message-Id: <20190201154232.10505-10-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190201154232.10505-1-jagan@amarulasolutions.com> References: <20190201154232.10505-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Horizontal back porch, sync active and sync end bits are needed to disable for burst mode panel operations. So, disable them via dsi base control register. Signed-off-by: Jagan Teki Tested-by: Merlijn Wajer --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index a2ad9fa7f8d5..3d7c03161954 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -549,12 +549,17 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi, u16 hbp, hfp, hsa, hblk, vblk; size_t bytes; u8 *buffer; + u32 val = 0; /* Do all timing calculations up front to allocate buffer space */ if (device->mode_flags & MIPI_DSI_MODE_VIDEO_BURST) { hbp = hfp = hsa = vblk = 0; hblk = (mode->hdisplay * Bpp); + + regmap_read(dsi->regs, SUN6I_DSI_BASIC_CTL_REG, &val); + val |= SUN6I_DSI_BASIC_CTL_HBP_DIS; + val |= SUN6I_DSI_BASIC_CTL_HSA_HSE_DIS; goto alloc_buf; } @@ -603,7 +608,7 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi, if (WARN_ON(!buffer)) return; - regmap_write(dsi->regs, SUN6I_DSI_BASIC_CTL_REG, 0); + regmap_write(dsi->regs, SUN6I_DSI_BASIC_CTL_REG, val); regmap_write(dsi->regs, SUN6I_DSI_SYNC_HSS_REG, sun6i_dsi_build_sync_pkt(MIPI_DSI_H_SYNC_START,