From patchwork Thu Nov 9 07:37:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 163267 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b129:0:b0:403:3b70:6f57 with SMTP id q9csp274575vqs; Wed, 8 Nov 2023 23:39:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IG5oqp+FQfaZzLugr7Sw8cPtNfe0fh5T887eWKYmKlv3Z8qnXQPYj8uTFcS2/SkIiXSOVA/ X-Received: by 2002:a17:902:e848:b0:1cc:42d0:dbc5 with SMTP id t8-20020a170902e84800b001cc42d0dbc5mr6558648plg.13.1699515564342; Wed, 08 Nov 2023 23:39:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699515564; cv=none; d=google.com; s=arc-20160816; b=SGqW50l1EQMtc3Sban+LrbfEGrJZI+4fXjD++7HQ0qKEbsGx8khJ/qbRNwTCP4gg1z 3cNMxkscazuXKxnrykzjiYUehduzjvPY7R5E3qQiUXwQuxr62PODiPCY5ueGfqGC/pol x1ATl7uk/kNeeOoz6fRQXa5nSzbyFw6FKQdlAZxTn2h/Mh2bGMnZeGXmYwlwG37jt8LL NFJLCnTAp5DynEGn/+QX1H0CnPkYiL9grmtqHNwDTRPaXTGWLlSgm+rTetugMPpZm5rD zxxoSMRNKwjrJvRFKMbr9WUnjRDrI2v3tuuhbNVUzdTIr12Q/UmBRJq2DDBUaaQ+oNoP Jerg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=7ATsJEFIulozajNgbJDjGqClRnQeHyvCfEio6WH5NIY=; fh=ar9Kuonru+6un71Fc3+cR+miWSr4t5vPPiuWh6IeKvI=; b=PRXR/18PuxJ/d/acDjqjDuP5S9L5voVUizeC75EBh4O7g+VmyGNjjVbMyH3+rctNHd GaYJuao61VxSU0cCpnzFI+bD4NYHT3eazyzfv+zd5uuwvJb2OF29tDLkN8SBfJ5R6GU0 KiofH62mbN7vE2QyNIWP+P78tzNRWVExh6EcwI5jPlY1CL1hjsnxDYnkwxQFsCTz5Bsb 7hiKtyQvpe0dz99jxY5Z5p5/5QefwdOpSLPIocQQIcOMY557xAH+s+EDLwfImnMdVord 9OEUd2MF+ZyDcCDHojIOPzG/WVxoGMTpdMfRe9f6GqKzw9AJtB4eKv1qa2ENH2VgNUU1 QB+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=j6xyRaDM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id f14-20020a170902ce8e00b001b222cd9826si4764293plg.349.2023.11.08.23.39.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Nov 2023 23:39:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=j6xyRaDM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id B5CFE832DCCE; Wed, 8 Nov 2023 23:39:13 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232781AbjKIHiv (ORCPT + 32 others); Thu, 9 Nov 2023 02:38:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229697AbjKIHit (ORCPT ); Thu, 9 Nov 2023 02:38:49 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54662A4 for ; Wed, 8 Nov 2023 23:38:47 -0800 (PST) Received: from [127.0.1.1] (91-158-149-209.elisa-laajakaista.fi [91.158.149.209]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id DE89AAF2; Thu, 9 Nov 2023 08:38:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1699515501; bh=4QrpN0remY7a+J6VizLfc7b4s63ZI1p2RwGVH+9cdlM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=j6xyRaDMQbKBte9nBDiQPWjV74ioRWP+2nYnkXnh0FyrLDk6z5Dwt1H8FkwhS5UDh 4vuENT8g05YNbMb+USR045s6/6vr/A9NVr7u6+tGweleGYMqw/NIQvilVmITgslWmb ALH+6g51eyeS0rhTxZhLU3yJiqM4FWRH8abF+GKo= From: Tomi Valkeinen Date: Thu, 09 Nov 2023 09:37:54 +0200 Subject: [PATCH v2 01/11] drm/tidss: Use pm_runtime_resume_and_get() MIME-Version: 1.0 Message-Id: <20231109-tidss-probe-v2-1-ac91b5ea35c0@ideasonboard.com> References: <20231109-tidss-probe-v2-0-ac91b5ea35c0@ideasonboard.com> In-Reply-To: <20231109-tidss-probe-v2-0-ac91b5ea35c0@ideasonboard.com> To: Aradhya Bhatia , Devarsh Thakkar , Jyri Sarha , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Laurent Pinchart , Francesco Dolcini , Tomi Valkeinen X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=972; i=tomi.valkeinen@ideasonboard.com; h=from:subject:message-id; bh=4QrpN0remY7a+J6VizLfc7b4s63ZI1p2RwGVH+9cdlM=; b=owEBbQKS/ZANAwAIAfo9qoy8lh71AcsmYgBlTIx9R3Be7juvu3cbDA4igiN84v7BvPT0aVvXJ zJeuTmjDzGJAjMEAAEIAB0WIQTEOAw+ll79gQef86f6PaqMvJYe9QUCZUyMfQAKCRD6PaqMvJYe 9SCJEACbeJnBxXR6wHkmfYPIYYjCWXulM6Bgr1xIQQcuZqr9vzIk86dR6KFM0z7rReRsDtdluOz EXtzLew+5jM9R9JvwI5DU/uZrmseigA4DZRkIFQolWs5mJGVFdgCIO/ImVhw6yIBl3DhirYxuXr mG+oCx2v/frd5X9ImjvfVZ+M8thl+7Lti5rePnMIDtGue4nx2Lc/LqA3FxsKLxQOTznbtVFMYSJ OmZofiG2kBjrJ3Inniym+UZryapoVvOr8OSuU6ZIvX2oJMQV32Sk34jQIQ6ULPj86rgUKJKaCZ+ UAxE/j8h9Izf0RkHsLFJlF4wGzWLHicWgySc1YVSnZPvPAPfuZASgWuNmcWlNxIdNxf7AXlaMUy mCvA9qbYtRwyES8B8cQ6PNnzmcKkGM2ppr6pzSmkVJIgQCxbSrMXpk8fD+RTDjAYXqAevuII7MC /x46ucTVzxQwf5e/nrHgX88hrcROe0aC0gor33ZSTOrScGdC9KJSDV4M9ebhpgYDtyX/gmJO9Ud pHXlftVl8yspfdjbn8oUTUYkSXsGZIRTCWROHD77upuxNoAgdfskSQWxQi8FsHgiGTaT4utINXa 1iVTusW5wGQkLyikemMAO9/TQaF9yjasglOh71knN/vRpOggltHZ9KAVp5cKLtArlINTZSzucHC Cks8sZJRK+20Pgw== X-Developer-Key: i=tomi.valkeinen@ideasonboard.com; a=openpgp; fpr=C4380C3E965EFD81079FF3A7FA3DAA8CBC961EF5 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 08 Nov 2023 23:39:13 -0800 (PST) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782071232583565025 X-GMAIL-MSGID: 1782071232583565025 Use pm_runtime_resume_and_get() instead of pm_runtime_get_sync(), which will handle error situations better. Also fix the return, as there should be no reason for the current complex return. Reviewed-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/tidss/tidss_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tidss/tidss_drv.c b/drivers/gpu/drm/tidss/tidss_drv.c index 4d063eb9cd0b..f403db11b846 100644 --- a/drivers/gpu/drm/tidss/tidss_drv.c +++ b/drivers/gpu/drm/tidss/tidss_drv.c @@ -32,9 +32,9 @@ int tidss_runtime_get(struct tidss_device *tidss) dev_dbg(tidss->dev, "%s\n", __func__); - r = pm_runtime_get_sync(tidss->dev); + r = pm_runtime_resume_and_get(tidss->dev); WARN_ON(r < 0); - return r < 0 ? r : 0; + return r; } void tidss_runtime_put(struct tidss_device *tidss)