Message ID | 20181023155035.9101-8-jagan@amarulasolutions.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> 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 0FF1B13B5 for <patchwork-linux-arm@patchwork.kernel.org>; Tue, 23 Oct 2018 16:16:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 00CF729EAB for <patchwork-linux-arm@patchwork.kernel.org>; Tue, 23 Oct 2018 16:16:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E8ACF29F38; Tue, 23 Oct 2018 16:16:22 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=unavailable 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 EDC9B29F71 for <patchwork-linux-arm@patchwork.kernel.org>; Tue, 23 Oct 2018 16:16:21 +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=12r+yRud1nNVAjVgPwF24Yee/oa8pzOxQZoCyx28i7o=; b=FFcWmZl02/eoij +ft7vOtmVZm7nyy+opGX3W4GeDwpcek3VPoUsXXOlerGdBUu9jqB9cAqxaI2sYo6lXDJcI8AZyhCc B3L9aQEMSm8LBaeXpEWfiqgvgCpzNGqBXsPVdiuhM0hIsNIMN4aN5ZTLWlvGwvZRDgt0iXyTY1HIu Ojb3/aUcco/l8V8f+BBDZ2D90MIn+EGzRw7Ob/PTqV3LwrgShylNE6gusJQK87rJwKpUBf0cze6eB 2YGoH2VBmkyO1s8hpAJG/HN7AQFv4/dm1tLNLRbRd2sRci1+KS4PKj0g32K9Bpa21XUO3Ok3FIp28 Bzf4QStX5IRBzn5aPI1g==; 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 1gEzLu-0000TN-Ff; Tue, 23 Oct 2018 16:16:18 +0000 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gEyyE-0004TE-33 for linux-arm-kernel@lists.infradead.org; Tue, 23 Oct 2018 15:53:39 +0000 Received: by mail-pf1-x442.google.com with SMTP id f26-v6so879148pfn.9 for <linux-arm-kernel@lists.infradead.org>; Tue, 23 Oct 2018 08:51:39 -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=NlgASVRlNX+ALqEjtYF3sm1E5YI3hOJ6Lz3xqdNlUFw=; b=SKwRUoCuPWk11pAUkiNGBqeHeZLkKJh618KwzDJ01LmNIlq42ZYy9LxDrkddubq3oX TykXJjlDB1+v7EXF+wDHX195vHqLDEbE5MMOBEr6FhlJKoxW95DEqF1H8dms2/6rBR6+ F3r9ZLjTCJ/R7HwpG4SNwurOdH4RePqcSTYiQ= 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=NlgASVRlNX+ALqEjtYF3sm1E5YI3hOJ6Lz3xqdNlUFw=; b=OTq7a2uTF0axLTbRJA7xbu5XYt54kwfHZt9N5nc2nl0ONFXahL/+51MqW0eZZM+o3S JL3JPmmil+R7I2zZyhEgAsLEXA4lZzPWSJ7Y62Wt0iev/ZvFijQZ9ceMXomiwEvyt4TP pMdYcU4UhWnSIGGzAQXrihLkjm0l6BqhlG9KOa0tkxUXEv0MIFsEKOl/wxQkcoZbih3r M6+t8DdGWBN9b9tDbhuCLnRqFV4RwxZCjJXec3qpyR9NTdN5enjAvJDBUHJ+f9EOBnWR 3twbyfJHAZPbprEOLMtjyb1I6hEGhfVl5VQoIMnd1eVyJv5y91V5lwYt7sAFq/WYUVi8 3QSg== X-Gm-Message-State: AGRZ1gIHR0khG1jZB7h2Dfb8yDFm3OGrDGz+eUGq+rk7WNpuDYsHeErW DdqMkV31mTcyK1PrunuEUmI4dQ== X-Google-Smtp-Source: AJdET5czfKeMo4WdpKorjXN7oSgKMFLettza7vTigo3eYGZAoObGBmiWE8R1oWBnJQRj2vkFeHCspQ== X-Received: by 2002:a63:734e:: with SMTP id d14-v6mr9580018pgn.397.1540309898443; Tue, 23 Oct 2018 08:51:38 -0700 (PDT) Received: from localhost.localdomain ([27.7.51.1]) by smtp.gmail.com with ESMTPSA id o75-v6sm7442829pfg.0.2018.10.23.08.51.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Oct 2018 08:51:37 -0700 (PDT) From: Jagan Teki <jagan@amarulasolutions.com> To: Maxime Ripard <maxime.ripard@free-electrons.com>, Chen-Yu Tsai <wens@csie.org>, Icenowy Zheng <icenowy@aosc.io>, Jernej Skrabec <jernej.skrabec@siol.net>, Vasily Khoruzhick <anarsoul@gmail.com>, Rob Herring <robh+dt@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will.deacon@arm.com>, David Airlie <airlied@linux.ie>, dri-devel@lists.freedesktop.org, Michael Turquette <mturquette@baylibre.com>, Stephen Boyd <sboyd@kernel.org>, linux-clk@vger.kernel.org, Michael Trimarchi <michael@amarulasolutions.com>, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: [PATCH v2 07/15] drm/sun4i: sun6i_mipi_dsi: Fix VBP size calculation Date: Tue, 23 Oct 2018 21:20:27 +0530 Message-Id: <20181023155035.9101-8-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181023155035.9101-1-jagan@amarulasolutions.com> References: <20181023155035.9101-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181023_085150_182740_9A6EC30A X-CRM114-Status: GOOD ( 15.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: Jagan Teki <jagan@amarulasolutions.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
drm/sun4i: Allwinner A64 MIPI-DSI support
|
expand
|
diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index fc8560607147..3a1d48bc1996 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -526,8 +526,8 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi, regmap_write(dsi->regs, SUN6I_DSI_BASIC_SIZE0_REG, SUN6I_DSI_BASIC_SIZE0_VSA(mode->vsync_end - mode->vsync_start) | - SUN6I_DSI_BASIC_SIZE0_VBP(mode->vsync_start - - mode->vdisplay)); + SUN6I_DSI_BASIC_SIZE0_VBP(mode->vtotal - + mode->vsync_end)); regmap_write(dsi->regs, SUN6I_DSI_BASIC_SIZE1_REG, SUN6I_DSI_BASIC_SIZE1_VACT(mode->vdisplay) |
According to horizontal and vertical timings are defined per the diagram from include/drm/drm_modes.h Back porch = [hv]total - [hv]sync_end So, update SUN6I_DSI_BASIC_SIZE0_VBP calculation as mode->vtotal - mode->vsync_end Horizontal or Vertical back porch calculation in BSP code is simply following the Linux drm comment diagram from include/drm/drm_modes.h which is [hv]back porch = [hv]total - [hv]sync_end BSP code form BPI-M64-bsp is calculating as vertical back porch as in linux-sunxi/drivers/video/sunxi/disp2/disp/de/disp_lcd.c timmings->ver_sync_time= panel_info->lcd_vspw; timmings->ver_back_porch= panel_info->lcd_vbp-panel_info->lcd_vspw; vbp = panel->lcd_vbp; vspw = panel->lcd_vspw; dsi_dev[sel]->dsi_basic_size0.bits.vbp = vbp-vspw; dsi_dev[sel]->dsi_basic_size0.bits.vbp = panel->lcd_vbp - panel->lcd_vspw; => timmings->ver_back_porch + panel_info->lcd_vspw - panel_info->lcd_vspw => timmings->ver_back_porch => mode->vtotal - mode->end Which evatually same as mode->vtotal - mode->vsync_end so update the same in SUN6I_DSI_BASIC_SIZE0_VBP On the information note, existing SUN6I_DSI_BASIC_SIZE0_VSA is proper value. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> --- Changes for v2: - Add detailed commit message drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)