Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3556065pxb; Fri, 5 Nov 2021 18:18:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz0qb8J6A6tUO6xhgEy1FFKxR0jnpZ8fvnE2CLZuOR1E71r5l2GwFE1cGQhFWaK1VUk9KG3 X-Received: by 2002:a05:6e02:1b01:: with SMTP id i1mr26978523ilv.53.1636161498353; Fri, 05 Nov 2021 18:18:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1636161498; cv=none; d=google.com; s=arc-20160816; b=VgQUJlkq8Te8yTc9fodVswevFrRcKpk9i1szrDR7N72mYfW9lf+1ZUYTUCHBtk2YHk xYWSMSpyOmDPXUyZMIqbYCrByFNx9aSZiLE4VnQcrKbEQIM5Ed7qZMB5mtD47vjftikG lAhQkAif/TY77cR5zUOr/riWGQYc4hL5a1fN/oD7s6RcOb7WvC6blZvEyWfFuGpBaLXp PormE7Y185Gx461d6wTkhZHiXqPagDno9eSWDHJO8X05X1Rlr+KBRaqRSXM6tqBXbOfW +24YNJtK3KHCn4EZWtnedbIVAeFAqhRLPi+knXGpFrlvZJwFMfUpasVFT++p4svhZNq/ 0AkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dmarc-filter:sender:dkim-signature; bh=0Jewg2AqBl+1plU7YqOcP1P8dFzpqrVSpl6IXbliAcY=; b=ANqEMp+7GQENaCuKhBKe5XGvRxqU66pSFz8cq16JU+/gB7wQt9Z9TjJIHLhz2ypBdv YsKH9W7w8u0wRt6bNiwhBYCNVXPXeFWZaDTtFN0SRXbgZL0fpfWkMASmxRG1sB7xJYHz 1zmI66RUU02ubGLjSxmVVO8Ts3ueDobDR2a3iVWc/NNZfA5x7iGFN+3/cCOBxxldXtvO P/BJvQuHgU/m04MukICVKVGJ+xTxJauFHTsaKiQf5r32K715OqTYy1qOKLTmGEOIuBOK ZYc+5zKhVmQfZuO/lBQekDftUZrZ/Lg2HeFeJvQIuILFkzlG70tGf/iQpwyfS5POwXiN ZXtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=rjtL0rAD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x8si18478285ilv.176.2021.11.05.18.18.05; Fri, 05 Nov 2021 18:18:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=rjtL0rAD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233905AbhKEVhM (ORCPT + 99 others); Fri, 5 Nov 2021 17:37:12 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:51974 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233890AbhKEVhJ (ORCPT ); Fri, 5 Nov 2021 17:37:09 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1636148069; h=Content-Transfer-Encoding: Content-Type: In-Reply-To: From: References: Cc: To: Subject: MIME-Version: Date: Message-ID: Sender; bh=0Jewg2AqBl+1plU7YqOcP1P8dFzpqrVSpl6IXbliAcY=; b=rjtL0rADfC0U7V5VG/FoWjNGtdnMx2bcu8Hr7x+AmoNYUezu5Z8nxVo06Qd3fnyTHRGguTbd R6YqJeu2ksH9CS9poE8fOBpMiLLEeALGkthasV52DKjBwleCEpYLAPBwyi/nKBzDDoZnPBRu zKeLSErpIy1YnMlEvdq6uOYk1gY= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n01.prod.us-west-2.postgun.com with SMTP id 6185a35f7d93184cc7410935 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Fri, 05 Nov 2021 21:34:23 GMT Sender: akhilpo=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 4D3BFC4360C; Fri, 5 Nov 2021 21:34:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=2.0 tests=ALL_TRUSTED,BAYES_00, NICE_REPLY_A,SPF_FAIL,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from [192.168.1.16] (unknown [59.88.239.205]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: akhilpo) by smtp.codeaurora.org (Postfix) with ESMTPSA id B2B78C43460; Fri, 5 Nov 2021 21:34:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.codeaurora.org B2B78C43460 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=codeaurora.org Message-ID: Date: Sat, 6 Nov 2021 03:04:15 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.1.1 Subject: Re: [PATCH v2] drm/msm/devfreq: Fix OPP refcnt leak Content-Language: en-US To: Rob Clark , dri-devel@lists.freedesktop.org Cc: Rob Clark , David Airlie , linux-arm-msm@vger.kernel.org, Douglas Anderson , Steev Klimaszewski , open list , Sean Paul , freedreno@lists.freedesktop.org References: <20211105202021.181092-1-robdclark@gmail.com> From: Akhil P Oommen In-Reply-To: <20211105202021.181092-1-robdclark@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/6/2021 1:50 AM, Rob Clark wrote: > From: Rob Clark > > Reported-by: Douglas Anderson > Fixes: 9bc95570175a ("drm/msm: Devfreq tuning") > Signed-off-by: Rob Clark > --- > drivers/gpu/drm/msm/msm_gpu_devfreq.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/gpu/drm/msm/msm_gpu_devfreq.c b/drivers/gpu/drm/msm/msm_gpu_devfreq.c > index d32b729b4616..07f1169df89b 100644 > --- a/drivers/gpu/drm/msm/msm_gpu_devfreq.c > +++ b/drivers/gpu/drm/msm/msm_gpu_devfreq.c > @@ -20,6 +20,10 @@ static int msm_devfreq_target(struct device *dev, unsigned long *freq, > struct msm_gpu *gpu = dev_to_gpu(dev); > struct dev_pm_opp *opp; > > + /* > + * Note that devfreq_recommended_opp() can modify the freq > + * to something that actually is in the opp table: > + */ > opp = devfreq_recommended_opp(dev, freq, flags); > > /* > @@ -28,6 +32,7 @@ static int msm_devfreq_target(struct device *dev, unsigned long *freq, > */ > if (gpu->devfreq.idle_freq) { > gpu->devfreq.idle_freq = *freq; > + dev_pm_opp_put(opp); > return 0; > } > > Reviewed-by: Akhil P Oommen -Akhil