From patchwork Wed Oct 23 12:21:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomeu Vizoso X-Patchwork-Id: 11206501 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 92A04112B for ; Wed, 23 Oct 2019 12:22:32 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7B334214B2 for ; Wed, 23 Oct 2019 12:22:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7B334214B2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=collabora.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AE4CB6EA77; Wed, 23 Oct 2019 12:22:31 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by gabe.freedesktop.org (Postfix) with ESMTPS id A019F6EA77 for ; Wed, 23 Oct 2019 12:22:29 +0000 (UTC) Received: by mail-wr1-x444.google.com with SMTP id o28so21847315wro.7 for ; Wed, 23 Oct 2019 05:22:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=e3FCsAeT5K9ZdHIcSbJyMOoHwnh6UPbcGp5phHrUoac=; b=Vt9/wxvP5fyoAsM4RhfJo1VaukH72ObWA0f3SJzXqXSuw1p1HRCp12D/L6sKQvWTR5 taronmVfAmR1VbBQ/sHskFih5pEVnWBdnpZfciH0yeri+ssXceSseRy/xyO7lZ6G+rFA fB7LC6gM0QjYxfEdV1sxOhqOLaE3M+Tw4VMfQQQViurdrDMTQjHz1jm4Di+CaPGEI6KS 3eydEq5vv7+8B9SwD9KD63KwmQWuOjlRXxBe5W48vL8Rb4uqz1WQFjawOg+wVMkc6nt7 +eQ4IDHbXFJx/LXfK57QBpHYqD+7Dn4uE8rctNmZO2Xi+fKPuE4DIPwOGOm94wwUMycr m+3w== X-Gm-Message-State: APjAAAUMM1Vq3o+myIljrZHSC+fCq7Z3HSktkMuYD0cpIkamoUVFGSw1 1Uatks6SZRZmOHn34Ti71Fw= X-Google-Smtp-Source: APXvYqw1NcJwe73jzpm/8PbdxicLWL/zyK/dS0vS9s2mDoXESRNQsH6ykzl6XO+SGpl9tHwnGk+JPg== X-Received: by 2002:a5d:614e:: with SMTP id y14mr8543618wrt.329.1571833348216; Wed, 23 Oct 2019 05:22:28 -0700 (PDT) Received: from cizrna.lan ([109.72.12.196]) by smtp.gmail.com with ESMTPSA id x21sm9773421wmj.42.2019.10.23.05.22.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2019 05:22:26 -0700 (PDT) From: Tomeu Vizoso To: linux-kernel@vger.kernel.org Subject: [PATCH v2] panfrost: Properly undo pm_runtime_enable when deferring a probe Date: Wed, 23 Oct 2019 14:21:57 +0200 Message-Id: <20191023122157.32067-1-tomeu.vizoso@collabora.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191023120925.30668-1-tomeu.vizoso@collabora.com> References: <20191023120925.30668-1-tomeu.vizoso@collabora.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=e3FCsAeT5K9ZdHIcSbJyMOoHwnh6UPbcGp5phHrUoac=; b=i4gpfqIdPEPkJ1QTxEJgpm5N7TxdtUNBaeo3ktliHpa/YrfYV2a3i2DLSwCxuUukH9 5TBN+AvjFQiQA0UV/Hkv6aO5jNaR4406iJlviEAeXPGBQaTJ5GD0Kdm8oFZ1SzW+QcXp iF+D5gv+SV4HN074ghZz+TnklNwpyqUjIAwUMtudRiYI1ar4jdk21PUbwtx/1FHTsU2k 61hNyMVQzIbPy8GPcmcLnu0hTRDyF2h0Fc1ULq+DPnDucNhBlXLz5rfO32KQr34Trwlf 7RBEdT//fDSlbCU/5Z/W7DqNLzDRCiJGL7TqE/xY5T5qCc9qf7iV1yzXr9sEZu5nAg/T PJwg== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tomeu Vizoso , David Airlie , dri-devel@lists.freedesktop.org, Chen-Yu Tsai , Robin Murphy Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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") Reviewed-by: Robin Murphy Reviewed-by: Steven Price Tested-by: Chen-Yu Tsai --- 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; }