From patchwork Sat Nov 3 10:08:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10666609 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 B0B3B13A4 for ; Sat, 3 Nov 2018 10:32:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9271E2AE8F for ; Sat, 3 Nov 2018 10:32:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 817DC2AE91; Sat, 3 Nov 2018 10:32: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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EF6432AE8F for ; Sat, 3 Nov 2018 10:32:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=OsysGKsAWxi6ScLiTLQFFmUfztFlxyyqyXinPeZjH1s=; b=L0dP53TP80gkPP +Lfpa8J47X6Ae6NHYUIUf9a0HFNLit97Cql8kpmj7Pqmo0EjnFbmJ9Z2WVZU3wm5qFgP4ZjbholRS lJg+wqViyEfuulxnTC4G97LUsBKz2T6v63GajQnKqX5AgLJFDPXn7v9sAJgwsPRRM2mcXJbTPoXrY YNNClG4Ya9aoTYjGLM+8AgEVsG3ZJ0ZIbl5+aiLdIGv2NT4HYPdyrrXujZN9X0ng3Pxytuk49Lduh vkJOfsCMRyqxFM8b1cHyKSo1EoQKNUM8688yk4PJ6hlXuOF8WoVTrzWJfg4jxEu7o0oslb/bw/k2Z EckASjPBcYahpRMk5RnQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gItEc-00043Y-M6; Sat, 03 Nov 2018 10:32:54 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gItEa-00040r-Fh for linux-arm-kernel@bombadil.infradead.org; Sat, 03 Nov 2018 10:32:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Ce7dCP7DfFpA1e50RettNtIdS5/8ZiyxnOTveZEOqbc=; b=YFT6hcXSnhSE0BzzR5eRNJDwKI 3oWQdHhX/9jHBebBY+rGHFSow0t9kW8Ah4pWDHCUfXOrGSxpJougtCIBlEC9WmgwpYwAdfFTlS2LA 7D//QAr6KA0QnPF3sCYseH+AqAPbxLheWi5DXX5rVioLM0g0WyLEDrKFpQ9Qo12FJ2KMX2vUqlZPn sAYXYBQl2fC03xjGK7WqvubQkkDNs8ksIsMbZ9286Dv4dHYOfMcuaPtrAKI66hP4yoH8nRIJ0Nofg UGaeBLiRbKwOIk05biWlqgoO+xCl4LUdaH0RwfWZa1wXFfiNKpAmwps/vptyBODZx8qcaeR5MLEfI dp/lmO/Q==; Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gIssq-0003pw-BJ for linux-arm-kernel@lists.infradead.org; Sat, 03 Nov 2018 10:10:25 +0000 Received: by mail-pg1-x541.google.com with SMTP id w3-v6so2043120pgs.11 for ; Sat, 03 Nov 2018 03:10:14 -0700 (PDT) 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=Ce7dCP7DfFpA1e50RettNtIdS5/8ZiyxnOTveZEOqbc=; b=kynS843WNKVgkuX88acq89wg8byWQ/X6sYeDsUTzFb8dIlI9nH/aSoo9oDSpB7O2Ag MTZgpW12Z6sr0svz+RnwqbW1Sgpq7Ph+JkgVuGL7UcUpbv+KDwl4atFt01kBd+GhFFoe OsmVUrr+cGV4XTS1tQuYJtjj+ESCGB11OAcuw= 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=Ce7dCP7DfFpA1e50RettNtIdS5/8ZiyxnOTveZEOqbc=; b=bAxjUJ4uxrll/rzpaR4cQ3pDn2u+XrI19YXx6d4c94+PYaeHpxcDzeKtwUYgciYJMz sKfJOTLuYBv9TGpgHaBMf3sYMzlm8G2dKTwmQk5BG8XFcJ2IBDZpbyAusbD93QnUH6xV /KHMsJLA+NRWYt9OrCIMtqA2gMwZLxvniCkcw4CqJDv2grDKPSzZQqqnfm5kvSTusT8l 4Ujnu3VFEhJGPPwKpVIhpWgTF80xs5zLrmWGJxs778ETC2gYcSBSbRvoaeMQiH8FUyvz c6gLRkmEwZGpC1A+mRcGHPAD5GruAc7/g7FzPaDnNxzSJGIvHNIjVhLcD34YvdvwVL1R Z9RA== X-Gm-Message-State: AGRZ1gJT8yZu6+HpcekyUzk3nc2mjB24MhiaFO9XrOxzw8gE37uPoGKD A/PVPVMmqFRDyq8iNTIcYbSWBw== X-Google-Smtp-Source: AJdET5e+pQzSqMcJNJABb28K3oUehx7FlxwUeNS9B+nUNPjuQyX+XcrQxRdm5S+2gEoaL/VSsMJfMw== X-Received: by 2002:a63:4384:: with SMTP id q126mr13740690pga.160.1541239812653; Sat, 03 Nov 2018 03:10:12 -0700 (PDT) Received: from localhost.localdomain ([2405:204:6094:3f7a:ed0a:fb74:1220:defe]) by smtp.gmail.com with ESMTPSA id z79-v6sm28466823pfl.33.2018.11.03.03.10.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 03 Nov 2018 03:10:12 -0700 (PDT) From: Jagan Teki To: Maarten Lankhorst , Maxime Ripard , Sean Paul , David Airlie , Rob Herring , Chen-Yu Tsai , Icenowy Zheng , Jernej Skrabec , Vasily Khoruzhick , Thierry Reding , Mark Rutland , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Michael Trimarchi , TL Lim , linux-sunxi@googlegroups.com Subject: [PATCH 07/10] drm/sun4i: sun6i_mipi_dsi: Enable burst mode HBP, HSA_HSE Date: Sat, 3 Nov 2018 15:38:57 +0530 Message-Id: <20181103100900.30313-8-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181103100900.30313-1-jagan@amarulasolutions.com> References: <20181103100900.30313-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181103_101024_375461_8791B1A6 X-CRM114-Status: GOOD ( 15.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jagan Teki Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Horizontal back porch, sync active and sync end bits are needed to enable for burst mode panel operations. So, enable 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 2d34e5f48d29..feb8c54c5146 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -518,6 +518,7 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi, u16 hbp, hfp_pkt_overhead, hfp, hsa, hblk, vblk; size_t bytes; u8 *buffer; + u32 val = 0; /* Do all timing calculations up front to allocate buffer space */ @@ -527,6 +528,10 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi, hblk = mode->hdisplay * Bpp; hfp = 0; vblk = 0; + + 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; } else { /* * A sync period is composed of a blanking packet (4 bytes + @@ -594,7 +599,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,