Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp387817imn; Thu, 28 Jul 2022 04:01:57 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uPtBSVDuuDUMc73dBdg6PjEgyJIop2qJ0E93mcXXTyYbin30YGKsru79ivYgH2ew8w2wQW X-Received: by 2002:a17:906:4fc5:b0:72b:9943:6f10 with SMTP id i5-20020a1709064fc500b0072b99436f10mr20976951ejw.722.1659006117230; Thu, 28 Jul 2022 04:01:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659006117; cv=none; d=google.com; s=arc-20160816; b=cLtSMMEbafDnH7wIJpmAgDeOIci/h0A+kbGIrtecGUvewMAy/c+v0UdZYEQcRQeoK8 17SfIWPbBvUWfcBgmVQx4oJRjWBiPjMMzMHpOM0XSG11656kFoOHI3RSFIhfAha0e6uS hHVKi2CtP3OJJqYngE37NaA+9OCUDvTNDgG5nJC3q/bd2lUpsAiG3aStP8aloWrSdsMn 1+ocVF2ooTeUvl3Ub+bOv8ZKsP91eNE3gEpSxIhi2pL+A6CnlIduI8HEzO+kp0dQWKi4 GKiHOkZGjSXp/Jabv3eroju8CuS28r7c0Pdj2ZkruUhvrBG0095G1OiHPdX5M8O9UPcD Ielw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=6ejDzynP2bwk6LslC6XiBBNAJnYFlK4XKEFYJjNwjd4=; b=aYY6SUPe5PRWy8FNrIS4XVcKlbELAyBkNxOgbjOCeeUk39kcSAUgW9Y79l139xhL9B US/GGgi5IdZv5Fjwrm4ucBJjA2C83/c7RSUXoivXCe/xgA9udIScbwWn1n6bErI1hTdD va0a9ATW0zBVEZMngMPZV/2to/VJtt3I54IwD6OBsjA/HnMU3HQhkYqzb3kgvfsLRCIv Ed7U0pTS+R4MJpmyMp0NfKdkjNZEio0Nrnarg8ptE62pn2tCW0/s8+w7hf2fWnGb20Ft VY3bmUMfWNNP7FS43+G5HI1qQAuxmTjMVCcm0WWwB3fuAjs8yZh+48rLVu+zxM1iWWxt fU0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=vSVPEiCi; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k10-20020a17090632ca00b006fe8b1baec0si407634ejk.709.2022.07.28.04.01.31; Thu, 28 Jul 2022 04:01:57 -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; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=vSVPEiCi; 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 S235800AbiG1KFz (ORCPT + 99 others); Thu, 28 Jul 2022 06:05:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235965AbiG1KFk (ORCPT ); Thu, 28 Jul 2022 06:05:40 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3862CDEE1; Thu, 28 Jul 2022 03:05:33 -0700 (PDT) Received: from [192.168.1.111] (91-158-154-79.elisa-laajakaista.fi [91.158.154.79]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 5B7116D4; Thu, 28 Jul 2022 12:05:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1659002731; bh=hy09P7RDOAzNVp6jFuC+hh2uVzq3PfPWCI074OwJV9U=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=vSVPEiCikFIts17ipxPcLb8xBz3GdW/ISCuSKbuVf4MbcMMky8Bkd7huQyioWsF8G iVBHAuPkoV+FdyL3+g4d+QDl9C5BPxXhiOvA3eiYagautvq8BTr0UxwnEOIZunEIXr YWpmHZkcGkcSMkL5IKpBSnMeDTjgxHXb/zM3b/Zo= Message-ID: <03c77b33-271c-5cb3-fe00-cda7ff21102b@ideasonboard.com> Date: Thu, 28 Jul 2022 13:05:27 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH 7/8] drm/tidss: Fix clock request value for OLDI videoports Content-Language: en-US To: Aradhya Bhatia Cc: Darren Etheridge , Nishanth Menon , Vignesh Raghavendra , Rahul T R , Krunal Bhargav , Devarsh Thakkar , DRI Development List , Devicetree List , Linux Kernel List , Krzysztof Kozlowski , Rob Herring , Daniel Vetter , David Airlie , Jyri Sarha References: <20220719080845.22122-1-a-bhatia1@ti.com> <20220719080845.22122-8-a-bhatia1@ti.com> From: Tomi Valkeinen In-Reply-To: <20220719080845.22122-8-a-bhatia1@ti.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_PASS, SPF_PASS 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 On 19/07/2022 11:08, Aradhya Bhatia wrote: > The OLDI TX(es) require a serial clock which is 7 times the pixel clock > of the display panel. When the OLDI is enabled in DSS, the pixel clock > input of the corresponding videoport gets a divided-by 7 value of the > requested clock. > > For the am625-dss, the requested clock needs to be 7 times the value. > > Update the clock frequency by requesting 7 times the value. > > Signed-off-by: Aradhya Bhatia > --- > drivers/gpu/drm/tidss/tidss_dispc.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/drivers/gpu/drm/tidss/tidss_dispc.c b/drivers/gpu/drm/tidss/tidss_dispc.c > index c4a5f808648f..0b9689453ee8 100644 > --- a/drivers/gpu/drm/tidss/tidss_dispc.c > +++ b/drivers/gpu/drm/tidss/tidss_dispc.c > @@ -1326,6 +1326,16 @@ int dispc_vp_set_clk_rate(struct dispc_device *dispc, u32 hw_videoport, > int r; > unsigned long new_rate; > > + /* > + * For AM625 OLDI video ports, the requested pixel clock needs to take into account the > + * serial clock required for the serialization of DPI signals into LVDS signals. The > + * incoming pixel clock on the OLDI video port gets divided by 7 whenever OLDI enable bit > + * gets set. > + */ > + if (dispc->feat->vp_bus_type[hw_videoport] == DISPC_VP_OLDI && > + dispc->feat->subrev == DISPC_AM625) > + rate *= 7; > + > r = clk_set_rate(dispc->vp_clk[hw_videoport], rate); > if (r) { > dev_err(dispc->dev, "vp%d: failed to set clk rate to %lu\n", The AM625 TRM seems to be missing the "DSS integration" section, even if it's referred to in three places in the TRM. Supposedly that has details about the clocking. Shouldn't the source clock be 3.5x when dual-link mode is used? While I don't know the details, this doesn't feel correct. We're supposed to be setting the VP pixel clock here, and the serial clock would be derived from that as it's done on AM65x. Is the DT clock tree wrong for AM625? Tomi