From patchwork Thu Apr 27 14:29:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Francesco Dolcini X-Patchwork-Id: 8725 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp312142vqo; Thu, 27 Apr 2023 07:34:37 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ43PjEeLiY8oJvCK1jXCHStK3l17DGAY+AOpD+Z8cuW52CBqsd8Ove2vYlvltKmUPTKLsUr X-Received: by 2002:a17:903:244f:b0:1a9:b977:81c7 with SMTP id l15-20020a170903244f00b001a9b97781c7mr1775456pls.62.1682606076871; Thu, 27 Apr 2023 07:34:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682606076; cv=none; d=google.com; s=arc-20160816; b=sFfplLADqwp5TSI0/PMMze0e02ROYh7NHfipmkCikWsyvk1KEhm72HnaNGUi6A1Pc/ O9/P+UpIHF3h1l4O/AkAQx5OiW/OwrzpHo4cK0R4tpm16k3A1UKY6YJvvzniX7Rbf+a+ j7dOvfgtkos5Mq8f77G1dCxFNRQD05Ezhv8rWTRxb1fNMfPr3MQ1McToVQIAlWmJeqIl eqX55EkEeeLDrZFEDysSpFGBW9XfLzLRQgEl2zESFUG70X3uJrXq1OelBJHovtxy0a8H TIXTabqnqOtd109UmB+3K46brOKBqcsl4ZbsAiQlABA/3qQWg2jAul+LWEH7trDGpbNg w54A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=7TCT0DLVZMQa6ZNm5Cfgs+Lu+WlvwliRO4yUdcdT5vs=; b=bpnWIG/mUCBkA+b52mS3MzUv2AUD7dCVZOj4hlHdshpl5YnAdk72McxLsHwmcaAriI SArvpcRqFmRSetpXqOwUIeHvYjeRP/FP65m0YC4Ys4RCsIF6/64RY9sxFTcwPMcp3Y/3 pWG4DoP3Hfjme3YJLGUlBDUpZyhs0ppZ2yggHieciC51AQEEAAytwxMDP2HH4f/j3D6K kcCFTbzA2y64fHlqbjyRwqpt1H2fZaaIRAjvxi1Qaq6B0iTbRmBSS2DzXttlzo7TZuvp rQYvDu2HkI49X949+Gbkw+BMZhqOD4jPAfTE569/T4XCYyto+qYXrB5R7aAmy2nAE2wX Hs+Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e17-20020a170902cf5100b001a9785282f5si9338596plg.287.2023.04.27.07.34.21; Thu, 27 Apr 2023 07:34:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244112AbjD0Oa0 (ORCPT + 99 others); Thu, 27 Apr 2023 10:30:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243563AbjD0OaT (ORCPT ); Thu, 27 Apr 2023 10:30:19 -0400 Received: from mail11.truemail.it (mail11.truemail.it [IPv6:2001:4b7e:0:8::81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B32F5BAD for ; Thu, 27 Apr 2023 07:29:44 -0700 (PDT) Received: from francesco-nb.pivistrello.it (93-49-2-63.ip317.fastwebnet.it [93.49.2.63]) by mail11.truemail.it (Postfix) with ESMTPA id 6502D20B47; Thu, 27 Apr 2023 16:29:39 +0200 (CEST) From: Francesco Dolcini To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , tomi.valkeinen@ideasonboard.com, dri-devel@lists.freedesktop.org Cc: Francesco Dolcini , David Airlie , Daniel Vetter , linux-kernel@vger.kernel.org Subject: [PATCH v1 0/9] drm/bridge: tc358768: various fixes on PLL calculation and DSI timings Date: Thu, 27 Apr 2023 16:29:25 +0200 Message-Id: <20230427142934.55435-1-francesco@dolcini.it> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764340349382666245?= X-GMAIL-MSGID: =?utf-8?q?1764340349382666245?= From: Francesco Dolcini This series includes multiple fixes on the tc358768 parallel RGB to DSI driver. With the following changes I am able to have a stable display output using a TI SN65DSI83 (DSI-LVDS bridge) and a 1280 x 800 LVDS display panel and the register values are coherent with Toshiba documentation and configuration spreadsheet, I was not able to test any other display sink. = DSI Video Mode = The driver uses the MIPI_DSI_MODE_LPM flag not correctly, because of that no HS Video is sent at all when this flag is set by the DSI slave. = DSI Timing Parameters = Multiple DSI timing parameters are not correct and this was leading to black or not stable images on some display output. The new formulas were verified with the datasheet and a configuration spread sheet from Toshiba. I did split the change in multiple commits, I can squash all of them together if this is considered better for any reason, including bisect-ability. = PLL computation = Two issues on the PLL computation, one is a required fix to have the bridge working when the parallel RGB input width is not 24, the second one is just following a prescription from the Toshiba documentation. In my test it was not making any difference. Francesco Dolcini (9): drm/bridge: tc358768: always enable HS video mode drm/bridge: tc358768: fix PLL parameters computation drm/bridge: tc358768: fix PLL target frequency drm/bridge: tc358768: fix TCLK_ZEROCNT computation drm/bridge: tc358768: fix TCLK_TRAILCNT computation drm/bridge: tc358768: fix THS_ZEROCNT computation drm/bridge: tc358768: fix TXTAGOCNT computation drm/bridge: tc358768: fix THS_TRAILCNT computation drm/bridge: tc358768: remove unused variable drivers/gpu/drm/bridge/tc358768.c | 53 +++++++++++++++++-------------- 1 file changed, 30 insertions(+), 23 deletions(-)