diff options
author | Lucas De Marchi <lucas.demarchi@intel.com> | 2023-03-14 03:30:01 +0300 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-12-20 02:29:47 +0300 |
commit | d855d2246ea6b04cbda372846b21c040fb068575 (patch) | |
tree | abc1dc06f85fd8b57d91063bbff62d432290f300 /drivers/gpu/drm/xe/xe_reg_sr.c | |
parent | 5be84050ddce298503e7290d375b6dcf3ce920d2 (diff) | |
download | linux-d855d2246ea6b04cbda372846b21c040fb068575.tar.xz |
drm/xe: Print whitelist while applying
Besides printing the various register save-restore, it's also useful to
know the register being allowed/denied access from unprivileged batch
buffers. Print them during device probe.
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://lore.kernel.org/r/20230314003012.2600353-4-lucas.demarchi@intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_reg_sr.c')
-rw-r--r-- | drivers/gpu/drm/xe/xe_reg_sr.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/xe/xe_reg_sr.c b/drivers/gpu/drm/xe/xe_reg_sr.c index 3d041c9330df..ef12de48ab73 100644 --- a/drivers/gpu/drm/xe/xe_reg_sr.c +++ b/drivers/gpu/drm/xe/xe_reg_sr.c @@ -20,6 +20,7 @@ #include "xe_gt_mcr.h" #include "xe_macros.h" #include "xe_mmio.h" +#include "xe_reg_whitelist.h" #include "xe_rtp_types.h" #define XE_REG_SR_GROW_STEP_DEFAULT 16 @@ -193,6 +194,7 @@ void xe_reg_sr_apply_whitelist(struct xe_reg_sr *sr, u32 mmio_base, { struct xe_device *xe = gt_to_xe(gt); struct xe_reg_sr_entry *entry; + struct drm_printer p; unsigned long reg; unsigned int slot = 0; int err; @@ -206,7 +208,9 @@ void xe_reg_sr_apply_whitelist(struct xe_reg_sr *sr, u32 mmio_base, if (err) goto err_force_wake; + p = drm_debug_printer(KBUILD_MODNAME); xa_for_each(&sr->xa, reg, entry) { + xe_reg_whitelist_print_entry(&p, 0, reg, entry); xe_mmio_write32(gt, RING_FORCE_TO_NONPRIV(mmio_base, slot).reg, reg | entry->set_bits); slot++; |