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 D48C7CF857C for ; Thu, 20 Nov 2025 10:25:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9866110E73B; Thu, 20 Nov 2025 10:25:00 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="WJ4mZ+qd"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1C5DE10E73B for ; Thu, 20 Nov 2025 10:24:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1763634298; x=1795170298; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=oYhijw9Rfep7KjVWJJgvbl/gpIfSSLCjNSNY4hHAXzQ=; b=WJ4mZ+qdghusWQmlvbvRKv8gfNoUEwc52NIFzwvFfVFN9dbMcln20Nal YkGAr+ArSXegpg0Zi5oK/iIZbsGDRqZa1w4PDqcB+zzAUp465gNy6248H oiJvBquPJGa/DHr2jAn0WYwhMrNOseQfaAlx7a71vZW7tamLBvwzNC+KS +r5R66FpGzOml/tfX1cpySiuyT2+b/H243WhVgRAJc2ic3dKz9jH9a/eI e24uXZqOIylf3nbIPNCXCkeyqdZ+MjoyLHFAieoxAD/zNTKL0eZMCWAsh dEMJIQc7z6hNa4FOMyvx55Q7/TQh9MNI9anzS8iFbtvIQ+fa86UooPmGD g==; X-CSE-ConnectionGUID: x/szlMNBQoKkkMtG4aQgUQ== X-CSE-MsgGUID: Muy+9stmTE6EH2/NHaRa5A== X-IronPort-AV: E=McAfee;i="6800,10657,11618"; a="76307651" X-IronPort-AV: E=Sophos;i="6.19,317,1754982000"; d="scan'208";a="76307651" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Nov 2025 02:24:58 -0800 X-CSE-ConnectionGUID: UJw7CPFKSNOlghGJuXJZxQ== X-CSE-MsgGUID: txKqi9GaSfOOuLJ6qym4aQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.19,317,1754982000"; d="scan'208";a="195463245" Received: from egrumbac-mobl6.ger.corp.intel.com (HELO mwauld-desk.intel.com) ([10.245.244.162]) by ORVIESA003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Nov 2025 02:24:57 -0800 From: Matthew Auld To: intel-xe@lists.freedesktop.org Cc: =?UTF-8?q?Thomas=20Hellstr=C3=B6m?= , Matthew Brost Subject: [PATCH v2 2/2] drm/xe/migrate: fix job lock assert Date: Thu, 20 Nov 2025 10:24:21 +0000 Message-ID: <20251120102418.300378-6-matthew.auld@intel.com> X-Mailer: git-send-email 2.51.1 In-Reply-To: <20251120102418.300378-4-matthew.auld@intel.com> References: <20251120102418.300378-4-matthew.auld@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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" We are meant to be checking the user vm for the bind queue, but actually we are checking the migrate vm. For various reasons this is not currently firing but this will likely change in the future. Now that we have the user_vm attached to the bind queue, we can fix this by directly checking that here. Fixes: dba89840a920 ("drm/xe: Add GT TLB invalidation jobs") Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Matthew Brost Reviewed-by: Matthew Brost --- drivers/gpu/drm/xe/xe_migrate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_migrate.c b/drivers/gpu/drm/xe/xe_migrate.c index f3b66b55acfb..2ed8ee32b5cf 100644 --- a/drivers/gpu/drm/xe/xe_migrate.c +++ b/drivers/gpu/drm/xe/xe_migrate.c @@ -2481,7 +2481,7 @@ void xe_migrate_job_lock(struct xe_migrate *m, struct xe_exec_queue *q) if (is_migrate) mutex_lock(&m->job_mutex); else - xe_vm_assert_held(q->vm); /* User queues VM's should be locked */ + xe_vm_assert_held(q->user_vm); /* User queues VM's should be locked */ } /** @@ -2499,7 +2499,7 @@ void xe_migrate_job_unlock(struct xe_migrate *m, struct xe_exec_queue *q) if (is_migrate) mutex_unlock(&m->job_mutex); else - xe_vm_assert_held(q->vm); /* User queues VM's should be locked */ + xe_vm_assert_held(q->user_vm); /* User queues VM's should be locked */ } #if IS_ENABLED(CONFIG_PROVE_LOCKING) -- 2.51.1