Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2228283imm; Thu, 27 Sep 2018 09:21:16 -0700 (PDT) X-Google-Smtp-Source: ACcGV61Z7LgOI5EtYfIYMUJQe+Wgx44JBnTYCbFCz1sF2eZG4vFa2qhXyoC0bU7CaZ2qR2rUT3gZ X-Received: by 2002:a63:f902:: with SMTP id h2-v6mr11046586pgi.154.1538065276667; Thu, 27 Sep 2018 09:21:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538065276; cv=none; d=google.com; s=arc-20160816; b=BRf7RrrguurhQCv9TFshheJhsQ6nOyQ7D8zWT6hFFur65VC6wgpM+KoTXoM1missne nB+h6NohYKEdimsHoBQUyGjOyb2AdIOtEpF0P1Z7Te2ozoEPm4BkiISuxsXf425zAjo8 NuZWon6kTIX/EgJUVD7qou/hauwLL3IXwkfgv4xpmJq8uJMKBAqphJCaMSkxYLCfbd5d LM8XjOsR2FubpOyre1CH6N6lwr5tUAEfKv58CknflkWlVaRSL/T2budIMoNcD0Wlaawe 7EpEWz0ynCSNJ59IyhgKCW8Dd2sQuYPj8d/VnX+daA6Jx3atEwYEhrMm7iCuPYusIkmq ah5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=1VeUtHWJ3hOtNfiEHSMOXor7IJiBoxL53Ef0kdq6OmY=; b=DW9Q/AUWDkZGXO4kMu/2ScDVQ4fEeXWjI7ivetrB/PZx9P12sOSIkyuj30L4LZyEc4 Thpg5MPAobB54tphv0BT5pV15rtMFR5pdxvGEiEfDzaD4u56cnI3zLe36qcIQUep0Xpu /w1hhkzFEKacE0axvjNVpIAyBjrU9qDYEzufHXbm4SmXAISrNTge2VJ+d1/bN2v9pWga 3ArKnjTvezS64gTBDkco/dGVh/uk1oMmYNIrsbS1aWSwEK0LoqwmUqJmjdAxWMAhU6AE KG07ziAUqCeEZ2D5hv2nQMzjjoUmN38xJOBENTpKT2F45EIK7cpFOf6v8RzfJMU/XSEz 6XiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ouJFqEan; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c191-v6si1133410pga.402.2018.09.27.09.21.00; Thu, 27 Sep 2018 09:21:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ouJFqEan; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728255AbeI0Wjr (ORCPT + 99 others); Thu, 27 Sep 2018 18:39:47 -0400 Received: from mail-it1-f196.google.com ([209.85.166.196]:54513 "EHLO mail-it1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727480AbeI0Wjr (ORCPT ); Thu, 27 Sep 2018 18:39:47 -0400 Received: by mail-it1-f196.google.com with SMTP id f14-v6so8610189ita.4 for ; Thu, 27 Sep 2018 09:20:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1VeUtHWJ3hOtNfiEHSMOXor7IJiBoxL53Ef0kdq6OmY=; b=ouJFqEanR0LXNdZwbHwVdWHvYWycT3QG5ko6/tkZsgU2VfeIC3c+hsRqqsZUu9Tyjg Xc/EGSieyzJvvFbTNmyyJZC1YGSUpYXv9Rk/hC8Wd7PE3mUpmmBLSrrZX8h+E/7WTBvC xGFUg/InUIfFV5BsyuJwMv8MYleOH0bO52tNk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1VeUtHWJ3hOtNfiEHSMOXor7IJiBoxL53Ef0kdq6OmY=; b=ftz1aYr+Iwo06QOPkRT/uSnF4v39aD6NEU0fC2JzPc6yzHzoaAVDcNRZKZYfmCO+/C pW+VW3l3Eaiqhv99YYh6vtPHffK3QlBtgEoquS1nynQHPqXimMuPL0x08sWk7z8tNUil e/CTFR3sR2FgR5y2yJUwL50ULvo8C0a6qJWNSP/TZC85o+I3IN6Z2yk/EBqlFKIRyAaZ zg5p621Db3LJiaiI1eBW8T9Is1ezfsgPfvddL4Kv7OZGQAE4RdS2k6ho7dLrYBem7e0S cSk4ZLbBLkGWw/t7e+4BpzwXv+1KYqCRtKrGrjWauR2XLPZtYvCraOKMoMoqNvvxQGy2 e8Gg== X-Gm-Message-State: ABuFfoh/8NS5wqNvpEeE/5FO2xp5HBIKj9vNAldNpu+tvPFl+75VhVJh 2+LLWkmb4+PMJIQezAJV+xTv43vvDNWXVxgke4rh4w== X-Received: by 2002:a24:5214:: with SMTP id d20-v6mr7771107itb.24.1538065245874; Thu, 27 Sep 2018 09:20:45 -0700 (PDT) MIME-Version: 1.0 References: <20180927114850.24565-1-jagan@amarulasolutions.com> <20180927114850.24565-7-jagan@amarulasolutions.com> <20180927152126.vovnvwmqdfpuxgdm@flea> In-Reply-To: <20180927152126.vovnvwmqdfpuxgdm@flea> From: Jagan Teki Date: Thu, 27 Sep 2018 21:50:34 +0530 Message-ID: Subject: Re: [PATCH 06/12] drm/sun4i: sun6i_mipi_dsi: Fix VBP size calculation To: Maxime Ripard Cc: Chen-Yu Tsai , Icenowy Zheng , Jernej Skrabec , Vasily Khoruzhick , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , David Airlie , dri-devel , Michael Turquette , Stephen Boyd , linux-clk , Michael Trimarchi , linux-arm-kernel , devicetree , linux-kernel , linux-sunxi Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 27, 2018 at 8:51 PM Maxime Ripard wrote: > > On Thu, Sep 27, 2018 at 05:18:44PM +0530, Jagan Teki wrote: > > 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 > > > > Signed-off-by: Jagan Teki > > --- > > drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c > > index 1c7e42015645..599284971ab6 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)); > > Is it purely theoretical, or did you find some source that back that? VSA is done as per that, sync_end - sync start would give sync time. VBP also done in BPI-M64-bsp[1] which results back porch existing code results fron porch. [1] https://github.com/BPI-SINOVOIP/BPI-M64-bsp/blob/master/linux-sunxi/drivers/video/sunxi/disp2/disp/de/lowlevel_sun50iw1/de_dsi.c#L955