From patchwork Thu Jan 24 19:58:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10779929 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 AEF92139A for ; Thu, 24 Jan 2019 20:00:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 807BC30D38 for ; Thu, 24 Jan 2019 20:00:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 71EB830D39; Thu, 24 Jan 2019 20:00:11 +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 96A2E30D3E for ; Thu, 24 Jan 2019 20:00:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730709AbfAXUAJ (ORCPT ); Thu, 24 Jan 2019 15:00:09 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:40660 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732134AbfAXUAI (ORCPT ); Thu, 24 Jan 2019 15:00:08 -0500 Received: by mail-pl1-f194.google.com with SMTP id u18so3380049plq.7 for ; Thu, 24 Jan 2019 12:00:08 -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=8q97sbmpzgiJ0X8sY10lWWdB/Eo6/FNKaSHSF4bAxYo=; b=ljfkEW3e5CkcbpUDcCUm2KymfdIdH5kLxFLVfaeP2gMsoJoDHICvERjswSxoPmFqPM EFFj75rodXEVTPCimGazX3Tiiry2kz0RKcHQ5WOlhmK0fkvy2mUJ8HLT2plqiTUEDqKV itBRjaeY3H2t/oBCydXgFmvS6jX5rEqdIxJm4= 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=8q97sbmpzgiJ0X8sY10lWWdB/Eo6/FNKaSHSF4bAxYo=; b=qT7d5GfpnOyDKGc+h4y3AVfpm73UzMjfIdAPEQnuAJNXM6W9Mg08J02cLWemOwvF9S AWyBeIQacEb/df72t/Z8MQE2wIXnP+dTwTWVhgEfNnZ3b9TI9KFIC+9F6KUEDN6hPHU4 ZYbqdjm1QhIR/yyzs52+Pab3Rly0J2i1xsRlOMGjvuFAG0MwMJvOlt65xv7DyMzVElFr cAJsaDkqCT4s1GujJ72X7iOYzfF+jDNt/lhUYiCGrtZ7c4cii34r4zmGddv4PQmNYPFC erd2nnnPci2EW6ngP50H7OfRmiKjBg2thqau7VbUJmhsz+QKXCPNZh4/5yu7kQPja60X djGw== X-Gm-Message-State: AJcUukcgpyagJ1mkwdPlgiyIRgLD4f4+/upYsZ8bmgsdydKx63n5OSl3 bbLzKNAnsU2oA3NjxmL97j5g+Q== X-Google-Smtp-Source: ALg8bN4JB1sFbrT1QGetXTKGwn0uHo8a4Ub5bRDOtZZpisg2qwYQ4vbkWFp9Gite9nop0n4WrX0J2g== X-Received: by 2002:a17:902:3283:: with SMTP id z3mr8014727plb.76.1548360007757; Thu, 24 Jan 2019 12:00:07 -0800 (PST) Received: from localhost.localdomain ([115.97.179.75]) by smtp.gmail.com with ESMTPSA id x11sm61637003pfe.72.2019.01.24.12.00.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Jan 2019 12:00:07 -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 v6 09/22] drm/sun4i: sun6i_mipi_dsi: Enable burst mode HBP, HSA_HSE Date: Fri, 25 Jan 2019 01:28:47 +0530 Message-Id: <20190124195900.22620-10-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190124195900.22620-1-jagan@amarulasolutions.com> References: <20190124195900.22620-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 --- 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,