Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1123608ybg; Wed, 23 Oct 2019 10:41:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqw1iv0zfxMoiaOCfbSMDwoJi2QnDw+ZaAo5nIvOIxpY7Lfb+f3uX4BgGX+lSAqJR16l59eI X-Received: by 2002:a50:84e9:: with SMTP id 96mr11379477edq.182.1571852511664; Wed, 23 Oct 2019 10:41:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571852511; cv=none; d=google.com; s=arc-20160816; b=uLAPEma5JrNo1ozdNOtdR/fTMrgwt7LeyBRvHLTR9Gw5mYVN3cqPwF3dLLPs86kQIN p0VG3vWIVWmAN9KuG8kRTrKxEk4p//GLbeJTBHquoabhB3hvklK2GV38+caiMFDtbQXC 9nIPbEH4mse+d2dyTwDJnT2NUeBqlCRlFvJapzLpXJzv02uI/DVc0g0k5SUCzkibLrxZ 6aoICgtlfq5ErGwvQDp5BN7EdvghJ5ON51kSfb0DwDz6fLym9NwLH2dSs9Nso+HlzwSK nE25L3mBHE07cywUraYZCWG5L7egJfy/dU1j8l5+aDIl9zFQaB+MYvdBzXMMGyeGNM0n 5duw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=5V8BCS59fLfsjIm2PtI19eD4v0mesm8XeyPQfz01qRw=; b=mFqWg+FknAVzb33OpU3Ca92co4M0/RZn1GKhnzutqhMDYq6Bu9lUPKN53aM1g55EAN yulETgsX2RMYqdpeZ7qegymYsm4yplo7SdIK3IvKslqYVCXMi5v7CEtpvSx90ArQJEox y7tV6lp5wTwtU3RRh0l+aeNhqUzYQpcDDIOMPmr8Pbs4jBbyLUL+jvWp7yBQ2HAZCqLd iJU0YVt0Vt3wbDpdJ6W6gc42Ill7hUyIA9ktW2hAThWmdavErYembstkVLm4U6DNH2QF 6pfJj9uD67iR1ihUfR3hApq1ZORYAE/hdddrIqFxWjKKXNrEAjUp0oxqLCU9GVGQTQG3 I1aA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x8si13692119ejs.414.2019.10.23.10.41.26; Wed, 23 Oct 2019 10:41:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391710AbfJWMue (ORCPT + 99 others); Wed, 23 Oct 2019 08:50:34 -0400 Received: from [217.140.110.172] ([217.140.110.172]:51214 "EHLO foss.arm.com" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S2390892AbfJWMue (ORCPT ); Wed, 23 Oct 2019 08:50:34 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A15964A7; Wed, 23 Oct 2019 05:50:05 -0700 (PDT) Received: from [192.168.1.123] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7A62D3F6C4; Wed, 23 Oct 2019 05:50:04 -0700 (PDT) Subject: Re: [PATCH v2] panfrost: Properly undo pm_runtime_enable when deferring a probe To: Tomeu Vizoso , linux-kernel@vger.kernel.org Cc: Chen-Yu Tsai , Rob Herring , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org References: <20191023120925.30668-1-tomeu.vizoso@collabora.com> <20191023122157.32067-1-tomeu.vizoso@collabora.com> From: Robin Murphy Message-ID: <6952956c-ba58-71de-05c9-fa39333484d9@arm.com> Date: Wed, 23 Oct 2019 13:49:59 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Thunderbird/68.1.2 MIME-Version: 1.0 In-Reply-To: <20191023122157.32067-1-tomeu.vizoso@collabora.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-10-23 1:21 pm, Tomeu Vizoso wrote: > When deferring the probe because of a missing regulator, we were calling > pm_runtime_disable even if pm_runtime_enable wasn't called. > > Move the call to pm_runtime_disable to the right place. > > Signed-off-by: Tomeu Vizoso > Reported-by: Chen-Yu Tsai > Cc: Robin Murphy > Fixes: f4a3c6a44b35 ("drm/panfrost: Disable PM on probe failure") I think that commit was right at the time, but actually we missed reordering the cleanup path to match the change in 635430797d3f. Otherwise, though, Reviewed-by: Robin Murphy > --- > drivers/gpu/drm/panfrost/panfrost_drv.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c > index bc2ddeb55f5d..f21bc8a7ee3a 100644 > --- a/drivers/gpu/drm/panfrost/panfrost_drv.c > +++ b/drivers/gpu/drm/panfrost/panfrost_drv.c > @@ -556,11 +556,11 @@ static int panfrost_probe(struct platform_device *pdev) > return 0; > > err_out2: > + pm_runtime_disable(pfdev->dev); > panfrost_devfreq_fini(pfdev); > err_out1: > panfrost_device_fini(pfdev); > err_out0: > - pm_runtime_disable(pfdev->dev); > drm_dev_put(ddev); > return err; > } >