Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2629798pxj; Mon, 10 May 2021 07:21:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyP1Iib+dYSDwELYtLW0f0ceXDCYplpRZQM8jEsVdbEbG92ZgxjNN1Vd4udhKbysEmFdDha X-Received: by 2002:a02:a30e:: with SMTP id q14mr21789551jai.4.1620656499274; Mon, 10 May 2021 07:21:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620656499; cv=none; d=google.com; s=arc-20160816; b=ir4I/dXlEOX67lMF24kbftoK64e+gRo3/5YIxhLukeIqQXYYZD7O9rGqmNNmjVlAJN S6OB+y+T3hgE+LumjrcJwOSXw6k44S1BckShBBQDGjGrp/xu041/G0Zs5e40Owcuu7d6 boW5EEHJmisQkQTG+zreDjMEBe+LuWxZUmlvzqvtYehekpxnjzyypfA00ESTKCk0xC8z /QK55tpUZ7VcHmszPc+f7KTJLF76+pm5VLnrJMnlQtMGrnPwXC5u9P33W4C5lTvq78Yf HFsLCUzILUcfLBM3atj9iYCkV2Xfqz41dzQY0Gq2+m3op0TUeJYBAHpXZak/QFZj8Ymf 5nCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=N/tsR4FPpi1SMa4JphRzoqbRD642hzPRhRehPxfLE8I=; b=GjGsaa2N+KB7ET+h8Ui6xi0K9jcvTNreXefdvc0BqPSx2I0pf49vCXUmhK3A0m19zT 9a1dFoDJBis5MrjhUVKpl0VWwtK1E7NvT5pPrTUkZBaFGsMrbWv1kdn87O2fXBSsPYje LSmpJk5ZNauECgA3HijiNkOK8ks1Sfbg2fHVqkVcXqL7xHrFqUaBmV1LIbSno0gVEYoE OyG437sfE9nm1meUfKSVvWffWYyIs6AD5nAsKZrrmBvFo3D5Kfi+zR/OBUa0M2uh5tZy g2DW7H4p9638C8nCW/eiy5iV5xjs13H0xCOFcYRH8z7fwasd0Wa6JwBPDuXQ815BN9gq N4zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FPrJVgd7; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d18si15481312ilo.12.2021.05.10.07.21.27; Mon, 10 May 2021 07:21:39 -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=@linaro.org header.s=google header.b=FPrJVgd7; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236451AbhEJOVA (ORCPT + 99 others); Mon, 10 May 2021 10:21:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238831AbhEJORw (ORCPT ); Mon, 10 May 2021 10:17:52 -0400 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 904C4C061378 for ; Mon, 10 May 2021 06:54:48 -0700 (PDT) Received: by mail-ej1-x634.google.com with SMTP id r9so24665626ejj.3 for ; Mon, 10 May 2021 06:54:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=N/tsR4FPpi1SMa4JphRzoqbRD642hzPRhRehPxfLE8I=; b=FPrJVgd7V/a2zz2Q0otP08sQFNf/w1p+kVWgnWsOnyKsYCck2v8rIeWPnFO2FuYhuI bE2RHp92aBVZ6n4NZ4rz7Kg1aiRJQf2/EXF+OlgXmVhxhlDFQeVASC/NuoaNhQqd4y6K eEZ8IpC6c0yXpubstKGcroxL6vZ6Vvg8920GalWCq/BAbUgMSK848W/e0xXI2u/FF2Wc vANQekUzQlLLjYdwyGc9ID0Y9UiqrbpgiS4rGltEP4GlJtAZjO6YoErvirmwVdb5eScx M4rjJzY1C/75EVAd9XX9gBT+1w5poDKuWYut+ufz8O3zndjtkL57z4F9xiAxX410Kq4V bYmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=N/tsR4FPpi1SMa4JphRzoqbRD642hzPRhRehPxfLE8I=; b=f/RW3NL0nmlsLutrNoR3HNBGYeLMqoyERSxdMwFYyGedJFlqSI4LWMjCHyXmfYaXHO sA52O2bljHnTZZ0ydW+wKvsBO3Llq0tCMv6EtTEaWIK6G8XUYWF/GVyaeeZaU95LyQVj l3fH10Vrr9vJk1Tw4Afcosj5F9mFOUToB0sp+myZL1GGNMVNN8FkkFDEeeuFiy4Va8iz hlxJ9R2MhlTcMywA7Opy/pQ/2guUQRt40MYc7y75mKWPw5BtiUwsOnkOWbv3xhZ4zyO9 01TAtKD07xmlraJgufz1uorkQnP9g7fjU5YGa1Me8TrjZBIePKYM9d0AekFyyToJvkgH r4iw== X-Gm-Message-State: AOAM532LaKe6aIIxas0r8xEt31nHjHhcbikt3aqEHo1P1YNSI8bbUi7l 8uvEkrIaffkwsJxvyvJUW3gPAg== X-Received: by 2002:a17:906:4809:: with SMTP id w9mr22916796ejq.401.1620654887266; Mon, 10 May 2021 06:54:47 -0700 (PDT) Received: from [192.168.1.14] ([195.24.90.54]) by smtp.googlemail.com with ESMTPSA id v14sm11444780edx.5.2021.05.10.06.54.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 10 May 2021 06:54:46 -0700 (PDT) Subject: Re: [PATCH v5 13/25] media: venus: core: use pm_runtime_resume_and_get() To: Mauro Carvalho Chehab Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Andy Gross , Bjorn Andersson , Mauro Carvalho Chehab , Stanimir Varbanov , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org References: <492e148ae1c7b0a8858c1670037925d3e4adb719.1620314616.git.mchehab+huawei@kernel.org> From: Stanimir Varbanov Message-ID: Date: Mon, 10 May 2021 16:54:43 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <492e148ae1c7b0a8858c1670037925d3e4adb719.1620314616.git.mchehab+huawei@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/6/21 6:25 PM, Mauro Carvalho Chehab wrote: > Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") > added pm_runtime_resume_and_get() in order to automatically handle > dev->power.usage_count decrement on errors. > > Use the new API, in order to cleanup the error check logic. > > Signed-off-by: Mauro Carvalho Chehab > --- > drivers/media/platform/qcom/venus/pm_helpers.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) Tested-by: Stanimir Varbanov Acked-by: Stanimir Varbanov > > diff --git a/drivers/media/platform/qcom/venus/pm_helpers.c b/drivers/media/platform/qcom/venus/pm_helpers.c > index c7e1ebec47ee..d0fddf5e9a69 100644 > --- a/drivers/media/platform/qcom/venus/pm_helpers.c > +++ b/drivers/media/platform/qcom/venus/pm_helpers.c > @@ -990,9 +990,8 @@ static int core_power_v4(struct venus_core *core, int on) > > if (on == POWER_ON) { > if (pmctrl) { > - ret = pm_runtime_get_sync(pmctrl); > + ret = pm_runtime_resume_and_get(pmctrl); > if (ret < 0) { > - pm_runtime_put_noidle(pmctrl); > return ret; > } > } > -- regards, Stan