Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp3326538rwb; Mon, 5 Sep 2022 09:41:52 -0700 (PDT) X-Google-Smtp-Source: AA6agR5I/oEzwwuTnnjcITzrbmJEVrlrWrEPNmOwkgc7hsKc5kSPxCANy2ECuCxOSfREdOV4hnvZ X-Received: by 2002:a17:90b:4b89:b0:1f5:68b:b14e with SMTP id lr9-20020a17090b4b8900b001f5068bb14emr21140366pjb.30.1662396112361; Mon, 05 Sep 2022 09:41:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1662396112; cv=pass; d=google.com; s=arc-20160816; b=sc8grbKU+CUj/QyIZY4BvxAcQpLl1mcEvMX+kbYLQ9xRitIfrfvoF04xRwlGRus13j 2sKUhRpSpWzxm5DJgJF9PiMnAeCjIaSlngFxtP7Vi8ZQJtURm1pYw8HBJGUOfmEJaBBy iFc+Gvrl1XmdK7jf4qgLDVVJN2ePnMNZEPgxlIUsX1iliMEt+ekyMnQD6FRQLsVNeRts X7WST68d+97x3Wbb1gzI1uI2xgFVCsBiLWkkAssNq1Rehf0fUItPDFqeHUE6t92V6AlH tdYDYfJEZbkes41rwZE0ZyY5ub7Plb+nb71DpRP5J6uPzMDJatm/z9K/A5mCpQbRVzw3 U5jw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=1SW65poqpuHHQckIRhIhpciTmFwZuUpATn81B7zZAxg=; b=aQKXmnAtLhqmk+BO/Uwv5ur1Z9566ueMPoXD4Rx8+zdc5BZ0/iG2k0ZgszhlrkZ3aL lXNZFAVoEKio8MXm9w+Bb2AkU7zFFL0Z0XzP99919WCYBt0MQZL0o5omfZ3CM4870FUN 6nlGLxGZdGh0jfUbc0RRqrxpmcXqNKh+dkF/F7NlUdq44DTSNGRW/ahTeOO2TE/9dUSf P+HvCjOb8JxYXmWJ8m1I4UKli1ADRhapLagXQ27IH+0qqf32hZzRNCX014uArYZBEHS1 v1+/n8SCfRTnpQ7LrAYOYgR0iquMtUvaSbANXjpSHzgBO/6Rkw+PgtYA5/RZQrfp506M UzUw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b="fh1G2h7/"; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a8-20020a056a000c8800b005366b1b5a2csi10956562pfv.202.2022.09.05.09.41.39; Mon, 05 Sep 2022 09:41:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b="fh1G2h7/"; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231990AbiIEQgD (ORCPT + 99 others); Mon, 5 Sep 2022 12:36:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231972AbiIEQfz (ORCPT ); Mon, 5 Sep 2022 12:35:55 -0400 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1anam02on2070.outbound.protection.outlook.com [40.107.96.70]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7FE714330A; Mon, 5 Sep 2022 09:35:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ACCm5RDwA+k6QZbmYzeWi10eTh7VWeQPC3l4V/3T6UIzcxAwp8fti9sL2jx+sog+804vNDHri7hNhVUMWJQPBvuxbXxXQZeFXFuVaqC/qWqliO5OWcMTah8l57sA2PN1eOJ1+/4LWPxBsVgHbFM3bMVuuqLo2XIRjIvNqr/5i37uwr3BLQlCiAxmeU69WbhytBfmw8qLTMIn1fEPNiDtBa23nDrbUUdk8W8ANIUyb+qo2xHwXjTdWZOEVnVD8fQ3/cBOcKUtuhyOx7jpzgX6Hea8M4+/vvSG6iSTsCryW01BkLXsKK8GaSaBLV70BvsLyVVT+i9SFdpJFK3SZ7310A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1SW65poqpuHHQckIRhIhpciTmFwZuUpATn81B7zZAxg=; b=mXztTWLWbX8mWgXVzkwG482jfkkjo88rBSAnW7tX5Wy5qFcpWBpnJ9/iXrAtHIjkuPyNQo63+/IrPZ3ZhXXn4ZFeb0Z8EEdjK8XKq/IDCh5WW81uO7uqjDH2AmGPl0HiqzyDGq9+ehQvgz6CFI5KmtwRqpqYpa3d/tVChDbwLbgSqP9eziJ8Lhtd8KMZKj21AACjwQU32he/4iah8qsogb+jgd9WQWNb3O3PH1NIgiN9HXWIkhdbQ015ieGYvX+OoLFToBSH4NQoXkipEHfnIMA4qocpGIcpKPxW8eoX9YKuIGZibflxeycRcBGkiRyJk/zB1BobTdkqceNBfCgh6w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=linaro.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1SW65poqpuHHQckIRhIhpciTmFwZuUpATn81B7zZAxg=; b=fh1G2h7/cByJg8wRVsEkLmCjMEoJF1HuozjfMI0y1H+dnQaoc22Axdizt7GWRPMBP4iBex7dXUzjNworxATIe8SWGqhZXYlJxk3tCCYXb2z0GOVorqW+oXPeskxTkaDvLH+Cp2p+SvAFIIIL8dB+7OGadLOu/fHN1wgHH7wgZ1g= Received: from BN9PR03CA0977.namprd03.prod.outlook.com (2603:10b6:408:109::22) by MW3PR12MB4491.namprd12.prod.outlook.com (2603:10b6:303:5c::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.12; Mon, 5 Sep 2022 16:35:51 +0000 Received: from BL02EPF0000C406.namprd05.prod.outlook.com (2603:10b6:408:109:cafe::ae) by BN9PR03CA0977.outlook.office365.com (2603:10b6:408:109::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.10 via Frontend Transport; Mon, 5 Sep 2022 16:35:50 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BL02EPF0000C406.mail.protection.outlook.com (10.167.241.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5612.11 via Frontend Transport; Mon, 5 Sep 2022 16:35:50 +0000 Received: from amd.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Mon, 5 Sep 2022 11:35:46 -0500 From: Arvind Yadav To: , , , , , , , , , , , , CC: Arvind Yadav Subject: [PATCH v2 2/4] dma-buf: enable signaling for the stub fence on debug Date: Mon, 5 Sep 2022 22:05:00 +0530 Message-ID: <20220905163502.4032-3-Arvind.Yadav@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220905163502.4032-1-Arvind.Yadav@amd.com> References: <20220905163502.4032-1-Arvind.Yadav@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF0000C406:EE_|MW3PR12MB4491:EE_ X-MS-Office365-Filtering-Correlation-Id: 9097f839-af40-43ba-768a-08da8f5cb1bf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WsmxWOMlAexiZ1DGvvhBAVp863qrM+kcaJzOqQ5CKuhhnD9PXUuZRvUomri2cW4r8wsfk8pnAgITk9JHp8xJKJbJZOri3fiEGLDhezM/ajUbjas+WpfwTkqrLjFr8y23J3lzRaqnNBou+ER2VLxXcVO7ots/KcCgT7wW+cnQyEMe9LAXDIjv4SQq2paJ7A+O/61bwPtgOOT7zw6LSPPTAfKcx2TvVOMBcoaXsp4qsmhEPEaCgdq2WhmpvbpASynPlxa+4J2UyIfna9PJwwGzWkhciT7jIS5+pgupZj4iOLn9W1cKdrlx5BtmT2rTVgJ74XHyQ7HEGvRJMK0W6BQ8TuDYv+ymyJOa9AW190dHpUUeJfwTYpO2m/0HHdyqLe9zFSPGc46NGbh2VGT+l6Inu0UO2qVTs/apQ6dhTJHfNQeZgBNBE50TuO6aYuSVnj9jtlu54rdSEe2uYZZ/sHbE7nOArANcFaqVV5pjvaHck1MkXEz3QG0AqMTK94+DwbODU4N3nzyv6jLcOEggBYRj0oHwyeMbfluKSb/3uh7kSMWnZJit8dbHdw9N3PNXDO1i0jLpHxET2r3CyDOL1R35kCTQ+yCfiPr9ishGN3qx2Flo4Q0mDQJo8D4/gyu3qhrhs8D+su/D7RDdSRYC0Uz6Ufa+QxraX2KPYcke1jOOHzY9FDBMB+d1O2yqsaw4TZ6iYJ1kkqBpt3LWxqrvyinQTlsC4G812pJ81MX5fHz88FqnCo4S25B7DOzPSXmlPjb4yfe1bFcbbYTMEvLO0SpxQyiyjGPDsyV4AoDPPbtLTGzBLgzF4Ja3xLyr+ZIc8NlF7Y7mlqY55V0YCfSoB2e3gvPsoQMJpHEmMNCSka+zvo/4xFyzVNVy2FwxFwob1rEu X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230016)(4636009)(376002)(136003)(346002)(39860400002)(396003)(36840700001)(46966006)(40470700004)(40460700003)(83380400001)(82740400003)(36860700001)(7696005)(6666004)(26005)(47076005)(336012)(1076003)(186003)(16526019)(426003)(2616005)(36756003)(5660300002)(2906002)(70586007)(8936002)(40480700001)(82310400005)(81166007)(86362001)(110136005)(921005)(41300700001)(478600001)(70206006)(316002)(8676002)(356005)(4326008)(36900700001)(83996005)(2101003);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Sep 2022 16:35:50.7598 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9097f839-af40-43ba-768a-08da8f5cb1bf X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BL02EPF0000C406.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR12MB4491 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_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Here's on debug enabling software signaling for the stub fence which is always signaled. This fence should enable software signaling otherwise the AMD GPU scheduler will cause a GPU reset due to a GPU scheduler cleanup activity timeout. Signed-off-by: Arvind Yadav --- Changes in v1 : 1- Addressing Christian's comment to remove unnecessary callback. 2- Replacing CONFIG_DEBUG_WW_MUTEX_SLOWPATH instead of CONFIG_DEBUG_FS. 3- The version of this patch is also changed and previously it was [PATCH 3/4] --- drivers/dma-buf/dma-fence.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/dma-buf/dma-fence.c b/drivers/dma-buf/dma-fence.c index 066400ed8841..2378b12538c4 100644 --- a/drivers/dma-buf/dma-fence.c +++ b/drivers/dma-buf/dma-fence.c @@ -27,6 +27,10 @@ EXPORT_TRACEPOINT_SYMBOL(dma_fence_signaled); static DEFINE_SPINLOCK(dma_fence_stub_lock); static struct dma_fence dma_fence_stub; +#ifdef CONFIG_DEBUG_WW_MUTEX_SLOWPATH +static bool __dma_fence_enable_signaling(struct dma_fence *fence); +#endif + /* * fence context counter: each execution context should have its own * fence context, this allows checking if fences belong to the same @@ -136,6 +140,9 @@ struct dma_fence *dma_fence_get_stub(void) &dma_fence_stub_ops, &dma_fence_stub_lock, 0, 0); +#ifdef CONFIG_DEBUG_WW_MUTEX_SLOWPATH + __dma_fence_enable_signaling(&dma_fence_stub); +#endif dma_fence_signal_locked(&dma_fence_stub); } spin_unlock(&dma_fence_stub_lock); -- 2.25.1