Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/xe: Add infrastructure for per engine tuning

Add the infrastructure for per engine tuning in preparation for disable
indirect state.

v3: Rebase
v4: Fix rebasing issues

Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Matt Atwood <matthew.s.atwood@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

authored by

Matt Atwood and committed by
Rodrigo Vivi
a617b304 3a13c2de

+15
+2
drivers/gpu/drm/xe/xe_hw_engine.c
··· 25 25 #include "xe_reg_sr.h" 26 26 #include "xe_rtp.h" 27 27 #include "xe_sched_job.h" 28 + #include "xe_tuning.h" 28 29 #include "xe_wa.h" 29 30 30 31 #define MAX_MMIO_BASES 3 ··· 406 405 } 407 406 408 407 xe_reg_sr_init(&hwe->reg_sr, hwe->name, gt_to_xe(gt)); 408 + xe_tuning_process_engine(hwe); 409 409 xe_wa_process_engine(hwe); 410 410 hw_engine_setup_default_state(hwe); 411 411
+12
drivers/gpu/drm/xe/xe_tuning.c
··· 27 27 {} 28 28 }; 29 29 30 + static const struct xe_rtp_entry_sr engine_tunings[] = { 31 + {} 32 + }; 33 + 30 34 static const struct xe_rtp_entry_sr lrc_tunings[] = { 31 35 { XE_RTP_NAME("Tuning: ganged timer, also known as 16011163337"), 32 36 XE_RTP_RULES(GRAPHICS_VERSION_RANGE(1200, 1210), ENGINE_CLASS(RENDER)), ··· 68 64 xe_rtp_process_to_sr(&ctx, gt_tunings, &gt->reg_sr); 69 65 } 70 66 EXPORT_SYMBOL_IF_KUNIT(xe_tuning_process_gt); 67 + 68 + void xe_tuning_process_engine(struct xe_hw_engine *hwe) 69 + { 70 + struct xe_rtp_process_ctx ctx = XE_RTP_PROCESS_CTX_INITIALIZER(hwe); 71 + 72 + xe_rtp_process_to_sr(&ctx, engine_tunings, &hwe->reg_sr); 73 + } 74 + EXPORT_SYMBOL_IF_KUNIT(xe_tuning_process_engine); 71 75 72 76 /** 73 77 * xe_tuning_process_lrc - process lrc tunings
+1
drivers/gpu/drm/xe/xe_tuning.h
··· 10 10 struct xe_hw_engine; 11 11 12 12 void xe_tuning_process_gt(struct xe_gt *gt); 13 + void xe_tuning_process_engine(struct xe_hw_engine *hwe); 13 14 void xe_tuning_process_lrc(struct xe_hw_engine *hwe); 14 15 15 16 #endif