From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12A86C433FE for ; Fri, 5 Nov 2021 04:32:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E794B60FC0 for ; Fri, 5 Nov 2021 04:32:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231858AbhKEEfe (ORCPT ); Fri, 5 Nov 2021 00:35:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231708AbhKEEfc (ORCPT ); Fri, 5 Nov 2021 00:35:32 -0400 Received: from mail-ot1-x32a.google.com (mail-ot1-x32a.google.com [IPv6:2607:f8b0:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C59BC061714 for ; Thu, 4 Nov 2021 21:32:53 -0700 (PDT) Received: by mail-ot1-x32a.google.com with SMTP id t21-20020a9d7295000000b0055bf1807972so3305031otj.8 for ; Thu, 04 Nov 2021 21:32:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kali.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=e7wV/zXlbFEZLefjaI+cZ2mUrOMI6pJgxRuHVeGTiB0=; b=YnYsM26Rs+Xf8pXIQ5nENuN+3ANyFaM6dkQjCLCP7Ir99A28SjSRGrkLaVtovNqGAb kXGyJRInVW3Mtkd6uetRuQXo7TIlSwBojh1OY+AEL6vmyOrgBb9vuke1dNfO34Ogmk81 0id+xA535P1bR386wD0sBznxFSt1DRTXkNXILdHMk4eFKQtLxNuXrYU/Gx5URa3N3ORj ZPKDNdxwYqziFSBrkQIT7z8pXgkYc8KVAb4I/kBduklg9VRYe9wud4sT0867QFkUpFp5 bgwRsM43YiwqfVOtFG1TWyxjHCYEGMVXLruAZgdafFefPZFR7KlQLCYVgqJjIuVkvQ0C Oa+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=e7wV/zXlbFEZLefjaI+cZ2mUrOMI6pJgxRuHVeGTiB0=; b=P2LAxgywzVOWmeG7G3FxT2yvhKSvxhbIYQ89x4GrETa5k94yEkpgsCwCwlTRpfmB4I EvXfKUfhSz9OsuFW8GQzUOy6aoQdJr/xSb3D4WE9dpnWgC+IjkHO9xwXSAulS2j48b/L Dh7gYWm46BkM7eHd73iuDUptE1vMLxobpV0q/hJ5WlB92ae0mRyvEn0L1qjnkY9Jgccp HUxEvTM5+Dm6JrmAdjVidaNutkcXNw8B3AnRQU8daIhmagT0YFFOIxFAJ11aXejKcXKQ 4qfSbK0u6jaZdtm3YfES3dZWMD/oW7UXIBWW6w4wcuAYES+M99u942IPioFhnHlxCXEp y6kA== X-Gm-Message-State: AOAM532x4EHnNspjhZMdARLBLPfMzZzbK0wNUzKdd3kRxQg2TudDQUTI RMTshAgms019VKX+Dua01yqWUA== X-Google-Smtp-Source: ABdhPJz149yEAnlzEutepXMNcT57vxTomZmWHg5AgNejKGnvWASOFZ022mCwDSj4uZFjon3aCelt8g== X-Received: by 2002:a9d:7d8c:: with SMTP id j12mr34638887otn.373.1636086773005; Thu, 04 Nov 2021 21:32:53 -0700 (PDT) Received: from [192.168.11.48] (cpe-173-173-107-246.satx.res.rr.com. [173.173.107.246]) by smtp.gmail.com with ESMTPSA id w10sm1506327otk.51.2021.11.04.21.32.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 04 Nov 2021 21:32:52 -0700 (PDT) Message-ID: Date: Thu, 4 Nov 2021 23:32:51 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.2.1 Subject: Re: [PATCH] drm/msm/devfreq: Fix OPP refcnt leak Content-Language: en-US To: Rob Clark , dri-devel@lists.freedesktop.org Cc: linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, Rob Clark , Douglas Anderson , Sean Paul , David Airlie , Daniel Vetter , open list References: <20211104222840.781314-1-robdclark@gmail.com> From: Steev Klimaszewski In-Reply-To: <20211104222840.781314-1-robdclark@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/4/21 5:28 PM, 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 | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/msm/msm_gpu_devfreq.c b/drivers/gpu/drm/msm/msm_gpu_devfreq.c > index d32b729b4616..9bf8600b6eea 100644 > --- a/drivers/gpu/drm/msm/msm_gpu_devfreq.c > +++ b/drivers/gpu/drm/msm/msm_gpu_devfreq.c > @@ -20,8 +20,6 @@ static int msm_devfreq_target(struct device *dev, unsigned long *freq, > struct msm_gpu *gpu = dev_to_gpu(dev); > struct dev_pm_opp *opp; > > - opp = devfreq_recommended_opp(dev, freq, flags); > - > /* > * If the GPU is idle, devfreq is not aware, so just ignore > * it's requests > @@ -31,6 +29,8 @@ static int msm_devfreq_target(struct device *dev, unsigned long *freq, > return 0; > } > > + opp = devfreq_recommended_opp(dev, freq, flags); > + > if (IS_ERR(opp)) > return PTR_ERR(opp); > Testing this here on the Lenovo Yoga C630, and I'm starting to see in my dmesg output [   36.337061] devfreq 5000000.gpu: Couldn't update frequency transition information. [   36.388122] devfreq 5000000.gpu: Couldn't update frequency transition information. [   36.810941] wcd934x-codec wcd934x-codec.3.auto: Port Closed RX port 1, value 4 [   36.811914] wcd934x-codec wcd934x-codec.3.auto: Port Closed RX port 2, value 4 [  198.794946] devfreq 5000000.gpu: Couldn't update frequency transition information. [  198.845698] devfreq 5000000.gpu: Couldn't update frequency transition information. [  502.285421] devfreq 5000000.gpu: Couldn't update frequency transition information. [  502.339427] devfreq 5000000.gpu: Couldn't update frequency transition information. [  503.361469] devfreq 5000000.gpu: Couldn't update frequency transition information. [  503.412757] devfreq 5000000.gpu: Couldn't update frequency transition information. [  503.871480] devfreq 5000000.gpu: Couldn't update frequency transition information. [  503.922712] devfreq 5000000.gpu: Couldn't update frequency transition information. [  503.974474] devfreq 5000000.gpu: Couldn't update frequency transition information. [  504.025501] devfreq 5000000.gpu: Couldn't update frequency transition information. [  505.923563] devfreq 5000000.gpu: Couldn't update frequency transition information. [  505.974513] devfreq 5000000.gpu: Couldn't update frequency transition information. [  510.313052] usb 3-1.3: USB disconnect, device number 4 [  519.677148] usb 3-1.3: new high-speed USB device number 5 using xhci-hcd [  519.793394] usb 3-1.3: New USB device found, idVendor=5986, idProduct=2115, bcdDevice=54.20 [  519.793441] usb 3-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [  519.793472] usb 3-1.3: Product: Integrated Camera [  519.793495] usb 3-1.3: Manufacturer: SunplusIT Inc [  519.861020] usb 3-1.3: Found UVC 1.00 device Integrated Camera (5986:2115) [  519.892879] input: Integrated Camera: Integrated C as /devices/platform/soc@0/a8f8800.usb/a800000.dwc3/xhci-hcd.1.auto/usb3/3-1/3-1.3/3-1.3:1.0/input/input27 [  520.283839] devfreq 5000000.gpu: Couldn't update frequency transition information. [  520.335854] devfreq 5000000.gpu: Couldn't update frequency transition information. Is this intended?