Message ID | 20210512142648.666476-11-andrey.grodzovsky@amd.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=SYvv=KH=lists.freedesktop.org=dri-devel-bounces@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15914C43600 for <dri-devel@archiver.kernel.org>; Wed, 12 May 2021 14:27:40 +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 B4DAF61411 for <dri-devel@archiver.kernel.org>; Wed, 12 May 2021 14:27:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B4DAF61411 Authentication-Results: mail.kernel.org; dmarc=fail (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 2386B6EC1A; Wed, 12 May 2021 14:27:38 +0000 (UTC) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2060.outbound.protection.outlook.com [40.107.223.60]) by gabe.freedesktop.org (Postfix) with ESMTPS id 971846EC14; Wed, 12 May 2021 14:27:36 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U+Eewd0CLuSwSrxK2iNd+N11Ag2uXXSflAUMvxU58wk/3a8nRqswUDjkXSihqO4RcikcJepDLP0yoh0vazSKq7r5syxS/WOUHcB70kN1rxf8jJv3+wVmF3gLirQ/P1K6CNkLkA7gVH2ECM5fqEwYx0zHjyg2kZ1m77fpBMPWBVwwQXIW1l4g7Tc1ojGxxPB1WlxHIbNHK6R+Awgbc3/5gwE6QrKyN8chv9RO1SlIOMqIOTV2XhH+hbKaSPyr9vc+4wr6pvlgvJMsKpch31WTsNkphvIplt8XbnNpyZZjV0Jk2cxAQDapvNyMXFHGyh3HHv5K+lGkmPJ3yjvJbzq4RA== 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=WvCJ3p4J5b6j3Y4MhS7JBFeYIKw8tX02HYjT2myyNew=; b=NClw1aosdmAom2YbdRgfYIU24BgaLP+kgESmVxFQBbjzAY/KYYkSGbYcZYD3RgX65BSz9cvDalAXMqu/sLeafv3s5TiWxsoi3SlzP0KSUFVYW8AWMO+zkObdrhb4lXzILyMTsYQAV4BLZS/RMgEhV6RXaRobxMdaEf2c1wBgKy7UwqzX29+8yNPAAlyxyGspDvs/l8pvApZs9QfPJLtSz6eo0rc2R8EY5FlBE2w7v1TgTfq4QgBxnIJUR1syFGNSt/kLO3FCYy4+/3zMcMCFhL6QrJCncU+GbgY9PUOB7jAnTQjwHPOiN8CdgbfdujO8NgIzbkvBlJ8FEHxLMNYL8Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; 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=WvCJ3p4J5b6j3Y4MhS7JBFeYIKw8tX02HYjT2myyNew=; b=nuzT6bWjXxYiWGuUlPvhCLkzrocNnKXBxeykUb8ZHUJA22yXqLzNURmZJ5B25myLUh1ss5V5YTxsxl0TBD8cAkn1INPtYwnTpEzalCJqxwN2NKsf7sNTJc+XTh0H/nv19TtT9YQubOuNbTdDfz1bVwNMte1diF1vXxJX/G4wwbI= Authentication-Results: lists.freedesktop.org; dkim=none (message not signed) header.d=none; lists.freedesktop.org; dmarc=none action=none header.from=amd.com; Received: from SN6PR12MB4623.namprd12.prod.outlook.com (2603:10b6:805:e9::17) by SN6PR12MB2845.namprd12.prod.outlook.com (2603:10b6:805:75::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.25; Wed, 12 May 2021 14:27:33 +0000 Received: from SN6PR12MB4623.namprd12.prod.outlook.com ([fe80::ad51:8c49:b171:856c]) by SN6PR12MB4623.namprd12.prod.outlook.com ([fe80::ad51:8c49:b171:856c%7]) with mapi id 15.20.4129.026; Wed, 12 May 2021 14:27:33 +0000 From: Andrey Grodzovsky <andrey.grodzovsky@amd.com> To: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-pci@vger.kernel.org, ckoenig.leichtzumerken@gmail.com, daniel.vetter@ffwll.ch, Harry.Wentland@amd.com Subject: [PATCH v7 10/16] drm/sched: Make timeout timer rearm conditional. Date: Wed, 12 May 2021 10:26:42 -0400 Message-Id: <20210512142648.666476-11-andrey.grodzovsky@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210512142648.666476-1-andrey.grodzovsky@amd.com> References: <20210512142648.666476-1-andrey.grodzovsky@amd.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Originating-IP: [2607:fea8:3edf:49b0:7576:4f76:97d8:1487] X-ClientProxiedBy: YTOPR0101CA0032.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b00:15::45) To SN6PR12MB4623.namprd12.prod.outlook.com (2603:10b6:805:e9::17) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from agrodzovsky-All-Series.hitronhub.home (2607:fea8:3edf:49b0:7576:4f76:97d8:1487) by YTOPR0101CA0032.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b00:15::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.30 via Frontend Transport; Wed, 12 May 2021 14:27:32 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c7617c67-b5ff-49a0-b218-08d9155214bc X-MS-TrafficTypeDiagnostic: SN6PR12MB2845: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: <SN6PR12MB28452375343F55BD175C6129EA529@SN6PR12MB2845.namprd12.prod.outlook.com> X-MS-Oob-TLC-OOBClassifiers: OLM:6108; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KhyuVcsMoQnPkmDdtW1RBzrl3t+epjt0mjR37Gb5T3amsd9DFfRP6189FvF7IQghX39P5HgtZfyF0yoGJrZE/RPGjW8b2xosncgsEF136E+3wHuSh3163ujmXV+lKMIvPNVhQITmlK6vc56CPt7FX2LNGLPh0drXsEfwPtyq38+hsCifRucPtiCDWKnhU7RU0N7A20FqWMc277KoGT0LtrW+9plHP/iI2GP0iQ8iAdnxK7eQxkV8obGvhrKY5p+huUlctCmFhd3bOZCFySSbCha11mK1ZMwSS1AlAWV/Ad4a9+bLHuvwwyQal5D1OJ8nQxokfreCFT9Fc4kQ0qqCeUNeHiPFr1/2YSn0GBGVenJMd+coF3gZg1NXWx094y5qWC5w8pDQrXaTKKznqz1SmrgU8/leRMAvn0TXsIbgf7GIMcmQ4wTYvoeSr+8iZeVyUkZhq/TKwHvEybm8GuYta3yOYhxrJOS1yDQPkw48CnuMJxUBvb3uO0U1F0fGIoc0AGZv86WyywQFweFaGjr8EFMX+Y71+JR6BnDpvsF4Ez7I5KLH1bEutQ6xhao9OAG5pB6kAb+8KKF7AnAJyqWXmd/rW+ELefisxrRxUJ6oUgc= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR12MB4623.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(39860400002)(396003)(346002)(136003)(366004)(6486002)(8676002)(54906003)(316002)(6512007)(16526019)(6636002)(478600001)(1076003)(186003)(4326008)(44832011)(2906002)(6506007)(8936002)(5660300002)(2616005)(38100700002)(66574015)(36756003)(86362001)(6666004)(66476007)(66946007)(66556008)(83380400001)(52116002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?q?Zp46b6ZgS+zr26iBldjJXQLdwSDsSX?= =?utf-8?q?D1eus1rn9gtCSaU4Y9nUZ1MO1O3W8HxEn0DYLxI/WXzr4apNpSIVc+7z+cUt3qrAp?= =?utf-8?q?ENWifcnw/giWT4hwaSiH9OcmqVNTpED5BVE66EG6kCg9JCep9Wrxd66E+c3tsTcUR?= =?utf-8?q?w6khxFP4UtHaF2Ky9bd9RIxBWQkJVjHYHyDxbmyqjuQKbe5B/rsOOLoTbgCmcUebg?= =?utf-8?q?xB7WJzfOCSPt85r1MhdXc3/apKYWxOcymceynTvc8ZCJa2pbqOLNaiM6m+78GTTHe?= =?utf-8?q?vWU8+un6p7XyOEEJyatOdFiGJ2R5qm2eQ9QFr7YhHZxdQZ5l+HTQsrdUcGNV2qTwD?= =?utf-8?q?h08kEXX9LxaoluLsJIxZa3h6ri/ePvZtICV5SAPvUq3TudFwKpfKWbc3lXMfKUDzK?= =?utf-8?q?tN7yqv9U18IUWUSnIXER78U05+BwJ0zutaK0H/NIwAurrAakfT38Zff2lfXjCjKuD?= =?utf-8?q?NYzcACvU3TOjy6gEiiLX+l4IbjFgXCR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ossTenant-Network-Message-Id: c7617c67-b5ff-49a0-b218-08d9155214bc X-MS-Exchange-CrossTenant-AuthSource: SN6PR12MB4623.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2021 14:27:33.1106 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: MSzpb4eWgClP/ko3EO32H9TwmiF7WT7dWTws8GSqK+BnTDsgBsii8mhwdYouToTo2sSwFo+RDOHj4ifOEO2Bhg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR12MB2845 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development <dri-devel.lists.freedesktop.org> List-Unsubscribe: <https://lists.freedesktop.org/mailman/options/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=unsubscribe> List-Archive: <https://lists.freedesktop.org/archives/dri-devel> List-Post: <mailto:dri-devel@lists.freedesktop.org> List-Help: <mailto:dri-devel-request@lists.freedesktop.org?subject=help> List-Subscribe: <https://lists.freedesktop.org/mailman/listinfo/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=subscribe> Cc: gregkh@linuxfoundation.org, Felix.Kuehling@amd.com, helgaas@kernel.org, Alexander.Deucher@amd.com, =?utf-8?q?Christian_K=C3=B6nig?= <christian.koenig@amd.com> Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" <dri-devel-bounces@lists.freedesktop.org> |
Series |
RFC Support hot device unplug in amdgpu
|
expand
|
diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c index f4f474944169..8d1211e87101 100644 --- a/drivers/gpu/drm/scheduler/sched_main.c +++ b/drivers/gpu/drm/scheduler/sched_main.c @@ -314,6 +314,7 @@ static void drm_sched_job_timedout(struct work_struct *work) { struct drm_gpu_scheduler *sched; struct drm_sched_job *job; + enum drm_gpu_sched_stat status = DRM_GPU_SCHED_STAT_NOMINAL; sched = container_of(work, struct drm_gpu_scheduler, work_tdr.work); @@ -331,7 +332,7 @@ static void drm_sched_job_timedout(struct work_struct *work) list_del_init(&job->list); spin_unlock(&sched->job_list_lock); - job->sched->ops->timedout_job(job); + status = job->sched->ops->timedout_job(job); /* * Guilty job did complete and hence needs to be manually removed @@ -345,9 +346,11 @@ static void drm_sched_job_timedout(struct work_struct *work) spin_unlock(&sched->job_list_lock); } - spin_lock(&sched->job_list_lock); - drm_sched_start_timeout(sched); - spin_unlock(&sched->job_list_lock); + if (status != DRM_GPU_SCHED_STAT_ENODEV) { + spin_lock(&sched->job_list_lock); + drm_sched_start_timeout(sched); + spin_unlock(&sched->job_list_lock); + } } /**