summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_pcode_api.h
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@intel.com>2025-11-10 08:41:08 -0800
committerLucas De Marchi <lucas.demarchi@intel.com>2025-11-12 08:57:27 -0800
commit459a0ce8dcb19edbd270d26b07fc9d72bfeece36 (patch)
tree744360bd21d6e0ce5e0ab63ff0e7f98c9ba47a46 /drivers/gpu/drm/xe/xe_pcode_api.h
parent53361aa64f2137e31a10813ccbd00d99f4dac130 (diff)
drm/xe/pcode: Rework error mapping
The sparse array used for error decoding from is unnecessarily big. It should be better handled by a switch statement that will also allow us to more easily improve this code. Add a CASE_ERR() macro to keep the table compact and use it instead of the 256-entries array, which saves some space: $ bloat-o-meter xe_pcode.o.old xe_pcode.o add/remove: 0/1 grow/shrink: 2/0 up/down: 190/-4096 (-3906) Function old new delta __pcode_mailbox_rw 363 465 +102 __pcode_mailbox_rw.cold 58 146 +88 err_decode 4096 - -4096 Total: Before=7890, After=3984, chg -49.51% Reviewed-by: Raag Jadav <raag.jadav@intel.com> Link: https://patch.msgid.link/20251110-pcode-errmap-v2-1-cb18c8f54238@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_pcode_api.h')
-rw-r--r--drivers/gpu/drm/xe/xe_pcode_api.h6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/gpu/drm/xe/xe_pcode_api.h b/drivers/gpu/drm/xe/xe_pcode_api.h
index 92bfcba51e19..70dcd6625680 100644
--- a/drivers/gpu/drm/xe/xe_pcode_api.h
+++ b/drivers/gpu/drm/xe/xe_pcode_api.h
@@ -92,9 +92,3 @@
#define BMG_PCIE_CAP XE_REG(0x138340)
#define LINK_DOWNGRADE REG_GENMASK(1, 0)
#define DOWNGRADE_CAPABLE 2
-
-struct pcode_err_decode {
- int errno;
- const char *str;
-};
-