Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp777091rdb; Wed, 1 Nov 2023 02:18:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFO2/zsuWuzq5OBR7ciCteSH+D6LRXyUn1A4hUG7eArSFE5WgKn5CupHZ+0kATW+1qpY1OV X-Received: by 2002:a05:6a20:840d:b0:180:7df:76ab with SMTP id c13-20020a056a20840d00b0018007df76abmr9480837pzd.44.1698830334410; Wed, 01 Nov 2023 02:18:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698830334; cv=none; d=google.com; s=arc-20160816; b=XtQ1OVOirzz2kxBmodMY/HVftte9V9HxPt6J1xAHoWZQyaYr1zDOb3p3ursKA2jdkU CMQRkDu4OxZkRraFmJ+yRjngI5eDpkbSx9gLZgDWaVBXHU0iTyInjnB59s9aOjDre9JI 6sHwY3D1tATvprf2uBeXh5B+4j1uu7QDFXwiWDWd/S016F4iJ0OyKEiSgyE5FZ5UrJSp uur45qeXse1fqG1FhUUX5PycgwzrR2a0IhkVxzTwZ4UzwfpKvpL8ca29/adSS5pstIXj KT/nANgBZ48Ypp0pl3HQgcHpcX6GTI9/AKIQk3326Ysl6vrYjEXVuiqEBSg/zRHjEdut 63/Q== 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=cM5qdD63oHiwProA2gXdY43xgxS/+Mvt34vJ4dBKG2k=; fh=IpenHstmzluQ2qG4rgZds4W72uLPbZNMEjQq5GLr0+k=; b=IVXv8wIob1f3u3hHdeN4aqHwQyD0OLNpN7mIMsPPBhy2SlrnWFbyzJVnZ3fPe2YrR0 yAF92EzHc4mpW9+u0/o6uwWeVHHKJUPqzUujSkS3PSpvv/e8+pItl9EveVG/fTUuBqdW a/Rmce1GAlJX7shRFRUolTcoogukwfARvfedPdVRcWYOs7dgm68bOePkcZ/Sw1koAaGk lakblvwQ+XH5j6nFXng+NV+hH3QJoQsmgjs2UqVC/2BvO5Vwj1+xuHZn5JDueKjuVzSm FUcAt2J4KoYfGuvwIoV9IxxZxzlTpk4HohKpq0hsLQvbjdOAqmaZqn7TLUj4tnG56R9O yu9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=o2mRwQzu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id km15-20020a17090327cf00b001cc5f995bccsi2494290plb.182.2023.11.01.02.18.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 02:18:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=o2mRwQzu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id AD739804779D; Wed, 1 Nov 2023 02:18:51 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233983AbjKAJSs (ORCPT + 99 others); Wed, 1 Nov 2023 05:18:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230146AbjKAJSo (ORCPT ); Wed, 1 Nov 2023 05:18:44 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2315EF3 for ; Wed, 1 Nov 2023 02:18:37 -0700 (PDT) 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 D826E7F8; Wed, 1 Nov 2023 10:18:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1698830298; bh=gkIBd5+fMV46AC7d0uwLpkNL1fVDY+8sAYxHxQO4ANk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=o2mRwQzu+y+EV3qM9yFl6nfauKT2y7VcnTtn8wCh+NPKjDdmlxzVOFIouNOYvo3/Q wPTnw/uwXe0nrTTwCbKXII0J4TBcA02J7f2pW9Z09jJaPX+ss56DPnzQhBDbW8eNn5 wazuHRifULXVGzoeuY+EkIOl8P8uAakZgHC8Rpec= From: Tomi Valkeinen Date: Wed, 01 Nov 2023 11:17:38 +0200 Subject: [PATCH 01/10] drm/tidss: Use pm_runtime_resume_and_get() MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20231101-tidss-probe-v1-1-45149e0f9415@ideasonboard.com> References: <20231101-tidss-probe-v1-0-45149e0f9415@ideasonboard.com> In-Reply-To: <20231101-tidss-probe-v1-0-45149e0f9415@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 , Tomi Valkeinen X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=905; i=tomi.valkeinen@ideasonboard.com; h=from:subject:message-id; bh=gkIBd5+fMV46AC7d0uwLpkNL1fVDY+8sAYxHxQO4ANk=; b=owEBbQKS/ZANAwAIAfo9qoy8lh71AcsmYgBlQhflp0H+oMJh4AKSQ1Ir0s9axU9mj4Jd5D82W 7KdfFko9HaJAjMEAAEIAB0WIQTEOAw+ll79gQef86f6PaqMvJYe9QUCZUIX5QAKCRD6PaqMvJYe 9bCTD/9V0Lh/Xns/cGwDrdHS5OhAzc26iltUq4huG/4tVJYYv2XmPd6R+VH0Z8s9o1C7I3yiunU j9QZRslEBhzf/Tz/uFfzTjPyGxLOlMRxol0YP2oljPMFCX2O440hxKRddhpFRKCq9INj8gq2NFX 8txW/8WLqURoHLOmv8CBL7ANxceY9iMp3ISW+UPBtXo8wlX0P8pircepSn9/dbhlmdL5os9IOPN 4lhrv51b+9qGXKa1OWhI1izPJQthC370HFjrWghKPityx6WWX+iYhIHm9BAKdvK5JSVmoVLpDbe nNp+njQE+t64euRlO0153TDCoiiWcih/4AtUvbBV/PE937sMbqR9k7pxqIlZ9aLkd5XF18+v2we lMepM+F22FQVnK8Dzf6a5kNus7k90Nna0M+BIo3aol2IwPaBz1vIFJzYvtbmadUS7cMWhsOrzA1 FgKqlxWiz8rnrPUZwBsYezqwkuuIIO5dFXkmMkLGLpxgoHDeKjcmxhztSdnYMqvzEWvVndOergC HptBTmZ9F8j4yTSZzGMiMB8TP9l1tzI0X7sGeByKSj4HAdZ06ZngsL4PjEw/bD8fDw1Or7oxYIH xMJ5S88qA4SSXUpP5vwhUgmSv+NERyMT/PMDmUodnZkbRNMuXyAnL2Wh9CCQAntk81Lihb5ihPp G5Tr9Nl2jbqdrSA== X-Developer-Key: i=tomi.valkeinen@ideasonboard.com; a=openpgp; fpr=C4380C3E965EFD81079FF3A7FA3DAA8CBC961EF5 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Wed, 01 Nov 2023 02:18:51 -0700 (PDT) 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. 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) -- 2.34.1