From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,USER_AGENT_NEOMUTT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 39E00C04EBA for ; Tue, 27 Nov 2018 10:25:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0B1F720817 for ; Tue, 27 Nov 2018 10:25:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0B1F720817 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-clk-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730821AbeK0VWh (ORCPT ); Tue, 27 Nov 2018 16:22:37 -0500 Received: from mail.bootlin.com ([62.4.15.54]:34777 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726416AbeK0VWg (ORCPT ); Tue, 27 Nov 2018 16:22:36 -0500 Received: by mail.bootlin.com (Postfix, from userid 110) id 388B220DF3; Tue, 27 Nov 2018 11:25:08 +0100 (CET) Received: from localhost (aaubervilliers-681-1-94-205.w90-88.abo.wanadoo.fr [90.88.35.205]) by mail.bootlin.com (Postfix) with ESMTPSA id 96DA120DD6; Tue, 27 Nov 2018 11:24:50 +0100 (CET) Date: Tue, 27 Nov 2018 11:24:50 +0100 From: Maxime Ripard To: Jagan Teki 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@googlegroups.com, linux-amarula@amarulasolutions.com Subject: Re: [PATCH v4 08/26] drm/sun4i: sun6i_mipi_dsi: Fix VBP size calculation Message-ID: <20181127102450.b65jzhrdpxn5rxmk@flea> References: <20181113111633.20189-1-jagan@amarulasolutions.com> <20181113111633.20189-9-jagan@amarulasolutions.com> <20181115095551.uctdkfmuwlnzhjnn@flea> <20181120155715.andrjp5kg6ugcv72@flea> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="pf6ls3yybuynq446" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org --pf6ls3yybuynq446 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 20, 2018 at 09:55:42PM +0530, Jagan Teki wrote: > On Tue, Nov 20, 2018 at 9:27 PM Maxime Ripard = wrote: > > > > On Thu, Nov 15, 2018 at 11:19:53PM +0530, Jagan Teki wrote: > > > On Thu, Nov 15, 2018 at 3:26 PM Maxime Ripard wrote: > > > > > > > > Hi, > > > > > > > > On Tue, Nov 13, 2018 at 04:46:15PM +0530, Jagan Teki wrote: > > > > > The horizontal and vertical back porch calculation in BSP > > > > > code is simply following the Linux drm comment diagram, in > > > > > include/drm/drm_modes.h which is > > > > > > > > > > [hv]back porch =3D [hv]total - [hv]sync_end > > > > > > > > > > BSP code form BPI-M64-bsp is calculating vertical back porch as > > > > > (from linux-sunxi/drivers/video/sunxi/disp2/disp/de/disp_lcd.c) > > > > > > > > > > timmings->ver_sync_time=3D panel_info->lcd_vspw; > > > > > timmings->ver_back_porch=3D panel_info->lcd_vbp-panel_info->lcd_v= spw; > > > > > > > > > > vbp =3D panel->lcd_vbp; > > > > > vspw =3D panel->lcd_vspw; > > > > > dsi_dev[sel]->dsi_basic_size0.bits.vbp =3D vbp-vspw; > > > > > dsi_dev[sel]->dsi_basic_size0.bits.vbp =3D panel->lcd_vbp - panel= ->lcd_vspw; > > > > > =3D> timmings->ver_back_porch + panel_info->lcd_vspw - panel_inf= o->lcd_vspw > > > > > =3D> timmings->ver_back_porch > > > > > =3D> 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 pr= oper > > > > > value. > > > > > > > > > > Signed-off-by: Jagan Teki > > > > > > > > I've tested your changes on my A33 board, and this commit will break > > > > it. > > > > > > > > It creates vblank timeouts, and visual artifacts at the bottom of t= he > > > > display. > > > > > > Strange, VBP is earlier gives front porch which is anyway wrong. > > > > > > > > > > > Later commits seem to fix the issue, but will create some blanking = on > > > > the upper third of the display. > > > > > > > > Since the documentation is quite sparse, and a MIPI-DSI analyzer is > > > > way too expensive, I'd really like to have at least what each of th= ese > > > > commits are actually fixing, and what symptoms each of these were > > > > causing, and not just "the BSP does it". > > > > > > W/o this 2-lane panel is breaking, same vblank timeout and visual > > > artifacts at the bottom of the panel. though the commits may reference > > > BSP, I have at-least tested on 3 different panels for us to prove its > > > working. > > > > > > > Having some datasheet for the panels you had working would help too. > > > > > > Unfortunately datasheet doesn't have any required information what we > > > actually looking for. > > > > Not even the timings? How did you get that information then? >=20 > datasheet has timing values, but this changes need controller > information about VBP register that I don't have. But again existing > VBP is not back porch for real, it's front porch. Yet, this breaks the existing setup. So again: > > > > Since the documentation is quite sparse, and a MIPI-DSI analyzer is > > > > way too expensive, I'd really like to have at least what each of th= ese > > > > commits are actually fixing, and what symptoms each of these were > > > > causing, and not just "the BSP does it". Maxime --=20 Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com --pf6ls3yybuynq446 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCW/0bcgAKCRDj7w1vZxhR xSVqAP45MYHeU4Nou/QUNUTtN0u7DZwdzn1v2m7HkRHZgpg4rAEAipVCANPIyJCi n3aM6uwb+fnPFSbu+9uMYN5pPPZzXAA= =pUXC -----END PGP SIGNATURE----- --pf6ls3yybuynq446--