]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/xe/guc: Unblock GuC buffer cache for all modes
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Mon, 12 May 2025 22:00:17 +0000 (00:00 +0200)
committerMichal Wajdeczko <michal.wajdeczko@intel.com>
Thu, 15 May 2025 10:29:54 +0000 (12:29 +0200)
Today we were using GuC buffer cache only in the PF mode, but
shortly we will want to use it also in native and VF mode.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Link: https://lore.kernel.org/r/20250512220018.172-2-michal.wajdeczko@intel.com
drivers/gpu/drm/xe/xe_guc.c
drivers/gpu/drm/xe/xe_guc_buf.c

index bac5471a1a7806ed7e41a241145666834a5e0eb8..350434a8b9537224ff37e087c28b4288dba55e56 100644 (file)
@@ -710,6 +710,10 @@ static int vf_guc_init_post_hwconfig(struct xe_guc *guc)
        if (err)
                return err;
 
+       err = xe_guc_buf_cache_init(&guc->buf);
+       if (err)
+               return err;
+
        /* XXX xe_guc_db_mgr_init not needed for now */
 
        return 0;
index 0193c94dd6a00bbce2e513faba68cdd1eceee119..14a07dca48e7b05e0c64794c404d5ee9538dbdeb 100644 (file)
@@ -37,10 +37,6 @@ int xe_guc_buf_cache_init(struct xe_guc_buf_cache *cache)
        struct xe_gt *gt = cache_to_gt(cache);
        struct xe_sa_manager *sam;
 
-       /* XXX: currently it's useful only for the PF actions */
-       if (!IS_SRIOV_PF(gt_to_xe(gt)))
-               return 0;
-
        sam = __xe_sa_bo_manager_init(gt_to_tile(gt), SZ_8K, 0, sizeof(u32));
        if (IS_ERR(sam))
                return PTR_ERR(sam);