mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-08 00:29:36 -04:00
drm/xe/debugfs: Make residencies definitions const
No need to keep them non-const. Also fix declaration of .name member, as it points to the const string. This translates to: add/remove: 1/0 grow/shrink: 0/2 up/down: 80/-248 (-168) Function old new delta residencies - 80 +80 dgfx_pcie_link_residencies_show 365 263 -102 dgfx_pkg_residencies_show 454 308 -146 Total: Before=2821548, After=2821380, chg -0.01% Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Soham Purkait <soham.purkait@intel.com> Cc: Jonathan Cavitt <jonathan.cavitt@intel.com> Cc: Karthik Poosa <karthik.poosa@intel.com> Cc: Riana Tauro <riana.tauro@intel.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Link: https://lore.kernel.org/r/20250905180225.8434-1-michal.wajdeczko@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
This commit is contained in:
committed by
Lucas De Marchi
parent
fce99326c9
commit
e57ae80fe0
@@ -40,7 +40,7 @@ DECLARE_FAULT_ATTR(gt_reset_failure);
|
||||
DECLARE_FAULT_ATTR(inject_csc_hw_error);
|
||||
|
||||
static void read_residency_counter(struct xe_device *xe, struct xe_mmio *mmio,
|
||||
u32 offset, char *name, struct drm_printer *p)
|
||||
u32 offset, const char *name, struct drm_printer *p)
|
||||
{
|
||||
u64 residency = 0;
|
||||
int ret;
|
||||
@@ -136,9 +136,9 @@ static int dgfx_pkg_residencies_show(struct seq_file *m, void *data)
|
||||
p = drm_seq_file_printer(m);
|
||||
xe_pm_runtime_get(xe);
|
||||
mmio = xe_root_tile_mmio(xe);
|
||||
struct {
|
||||
static const struct {
|
||||
u32 offset;
|
||||
char *name;
|
||||
const char *name;
|
||||
} residencies[] = {
|
||||
{BMG_G2_RESIDENCY_OFFSET, "Package G2"},
|
||||
{BMG_G6_RESIDENCY_OFFSET, "Package G6"},
|
||||
@@ -165,9 +165,9 @@ static int dgfx_pcie_link_residencies_show(struct seq_file *m, void *data)
|
||||
xe_pm_runtime_get(xe);
|
||||
mmio = xe_root_tile_mmio(xe);
|
||||
|
||||
struct {
|
||||
static const struct {
|
||||
u32 offset;
|
||||
char *name;
|
||||
const char *name;
|
||||
} residencies[] = {
|
||||
{BMG_PCIE_LINK_L0_RESIDENCY_OFFSET, "PCIE LINK L0 RESIDENCY"},
|
||||
{BMG_PCIE_LINK_L1_RESIDENCY_OFFSET, "PCIE LINK L1 RESIDENCY"},
|
||||
|
||||
Reference in New Issue
Block a user