From mboxrd@z Thu Jan 1 00:00:00 1970 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 56144D111AC for ; Wed, 26 Nov 2025 21:48:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0734710E704; Wed, 26 Nov 2025 21:48:07 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="eoj1AwGH"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by gabe.freedesktop.org (Postfix) with ESMTPS id DBCC610E6ED; Wed, 26 Nov 2025 21:47:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1764193673; x=1795729673; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=02nZW3nRosvOCa6C3ybqyNaHuAH4WuCFsoAVT1AkQMM=; b=eoj1AwGH+1HltKJgxb7Tiu3WqTQfX4/zjy0nfLoezHGvKwffwOM1P1VX HZVZQbFvTHUZjT93fDfzqlu9yjBJccHfT+nnHcpmECdpnYmQr04/T20AE Dp7QIAVCeWdj0Cir+haRVQUKy2A3zuAPqApUxAMdo7QiGe76KTOp19WMm lLqgVYZNIJS5TkG4rcIe+vZn01F5kx5IYSz2x2iPJ6Fbxvx1HfHH91HjB OhonadA+bTr4FSfv7OW9o5MPn8YqulBmC64Qyy7sY4riyl7L4Z6FTPVKK jdEjOPQo1On5NOeec6rIdU4Sk4EoGgbJAiRvD9DnrMbNiSx+0e2RGLBHV Q==; X-CSE-ConnectionGUID: Dc26yvLSQhy16MAEIdMZtg== X-CSE-MsgGUID: zLb1c9OLQJKTAc5GF+GV1A== X-IronPort-AV: E=McAfee;i="6800,10657,11625"; a="91721895" X-IronPort-AV: E=Sophos;i="6.20,229,1758610800"; d="scan'208";a="91721895" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Nov 2025 13:47:52 -0800 X-CSE-ConnectionGUID: ynI6100QRoqwAHKFxl+Bgw== X-CSE-MsgGUID: lnP1bFDsReyKWrl/aAOFdA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.20,229,1758610800"; d="scan'208";a="193281170" Received: from lstrano-desk.jf.intel.com ([10.54.39.91]) by fmviesa008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Nov 2025 13:47:52 -0800 From: Matthew Brost To: intel-xe@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Subject: [PATCH v6 0/8] Fix DRM scheduler layering violations in Xe Date: Wed, 26 Nov 2025 13:47:40 -0800 Message-Id: <20251126214748.650107-1-matthew.brost@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" At XDC, we discussed that drivers should avoid accessing DRM scheduler internals, misusing DRM scheduler locks, and adopt a well-defined pending job list iterator. This series proposes the necessary changes to the DRM scheduler to bring Xe in line with that agreement and updates Xe to use the new DRM scheduler API. While here, cleanup LR queue handling and simplify GuC state machine in Xe too. v2: - Fix checkpatch / naming issues v3: - Only allow pending job list iterator to be called on stopped schedulers - Cleanup LR queue handling / fix a few misselanous Xe scheduler issues v4: - Address Niranjana's feedback - Add patch to avoid toggling scheduler state in the TDR v5: - Rebase - Fixup LRC timeout check (Umesh) v6: - Fix VF bugs (Testing) Matt Matthew Brost (8): drm/sched: Add several job helpers to avoid drivers touching scheduler state drm/sched: Add pending job list iterator drm/xe: Add dedicated message lock drm/xe: Stop abusing DRM scheduler internals drm/xe: Only toggle scheduling in TDR if GuC is running drm/xe: Do not deregister queues in TDR drm/xe: Remove special casing for LR queues in submission drm/xe: Avoid toggling schedule state to check LRC timestamp in TDR drivers/gpu/drm/scheduler/sched_main.c | 4 +- drivers/gpu/drm/xe/xe_gpu_scheduler.c | 9 +- drivers/gpu/drm/xe/xe_gpu_scheduler.h | 37 +- drivers/gpu/drm/xe/xe_gpu_scheduler_types.h | 2 + drivers/gpu/drm/xe/xe_guc_exec_queue_types.h | 2 - drivers/gpu/drm/xe/xe_guc_submit.c | 362 +++---------------- drivers/gpu/drm/xe/xe_guc_submit_types.h | 11 - drivers/gpu/drm/xe/xe_hw_fence.c | 16 - drivers/gpu/drm/xe/xe_hw_fence.h | 2 - drivers/gpu/drm/xe/xe_lrc.c | 42 ++- drivers/gpu/drm/xe/xe_lrc.h | 3 +- drivers/gpu/drm/xe/xe_ring_ops.c | 6 +- drivers/gpu/drm/xe/xe_sched_job.c | 1 + drivers/gpu/drm/xe/xe_sched_job_types.h | 2 + drivers/gpu/drm/xe/xe_trace.h | 5 - include/drm/gpu_scheduler.h | 82 +++++ 16 files changed, 192 insertions(+), 394 deletions(-) -- 2.34.1