From patchwork Thu Oct 24 19:57:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Grodzovsky X-Patchwork-Id: 11210661 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 BC891913 for ; Thu, 24 Oct 2019 19:57:39 +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 A4B052070B for ; Thu, 24 Oct 2019 19:57:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A4B052070B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amd.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 53D5C6E784; Thu, 24 Oct 2019 19:57:37 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-eopbgr810048.outbound.protection.outlook.com [40.107.81.48]) by gabe.freedesktop.org (Postfix) with ESMTPS id ECA076E784; Thu, 24 Oct 2019 19:57:35 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BfdFKTayFRnbv2TiAv26Iw6Uw4lNwJPJ6a4y60wf/r4DnCt5z6jHlwvBj5jaGbIBqByDwT5miXIAK36H9JshiHJLeQ7MmjMFTQeK2S4M4qFEiKaBocVd4ZH86LqVIlHI2h3+ozKQ0rIgWw2+iobEvNNVYY0ulxrj6RdhX5EC9IaSmNRokskbcHlv6geO7HZNj7RNJqP0CVO0xtnRj3SkNvtX7pzaGuqGfMT/sc1ArHokVR0Cp7Q0iUiXmA1ndv9AEiS93ZrJPDeWTmrjW1p+2qW62TlKJwfY92JFduTL+72VefHDUEii7MWfi5SX5fQ13OeSB+idEvULBFf6dKgJYg== 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-SenderADCheck; bh=dFNaNjE/tStoe8fOKoLYHB68C3bdfg7hp/zjaW5jLdY=; b=TAP9POVtDiPuoiZkCkqhvV4qQG0UbvIWbwBnY59vsF7bBoGnnM8doZKaFbG4LD641pLzEEHEkvMRSfRcox5ylEJZqUOYUWr2Lpu5gmql4ctJllv+aBK3eAPI1SmrpdDB791hzU/sRZiF8h60dJuv6IRersJUN/aJytXcVxjEbedfqJNDe5+tWaDUg9PGQ4zzbMXL1vS6RWj/UmxTa4/lFpt8QAuYIfI62SFt7t4OujIK/urTiKhIGO1Mhw04xIUuH8gmyghrhPF077EcHumKeW+nyG3AAdgu0xtQiOkxLbCPIsHmjHjFhfQA+UdPjr/S/jOi20Nn2/edWhYfIFRAKg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.freedesktop.org smtp.mailfrom=amd.com; dmarc=permerror action=none header.from=amd.com; dkim=none (message not signed); arc=none Received: from SN1PR12CA0091.namprd12.prod.outlook.com (2603:10b6:802:21::26) by BN6PR12MB1153.namprd12.prod.outlook.com (2603:10b6:404:19::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2367.24; Thu, 24 Oct 2019 19:57:34 +0000 Received: from DM3NAM03FT020.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e49::200) by SN1PR12CA0091.outlook.office365.com (2603:10b6:802:21::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2387.20 via Frontend Transport; Thu, 24 Oct 2019 19:57:34 +0000 Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXMB02.amd.com (165.204.84.17) by DM3NAM03FT020.mail.protection.outlook.com (10.152.82.193) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2387.20 via Frontend Transport; Thu, 24 Oct 2019 19:57:34 +0000 Received: from SATLEXMB01.amd.com (10.181.40.142) by SATLEXMB02.amd.com (10.181.40.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 24 Oct 2019 14:57:33 -0500 Received: from agrodzovsky-All-Series.amd.com (10.180.168.240) by SATLEXMB01.amd.com (10.181.40.142) with Microsoft SMTP Server id 15.1.1713.5 via Frontend Transport; Thu, 24 Oct 2019 14:57:33 -0500 From: Andrey Grodzovsky To: , Subject: [PATCH 1/2] drm/sched: Set error to s_fence if HW job submission failed. Date: Thu, 24 Oct 2019 15:57:29 -0400 Message-ID: <1571947050-26276-1-git-send-email-andrey.grodzovsky@amd.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:165.204.84.17; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(39860400002)(136003)(396003)(376002)(346002)(428003)(189003)(199004)(48376002)(8676002)(186003)(50466002)(70206006)(70586007)(26005)(2906002)(8936002)(50226002)(47776003)(53416004)(81156014)(4326008)(336012)(81166006)(6666004)(110136005)(44832011)(426003)(36756003)(54906003)(16586007)(2616005)(476003)(126002)(486006)(305945005)(5660300002)(86362001)(478600001)(7696005)(51416003)(316002)(356004); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR12MB1153; H:SATLEXMB02.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoDomainNonexistent; MX:1; A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e214cbfd-3135-442b-fc40-08d758bc695e X-MS-TrafficTypeDiagnostic: BN6PR12MB1153: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1265; X-Forefront-PRVS: 0200DDA8BE X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: n4udein9ngI4ON4FnQXbwJFgUXZOXECYDggCh2uEjS0MYbd1kZ5ZB8HcdwtJ51yOEbOP3bwoX4YB5dIV6So3nosbaEFco+6QjvVZ7vtENvckV2OVveO+6PGBmFHdX2r81BHJ2WYgrF8PqAqAlR2I4poCor1IFLCSz7/O++aCGvIbnktMoZecir5FUVvI5boXV7mnMXKW7ZpYCFg9QledwAUZmW7Nba8gLxTL9uoKdr6Kq4znBMKFe/jcWzVwoRlT8Bv+5NhS483sYeii+4Si/9xY5M9JkFrnyyXLudbURf0GOF4Kt5EzsS1ntgjz4L/bCGf6rfAGocLEjj9cItPI+E8wxel1UMPMvB8QPNLDcmoxfR7ld/I8aUKZNaQ7U51k3BDqpY96nIuN80BJ8IQCn8eQxNWqIv8BS71lslp+nKtyUEj1xW/P/7FRdv4urrOk X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2019 19:57:34.0292 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e214cbfd-3135-442b-fc40-08d758bc695e 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=[SATLEXMB02.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1153 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector2-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dFNaNjE/tStoe8fOKoLYHB68C3bdfg7hp/zjaW5jLdY=; b=A4DnhLq1ZF97C2krEh1Z0xXzP0PerQIh4p994Z+yftm2krAYRi+89ggDHwwZKjQeHPPrkJ0TTLwRI1XotzO/Dw6mCaY5w5MPp2gu5ui8OXQ1uazMtsLcRWvJMEIb3hgzYaqoOS2lJcpIYBMUauHPweJpoW4e74Md2u7JErf5f/I= X-Mailman-Original-Authentication-Results: spf=none (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; lists.freedesktop.org; dkim=none (message not signed) header.d=none;lists.freedesktop.org; dmarc=permerror action=none header.from=amd.com; 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: ckoenig.leichtzumerken@gmail.com, Shirish.S@amd.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Problem: When run_job fails and HW fence returned is NULL we still signal the s_fence to avoid hangs but the user has no way of knowing if the actual HW job was ran and finished. Fix: Allow .run_job implementations to return ERR_PTR in the fence pointer returned and then set this error for s_fence->finished fence so whoever wait on this fence can inspect the signaled fence for an error. Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/scheduler/sched_main.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c index 9a0ee74..f39b97e 100644 --- a/drivers/gpu/drm/scheduler/sched_main.c +++ b/drivers/gpu/drm/scheduler/sched_main.c @@ -479,6 +479,7 @@ void drm_sched_resubmit_jobs(struct drm_gpu_scheduler *sched) struct drm_sched_job *s_job, *tmp; uint64_t guilty_context; bool found_guilty = false; + struct dma_fence *fence; list_for_each_entry_safe(s_job, tmp, &sched->ring_mirror_list, node) { struct drm_sched_fence *s_fence = s_job->s_fence; @@ -492,7 +493,16 @@ void drm_sched_resubmit_jobs(struct drm_gpu_scheduler *sched) dma_fence_set_error(&s_fence->finished, -ECANCELED); dma_fence_put(s_job->s_fence->parent); - s_job->s_fence->parent = sched->ops->run_job(s_job); + fence = sched->ops->run_job(s_job); + + if (IS_ERR_OR_NULL(fence)) { + s_job->s_fence->parent = NULL; + dma_fence_set_error(&s_fence->finished, PTR_ERR(fence)); + } else { + s_job->s_fence->parent = fence; + } + + } } EXPORT_SYMBOL(drm_sched_resubmit_jobs); @@ -720,7 +730,7 @@ static int drm_sched_main(void *param) fence = sched->ops->run_job(sched_job); drm_sched_fence_scheduled(s_fence); - if (fence) { + if (!IS_ERR_OR_NULL(fence)) { s_fence->parent = dma_fence_get(fence); r = dma_fence_add_callback(fence, &sched_job->cb, drm_sched_process_job); @@ -730,8 +740,11 @@ static int drm_sched_main(void *param) DRM_ERROR("fence add callback failed (%d)\n", r); dma_fence_put(fence); - } else + } else { + + dma_fence_set_error(&s_fence->finished, PTR_ERR(fence)); drm_sched_process_job(NULL, &sched_job->cb); + } wake_up(&sched->job_scheduled); } From patchwork Thu Oct 24 19:57:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Grodzovsky X-Patchwork-Id: 11210663 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 A1363913 for ; Thu, 24 Oct 2019 19:57:43 +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 896222166E for ; Thu, 24 Oct 2019 19:57:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 896222166E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amd.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 849556E78E; Thu, 24 Oct 2019 19:57:42 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM05-CO1-obe.outbound.protection.outlook.com (mail-eopbgr720060.outbound.protection.outlook.com [40.107.72.60]) by gabe.freedesktop.org (Postfix) with ESMTPS id A21A06E78B; Thu, 24 Oct 2019 19:57:39 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MvbHKrl6vsHRt1OxmWgtVN+bQeMP6RkZyoUEXfz7GoocwXHStRrDKmK1Le2qxAkqTeSydZwkY975ul2MI/Xc7F17Sy0Hk6sX6AYGP1BVrFxX1SzDwXaDWpk/S2+5rdVgqy9PMChsB8h0ahqP7fCtf06G0f79m8Lfkc34YiWVUS4KEtMHzLG2u3dLNeeJL+wsj4vnMPEvMAxLI4pEuku7vL2ygpN2vD4VHEb76D8q6NsWy+xoupmj1qHVckoZRDf8gZoLikIcWVmevvLkQ+xTsTeOWpCGHlimiSepuybCr+xgFmpzzQjeMih/UUAe77LFQUCN+ZIzZkuavkfRfJwBTw== 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-SenderADCheck; bh=Mpk4S0bnzFnyYoMy/6ptbMwhOLF48GAOZwi0dLClAHM=; b=Tb7hlWxHVVkTDiDOHMOo/JhDxDmcTZGz38zCLw3LB91HJPptSh8kgGBhy0IkH2woAHCySQjukoPAbzJ8lpTcdbF8ZFwL5e73I1zYp1aqnzfKnJWLXQmyuQraBfF8FOPMpNcRyiHtTlRhc22cYVvKr2Q9kCPczOz80ydYfT+qXbgzG2uyqpeMpNMnMCbwVIaF3/Kiie6SvtaUaED1LkW8E4nZ4hxj2IqH0E6lyIqu+FDqCjoV0IuLo4nsgweGL6B7LjQCkmkhXwFXC8F1NL2w2oUIdsl2ax4Qd+73aZMVYb8dfIcbsiTisLCcXkYg+64mb7ACWkpCZmX9nlYLXZPLGQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.freedesktop.org smtp.mailfrom=amd.com; dmarc=permerror action=none header.from=amd.com; dkim=none (message not signed); arc=none Received: from MWHPR12CA0049.namprd12.prod.outlook.com (2603:10b6:300:103::11) by BN7PR12MB2673.namprd12.prod.outlook.com (2603:10b6:408:27::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2387.22; Thu, 24 Oct 2019 19:57:36 +0000 Received: from DM3NAM03FT036.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e49::202) by MWHPR12CA0049.outlook.office365.com (2603:10b6:300:103::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2387.22 via Frontend Transport; Thu, 24 Oct 2019 19:57:36 +0000 Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXMB02.amd.com (165.204.84.17) by DM3NAM03FT036.mail.protection.outlook.com (10.152.82.189) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.2387.20 via Frontend Transport; Thu, 24 Oct 2019 19:57:35 +0000 Received: from SATLEXMB01.amd.com (10.181.40.142) by SATLEXMB02.amd.com (10.181.40.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 24 Oct 2019 14:57:35 -0500 Received: from agrodzovsky-All-Series.amd.com (10.180.168.240) by SATLEXMB01.amd.com (10.181.40.142) with Microsoft SMTP Server id 15.1.1713.5 via Frontend Transport; Thu, 24 Oct 2019 14:57:34 -0500 From: Andrey Grodzovsky To: , Subject: [PATCH 2/2] drm/amdgpu: If amdgpu_ib_schedule fails return back the error. Date: Thu, 24 Oct 2019 15:57:30 -0400 Message-ID: <1571947050-26276-2-git-send-email-andrey.grodzovsky@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1571947050-26276-1-git-send-email-andrey.grodzovsky@amd.com> References: <1571947050-26276-1-git-send-email-andrey.grodzovsky@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:165.204.84.17; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(376002)(396003)(136003)(39860400002)(346002)(428003)(189003)(199004)(7696005)(53416004)(126002)(81156014)(81166006)(36756003)(70206006)(5660300002)(70586007)(50226002)(4326008)(44832011)(50466002)(48376002)(4744005)(16586007)(8676002)(47776003)(478600001)(54906003)(316002)(110136005)(8936002)(76176011)(51416003)(336012)(426003)(11346002)(446003)(186003)(476003)(2616005)(86362001)(2906002)(26005)(356004)(6666004)(305945005)(486006); DIR:OUT; SFP:1101; SCL:1; SRVR:BN7PR12MB2673; H:SATLEXMB02.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoDomainNonexistent; MX:1; A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9a8335a1-ee2e-44dd-ec99-08d758bc6a77 X-MS-TrafficTypeDiagnostic: BN7PR12MB2673: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:849; X-Forefront-PRVS: 0200DDA8BE X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FWAIT9X9vYpXS/5XHX+e7cLxq7kKggKRfn9UhCWSu4bELDy39dNOOj1EbuPIalTndRFOvJEIuyKsfNivcJ8FN3Efv/WV9zt0vY72jBVDqZjMrrlYRVWBY+b07LyOx/+RR6ct/hbfsL+ox+wu3N6tzHdB0k3G1XQUw9rFPANVEIU6Lcq+s1964jQ+9DKjKfDvi6jJ+oQX11tF5wt7WAZDpCw248XHzMRVp9CYx5BfVM5sFR1sL/U9pYVyg2RbhVyTuvUuEYae+99BIAqbS5beD30fbELujT0BCEUmlyhfChWRfAnv/U62/TXo90I4bZTQvyMMTI8Tu7ME9o/k6iK+rom22eZ6w8zDE25a22SXSePi//xZ4DHzqfWA0i04k3qMCi8AYlO9IW1W0b6SH8buOEB1UprCM+YZRtiGnvxjrVK9FyicTCWXRlvZ5WNmya2m X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2019 19:57:35.8623 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9a8335a1-ee2e-44dd-ec99-08d758bc6a77 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=[SATLEXMB02.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR12MB2673 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector2-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Mpk4S0bnzFnyYoMy/6ptbMwhOLF48GAOZwi0dLClAHM=; b=ItrCK0f0y+2lxa8mM7UONtK09qUQoHzb1nGSSqaXq2R4CEx3T8BfYjjwkeHKSqOGSHaTQ5gVES0Nae7h3UQXxbXs0aiS3hUkeHpZGWzbi0+b2cO+RR1GP3BOlpysUtYmfuDu2puZdlwR+wFx0NmU/KfqlS5Oq6SefR7NmXHHJBM= X-Mailman-Original-Authentication-Results: spf=none (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; lists.freedesktop.org; dkim=none (message not signed) header.d=none;lists.freedesktop.org; dmarc=permerror action=none header.from=amd.com; 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: ckoenig.leichtzumerken@gmail.com, Shirish.S@amd.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Use ERR_PTR to return back the error happened during amdgpu_ib_schedule. Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c index e1bad99..9769bb5 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c @@ -243,6 +243,8 @@ static struct dma_fence *amdgpu_job_run(struct drm_sched_job *sched_job) job->fence = dma_fence_get(fence); amdgpu_job_free_resources(job); + + fence = r ? ERR_PTR(r) : fence; return fence; }