Commit f647eff1 authored by Lucas De Marchi's avatar Lucas De Marchi Committed by Rodrigo Vivi

drm/xe: Remove dump function from reg_sr

The dump function was originally added with the idea that it could be
re-used both for printing the reg-sr data and saving it to pass to GuC
via ADS. This was not used by the GuC integration, so remove it now to
give place to a new debug.
Signed-off-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: default avatarMatt Roper <matthew.d.roper@intel.com>
Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
parent 043790f3
......@@ -43,32 +43,6 @@ int xe_reg_sr_init(struct xe_reg_sr *sr, const char *name, struct xe_device *xe)
return drmm_add_action_or_reset(&xe->drm, reg_sr_fini, sr);
}
int xe_reg_sr_dump_kv(struct xe_reg_sr *sr,
struct xe_reg_sr_kv **dst)
{
struct xe_reg_sr_kv *iter;
struct xe_reg_sr_entry *entry;
unsigned long idx;
if (xa_empty(&sr->xa)) {
*dst = NULL;
return 0;
}
*dst = kmalloc_array(sr->pool.used, sizeof(**dst), GFP_KERNEL);
if (!*dst)
return -ENOMEM;
iter = *dst;
xa_for_each(&sr->xa, idx, entry) {
iter->k = idx;
iter->v = *entry;
iter++;
}
return 0;
}
static struct xe_reg_sr_entry *alloc_entry(struct xe_reg_sr *sr)
{
if (sr->pool.used == sr->pool.allocated) {
......
......@@ -16,8 +16,6 @@ struct xe_device;
struct xe_gt;
int xe_reg_sr_init(struct xe_reg_sr *sr, const char *name, struct xe_device *xe);
int xe_reg_sr_dump_kv(struct xe_reg_sr *sr,
struct xe_reg_sr_kv **dst);
int xe_reg_sr_add(struct xe_reg_sr *sr, u32 reg,
const struct xe_reg_sr_entry *e);
......
......@@ -23,11 +23,6 @@ struct xe_reg_sr_entry {
u8 reg_type;
};
struct xe_reg_sr_kv {
u32 k;
struct xe_reg_sr_entry v;
};
struct xe_reg_sr {
struct {
struct xe_reg_sr_entry *arr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment