Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp6860218rdb; Tue, 2 Jan 2024 16:51:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IHbEU0OZoQt4fWk/MwOQ5ziVb5r1xjUfWJYvu2PKO3+x3V6yNsTLw44mcSkcJHQmY2VeHLK X-Received: by 2002:a05:6358:260e:b0:173:50b:26e5 with SMTP id l14-20020a056358260e00b00173050b26e5mr12098935rwc.22.1704243107998; Tue, 02 Jan 2024 16:51:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704243107; cv=none; d=google.com; s=arc-20160816; b=vHGtqXGQfgJYNsivBaMPLvFB2im7b/L9zs4UVADZBCdY1LZAQEVwqbunDFwdj4v0lL 2bhQhyi9E1sO1F2ps/yXX1qtgy1XZX+Bz53sMV9n9/CaWml1hfdI2nwb3L72wP1ylyi/ Osh08sErgumIJHZuXjvFPR11OEMB2Q3rmeV0wNLqU1lt/intwvTSEqfrTmpw3GY8Wc5T qhEpvzA8WOWwf8L6per1xU+Siz4oX6uuycXl/zTpVfaysd0AMIPVqRHuADiKAGQ5ng7C ArJH70Dj6fONh42aw7KFR/toqhDV3JdzjtkALYQ8DmrgSy8SGhMT+xQE2N5c90gHm+pt xs4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:date:to:cc:from:subject:references:in-reply-to :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:dkim-signature; bh=iw4D9K6H60zW9yGTucSNQ0sP7AfAVXzYnq7+xAS58UM=; fh=T6AUCZeFgkJwP4WBqp2J7aiCKc8yqVMiUcfYOOpwLzU=; b=zeyAE19SOsQkbir5zb4qABGFb1cF3CFK75xz5zNWlF31LExZQzSylSwL2aC+ME0iFp LcJXYlPlOjjIUiSBwBkYzJ6/JVLB0epGJnyx775fCaARWnxMbx/MekyaudLOV36kJPYC tst0WTY9jPqLX8YJ8uzTWNOduCeOEbF4fFlIK3Vt9Owsf4bksn6QHkMgJ9NVlLNP5QBQ azuq5l2Uc6W3kkdJYhsoc1OPU7vU14CBLBwmSoOxCAuS9xYKlnwEwM2ShO51CbwwBDsZ hhserHdosSXgKBAFIDg55SR14eyViktM/lsaa0BfmoS2JpKd0uSfp0lVw54Io16Bb1ZO CgpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YFYMYv4W; spf=pass (google.com: domain of linux-kernel+bounces-15009-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15009-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id k2-20020a17090a9d8200b0028c984d53b4si304635pjp.73.2024.01.02.16.51.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 16:51:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-15009-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YFYMYv4W; spf=pass (google.com: domain of linux-kernel+bounces-15009-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15009-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 802C22847FE for ; Wed, 3 Jan 2024 00:51:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0A9F97EB; Wed, 3 Jan 2024 00:51:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="YFYMYv4W" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 42641136B; Wed, 3 Jan 2024 00:51:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AA994C433C8; Wed, 3 Jan 2024 00:51:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704243093; bh=08KXlXgNZeakwMogHdMN3HKZsxc/azSBB+WAxe4fQKk=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=YFYMYv4WTcktJ/dyY3MCx1mzQl2yO1WZbhlk7IVHTrRRd+mQXC8UOQKL7efWNbxZG Wbx8Mw2PxlYyOGLOKefA8mEDZjp5yonW111jj/HBZwGNPxt0mlZOIocd1Cf2ap2yuf zi/TicIK9UDpvf/nHYAhusU2ELOnhybZL9vMGAMTtO+EwtlSh13OgJ8OcjcvBAef5w o0LhbK4ZXZXyLs8IUFoJTdbjFGuayp3B8DPAquUhnF8MXRVc2AkDMUXdgl6vguDnu4 6xlYz3LvTbalpxjLGDbo7OvHMovs2BQlBf4eO0dapXLqmGCPoJiDiluQOALe7A61I7 aewQOFXaBGttw== Message-ID: Content-Type: text/plain; charset="utf-8" Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20231103102533.69280-3-angelogioacchino.delregno@collabora.com> References: <20231103102533.69280-1-angelogioacchino.delregno@collabora.com> <20231103102533.69280-3-angelogioacchino.delregno@collabora.com> Subject: Re: [PATCH v3 2/3] clk: mediatek: mt8195-topckgen: Refactor parents for top_dp/edp muxes From: Stephen Boyd Cc: mturquette@baylibre.com, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, wenst@chromium.org, 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 To: AngeloGioacchino Del Regno Date: Tue, 02 Jan 2024 16:51:31 -0800 User-Agent: alot/0.10 Quoting AngeloGioacchino Del Regno (2023-11-03 03:25:32) > 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. >=20 > 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 >=20 > 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. >=20 > Reviewed-by: Alexandre Mergnat > Reviewed-by: Chen-Yu Tsai > Signed-off-by: AngeloGioacchino Del Regno > --- Applied to clk-next