Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp1990117rdf; Mon, 6 Nov 2023 00:58:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IGKtqWM9EU0iX4r6UrlLAQZCFUWeuHNFtvpu0D6f3wLoqQQJEB6aBB8NLSKi7g/IdbQDQyo X-Received: by 2002:a17:90a:f198:b0:27d:60b1:4f2c with SMTP id bv24-20020a17090af19800b0027d60b14f2cmr21779397pjb.4.1699261138303; Mon, 06 Nov 2023 00:58:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699261138; cv=none; d=google.com; s=arc-20160816; b=j0YyngHJPDaiOiWXC9oNjASBGd6WcxNHikqxoetfu85nJ163LWlKw2Chcl5dTT7a0U Wfk/wet+647kBc0ApttLeHLgtmNeBnXcIbBlInKmIzHIsHNs8wdqL4qN4b6GyanqP1o3 czULggfpzdjnzvLV0Dtv56OvXP6ydwT81ztW3fBG5tbgsV0V2DpPSo24rrRgZirHDF9U JfU6Kg2Ua2lFWpltmR1UbhNJMfx2Z1eJmO/2VEz6aeRCfUko6SSq3+bzzP1aZ2YKrYOg 5gakbPp4Q3YVLBU4WpLhLvM50uc1qZKn2KHQVZKH/SJSZqIyylV2BtsYYeqcLURTbzDF oH0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=BhaNPZ5ALKGhgIwmnk7EA8sPdVUBa/gDuKElje8KGZk=; fh=rQAHlSEte72NA94oGXfCCpgeXRpVGxRwSbrKzvgYuFY=; b=SFLnnax8iA5Pwwchm54YsMA0rT5a4pbcPHmWZ1/PqfqDnd3WHNhenBlcIzD3SrNl0B 6ssH7Mg5KX87syI+p1WIM5jv60iZNDHxT6lENIpSpVHBHMdzgXCUA6yLICA7zcV7RaeN FsEujIRu8IdVvR28vGYxYWztHaexk1Pmqn5tk35AqZIyzV0+2aqkkEPJPGDJcnLpmzEI ao8bZYiiykHJwTtq+GeHU8LhCMhiVme3IgKHbXGDiQL7OeR/0t9tSwPHITjTIYO1GBOr dSDjr62mnkkJJHPKTsy8KJXgIMmNxjIeTaV/oC/uVb2Fx65gGcqWITKcSApuH8sFUrdp ZnAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=JLziYkhU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id np9-20020a17090b4c4900b0027b123fbe9dsi8211713pjb.156.2023.11.06.00.58.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 00:58:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=JLziYkhU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id A7A4280A0E0B; Mon, 6 Nov 2023 00:58:55 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231351AbjKFI61 (ORCPT + 99 others); Mon, 6 Nov 2023 03:58:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231301AbjKFI60 (ORCPT ); Mon, 6 Nov 2023 03:58:26 -0500 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A1D383 for ; Mon, 6 Nov 2023 00:58:23 -0800 (PST) Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-507962561adso5488352e87.0 for ; Mon, 06 Nov 2023 00:58:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1699261101; x=1699865901; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=BhaNPZ5ALKGhgIwmnk7EA8sPdVUBa/gDuKElje8KGZk=; b=JLziYkhUrV+OEVBt7CaBG5mhiS1bY1jxhuk/7vLFvK6BiWMbrjo+n5SiB5vB9Bl15k W0AcA2Bi6Sdc5nqiOMYi1JqI3YOJcb21htw6fl3CsCv0fb2b7YTFhph12/2lSUjVvNTn eK96/0BbgTfAp8Z9YDuwBpe0X6IESmW2YVVwg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699261101; x=1699865901; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BhaNPZ5ALKGhgIwmnk7EA8sPdVUBa/gDuKElje8KGZk=; b=P3MNhKxOBjaA6GUMZYPpqCWLIZavteoVOid3mFmkQinF0dQJ3loi8SPEm2AvMzLrgv dPFlEGJbx85PU45XSkeTjuE/fovuWGVuzuH0siURVSpyPrNG0gnCexSxcC87lymVDNJ8 f3ZsOmv5gQKbZqNhTO/Tbc5qyhqPZPj9YeZ7GhVRKZbic8gxNd/WXRinGjw/pNIqUruu BnU1LCX/BLo79YnKqEmNrOSKeZ8uKhGeoWtj1U+a8hvM8NvKhcOfoqOWGc+Fl/DL2Mmz 0a8tvj/IYN6YkSPJ3Ww6EIqBIC0502tY9jNteeJWYyeGHJcv+odPaJpcJyj1tN2/3+eY xb0A== X-Gm-Message-State: AOJu0Yxxj9nQ/NWvfG/UT+j0X2hMI+x3ptkV3JTJf6f2nO7bskiOw/fy +w+kEtS1+AZQO0gMU2QCiPhUpfMclfrUa0U9hQB2JA== X-Received: by 2002:a05:6512:3245:b0:509:49fc:c25c with SMTP id c5-20020a056512324500b0050949fcc25cmr8787028lfr.28.1699261101126; Mon, 06 Nov 2023 00:58:21 -0800 (PST) MIME-Version: 1.0 References: <20231103102533.69280-1-angelogioacchino.delregno@collabora.com> <20231103102533.69280-4-angelogioacchino.delregno@collabora.com> In-Reply-To: <20231103102533.69280-4-angelogioacchino.delregno@collabora.com> From: Chen-Yu Tsai Date: Mon, 6 Nov 2023 16:58:09 +0800 Message-ID: Subject: Re: [PATCH v3 3/3] clk: mediatek: mt8188-topckgen: Refactor parents for top_dp/edp muxes To: AngeloGioacchino Del Regno Cc: sboyd@kernel.org, mturquette@baylibre.com, matthias.bgg@gmail.com, msp@baylibre.com, amergnat@baylibre.com, yangyingliang@huawei.com, u.kleine-koenig@pengutronix.de, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, kernel@collabora.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 06 Nov 2023 00:58:55 -0800 (PST) On Fri, Nov 3, 2023 at 6:25=E2=80=AFPM AngeloGioacchino Del Regno wrote: > > The top_dp and top_edp muxes can be both parented to either TVDPLL1 > or TVDPLL2, two identically specced PLLs for the specific purpose of > giving out pixel clock: this becomes a problem when the MediaTek > DisplayPort Interface (DPI) driver tries to set the pixel clock rate. > > In the usecase of two simultaneous outputs (using two controllers), > it was seen that one of the displays would sometimes display garbled > output (if any at all) and this was because: > - top_edp was set to TVDPLL1, outputting X GHz > - top_dp was set to TVDPLL2, outputting Y GHz > - mtk_dpi calls clk_set_rate(top_edp, Z GHz) > - top_dp is switched to TVDPLL1 > - TVDPLL1 changes its rate, top_edp outputs the wrong rate. > - eDP display is garbled > > To solve this issue, remove all TVDPLL1 parents from `top_dp` and > all TVDPLL2 parents from `top_edp`, plus, necessarily switch both > clocks to use the new MUX_GATE_CLR_SET_UPD_INDEXED() macro to be > able to use the right bit index for the new parents list. > > Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai