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 5FE0FF34C49 for ; Mon, 13 Apr 2026 13:17:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 26FF710E43F; Mon, 13 Apr 2026 13:17:02 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="GMMgKQ0Q"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id CD89310E43F for ; Mon, 13 Apr 2026 13:17:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1776086221; x=1807622221; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=DKiSvDRiMycsF+VxCgySqc+pw7M/pikflVy/G2IQRrY=; b=GMMgKQ0QFJnow7kWoxdFAg9pimeg0j4dB/dB8k+jTAR06gWsLd7/uQJq zhYvCLaFjlc/ZnEDEw+xcqC/qE6CpFrSIVKsvjAr6YRdR58KWJ5EhdqPl F35KaQZ7ZDZMToDXo8jk9F5bBxnTKw9GQbYIvAxWHheZVaNlO05rq37rq ZxIONsv+5Q4JHPtxRM/yx3C7oLm9+l/y2G1tP5K3ZZ07HELhAdFSpzrZ2 q37Vkpt6GYzitu3VQMUnot47V8drf69s+rc2TRcKJjVDy7IIEoBH2dy2a ufRSfovcqIRolooT2STD53AXcXFlpqyLyf2yx3Ps+gqM90FWmosjgBT3v w==; X-CSE-ConnectionGUID: Ok8naPj0S/m64Zmo8SKhow== X-CSE-MsgGUID: omdzHYf2T4ScLWgWyfbyEA== X-IronPort-AV: E=McAfee;i="6800,10657,11758"; a="77037298" X-IronPort-AV: E=Sophos;i="6.23,177,1770624000"; d="scan'208";a="77037298" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2026 06:17:01 -0700 X-CSE-ConnectionGUID: jvpkonllQ+umR/p1uojAZA== X-CSE-MsgGUID: 5fYiV26uQ0eQpgGdGjPmIw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,177,1770624000"; d="scan'208";a="260224330" Received: from tejasupa-desk.iind.intel.com (HELO tejasupa-desk) ([10.190.239.37]) by orviesa002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2026 06:16:58 -0700 From: Tejas Upadhyay To: intel-xe@lists.freedesktop.org Cc: matthew.auld@intel.com, matthew.brost@intel.com, thomas.hellstrom@linux.intel.com, himal.prasad.ghimiray@intel.com, Tejas Upadhyay Subject: [RFC PATCH V7 3/9] drm/xe: Link LRC BO and its execution Queue Date: Mon, 13 Apr 2026 18:46:24 +0530 Message-ID: <20260413131623.2891528-14-tejas.upadhyay@intel.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260413131623.2891528-11-tejas.upadhyay@intel.com> References: <20260413131623.2891528-11-tejas.upadhyay@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" To establish a link between an LRC BO (Logical Ring Context Buffer Object) and its corresponding execution Queue in the drm/xe driver, you need to store a back-pointer to the queue within the BO's private data structure. This allows the driver to identify and take corrective action on the specific queue if the LRC BO encounters an error (e.g., memory corruption or eviction issues). Signed-off-by: Tejas Upadhyay --- drivers/gpu/drm/xe/xe_bo_types.h | 3 +++ drivers/gpu/drm/xe/xe_exec_queue.c | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/gpu/drm/xe/xe_bo_types.h b/drivers/gpu/drm/xe/xe_bo_types.h index ff8317bfc1ae..24f5da89dbde 100644 --- a/drivers/gpu/drm/xe/xe_bo_types.h +++ b/drivers/gpu/drm/xe/xe_bo_types.h @@ -19,6 +19,7 @@ struct xe_device; struct xe_vm; +struct xe_exec_queue; #define XE_BO_MAX_PLACEMENTS 3 @@ -39,6 +40,8 @@ struct xe_bo { u32 flags; /** @vm: VM this BO is attached to, for extobj this will be NULL */ struct xe_vm *vm; + /** @q: Queue this BO is attached to, mostly for LRC BO, NULL otherwise */ + struct xe_exec_queue *q; /** @tile: Tile this BO is attached to (kernel BO only) */ struct xe_tile *tile; /** @placements: valid placements for this BO */ diff --git a/drivers/gpu/drm/xe/xe_exec_queue.c b/drivers/gpu/drm/xe/xe_exec_queue.c index b287d0e0e60a..b3b80893c387 100644 --- a/drivers/gpu/drm/xe/xe_exec_queue.c +++ b/drivers/gpu/drm/xe/xe_exec_queue.c @@ -386,6 +386,7 @@ static int __xe_exec_queue_init(struct xe_exec_queue *q, u32 exec_queue_flags) goto err_lrc; } + lrc->bo->q = q; xe_exec_queue_set_lrc(q, lrc, i); if (__lrc) -- 2.52.0