From patchwork Wed Sep 7 20:57:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Zhu X-Patchwork-Id: 12969381 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id D256DC6FA82 for ; Wed, 7 Sep 2022 20:57:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9B9AB10E88D; Wed, 7 Sep 2022 20:57:39 +0000 (UTC) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2075.outbound.protection.outlook.com [40.107.92.75]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0CFB010E885; Wed, 7 Sep 2022 20:57:33 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CLBA+VoFmpSIevPKR5rQ+A59D3DjOgSG7HmSNS3wQGL00teEJGs0z5s7rBXvCoI7eiNaL3NL4W0Ih/3vKOYUeRId96JjBfnZSdnIfVOgGWpIYX3Lbx+SNR39QM1Hk/l6Aoh3jwnDoiAmMWlfdhYabOfqk7t7XBQuJPRMqk92fXNcZsvIGyyChPqh1EzpWX4azHS9r6h/oM9AgwOtpf/mwhkNeQvzd/xVTMxCIprW0TJZa4vZYWSQngZKjLvg0c2PTIVsEN3WqxiLWWSemkpcabNXJilAQn+AOrGOfJWI3aLobHKK0K4QEXaBPVFD5kmi7nV/nbnx5wUw2ror371pJQ== 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=Q3gpTIwv0LDi33/i5+y9kR9HQgBXprM7D4lLGDF7dF8=; b=fYuQtQT5T6nImvBzy0BAyNztM2WZySr2wCND9jUQ0IiS9BsvAPZOTCFWqbNQCO5XauXi7l+wLffd4u0a5js+jY6kBYYRSLIi/YeGNFNSI+4I3zFXidHuTHPUslwltKc35WmUrZO9yKLx9HF7vO8ymtoVr/LMVO7cBeRdwUuizis/ZZ2SEfA5u8q16zpglKxUhaZHTZHTq1SUf7Ss2ruw6bYUm27pe16jkmCM1UO7TtjcWREhVWfsWg2hemYtA1frFuwWWEMl0I6IwlTY9v2sUC1Ym/CPGQfu042gNEuQLzMNpLANAt8vxFcJ45OmSSip1VF5qRdyJjuW5G797f66uQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.freedesktop.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=Q3gpTIwv0LDi33/i5+y9kR9HQgBXprM7D4lLGDF7dF8=; b=B/0gnw9sYo4sD+niCgUC1fLcoUcpPghhSbbCtZvo5fCtdVw7fVDLyCc0L8VsSewmnY/JbFHHrC/jF/qEemwJAtHsJGuv6SgJ+ZBSZrK/3W+QQ1dnf+TqgID3evqxlT7VkUqolp1iW5TyZop70mqmDw5znaG00kOsRkFalRHNEb4= Received: from BN7PR02CA0035.namprd02.prod.outlook.com (2603:10b6:408:20::48) by IA1PR12MB6529.namprd12.prod.outlook.com (2603:10b6:208:3a6::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.10; Wed, 7 Sep 2022 20:57:30 +0000 Received: from BN8NAM11FT049.eop-nam11.prod.protection.outlook.com (2603:10b6:408:20:cafe::71) by BN7PR02CA0035.outlook.office365.com (2603:10b6:408:20::48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.14 via Frontend Transport; Wed, 7 Sep 2022 20:57:30 +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 BN8NAM11FT049.mail.protection.outlook.com (10.13.177.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5612.13 via Frontend Transport; Wed, 7 Sep 2022 20:57:30 +0000 Received: from jz-tester.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; Wed, 7 Sep 2022 15:57:29 -0500 From: James Zhu To: , Subject: [PATCH 1/4] drm/sched: returns struct drm_gpu_scheduler ** for drm_sched_pick_best Date: Wed, 7 Sep 2022 16:57:02 -0400 Message-ID: <20220907205705.934688-1-James.Zhu@amd.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT049:EE_|IA1PR12MB6529:EE_ X-MS-Office365-Filtering-Correlation-Id: df14cd3c-ed4f-4385-e9e9-08da91139460 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Qy8rRjtMd5byvuc0b8b5Gaqmtx9L0LPH0MV2pCKp3UDBZua6NTWen0Jll95Hi038b/V1PXBy9cY1rOkyrKsdofHt1jILfMGBTr545LeAzwnpHvYUdZZB4aiay4gJ4/zUUI3Z3xVq8i0qKMl86JjX5VBXUhb++NQ9i8HTsQMd7fIwzZsvSlasyKu4nJbEwbHWi2R3EFUQJav71ByJKyP5I0FXL/Oz5lGRf6IN8h2icTbrGaB8l2CmIf6HYO8rs6Zk0Jhp3jLicNssZd86JBWzZ1tm5BAhfIvKmp1zsxKv1CA03Y+6J8Kk9jC/YC3CfIrnb5WAYeRWqjagz81HeG6JGZrpQSey6pryHQSO2a7WAlYFsqUdLrrg7amDgwtOlNaItol4rq+eAFEfOkPxeXOn+LwN/TcWNPM6v4FXItvlHPVQbb7P5L3AtgLvCBzxsQ+GWlXaH64NupOeBdGgGMuFs9T87I/ctLtoYyL92t+rpUje7ahOIPushZ3Kee58KvHkK5p4ujuLrsfXDl4DyYTTZ0Vj6Eir8LHn9JmxZQws+EY1nl+DtdXDuxi3+myF32ZzqOUI38BqO/PicowzyA37s6F4tRjhZaoamPmgs0yuIGFkapVizrG9nn9qSysNWpLPSSooJjYaQq+Xfqyl4t97cRuBllPAsriURjwtyI7w6Dr+bXd6gzC4h2HbOSzz4Zn0aMS/XKYFW0nsKEyce6hSfRfreizTPhM7lmZ1r0nG6NWt1vg5X7NPj78+SPFWOdzWGOPPqMyPH7CgBGr2joTQJ8HMDA5xxDyEZOPcJD5pVv7LK0XNz7Gp2uCbrtbJQoMB 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)(396003)(136003)(39860400002)(376002)(346002)(36840700001)(46966006)(40470700004)(426003)(40460700003)(110136005)(4326008)(316002)(54906003)(7696005)(41300700001)(6666004)(70206006)(70586007)(2906002)(4744005)(5660300002)(8676002)(450100002)(40480700001)(26005)(478600001)(82740400003)(81166007)(336012)(8936002)(82310400005)(356005)(86362001)(36756003)(83380400001)(2616005)(1076003)(16526019)(36860700001)(186003)(47076005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2022 20:57:30.5194 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: df14cd3c-ed4f-4385-e9e9-08da91139460 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: BN8NAM11FT049.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6529 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alexander.deucher@amd.com, christian.koenig@amd.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" drm_sched_pick_best returns struct drm_gpu_scheduler ** instead of struct drm_gpu_scheduler * Signed-off-by: James Zhu --- include/drm/gpu_scheduler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/drm/gpu_scheduler.h b/include/drm/gpu_scheduler.h index 0fca8f38bee4..011f70a43397 100644 --- a/include/drm/gpu_scheduler.h +++ b/include/drm/gpu_scheduler.h @@ -529,7 +529,7 @@ void drm_sched_fence_finished(struct drm_sched_fence *fence); unsigned long drm_sched_suspend_timeout(struct drm_gpu_scheduler *sched); void drm_sched_resume_timeout(struct drm_gpu_scheduler *sched, unsigned long remaining); -struct drm_gpu_scheduler * +struct drm_gpu_scheduler ** drm_sched_pick_best(struct drm_gpu_scheduler **sched_list, unsigned int num_sched_list); From patchwork Wed Sep 7 20:57:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Zhu X-Patchwork-Id: 12969383 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 649E0C6FA82 for ; Wed, 7 Sep 2022 20:57:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4B2FB10E894; Wed, 7 Sep 2022 20:57:47 +0000 (UTC) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2040.outbound.protection.outlook.com [40.107.236.40]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5996E10E88E; Wed, 7 Sep 2022 20:57:33 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Tlm1XbYRbXp806CtLqgnJeQe9LNGaYf1SI4Rq+yncGqtAzdt2xLdW/cVqyzcaYj1e0x2jsGGOG6PoXeHcHVWvyOig56t8QFg2j+KxtCLTWvFRCfW2p6lZi5R4APkp/R0dlrf4Pqn0nqEcj+sAocs0HhLTXHZW1H8P18mCyxMVbhq2IqAHTGv7ifMW8Rln5tTK+qNay6g/yX7EwRbk3zQWuV3IsF46jKQS0o7zKHORcH+7+4qzRbk/Kf9eqQo+1ls2Uuh3aSpH7XvYL1QUXnV6LdohzAtbXN6kcI+YbZST74+8fEwZkO+mvXQWDlKfNYqIFWQjzpDP0S1ifKtDM2Gtg== 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=7qN5vy5NuWqYy0Wqw4c0wXlHqSG0ce1NlPw4fY35hgY=; b=FtOMNIP6hdCUqgfNW9Jx35ObjPktgZGSWOB91Djv8t1kupCL4Ax83ADWCCs11EP0I53yjr0+6gczeKx12ZDcz+z4YYHtAQjTE30EDeVtV7YjyksuxAmk5hWXyZti7Ugj1koT9LSNy0czYZhVT+ffFXHudqvJHkl8Qe0GOAixxiOGmV9LiqTcbHLsxED/gPmPSweEE0YnyP44p0nILh4vTYeB1eZAOlEuLTZOzSogmXMcJNe7LUA982i4JJJmsmy7klIeuJoDGJPLL0M8cJXlo5XBH28qlqxv9afmt8KvjwNdXeghjI8H0ElKeWc/zpqES70Ctv5LONboTwqBm4OOGw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.freedesktop.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=7qN5vy5NuWqYy0Wqw4c0wXlHqSG0ce1NlPw4fY35hgY=; b=q4/Z6QXLyXJCXmnU9zwLzOa8YT+HWjXf5U7/inyBpPQCblQpQq6CP5vSgIJl0i2A8Lh5uo8E0pjoEweJ89cOFv9psLzHs36e67C/ZbPcdysEdLZRulcNxOL9sNs97KfJHeZu6j67DCoHfCVyaLsL7n/2G4v9jejUS7uFvfZvqMw= Received: from BN7PR02CA0007.namprd02.prod.outlook.com (2603:10b6:408:20::20) by CH2PR12MB4152.namprd12.prod.outlook.com (2603:10b6:610:a7::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.12; Wed, 7 Sep 2022 20:57:31 +0000 Received: from BN8NAM11FT049.eop-nam11.prod.protection.outlook.com (2603:10b6:408:20:cafe::83) by BN7PR02CA0007.outlook.office365.com (2603:10b6:408:20::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.12 via Frontend Transport; Wed, 7 Sep 2022 20:57:31 +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 BN8NAM11FT049.mail.protection.outlook.com (10.13.177.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5612.13 via Frontend Transport; Wed, 7 Sep 2022 20:57:30 +0000 Received: from jz-tester.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; Wed, 7 Sep 2022 15:57:29 -0500 From: James Zhu To: , Subject: [PATCH 2/4] drm/sched: implement new drm_sched_pick_best Date: Wed, 7 Sep 2022 16:57:03 -0400 Message-ID: <20220907205705.934688-2-James.Zhu@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220907205705.934688-1-James.Zhu@amd.com> References: <20220907205705.934688-1-James.Zhu@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT049:EE_|CH2PR12MB4152:EE_ X-MS-Office365-Filtering-Correlation-Id: 76ef8c1a-9187-40a2-e608-08da9113949e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WvFLc6pn6zkJAL+IBeBcpr3RNjivtzw34hbWNnrogVUWwbA7SlVyC3cEQ1mdTSVwh+mExTU3/W9POxt0/hfgc8weHMtvKd9UYu+OY6Bh/N8e0Pzg00T/E5L7NdrripGgRQfzonS1w2O88Leni0DRhED2VYjB6Nqy3+kgtVXqHjGdCsJIwC9lC+bI1J87VDjVBBzq/DQC1fpJP8s9ba5mK2O0kGltGP5qwkqU5vXhmq0ExgJAw6GilZNn6yi9Xvlnz6GdVVO7phFLrLEjgjkN5gFZexiS1XTyHYXqkbirVPTC88D4waSCvNXFYOPiYICa03Fm7oixekALaeNrvXqnoPtibsPIbMlqdJSEYApTLXXtoCG5kOaQt3ZG2KAhf2PzQTKpKZmbiO2s6V7VrHgaPnc2ALpFPR991HWGjF/bbMVu6DNTgSyAqixIqaW2WxGUkTPXNcxV12DB9Q++oA3GXiWqnwTbG2q1IsmZb4CmV7uyprnU+FdE5bHw+5g6jYBXY7eQEJ5kG2lNzfzyPt/79NtKBkvXmP67ZNXbDfCwK2KBr6Ln7XfFCz+F6LJURaKczo0aodu0KuDzgOcu1H1dYgKU7VWr8dYacb2oe2cpaPMghXkbHltN1FcW1i3JEo7BoHwUzy1HvY/q0sPuytYi2bWle0rzBYBLwSGRL7ew0LWvRsiBpu5Oy8XPVZMsPU80TRiRDKrJ9ngx6jRq2+fhxQNFAsqWAypVBnyWVWYdb1KcTr1QqNrKIRxKDqsscEkdrksbMrfkKbj6lnSS2of9t38gkEtPhW4FC7nfgEIfcNc= 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)(396003)(39860400002)(136003)(346002)(376002)(36840700001)(46966006)(40470700004)(8676002)(83380400001)(40480700001)(2616005)(1076003)(186003)(426003)(47076005)(82310400005)(70586007)(478600001)(70206006)(4326008)(336012)(7696005)(36756003)(16526019)(41300700001)(26005)(6666004)(82740400003)(40460700003)(36860700001)(81166007)(86362001)(8936002)(2906002)(110136005)(54906003)(5660300002)(450100002)(356005)(316002)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2022 20:57:30.9569 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 76ef8c1a-9187-40a2-e608-08da9113949e 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: BN8NAM11FT049.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4152 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alexander.deucher@amd.com, christian.koenig@amd.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" drm_sched_pick_best return best selecetd ring schedul list's address. Signed-off-by: James Zhu --- drivers/gpu/drm/scheduler/sched_entity.c | 2 +- drivers/gpu/drm/scheduler/sched_main.c | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/scheduler/sched_entity.c b/drivers/gpu/drm/scheduler/sched_entity.c index 191c56064f19..f5595607995b 100644 --- a/drivers/gpu/drm/scheduler/sched_entity.c +++ b/drivers/gpu/drm/scheduler/sched_entity.c @@ -475,7 +475,7 @@ void drm_sched_entity_select_rq(struct drm_sched_entity *entity) return; spin_lock(&entity->rq_lock); - sched = drm_sched_pick_best(entity->sched_list, entity->num_sched_list); + sched = *drm_sched_pick_best(entity->sched_list, entity->num_sched_list); rq = sched ? &sched->sched_rq[entity->priority] : NULL; if (rq != entity->rq) { drm_sched_rq_remove_entity(entity->rq, entity); diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c index 68317d3a7a27..111277f6c53c 100644 --- a/drivers/gpu/drm/scheduler/sched_main.c +++ b/drivers/gpu/drm/scheduler/sched_main.c @@ -863,12 +863,12 @@ drm_sched_get_cleanup_job(struct drm_gpu_scheduler *sched) * Returns pointer of the sched with the least load or NULL if none of the * drm_gpu_schedulers are ready */ -struct drm_gpu_scheduler * +struct drm_gpu_scheduler ** drm_sched_pick_best(struct drm_gpu_scheduler **sched_list, unsigned int num_sched_list) { - struct drm_gpu_scheduler *sched, *picked_sched = NULL; - int i; + struct drm_gpu_scheduler *sched; + int i, picked_idx = -1; unsigned int min_score = UINT_MAX, num_score; for (i = 0; i < num_sched_list; ++i) { @@ -883,11 +883,13 @@ drm_sched_pick_best(struct drm_gpu_scheduler **sched_list, num_score = atomic_read(sched->score); if (num_score < min_score) { min_score = num_score; - picked_sched = sched; + picked_idx = i; } } - - return picked_sched; + if (picked_idx != -1) + return &(sched_list[picked_idx]); + else + return (struct drm_gpu_scheduler **)(NULL); } EXPORT_SYMBOL(drm_sched_pick_best); From patchwork Wed Sep 7 20:57:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Zhu X-Patchwork-Id: 12969382 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 0A1EEC54EE9 for ; Wed, 7 Sep 2022 20:57:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D51DC10E890; Wed, 7 Sep 2022 20:57:39 +0000 (UTC) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2041.outbound.protection.outlook.com [40.107.220.41]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3710D10E88D; Wed, 7 Sep 2022 20:57:33 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aseNZ7oBCBCngTSZWMde8Ly1rLMSJUCQRtDczamplHhP1GQtuJCsSfDOteKz7hrhfkq7gRWgHD0MZc0KVmYvRKWOK5AtkeNwjAO02PUof4QHK5sd4jyAv+wsug5tZ97NRLyqxRXlDqTaFa9BAxpMjyiFc/Ko8yzIUeCqa5RnccIZk/QzSy2wmmI6mycZuNFfWz6VVPzH7DbFfQCB13epAYGD82JjuPsgVouD3zDfVdcRMZD/lo2dh9TlT69ttajd+kiXSd9A3LkH6Ve1hDd+DGlgh3SHS5BJk/46ijfgZwY9kuMRdJskJKHLQdTOCAWx0JIg5Hm/Bq9/NHv3yMwKXA== 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=Wyq3rm8Qdto2l+DCe1eY2/buPWtGVuR+ZzxCJ7WHeLA=; b=A1w6XlOCd/b8shI5KsRCX7sz2CU5JVlkXrKbQ0Ldn70uanRc4aLHNF8cOyqyjTjniaLnHzP31R66vc7oYS9FIPX4zrECIYjMD3VX7L0d96ZNi9NBmOkeRJjbj8Fbl1bYEiUK+sWzrZzLswGay/MYZiJy6V9Xg/xHPVNMcGerFAKuDZRoYmoclWH06/mv/YiC1LxXzdKjrap7QqczECUTyhqq4tEESw6syWnKaeWLmF3f8Yb69tlh3DvLIA03SoaOy98BrKdgzKUNNJsGRzD+oV+1QaoNB+ng418txjl+DrIhSKeBTzzTwjFxE/enW5tbT0x2m2SnM+7txrz478DqiA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.freedesktop.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=Wyq3rm8Qdto2l+DCe1eY2/buPWtGVuR+ZzxCJ7WHeLA=; b=vGdv5K2KSRVqcCd6/wcNmlCUSuDQWbx0nRWWbWs2oEgUQVojxT0rqnRnFeFS0cTN6XOQIfqhKehKuRgtfpm9xYaUyX9R0y2Dn8YMVlV3E4vmVeqwXyuNaW2b3yZtV4K9gC43PctEMZRJhSfSBHNry8KquglFWw/tFhh9GocbJa8= Received: from BN7PR02CA0035.namprd02.prod.outlook.com (2603:10b6:408:20::48) by DM4PR12MB6206.namprd12.prod.outlook.com (2603:10b6:8:a7::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.17; Wed, 7 Sep 2022 20:57:31 +0000 Received: from BN8NAM11FT049.eop-nam11.prod.protection.outlook.com (2603:10b6:408:20:cafe::71) by BN7PR02CA0035.outlook.office365.com (2603:10b6:408:20::48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.14 via Frontend Transport; Wed, 7 Sep 2022 20:57:31 +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 BN8NAM11FT049.mail.protection.outlook.com (10.13.177.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5612.13 via Frontend Transport; Wed, 7 Sep 2022 20:57:31 +0000 Received: from jz-tester.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; Wed, 7 Sep 2022 15:57:30 -0500 From: James Zhu To: , Subject: [PATCH 3/4] drm/sched: always keep selecetd ring sched list in ctx entity Date: Wed, 7 Sep 2022 16:57:04 -0400 Message-ID: <20220907205705.934688-3-James.Zhu@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220907205705.934688-1-James.Zhu@amd.com> References: <20220907205705.934688-1-James.Zhu@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT049:EE_|DM4PR12MB6206:EE_ X-MS-Office365-Filtering-Correlation-Id: 484f7c33-bf50-49c3-1d97-08da911394d8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BNmO03/Ej9U991jttVhWqQa3eXPwBb0GJ3nCLswCXa2XkRxKhHk4VN9pKkWTDGGmlvq/shEPVQPX5ycduhU/2Ksx4OZ7wGAWg7YwPc9anyQYjx/j9uhJBlNDGxLQhB1qF4qZ+niDRuuV4Z6JGe98mXfz3zIRy12XbsJCaCgNJfzqhRE4g3umJ3w3QKtOlpa/gyHzanwvh00vzOL35ve4Ou9luLIFuwrA3L9ZMofTmr+VfU3547C5EB3XgncKmy6xoeg2ZQsQQrOapFBpaxhgI5iauOilh00oXEiBblNN3w6kpUDT0t6rdTNGQzBTslpni2D2ezG2UQEsZVBqIe8e6vF32bEz3AekrieM7p9l7G77B4HXBs9kADLafhHWlBTDUMf3x3LaGfe4ohpgC7a/eb3hTq2wbApHZo26dQAxCmJDuaAKNMIm4gnZeSd+fEojI4a5K4H7o7o1yexgGl7/3rjCkEvBmfXhgon8NKx89dPaftGcaHyRLpJ94ADedBVP89Q0Houiy0R+nqXToMOcLrOS4HxYbils41tZt/U+4P8t46ZJUqagU7GzFI7w5rOLjQgRYygk+SGHteX7zHkC3JXGVma33nFKRKHH18eGZA1yOWVtVvl6dahLHGlsfyZ4TBrNIhYVwsXM0yNpQREa60BW6lNA1ozyLnjrjxxooWoOFUkJnXdohI19ZEjSuokmCQD5CYfKhMvYSgQ4kvPsv+uz+um2EOz0H299B78oLkDFD1jmDf5aJwnlq6RsUO4xOO8kMAxHVmxMCSwkpZdGkzigUlSpWCV914T7qu1Vd1Q= 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)(39860400002)(136003)(396003)(346002)(376002)(40470700004)(46966006)(36840700001)(40460700003)(41300700001)(2616005)(186003)(1076003)(82310400005)(5660300002)(426003)(47076005)(336012)(54906003)(16526019)(81166007)(83380400001)(8936002)(356005)(82740400003)(316002)(2906002)(70206006)(26005)(478600001)(70586007)(450100002)(86362001)(8676002)(7696005)(36860700001)(110136005)(40480700001)(6666004)(36756003)(4326008)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2022 20:57:31.3162 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 484f7c33-bf50-49c3-1d97-08da911394d8 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: BN8NAM11FT049.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB6206 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alexander.deucher@amd.com, christian.koenig@amd.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Always keep selecetd ring sched list in ctx entity. Signed-off-by: James Zhu --- drivers/gpu/drm/scheduler/sched_entity.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/scheduler/sched_entity.c b/drivers/gpu/drm/scheduler/sched_entity.c index f5595607995b..39dca9cb8e0d 100644 --- a/drivers/gpu/drm/scheduler/sched_entity.c +++ b/drivers/gpu/drm/scheduler/sched_entity.c @@ -71,7 +71,7 @@ int drm_sched_entity_init(struct drm_sched_entity *entity, entity->guilty = guilty; entity->num_sched_list = num_sched_list; entity->priority = priority; - entity->sched_list = num_sched_list > 1 ? sched_list : NULL; + entity->sched_list = sched_list; entity->last_scheduled = NULL; if(num_sched_list) @@ -453,7 +453,7 @@ void drm_sched_entity_select_rq(struct drm_sched_entity *entity) struct drm_sched_rq *rq; /* single possible engine and already selected */ - if (!entity->sched_list) + if (entity->num_sched_list <= 1) return; /* queue non-empty, stay on the same engine */ @@ -482,9 +482,6 @@ void drm_sched_entity_select_rq(struct drm_sched_entity *entity) entity->rq = rq; } spin_unlock(&entity->rq_lock); - - if (entity->num_sched_list == 1) - entity->sched_list = NULL; } /** From patchwork Wed Sep 7 20:57:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Zhu X-Patchwork-Id: 12969384 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id BD665C54EE9 for ; Wed, 7 Sep 2022 20:58:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 43A0910E895; Wed, 7 Sep 2022 20:57:49 +0000 (UTC) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2089.outbound.protection.outlook.com [40.107.93.89]) by gabe.freedesktop.org (Postfix) with ESMTPS id 25A7E10E885; Wed, 7 Sep 2022 20:57:34 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QUGDZPXmsc7VDxBeQe4Y6qwTSU5+a8iSRYwSBZgEPCqcMuSI9JFPrsRkEQJkLE3hz9FUwcsujlijypiAJEXx2upv/RnkwRu0AfH0XIrxKh7b7WreeqBesFOYkA7UkO8NtV9Icpv8AJNu+iNRVYnnoTgFL7Udagq8Guy6aP+50bK9ozs6dKuK6SNBFZbGsnolJQv/N3FU0W04hM+LkJ1Xk2HtFZT+l7L39WXR/UxOeCvTkvs9K7Ivq3TVpe4oJ1p1FsxPrPNaQ4W28fB0DILCDSIZkwut/pRdBToM8AncaKwyP3lEQtahsJ2KubLmp2HihkdAkm3jgsOTdVJ6hlJRPA== 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=lyHwSeYVAr47BNMfu2EAzSms/H3ZylUlJ/1SlTxTTuA=; b=H48EkAwAOMgg9CNcmZc4bpbNUTL8wwN4KONtIlydsJS51Un6KxoG63GU37octnPMzgbbtK4928NdAOcd2rTs3vR3rHNJhS676VH3Wq0e5COvSxvOEBfUh+heHqWGQ9c4o88yLILxpeaHZWxn9jrob5kJdpCI/CTf6GNCLdy6+60AFl19RnfRb5qSC/g67mh7Hnx/nvE3HATwoJ4srv6ZgTFp4rW8PSh4+pb0c2LVgjUrSfqXDFjQu0OsAVOF7y9NtlAdMmXVTharAYwtIga1Uz9PAR1lVzqsVE1k528nKEcv7JhSvqTrhS8Sob1sXBCH8OdSfbAl67Rov5p8PPs2Mg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.freedesktop.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=lyHwSeYVAr47BNMfu2EAzSms/H3ZylUlJ/1SlTxTTuA=; b=HcZOUmmxfBFyuKqn7T9ktEG5Xj7DF4bKAPxTq7nw+3Ax6dMo/gIOjqOe+PkWVC/rix9Brl9Fn1VnuRpDZacOdIfvXKOiZ9BwbQ9yEdNqHVVN7+9XHZ/5ugYFySnNdhICqqzLoIE4vT7p3lN9b4Z2+hK3aHM2sU8xY/o1nFDPhT0= Received: from BN7PR02CA0024.namprd02.prod.outlook.com (2603:10b6:408:20::37) by DS7PR12MB6192.namprd12.prod.outlook.com (2603:10b6:8:97::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.14; Wed, 7 Sep 2022 20:57:32 +0000 Received: from BN8NAM11FT049.eop-nam11.prod.protection.outlook.com (2603:10b6:408:20:cafe::1d) by BN7PR02CA0024.outlook.office365.com (2603:10b6:408:20::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.12 via Frontend Transport; Wed, 7 Sep 2022 20:57:31 +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 BN8NAM11FT049.mail.protection.outlook.com (10.13.177.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5612.13 via Frontend Transport; Wed, 7 Sep 2022 20:57:31 +0000 Received: from jz-tester.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; Wed, 7 Sep 2022 15:57:31 -0500 From: James Zhu To: , Subject: [PATCH 4/4] drm/amdgpu: update amdgpu_ctx_init_entity Date: Wed, 7 Sep 2022 16:57:05 -0400 Message-ID: <20220907205705.934688-4-James.Zhu@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220907205705.934688-1-James.Zhu@amd.com> References: <20220907205705.934688-1-James.Zhu@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT049:EE_|DS7PR12MB6192:EE_ X-MS-Office365-Filtering-Correlation-Id: 5be30523-244f-4cdc-2c32-08da91139529 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: npCiwCRg+jngI50Gi4fjax7YfL/vI7K/4vh/0Hvd4I43lfIyVpix1ewZ0C/X2y8YILNVubFgpyqZfr33/Szpt0nVfQrn3sm5NroZEgFyGHtGOxkkvTilqBXP/VAXGEGhVcqImOrZ6qY4CQVkVwLNDc4GtaKli42vNvsG0G2KBE/f5O98vGSdioWKXmyy3A7Thvgl9CWoV8hg+SRcNJ9HnbwRvJ9BhlbNbLYQAcT4DfS106L3JMdC4sTp3NKeKkx30P4UAeaugIjYHU16bq3z/PwwDLD7GBREhBA9p5Fkh1Tv3ECa0j85qH+gmYWlF96p7CtJWUZARWcoe7Yn9gDlolFFuWSJEztHUKYc/ZP6bxQHdIlZy6AA/Js6bZXNoj/01B4+hr4Lz3DUVwipKD0OAzAnlQl/F9GTxcM+D0FaZMwF3OG7SnJHcHH/UGF4vevXyGuU5zr/IJX+BgrBmFIwJ7G5DhVLrmuqSQTgtaIOz3SBT4KKZGd+6+2larPktGpjrxWF4wblYXQxiWdbprS93HsQO0eVEtod5iE/adS0NjiWszwzZNUByGaK0EJ2c5aQhcLoKV3kMmmQYDkhlIDPEm5n5SA0IXW8AfGxzl+tsQRxoYl+swg3KVr4tK6k+tUtp20xVwz2wm8TmECMTnRFr8ZLT0bQAWOyfNFAk4BGXyLaQxNTZl1YjuYlkqryZgcpdif08yOAeTnD0y9m3iZHvxXnYwtbXCYhZwJ2nQRfD3IYsrShu98zdpK3g7zgQixAiCxLtF0EoTG22Sy6a2QqVGDAy/LdacvfIcQt4PgvLPIEKntkigmjnqvavw8I3FZ0 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)(346002)(39860400002)(396003)(136003)(376002)(46966006)(40470700004)(36840700001)(8936002)(6666004)(47076005)(426003)(81166007)(40480700001)(41300700001)(5660300002)(70206006)(70586007)(450100002)(8676002)(478600001)(4326008)(82740400003)(83380400001)(186003)(1076003)(2616005)(7696005)(356005)(15650500001)(86362001)(40460700003)(26005)(54906003)(110136005)(2906002)(336012)(16526019)(316002)(36860700001)(36756003)(82310400005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2022 20:57:31.8474 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5be30523-244f-4cdc-2c32-08da91139529 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: BN8NAM11FT049.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB6192 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alexander.deucher@amd.com, christian.koenig@amd.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" update amdgpu_ctx_init_entity with new drm_sched_pick_best. Signed-off-by: James Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c index 6ea8980c8ad7..3a1cb0a70392 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c @@ -201,7 +201,7 @@ static ktime_t amdgpu_ctx_entity_time(struct amdgpu_ctx *ctx, static int amdgpu_ctx_init_entity(struct amdgpu_ctx *ctx, u32 hw_ip, const u32 ring) { - struct drm_gpu_scheduler **scheds = NULL, *sched = NULL; + struct drm_gpu_scheduler **scheds = NULL; struct amdgpu_device *adev = ctx->mgr->adev; struct amdgpu_ctx_entity *entity; enum drm_sched_priority drm_prio; @@ -230,8 +230,7 @@ static int amdgpu_ctx_init_entity(struct amdgpu_ctx *ctx, u32 hw_ip, hw_ip == AMDGPU_HW_IP_VCN_DEC || hw_ip == AMDGPU_HW_IP_UVD_ENC || hw_ip == AMDGPU_HW_IP_UVD) { - sched = drm_sched_pick_best(scheds, num_scheds); - scheds = &sched; + scheds = drm_sched_pick_best(scheds, num_scheds); num_scheds = 1; }