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: 177272 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp642107ill; Wed, 23 Oct 2019 05:22:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqx2LzDcfzlFu0EdALJe9Pwn/Yl3cadvVawy2c23OxwcKZv0dkCUqtArCNBA+khkyIrTzmOE X-Received: by 2002:aa7:8ece:: with SMTP id b14mr10370029pfr.113.1571833352569; Wed, 23 Oct 2019 05:22:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571833352; cv=none; d=google.com; s=arc-20160816; b=aTYo7qiX649Z6+olaeD7jtqI3S8lb1XscxE+4jd5AhUKtu7kgqnscfSjqZbXPoIBQx gTX3GOonWZRc0Bb+wpJ6jZ8VYUkJrmXAAwLmfz1XLwUM4VLOL7gegaiUcfaoJ2UlgNIO rwd7Cgbi3uvjyNzdXmnJt0HZfya8o41rb4um5B4J209hC7216C0i4X2y64a+h/1mdoXE Bf+k7yB9t4fEFLM3vP+bPFpZAz69KUJqWxboSk2OG39los+6BOy1DFlhBKM4LNrfUZXq 1MkQw+iAZ52nQofqApbRSql182lv0HWG6UxC0btpdmRaCmHO/C8yfUELPXF3PQmmZLz+ h8mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:delivered-to; bh=zJG3Gg2ukeRE3Z2lW6vvZ/QbbXFZA/amDzITTi8og7g=; b=HVmQMMPvwWaop25bMecFTqZr5fFYtCZ4gKM6P4/+0uLJNrCZhyTUFifVhGOfLS/Ktj fBrSnZkFrhNHmi6AfKLz9d2wLGDRySKy/4it+CdLqdJeYA9ANbTJKwlRnJjg0HZ2T9i+ Ubjtk3c8Vxvu/WQs4OjmCOcy3Ko8eruKp2beXd2Ga/RrX3krWtCBviUTYfMeRb5+uwP7 VKVM4D8h48DXel+kVQGUHsSxfVn19ORk38/l0gbpIhsQA8EYNBMfbRTK5EKCBNYgDxvf uKaIfwOJqtBZJyw4+ZG7UD4LQF+b6IiLKczaLBlrhJWo3GG7v6IDPbjkk+RM5SM+A4nO 1UGg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id d24si10474585plj.161.2019.10.23.05.22.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Oct 2019 05:22:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com 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-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 --- 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; }