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.129.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 44121361DCE for ; Fri, 27 Mar 2026 18:35:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774636552; cv=none; b=SeR16z/91GaZT++J1bGonFIAhLGlb6d7QC6VDfbTd2hjHGO2DB3e7MaFhr4ej4/EsDFrpGT2OojGsSj3+ZfXlwdRnS8SwcWeC43qzVNgZQcQS1J+iDCn1U8e5AWbx7r4ItK7lzhft6Lcj7g7Uhuf0GVQqP1OrN9Y62CUSQPWdfM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774636552; 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=m0z9vzguzJMavVJmZ+kHlaCgiVhpyk0Mk1T3rL+duakSAgufiHKl7VmB6X5Bt72gRikyuQcEzzilUsrAHvajRrZevHNWmYiyFqiT0mlqvrgf1G80qYzLIbzHZWQLAnZN+8f3AYUBHMxuiSvbyJh3jmfM86cnQwGTQkdpq5oJiwI= 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=HD28Nqwl; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=m9AB5tr0; arc=none smtp.client-ip=170.10.129.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="HD28Nqwl"; 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=1774636550; 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=HD28NqwlLQ2/aC58pdp0UjV5WF4DCSaML9MdfC5BdqnD379/xhE8wAcXq1Uv79UtxLQ/ae 41GyHxd5Lqm9yHuY6NPfgNEoclJIc/TzEtTDVlSn4FLEuwUVhNaTsLY7Tl4cV3uraISmge p1z9CdGWbwBilp6PWOEwnVgxIhZ4D5o= Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-427-5iN-4jjPNnirTaV3MykHHA-1; Fri, 27 Mar 2026 14:35:48 -0400 X-MC-Unique: 5iN-4jjPNnirTaV3MykHHA-1 X-Mimecast-MFC-AGG-ID: 5iN-4jjPNnirTaV3MykHHA_1774636548 Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-8cfda078676so753170785a.2 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=Qq+T2mrGHK/yhWh79FbyoenEi/zvNHQLtZf/mEtV98NnkiC6jbWLaRJMHrnXURZi5S BY+gD0ZOanYVsAdKLLPTWlDpW4t8t+C6e5HGLXXc9Bp8Boc4aBFmIDQH3oJ/aGMsQb28 nQurzW1rjKS4strFr7Oxs9Z6I/3S1DuFi06cOm0RjWiyTBMpcCrZoxjKMwW4BrrhD9XZ 7jS1+Ka8CjLqES/Ds4DjbBbkmSopWx0+mRkvACrSe2EuA7qYHpYHH8WZXXNSNYcR5CYB ClhE/HYeL12ZSnJZcPNAU8HXVt8Eq2yGOkrEmR45FLojUxcHwc9KqpXrjiagSNCFm8Ct mRqw== X-Gm-Message-State: AOJu0YzMUIQIlnT1EWTm1Slj5smOyXecAOWGmNlGyhyw5QL3kLaE1NFr Oxs6032h3PBVTPHP8413i1bnf32ShKWZSzTOMM4JSMoGFMUWRmOhQSZmQnD99Yh8Lb0rrKKN0Kd 9fr5LxXLmsaLjvWE3qNMU+Jnq24RneVMr35qCwwmBQjldF88uiUQRlcCsBqRVNw== X-Gm-Gg: ATEYQzw+zpSDiw/KzoKs+zZ+/shYWp9f0/+qML8sbpZlW4wTHSeJNJkp+zfq+FW26Zo CPcrekFyVvtQKI55OxoI0nAgfPc9IYR+AOnUwTyLc/hS9gYtpSQhQkiIYl26LWRDId+X7SP6OJI ogtKjGtlgHBqU5PmPe9r43Wyo1HKcjcSYk7aOlCWTegLIOwDg0lluGtTY/StsabfQLPM2ulwPiJ ed+PLmsEVvDfV6n8hBQMckVOmCDvFY+lmLDnW/f/060FobUpGACXRPUUaSLKwctURzkgpXPX/R5 xeRtBZLtZOsMvxZVTxWNRy1wb89nesn95J5htJ3PGs9c30MdgNg8viRlFHl3u952Q9GoNS0F1Eo PEbLueG4DmCTUZod1qosAWc3mfM5wZMhvgJzI4nag8EFbM081FHlEWTxW X-Received: by 2002:a05:620a:7010:b0:8cf:bbf0:ff55 with SMTP id af79cd13be357-8d01c7df86dmr471919885a.51.1774636548022; 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-clk@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