]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/xe: Remove unused functions
authorDr. David Alan Gilbert <linux@treblig.org>
Sun, 13 Jul 2025 15:25:31 +0000 (16:25 +0100)
committerLucas De Marchi <lucas.demarchi@intel.com>
Mon, 14 Jul 2025 14:55:18 +0000 (07:55 -0700)
xe_bo_create_from_data() last use was removed in 2023 by
commit 0e1a47fcabc8 ("drm/xe: Add a helper for DRM device-lifetime BO
create")

xe_rtp_match_first_gslice_fused_off() last use was removed in 2023 by
commit 4e124151fcfc ("drm/xe/dg2: Drop pre-production workarounds")

Remove them, and xe_dss_mask_empty whose last use was by
xe_rtp_match_first_gslice_fused_off().

(Xe has a bunch ofother symbols that have been added but not used,
given how new it is, I've left those, as opposed to these that
had the code that used them removed).

Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Link: https://lore.kernel.org/r/20250713152531.219326-1-linux@treblig.org
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
drivers/gpu/drm/xe/xe_bo.c
drivers/gpu/drm/xe/xe_bo.h
drivers/gpu/drm/xe/xe_gt_topology.c
drivers/gpu/drm/xe/xe_gt_topology.h
drivers/gpu/drm/xe/xe_rtp.c
drivers/gpu/drm/xe/xe_rtp.h

index 4e0355d0f406b0718a1110f8d18111d216a526b6..18f27da47a3634b366d3c4f42546d90b1cf1ae28 100644 (file)
@@ -2174,21 +2174,6 @@ struct xe_bo *xe_bo_create_pin_map(struct xe_device *xe, struct xe_tile *tile,
        return xe_bo_create_pin_map_at(xe, tile, vm, size, ~0ull, type, flags);
 }
 
-struct xe_bo *xe_bo_create_from_data(struct xe_device *xe, struct xe_tile *tile,
-                                    const void *data, size_t size,
-                                    enum ttm_bo_type type, u32 flags)
-{
-       struct xe_bo *bo = xe_bo_create_pin_map(xe, tile, NULL,
-                                               ALIGN(size, PAGE_SIZE),
-                                               type, flags);
-       if (IS_ERR(bo))
-               return bo;
-
-       xe_map_memcpy_to(xe, &bo->vmap, 0, data, size);
-
-       return bo;
-}
-
 static void __xe_bo_unpin_map_no_vm(void *arg)
 {
        xe_bo_unpin_map_no_vm(arg);
index 8559901e4088ebe7fedf14204b514ed3d15353f9..02e8cde4c6b201dcdffed1cf2f9177fe8410a8ee 100644 (file)
@@ -118,9 +118,6 @@ struct xe_bo *xe_bo_create_pin_map_at_aligned(struct xe_device *xe,
                                              size_t size, u64 offset,
                                              enum ttm_bo_type type, u32 flags,
                                              u64 alignment);
-struct xe_bo *xe_bo_create_from_data(struct xe_device *xe, struct xe_tile *tile,
-                                    const void *data, size_t size,
-                                    enum ttm_bo_type type, u32 flags);
 struct xe_bo *xe_managed_bo_create_pin_map(struct xe_device *xe, struct xe_tile *tile,
                                           size_t size, u32 flags);
 struct xe_bo *xe_managed_bo_create_from_data(struct xe_device *xe, struct xe_tile *tile,
index 305939c697475db2faf759799e23bff87e4810ff..8c63e32636434e1c84acd1f40bc883867670a6ee 100644 (file)
@@ -290,11 +290,6 @@ xe_dss_mask_group_ffs(const xe_dss_mask_t mask, int groupsize, int groupnum)
        return find_next_bit(mask, XE_MAX_DSS_FUSE_BITS, groupnum * groupsize);
 }
 
-bool xe_dss_mask_empty(const xe_dss_mask_t mask)
-{
-       return bitmap_empty(mask, XE_MAX_DSS_FUSE_BITS);
-}
-
 /**
  * xe_gt_topology_has_dss_in_quadrant - check fusing of DSS in GT quadrant
  * @gt: GT to check
index a72d26ba06530aad8eeed8743dcf83bbd724435f..c8140704ad4c1411f61358fd34c9a2a44ade308b 100644 (file)
@@ -41,8 +41,6 @@ xe_gt_topology_mask_last_dss(const xe_dss_mask_t mask)
 unsigned int
 xe_dss_mask_group_ffs(const xe_dss_mask_t mask, int groupsize, int groupnum);
 
-bool xe_dss_mask_empty(const xe_dss_mask_t mask);
-
 bool
 xe_gt_topology_has_dss_in_quadrant(struct xe_gt *gt, int quad);
 
index e4b3b135a4af00db2c574ebf44a401f936e6dc60..95571b87aa73cbe37b7601064e2f79d25a43af40 100644 (file)
@@ -358,21 +358,6 @@ bool xe_rtp_match_first_render_or_compute(const struct xe_gt *gt,
                hwe->engine_id == __ffs(render_compute_mask);
 }
 
-bool xe_rtp_match_first_gslice_fused_off(const struct xe_gt *gt,
-                                        const struct xe_hw_engine *hwe)
-{
-       unsigned int dss_per_gslice = 4;
-       unsigned int dss;
-
-       if (drm_WARN(&gt_to_xe(gt)->drm, xe_dss_mask_empty(gt->fuse_topo.g_dss_mask),
-                    "Checking gslice for platform without geometry pipeline\n"))
-               return false;
-
-       dss = xe_dss_mask_group_ffs(gt->fuse_topo.g_dss_mask, 0, 0);
-
-       return dss >= dss_per_gslice;
-}
-
 bool xe_rtp_match_not_sriov_vf(const struct xe_gt *gt,
                               const struct xe_hw_engine *hwe)
 {
index ac260feaabef5eef43d13341e8df6202510f255e..5ed6c14b9ae343399f5352e33e702477d07095f2 100644 (file)
@@ -466,17 +466,6 @@ bool xe_rtp_match_even_instance(const struct xe_gt *gt,
 bool xe_rtp_match_first_render_or_compute(const struct xe_gt *gt,
                                          const struct xe_hw_engine *hwe);
 
-/*
- * xe_rtp_match_first_gslice_fused_off - Match when first gslice is fused off
- *
- * @gt: GT structure
- * @hwe: Engine instance
- *
- * Returns: true if first gslice is fused off, false otherwise.
- */
-bool xe_rtp_match_first_gslice_fused_off(const struct xe_gt *gt,
-                                        const struct xe_hw_engine *hwe);
-
 /*
  * xe_rtp_match_not_sriov_vf - Match when not on SR-IOV VF device
  *