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 974BDC54E67 for ; Wed, 20 Mar 2024 11:28:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2A29B10EAED; Wed, 20 Mar 2024 11:28:28 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="MkPDMJ1u"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id 91E6310F0D3 for ; Wed, 20 Mar 2024 11:28:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710934107; x=1742470107; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=CPOd/nfIrpvQ2jsPG73YuMIGaI1hjRRev629VHlfGhE=; b=MkPDMJ1uuqYFVNmLUJQIXFxLsA8Us60kWoGJNEwDGLoAkPbdNNEUP7Bx n/E0KKqz3mniKy9YgGvYHXCm6Wa4q36+RIeCFily+jcslnoNx6sCFHvou LMDpZIvuG7+WydWGGKgDSyE1vZouuxKLHi+cPq4Q8Dbtx+mDUHfJPzLy8 INUnIExfVBfRiM/R6L1EKrBNaBQZg0zinLh5xyceoeoG9zilQGC3wb/LT N+kCl3mNN/Sknerve/J5wLfRw/A0rSBj0620/Gl8Zro52jxpXUQwb/PoU yjrYNle/2ro5u/ELBgQH8LPLz/QnfQ5mG0xO6hrc5EXxfgKdrKcEo5Jk0 w==; X-IronPort-AV: E=McAfee;i="6600,9927,11018"; a="9647746" X-IronPort-AV: E=Sophos;i="6.07,140,1708416000"; d="scan'208";a="9647746" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 04:28:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,140,1708416000"; d="scan'208";a="14016089" Received: from unknown (HELO mwauld-mobl1.intel.com) ([10.245.245.48]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 04:28:25 -0700 From: Matthew Auld To: intel-xe@lists.freedesktop.org Cc: Nirmoy Das Subject: [PATCH 2/2] drm/xe/bb: assert width in xe_bb_create_migration_job() Date: Wed, 20 Mar 2024 11:27:32 +0000 Message-ID: <20240320112730.219854-4-matthew.auld@intel.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240320112730.219854-3-matthew.auld@intel.com> References: <20240320112730.219854-3-matthew.auld@intel.com> 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" The q->width should always be exactly one here for migration queue/vm. The width will anyway be overridden later since we need to emit two jumps for special migration jobs. Enforce that here to ensure caller is not doing something strange. While here also convert to the helper to determine if the queue is migration based. Signed-off-by: Matthew Auld Cc: Nirmoy Das --- drivers/gpu/drm/xe/xe_bb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/xe/xe_bb.c b/drivers/gpu/drm/xe/xe_bb.c index a35e0781b7b9..541361caff3b 100644 --- a/drivers/gpu/drm/xe/xe_bb.c +++ b/drivers/gpu/drm/xe/xe_bb.c @@ -86,7 +86,8 @@ struct xe_sched_job *xe_bb_create_migration_job(struct xe_exec_queue *q, }; xe_gt_assert(q->gt, second_idx <= bb->len); - xe_gt_assert(q->gt, q->vm->flags & XE_VM_FLAG_MIGRATION); + xe_gt_assert(q->gt, xe_sched_job_is_migration(q)); + xe_gt_assert(q->gt, q->width == 1); return __xe_bb_create_job(q, bb, addr); } -- 2.44.0