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 E5AB5C55822 for ; Tue, 4 Aug 2026 16:51:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8DCAD10E692; Tue, 4 Aug 2026 16:51:08 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="KpZ98n04"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3C0B710E692 for ; Tue, 4 Aug 2026 16:51:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1785862267; x=1817398267; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=afJvUjA7HtA/giCuqIOtJyk6SF2sQJUwOlBo1xAK/BM=; b=KpZ98n04YcoMqLfdABvia3hKW2q2a3ed+Yp3n7tLCxy0py0ls1BHVJFE 7e9saSLSkPz2dBbX4W3tPUcyAqTo9MKmLJNyzxjkdG6Bszw5D3G+mVi5p riIleoMWhdHwYyQWCs8Ea40lk2uSWA6soEob4IwZFE9OZvZgcO1cUFrV6 VhWValoOFt9ndL3agqcl0VQZBSlV8M3nHRNpNFithFFiymUdQVPtQvSJh 1j+NT19WLkaCZnX1/ifNaHEoou7JJFNTMlsJ8qLN9HVI1+ZONrKK/9BBy BFUMvjKkvsBWM4nLZjRhfabz0LN078TmNLwJmT8lHPOsr5BePXSAKbJUA Q==; X-CSE-ConnectionGUID: 4DBSXcQzSdyqVV/qYjT3CQ== X-CSE-MsgGUID: bVni8EweSv2niJG2UKYgvg== X-IronPort-AV: E=McAfee;i="6800,10657,11865"; a="97925420" X-IronPort-AV: E=Sophos;i="6.25,204,1779174000"; d="scan'208";a="97925420" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Aug 2026 09:51:07 -0700 X-CSE-ConnectionGUID: QWSwzKDETiOhglbqVei8fw== X-CSE-MsgGUID: QtT58CQ3SfyGAS2JV+L7lw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.25,204,1779174000"; d="scan'208";a="265063691" Received: from dut6094bmgfrd.fm.intel.com ([10.80.55.44]) by orviesa003.jf.intel.com with ESMTP; 04 Aug 2026 09:51:08 -0700 From: Jia Yao To: intel-xe@lists.freedesktop.org Cc: Jia Yao , Gwan-gyeong Mun , Matthew Auld , stable@vger.kernel.org Subject: [PATCH v8 2/3] drm/xe/guc_ads: allocate UM queues in VRAM on dGFX Date: Tue, 4 Aug 2026 16:50:56 +0000 Message-ID: <20260804165057.129529-3-jia.yao@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260804165057.129529-1-jia.yao@intel.com> References: <20260804165057.129529-1-jia.yao@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" On iGPU, the UM queue BO is allocated in system memory. On dGFX, the BO was previously created in system memory and later reallocated in xe_guc_realloc_post_hwconfig(). Allocate the UM queue BO directly in VRAM on dGFX, where it is ultimately required. Fixes: 9c57bc08652a ("drm/xe/lnl: Drop force_probe requirement") Cc: Gwan-gyeong Mun Cc: Matthew Auld Cc: # v6.12+ Signed-off-by: Jia Yao Reviewed-by: Matthew Auld --- drivers/gpu/drm/xe/xe_guc.c | 6 ------ drivers/gpu/drm/xe/xe_guc_ads.c | 8 +++++--- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c index 4f132bf8539d..4286bd05c686 100644 --- a/drivers/gpu/drm/xe/xe_guc.c +++ b/drivers/gpu/drm/xe/xe_guc.c @@ -732,12 +732,6 @@ static int xe_guc_realloc_post_hwconfig(struct xe_guc *guc) if (ret) return ret; - if (guc->ads.um_queue_bo) { - ret = xe_managed_bo_reinit_in_vram(xe, tile, &guc->ads.um_queue_bo); - if (ret) - return ret; - } - return 0; } diff --git a/drivers/gpu/drm/xe/xe_guc_ads.c b/drivers/gpu/drm/xe/xe_guc_ads.c index f8c679cef003..77429ff4d2a9 100644 --- a/drivers/gpu/drm/xe/xe_guc_ads.c +++ b/drivers/gpu/drm/xe/xe_guc_ads.c @@ -445,15 +445,17 @@ int xe_guc_ads_init(struct xe_guc_ads *ads) /* * Allocate a separate BO for the HW fault ring (UM queues). * - * Round the size up to the next power of two so that + * Round the size up to the next power of two so that on iGPU * (system memory, no IOMMU) the TTM pool issues a single * alloc_pages(order=N) call, maximising the chance of getting * a physically contiguous block. GuC requires contiguous DPA. */ - size_t um_size = roundup_pow_of_two(GUC_UM_QUEUE_SIZE * + size_t um_size = IS_DGFX(xe) ? + GUC_UM_QUEUE_SIZE * GUC_UM_HW_QUEUE_MAX : + roundup_pow_of_two(GUC_UM_QUEUE_SIZE * GUC_UM_HW_QUEUE_MAX); - u32 um_flags = XE_BO_FLAG_SYSTEM | + u32 um_flags = XE_BO_FLAG_VRAM_IF_DGFX(tile) | XE_BO_FLAG_GGTT | XE_BO_FLAG_GGTT_INVALIDATE | XE_BO_FLAG_PINNED_NORESTORE; -- 2.43.0