From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 4CCBD410D05 for ; Fri, 27 Mar 2026 18:35:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774636554; cv=none; b=EK2FrJ8nZNI8iXcbpMiSnd9YRkqoBPddP4MSoq6D1mENBRp0//4w06MfJUtDXcu39CA2eJz6YVdZS44ilJ/jRWaSn0q2yYfva05+JbGszeiZAYpGYX73db7mpm5Rbnwz6YllQGJNI2moe+lfBwSiGnlKm7k6HRZ15xdum0Z/dYE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774636554; c=relaxed/simple; bh=HcpjVfTRCC/nPL4AsdXi+Re5QhxrdRbCpCjf1GBzvEc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=sTy/LKbicMB3Y63cTCPQwzNoPDqiFD2Lw8Ciz1yx22MRAdBcZ33AdJcUvIUQtjIoqhrhKg6cqHQjRrOOtPpa6VG/56ZBeIGO1bka7J5ii+riaF/oYJJ7lm7GqBOrlb3LYHzn/tsqI5Ef1ej00g+ZYOyq3l2bujVMYfPdxS+UREw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=CileIjKz; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=m9AB5tr0; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="CileIjKz"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="m9AB5tr0" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1774636552; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=c/93MB1/qzDoWw1DCi0QW275S51oBz7F7ihG0OjaMgY=; b=CileIjKzag8ZvKaGitP0GnxOiHE6mYo2XSHnpeZ5WUx99qmuCc449HjTwyfKluyarPtFVe nP7LFx3deXt2UA2LWTQF7rx9AJJJT19Sl0x6QCnxYl2cB2sWFxIt+7n5eXyXHBLvhfeuhs hUBWN4MlRJA4/ROQy891x+Ex2wGb6So= Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-570-jBsanIrzOJKLVHUSw2PZ9A-1; Fri, 27 Mar 2026 14:35:48 -0400 X-MC-Unique: jBsanIrzOJKLVHUSw2PZ9A-1 X-Mimecast-MFC-AGG-ID: jBsanIrzOJKLVHUSw2PZ9A_1774636548 Received: by mail-qv1-f70.google.com with SMTP id 6a1803df08f44-899fa82ebb9so58438176d6.3 for ; Fri, 27 Mar 2026 11:35:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1774636548; x=1775241348; darn=vger.kernel.org; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=c/93MB1/qzDoWw1DCi0QW275S51oBz7F7ihG0OjaMgY=; b=m9AB5tr0wGg8MfgojJf3B+QYY+ycwtDUxd+w8w576/LSNU2Gb5BxqqqIkHevhv4aEp MbG99X2E7IsNcah02Yum4FEdKtb6mTwq4V1j+jf3f3X5eTOF4jMTHXK5pdOy8fDUb6bM oc2Tf8Z743GD6oS8PO1x8WEhwOr2JGd9+HAWGbjrZnBeOiL6dpzA5UE6LEUo+RBAdQFT ns7cnU80gIMEWyIdEQuFXMc8zz8nb9stKl2iKyEXS9UOq+LeEE0KnIB2RUaZtHUDiGdL LBHnEvFzPr8udontLGYMV7iGHVpuVUZA5emsjxvA1vXQ1b7fBZmBqf22y4g6GNY46pu6 ixqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774636548; x=1775241348; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=c/93MB1/qzDoWw1DCi0QW275S51oBz7F7ihG0OjaMgY=; b=JXk9IlwHn0UeQAPO4RnttfreBC+ds1KUkwmHNmH0Pn4cE643+WXDqrGg46qaku8SUM cgTZ4lIiWu128DsUWrL7ulUYHQjzCcC1FhkJfebwSMKpbNncjd1RC28V9bPbai+/FUSV jUFZT6DRGkRhdUUg+t2sVyM7+17xWB7QBSqMZeyIQuFY+cPQbtxbBpT/JJ58E9ZDyx4k QmlctU2nwBpE8Z4i1Y/T7lqwJ6pYUf4DT8dtmIuMbV8JWWJ7ku+bTzdquIj++KU1MlJz BTCYO8tS0dAlR++atBmjrrY8CNgarXZPMAjFSYKQBKquRS/w+rxc6XpLtbXQjzYZ0znp Irtg== X-Forwarded-Encrypted: i=1; AJvYcCUY3yz8f914hL3Se8aNYsiDBe0TlZihM6lNeRipuh7SpiF/37vStNKq9hLh69aH9TP/Zem0QrpLu41uRp0=@vger.kernel.org X-Gm-Message-State: AOJu0YzOcmBTVROxwIuSHr4PyYkUaa2Yzpy7Hwv4xVQN7qoEH/G1x3Rn GzTetXd2Td9ZQOI57yy4+9rcUHrRLGY/gOrtMPQKKX2nO8QZ0UfSV2sq/sqWX9jmcNcNQaHkshs ZjGs8GSI2qGdBIjnaTdF4EmCyol889+ddPVW1rK36PlC01Z8sBdDxvLarSzuTjiNlKw== X-Gm-Gg: ATEYQzzo56I85xGWOvLEKtas0IsPJLJSoQaCHVB7os3pZ7hoPkVbbv9va/rgTRce5hA g8OiDKvTF7efiv5Xg0grLTeVWipIFXCdkvsR8kM//X4RPuzADD+HNGrpqVVo2MKm8A+aGBVcGd3 wqE0ucpciagqqXfPMx+6KnN31QE7DV+b70X/WQUHDroaByN83GTsVSiYKnZaWo4RNlgrRXQpU06 ZAJC5Oud3VQiHD5l9wztqLgTDQo0BWBpnS8Qnbr8ptGzkEeD/veR9buSMWXPPUrYROBHyQ3id2i 7Fl5xVykY88Hj2NXnEeELWdctteFBfL393KbahJ1asiJs6EnBRUWaW+LRqtFtgc5RkfYVk8/cuc GOa4el0keiteGexCeNg1gbuRx3oPTWr+kHO3K3EEKf+Yl8Oyrcer8GdeP X-Received: by 2002:a05:620a:7010:b0:8cf:bbf0:ff55 with SMTP id af79cd13be357-8d01c7df86dmr471920985a.51.1774636548037; Fri, 27 Mar 2026 11:35:48 -0700 (PDT) X-Received: by 2002:a05:620a:7010:b0:8cf:bbf0:ff55 with SMTP id af79cd13be357-8d01c7df86dmr471913785a.51.1774636547504; Fri, 27 Mar 2026 11:35:47 -0700 (PDT) Received: from redhat.com (c-73-183-52-120.hsd1.pa.comcast.net. [73.183.52.120]) by smtp.gmail.com with ESMTPSA id af79cd13be357-8d00e4ca250sm558769285a.25.2026.03.27.11.35.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Mar 2026 11:35:46 -0700 (PDT) Date: Fri, 27 Mar 2026 14:35:44 -0400 From: Brian Masney To: Michael Turquette , Stephen Boyd , Maxime Ripard , Alberto Ruiz , Brendan Higgins , David Gow , Rae Moar Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com Subject: Re: [PATCH v7 0/8] clk: add support for v1 / v2 clock rate negotiation and kunit tests Message-ID: References: <20260323-clk-scaling-v7-0-8e7193dc9405@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20260323-clk-scaling-v7-0-8e7193dc9405@redhat.com> User-Agent: Mutt/2.3.0 (2026-01-25) On Mon, Mar 23, 2026 at 01:24:51PM -0400, Brian Masney wrote: > The Common Clock Framework is expected to keep a clock’s rate stable > after setting a new rate with: > > clk_set_rate(clk, NEW_RATE); > > Clock consumers do not know about the clock hierarchy, sibling clocks, > or the type of clocks involved. However, several longstanding issues > affect how rate changes propagate through the clock tree when > CLK_SET_RATE_PARENT is involved, and the parent's clock rate is changed: > > - A clock in some cases can unknowingly change a sibling clock's rate. > > - No negotiation is done with the sibling clocks, so an inappropriate > or less than ideal parent rate can be selected. > > A selection of some real world examples of where this shows up is at > [1]. DRM needs to run at precise clock rates, and this issue shows up > there, however will also show up in other subsystems that require > precise clock rates, such as sound. > > This series introduces kunit tests to illustrate the current behavior in > the clk core. As discussed at Linux Plumbers Conference 2025 in Tokyo > [2], it was suggested to move the negotiation logic into the clk > providers themselves so that only the clks with this issue can have > their rate preserved, and add some common helpers to the clk core. Sashiko identified a few issues with this series, so I'll post a new version with the fixes. https://sashiko.dev/#/patchset/20260323-clk-scaling-v7-0-8e7193dc9405%40redhat.com Brian