Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp5753636ioo; Wed, 1 Jun 2022 11:51:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7DDd5M6Nn1004ZND0KRwowlJdt5ZLoZgScURyqcOeUtnaIx+es06aW9u8pxc4R7y0pZpo X-Received: by 2002:a17:907:1c0d:b0:6fe:fe29:566b with SMTP id nc13-20020a1709071c0d00b006fefe29566bmr860178ejc.588.1654109466204; Wed, 01 Jun 2022 11:51:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654109466; cv=none; d=google.com; s=arc-20160816; b=gOXIBk0VAqcpw8Kn8nhynxdb48h7nTNnFhHejkRDcOKEYnGorCqjPKB8hT5ryPZNnb bzwTTUJ0vV0gyaU3x3FIg3NFPUlroaFVHPvn8Zqtxd8FiGt6Vf7cuG3IkE70sTBWOFC8 z7/gBdVIa5VlUhpKhkNHaRfIpo8C0yB5Xz30OD2vzvzE/BHFhm0E3Hlbnf0JvQDuFaXB FoHRhzRc7PPF4Z/WCoFcDbNKb1G7eF/tVZlYazBhPwiwXtGcST+tyMIXRarvBqECg/2L MVUmDwYM8RVZABAR1yGmYZUUhmkHQ4CoZZ1rAVSUm2cCRmW8xz6kCfPVD5m9XXJBbfCK WLJg== 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=ZSLV3GBQBnlAV5yFp3A4v28u1Gnmik85ogLelASJBlM=; b=shqJpYB1ixU0QQASyAJ4N8mYUgqU/jYnVlH1+QxGJdSE6hIwxa8Il1FAe1tqpxDokz Utg4hGp6GvEofl4XKZO+jfG0TJYduBM2JwY3XlDEMTE5q3oOUJ6+vvKDkGa9BbM/PHRR p5afYU2jgi3KLJBAupg4cG/UxKo/FyXgvh8/YNQtxLAB6N7TL7JJCr5/wNQMIw9jpdPa +Ls63i1zID1TOYO5sU+K5L2RnBu8H5eYt4Z+Wq6ipVIi3yFO8A5Mc7kLa9ikAx4q63Bg qlw/utScB+JIMm75A8MgXYeGQtFTRTyrLmLWx4ZQgHZiuxCZRn9LUq5hUhUPV3Wol+8D DAsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="G6+2ri/V"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id s16-20020a1709060c1000b006ff27ae5429si2298485ejf.133.2022.06.01.11.51.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 11:51:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="G6+2ri/V"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BA5AE6153; Wed, 1 Jun 2022 11:41:46 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348040AbiEaVjP (ORCPT + 99 others); Tue, 31 May 2022 17:39:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233809AbiEaVjN (ORCPT ); Tue, 31 May 2022 17:39:13 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05E3E69296 for ; Tue, 31 May 2022 14:39:12 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id rs12so29069863ejb.13 for ; Tue, 31 May 2022 14:39:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ZSLV3GBQBnlAV5yFp3A4v28u1Gnmik85ogLelASJBlM=; b=G6+2ri/VlQ8yFwFXj74MfREI3aG4EAj3Tv4RTyXriFCkuNZgqqsE6YEb+RI1MiiG6u jUrvLmn+pmyEOMkFGPDQlwvGDysPypwMJAL+4flzyKzCAEFIQRRucXeADWRCWhYR2I6f ciei005AA9QQiQXNIDi8ojvPdlBRv+7S4gA7I= 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=ZSLV3GBQBnlAV5yFp3A4v28u1Gnmik85ogLelASJBlM=; b=XWwLLmFrQuZRbXJAkfNK4dEIgZdwTYN/8tNJuXa63T/Ezq9JgcFPDShpbSsSQ0OMKP acjbhjStyGWWirKXKD1S7n0ywtJc8gfnPJW/uAdndwT7G2tvgNq8A5mn011F6+k7fmDP HPvPYZ4LxjW6PuncAYAXc5MQj7fJ7YH8//CxnBdPoXhAzqNSCukLzb8WA7PnDFXN8dkU UVf5tirJVyTTIfojKMu4QZEuZofWpnSYlCyAU5Ggcpv60du8J/zleP1tQBcRE/9CyTXs BGFtS71QHZvlZXaaRF1RLznzOIK5S9dDlEIiO930ZkDeHQSTKHuZhMKnd//Q5pXHy+J3 yGJA== X-Gm-Message-State: AOAM5310X7619r8fqZuNFCTTQQBBs/IRf1UxGpWaG/cSFlTLT1K8cJoo sFPIIz+mfpVo2u20kPqJ3jRskQFOEbyrx+W5 X-Received: by 2002:a17:906:7954:b0:6fe:d9af:feb0 with SMTP id l20-20020a170906795400b006fed9affeb0mr39867804ejo.361.1654033150385; Tue, 31 May 2022 14:39:10 -0700 (PDT) Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com. [209.85.221.45]) by smtp.gmail.com with ESMTPSA id g3-20020a1709063b0300b006feb3d65330sm5318223ejf.109.2022.05.31.14.39.07 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 31 May 2022 14:39:08 -0700 (PDT) Received: by mail-wr1-f45.google.com with SMTP id q21so9137925wra.2 for ; Tue, 31 May 2022 14:39:07 -0700 (PDT) X-Received: by 2002:a05:6000:1548:b0:20f:c4e3:637a with SMTP id 8-20020a056000154800b0020fc4e3637amr41857017wry.513.1654033146812; Tue, 31 May 2022 14:39:06 -0700 (PDT) MIME-Version: 1.0 References: <20220531072757.1.Ie7f6d4bf8cce28131da31a43354727e417cae98d@changeid> <1ce24f74-3c9e-60ed-46ad-3ba714fb7c61@quicinc.com> In-Reply-To: <1ce24f74-3c9e-60ed-46ad-3ba714fb7c61@quicinc.com> From: Doug Anderson Date: Tue, 31 May 2022 14:38:54 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] drm/msm/dpu: Move min BW request and full BW disable back to mdss To: Abhinav Kumar Cc: Rob Clark , Dmitry Baryshkov , Bjorn Andersson , Daniel Vetter , David Airlie , Kalyan Thota , Sean Paul , Stephen Boyd , dri-devel , freedreno , linux-arm-msm , LKML Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,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 Hi, On Tue, May 31, 2022 at 2:29 PM Abhinav Kumar wrote: > > > @@ -136,6 +178,13 @@ static int msm_mdss_enable(struct msm_mdss *msm_mdss) > > { > > int ret; > > > > + /* > > + * Several components have AXI clocks that can only be turned on if > > + * the interconnect is enabled (non-zero bandwidth). Let's make sure > > + * that the interconnects are at least at a minimum amount. > > + */ > > + msm_mdss_icc_request_bw(msm_mdss, MIN_IB_BW); > > + > > This patch does two things : > > 1) Move the min icc vote from the dpu_runtime_resume() path to the > msm_mdss_enable() so that while resuming, we add the min vote to the > parent device. We do need a min vote before turning on the AXI clk as > per this comment mentioned in c33b7c0389e1 (drm/msm/dpu: add support for > clk and bw scaling for display) > > > @@ -1101,8 +1129,15 @@ static int __maybe_unused > dpu_runtime_resume(struct device *dev) > struct drm_encoder *encoder; > struct drm_device *ddev; > struct dss_module_power *mp = &dpu_kms->mp; > + int i; > > ddev = dpu_kms->dev; > + > + /* Min vote of BW is required before turning on AXI clk */ > + for (i = 0; i < dpu_kms->num_paths; i++) > + icc_set_bw(dpu_kms->path[i], 0, > + dpu_kms->catalog->perf.min_dram_ib); > > So I understand and I am fine with this part. > > 2) Add a min vote in msm_mdss_init(). > > This is the part I am not able to fully follow. > > If we only need to add the min vote before voting for the clocks, adding > it in mdss_mdss_enable() should be enough. > > Do we need this part of adding the min vote to the msm_mdss_init()? > > If so, why? Ah, good question. Mostly I was matching how things were done before commit a670ff578f1f ("drm/msm/dpu: always use mdp device to scale bandwidth"). Before that commit we used to put the min vote in the init path. ...but you're right, I don't see any good reason for it. I'll send a v2 removing that line from msm_mdss_init(). -Doug