Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3111363pxp; Tue, 8 Mar 2022 07:56:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJwnrct8JHbVvXaNZg8l8C3yk9bqmuayimL9l3HnFqaUsDD/9MOYgQkPw9gkI+A7r70fmS5n X-Received: by 2002:a05:6a00:b92:b0:4f6:dfe0:9abb with SMTP id g18-20020a056a000b9200b004f6dfe09abbmr16286034pfj.68.1646754986099; Tue, 08 Mar 2022 07:56:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646754986; cv=none; d=google.com; s=arc-20160816; b=j3tF9lgDTkivsaIe4qRCcLZ61+YEArqslJLB5PwqhkYXoDdKWjiIpkz3ywvRZLWzXV W6fBHYJs2VL0EyZ2b0CSkaVqy/c2/28rfcw2LHgsO4moAJzD2C06bor/PeyoQkO1HNFQ bNDB/02hcKsya76uNWkExkGtgNtZXEas2lhZSlx61EXxcQm/skYFyAM9PQj4+6gL4/8K GLfUemjI0CXPh6fu42UNMkIuxuz0GMUqpHovrGYddpTAc7IxCMgpNukvHoPU6jmk3nFS Q8nXXv5cR/QXgGmExyuKjsgtQ/zEdgMsedM/rpfHP1AMpiyPR97F4QPPlXV4Ov60MOF5 rw4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=5S46HqKw5WhnAEBV/cYGBkiY8K6uLIFtiOgeL4GLg/g=; b=yFAsD3BShK5irZ1Y4ojF+XTREBKO7OkJFewWLbqyXc4IEnDp5PmWIzk7PGtili5Oyt SpsLGOO56kp6WHKWVkNKas4hKIbsPQh/vlJKQWVZCe7NacKsyvw/f0WRKELKVA+An+d1 sbD0sPlAQKE8ncRh+1AOPO33s8t0PaPkSPe4rJ/WKpHwzoBW5RcRdsPjMH6LXD2ldfEi Z1on6RwWeo8CmAtN4NKVMy/qnxwjgiSfpM0u0n4qg4Mnoqpo9+hUzktY5mvudJmTOXos 0gu73qBZZu6VoQw+Pfrkn2BfVt3nR8P3g64Yz86OeiDD0hyxd/fdz52L7rXxq2MAE0FK prQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Q0rJy5Mj; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k18-20020a63ff12000000b00373e14b3b79si15981329pgi.74.2022.03.08.07.56.09; Tue, 08 Mar 2022 07:56:26 -0800 (PST) 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 header.i=@linaro.org header.s=google header.b=Q0rJy5Mj; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244118AbiCGQXS (ORCPT + 99 others); Mon, 7 Mar 2022 11:23:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241657AbiCGQXR (ORCPT ); Mon, 7 Mar 2022 11:23:17 -0500 Received: from mail-qv1-xf34.google.com (mail-qv1-xf34.google.com [IPv6:2607:f8b0:4864:20::f34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7E118BF55 for ; Mon, 7 Mar 2022 08:22:21 -0800 (PST) Received: by mail-qv1-xf34.google.com with SMTP id p8so9444754qvg.12 for ; Mon, 07 Mar 2022 08:22:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=5S46HqKw5WhnAEBV/cYGBkiY8K6uLIFtiOgeL4GLg/g=; b=Q0rJy5Mj2RVlnL23r8fEmZo8WvHaqHVGmelCOha7ZHeXH8sskb82ShLHV4AqlLPGSm z+JyE58pO5XXnG/2aC8gWCpZPID9BQoxY8gwRBl/Dqz9L9+8kViLFXj+OlMQCxu/qEHt heacvfYtjmzMR5cSY4eLKem1LWjz49OsaeOLeJ7otZH1HxtnhMKsngHv0QX25bOodOtc 8RKIpZnRZfUVIER7TfZjpgF3MIv8yofb+3QI98YvcVuPv4yneFzBO2Co2OkvTJPJKIkd ml5Xrn8wRMwTRsjstytR10dPDzQ38uDjqM/xwF9oJmepOXBlum8epWb2oB3I4PzivJhl 4zvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5S46HqKw5WhnAEBV/cYGBkiY8K6uLIFtiOgeL4GLg/g=; b=6S0h6eRC6ATXTyjHz0PC3s2YfpggJzeIVRjc1KwtZpvAVhOTOSDplZ6Bc6K8fv2RVB HGlDPpGhpJaeh/A8dK9XfRJQfxVam77ygYwX5RXUYzpIozjLzFJijYJs9ass/wLH40EK ZsHc57WYGz0zq7FwO1y+V9Daejan6XIh5mD9PJBHVj1ZDvn62VXd3xBfDGYZUIm0GmXU 8wWzlNdANumlmsBH+PxDhhbRyysdijryooMukal4SvQxVQb+00J8pcsKgsnw42v+JqZl n6ayQrYehDogWgQNMwwiZDX+x0hjAvp9oUBujb//WYrUSFlhDPZ4OJa06JmDGw6F0b2J 5MuA== X-Gm-Message-State: AOAM531BpsWTss+Ttl/jAv9Iq29qDiaglnIBM749FBXFqwfitOPQXtj7 tbZcOkjU4+ura2LeNUn4C+0R4zD1xDcAJ15PDp8PwQ== X-Received: by 2002:ad4:53a4:0:b0:430:1d8c:18ea with SMTP id j4-20020ad453a4000000b004301d8c18eamr8762462qvv.115.1646670140889; Mon, 07 Mar 2022 08:22:20 -0800 (PST) MIME-Version: 1.0 References: <1646300401-9063-1-git-send-email-quic_vpolimer@quicinc.com> <1646300401-9063-5-git-send-email-quic_vpolimer@quicinc.com> In-Reply-To: From: Dmitry Baryshkov Date: Mon, 7 Mar 2022 19:22:09 +0300 Message-ID: Subject: Re: [PATCH v4 4/4] arm64/dts/qcom/sm8250: remove assigned-clock-rate property for mdp clk To: Vinod Polimera Cc: Doug Anderson , Stephen Boyd , quic_vpolimer , dri-devel , linux-arm-msm , freedreno , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , LKML , Rob Clark , quic_kalyant Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 7 Mar 2022 at 19:05, Vinod Polimera wrote: > > > WARNING: This email originated from outside of Qualcomm. Please be wary > > of any links or attachments, and do not enable macros. > > > > On Sat, 5 Mar 2022 at 00:49, Doug Anderson > > wrote: > > > On Thu, Mar 3, 2022 at 4:16 PM Dmitry Baryshkov > > > wrote: > > > > > > > > On Fri, 4 Mar 2022 at 02:56, Stephen Boyd > > wrote: > > > > > > > > > > Quoting Dmitry Baryshkov (2022-03-03 15:50:50) > > > > > > On Thu, 3 Mar 2022 at 12:40, Vinod Polimera > > wrote: > > > > > > > > > > > > > > Kernel clock driver assumes that initial rate is the > > > > > > > max rate for that clock and was not allowing it to scale > > > > > > > beyond the assigned clock value. > > > > > > > > > > > > > > Drop the assigned clock rate property and vote on the mdp clock as > > per > > > > > > > calculated value during the usecase. > > > > > > > > > > > > > > Fixes: 7c1dffd471("arm64: dts: qcom: sm8250.dtsi: add display > > system nodes") > > > > > > > > > > > > Please remove the Fixes tags from all commits. Otherwise the > > patches > > > > > > might be picked up into earlier kernels, which do not have a patch > > > > > > adding a vote on the MDP clock. > > > > > > > > > > What patch is that? The Fixes tag could point to that commit. > > > > > > > > Please correct me if I'm wrong. > > > > Currently the dtsi enforces bumping the MDP clock when the mdss > > device > > > > is being probed and when the dpu device is being probed. > > > > Later during the DPU lifetime the core_perf would change the clock's > > > > rate as it sees fit according to the CRTC requirements. > > > > > > "Currently" means _before_ ${SUBJECT} patch lands, right? Since > > > ${SUBJECT} patch is removing the bump to max. > > > > Yes. 'Before this patch'. > > > > > > > > > > > > However it would happen only when the during the > > > > dpu_crtc_atomic_flush(), before we call this function, the MDP clock > > > > is left in the undetermined state. The power rails controlled by the > > > > opp table are left in the undetermined state. > > > > > > > > I suppose that during the dpu_bind we should bump the clock to the max > > > > possible freq and let dpu_core_perf handle it afterwards. > > > > > > Definitely feels like seeing the clock to something predictable during > > > the initial probe makes sense. If it's just for the initial probe then > > > setting it to max (based on the opp table) seems fine. > > > > Vinod, could you please implement it? > > > > > I think an > > > earlier version of this series set it to max every time we did runtime > > > resume. We'd have to have a good reason to do that. > > > > Yes, this is correct. Based on the comments I had the impression that > > there was a suggestion that the place for the calls was wrong. Most > > probably I was instead projecting my own thoughts. > > > I had discussed internally with the team. Traditionally, mdp clk vote during > probe/bind is required when display is turned on in bootloader and persists > till first update in kernel. Not each and every board has a display setup in the bootloader. For example the RB5 I have here doesn't support setting up the display. Not to mention that we should tell Linux, which vote is cast, otherwise the .sync_state can turn respective votes off. > As in chromebook, timing engine will be turned > off during depthcharge exit and as there is no display transition from > bootloader to kernel, mdp clk can be voted based on the calculated value > during framework update and does not required vote during probe/bind. Generally Linux should not depend on the bootloader setup. You can not be sure. What if we kexec next kernel? -- With best wishes Dmitry