Skip to content

Commit 8f3d1c9

Browse files
Dr. David Alan Gilbertlucasdemarchi
authored andcommitted
drm/xe: Remove unused functions
xe_bo_create_from_data() last use was removed in 2023 by commit 0e1a47f ("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 4e12415 ("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 <[email protected]> Signed-off-by: Dr. David Alan Gilbert <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lucas De Marchi <[email protected]>
1 parent 7b6db17 commit 8f3d1c9

File tree

6 files changed

+0
-51
lines changed

6 files changed

+0
-51
lines changed

drivers/gpu/drm/xe/xe_bo.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2174,21 +2174,6 @@ struct xe_bo *xe_bo_create_pin_map(struct xe_device *xe, struct xe_tile *tile,
21742174
return xe_bo_create_pin_map_at(xe, tile, vm, size, ~0ull, type, flags);
21752175
}
21762176

2177-
struct xe_bo *xe_bo_create_from_data(struct xe_device *xe, struct xe_tile *tile,
2178-
const void *data, size_t size,
2179-
enum ttm_bo_type type, u32 flags)
2180-
{
2181-
struct xe_bo *bo = xe_bo_create_pin_map(xe, tile, NULL,
2182-
ALIGN(size, PAGE_SIZE),
2183-
type, flags);
2184-
if (IS_ERR(bo))
2185-
return bo;
2186-
2187-
xe_map_memcpy_to(xe, &bo->vmap, 0, data, size);
2188-
2189-
return bo;
2190-
}
2191-
21922177
static void __xe_bo_unpin_map_no_vm(void *arg)
21932178
{
21942179
xe_bo_unpin_map_no_vm(arg);

drivers/gpu/drm/xe/xe_bo.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,6 @@ struct xe_bo *xe_bo_create_pin_map_at_aligned(struct xe_device *xe,
118118
size_t size, u64 offset,
119119
enum ttm_bo_type type, u32 flags,
120120
u64 alignment);
121-
struct xe_bo *xe_bo_create_from_data(struct xe_device *xe, struct xe_tile *tile,
122-
const void *data, size_t size,
123-
enum ttm_bo_type type, u32 flags);
124121
struct xe_bo *xe_managed_bo_create_pin_map(struct xe_device *xe, struct xe_tile *tile,
125122
size_t size, u32 flags);
126123
struct xe_bo *xe_managed_bo_create_from_data(struct xe_device *xe, struct xe_tile *tile,

drivers/gpu/drm/xe/xe_gt_topology.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -290,11 +290,6 @@ xe_dss_mask_group_ffs(const xe_dss_mask_t mask, int groupsize, int groupnum)
290290
return find_next_bit(mask, XE_MAX_DSS_FUSE_BITS, groupnum * groupsize);
291291
}
292292

293-
bool xe_dss_mask_empty(const xe_dss_mask_t mask)
294-
{
295-
return bitmap_empty(mask, XE_MAX_DSS_FUSE_BITS);
296-
}
297-
298293
/**
299294
* xe_gt_topology_has_dss_in_quadrant - check fusing of DSS in GT quadrant
300295
* @gt: GT to check

drivers/gpu/drm/xe/xe_gt_topology.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ xe_gt_topology_mask_last_dss(const xe_dss_mask_t mask)
4141
unsigned int
4242
xe_dss_mask_group_ffs(const xe_dss_mask_t mask, int groupsize, int groupnum);
4343

44-
bool xe_dss_mask_empty(const xe_dss_mask_t mask);
45-
4644
bool
4745
xe_gt_topology_has_dss_in_quadrant(struct xe_gt *gt, int quad);
4846

drivers/gpu/drm/xe/xe_rtp.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -358,21 +358,6 @@ bool xe_rtp_match_first_render_or_compute(const struct xe_gt *gt,
358358
hwe->engine_id == __ffs(render_compute_mask);
359359
}
360360

361-
bool xe_rtp_match_first_gslice_fused_off(const struct xe_gt *gt,
362-
const struct xe_hw_engine *hwe)
363-
{
364-
unsigned int dss_per_gslice = 4;
365-
unsigned int dss;
366-
367-
if (drm_WARN(&gt_to_xe(gt)->drm, xe_dss_mask_empty(gt->fuse_topo.g_dss_mask),
368-
"Checking gslice for platform without geometry pipeline\n"))
369-
return false;
370-
371-
dss = xe_dss_mask_group_ffs(gt->fuse_topo.g_dss_mask, 0, 0);
372-
373-
return dss >= dss_per_gslice;
374-
}
375-
376361
bool xe_rtp_match_not_sriov_vf(const struct xe_gt *gt,
377362
const struct xe_hw_engine *hwe)
378363
{

drivers/gpu/drm/xe/xe_rtp.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -466,17 +466,6 @@ bool xe_rtp_match_even_instance(const struct xe_gt *gt,
466466
bool xe_rtp_match_first_render_or_compute(const struct xe_gt *gt,
467467
const struct xe_hw_engine *hwe);
468468

469-
/*
470-
* xe_rtp_match_first_gslice_fused_off - Match when first gslice is fused off
471-
*
472-
* @gt: GT structure
473-
* @hwe: Engine instance
474-
*
475-
* Returns: true if first gslice is fused off, false otherwise.
476-
*/
477-
bool xe_rtp_match_first_gslice_fused_off(const struct xe_gt *gt,
478-
const struct xe_hw_engine *hwe);
479-
480469
/*
481470
* xe_rtp_match_not_sriov_vf - Match when not on SR-IOV VF device
482471
*

0 commit comments

Comments
 (0)