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: 10666647 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 8B7E513B5 for ; Sat, 3 Nov 2018 14:23:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7A2E02883F for ; Sat, 3 Nov 2018 14:23:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6D7A828915; Sat, 3 Nov 2018 14:23:32 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C6021288BC for ; Sat, 3 Nov 2018 14:23:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DC6266EEF6; Sat, 3 Nov 2018 14:23:26 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2A5B36E681 for ; Sat, 3 Nov 2018 10:10:13 +0000 (UTC) Received: by mail-pg1-x542.google.com with SMTP id n10-v6so2048456pgv.10 for ; Sat, 03 Nov 2018 03:10:13 -0700 (PDT) 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=GSh2BFH0sf2lPeB+BApy9fE7rQGcsq+tKvTgqwLGNdqYKECWaqkDwCR5fQr9grsEHQ fCDLYRy04uegexh/bdWdzgVWyjorQidngNfBC4SpBW+iiBItCT2ggYiFAMVz/bkUyzaE m6Y1Gtrzi6qMwl6pLutasQmB5gOy2BvsxvyQvAnRI6ZIXpyY7IlSPFSHCs1UlJdYAmoA nnlxwDJ+RSUxDfkIIxj4ZikQReayPBvXYXcfdNKhWXyYRyqwzSSB43ocaI4QDkhgRZTV 0b9o6WWq4ScG49P3R6sH7TuazJTi4kGCossb4A0QxXmxp1/rC6s0klS85wA7XFIqG1OE SMhg== X-Gm-Message-State: AGRZ1gJmBh24fmoTAUerdiCdiNXScy5UYWKmRa0CXtdRe4wxpAithy+F qqteCjU7z/9d22BZQ1iSlfYdvQ== 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-Mailman-Approved-At: Sat, 03 Nov 2018 14:23:26 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jagan Teki Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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,