mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 02:53:36 +02:00
drm/xe/reg_sr: Use a single parameter for xe_reg_sr_apply_whitelist()
All other parameters can be extracted from a single struct xe_hw_engine reference. This removes redundancy and simplifies the code. Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Link: https://lore.kernel.org/r/20230609143815.302540-2-gustavo.sousa@intel.com Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
This commit is contained in:
parent
f1a5a9bf14
commit
1011812c64
|
|
@ -491,8 +491,7 @@ static int do_gt_restart(struct xe_gt *gt)
|
|||
|
||||
for_each_hw_engine(hwe, gt, id) {
|
||||
xe_reg_sr_apply_mmio(&hwe->reg_sr, gt);
|
||||
xe_reg_sr_apply_whitelist(&hwe->reg_whitelist,
|
||||
hwe->mmio_base, gt);
|
||||
xe_reg_sr_apply_whitelist(hwe);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -381,7 +381,7 @@ static int hw_engine_init(struct xe_gt *gt, struct xe_hw_engine *hwe,
|
|||
XE_BUG_ON(!(gt->info.engine_mask & BIT(id)));
|
||||
|
||||
xe_reg_sr_apply_mmio(&hwe->reg_sr, gt);
|
||||
xe_reg_sr_apply_whitelist(&hwe->reg_whitelist, hwe->mmio_base, gt);
|
||||
xe_reg_sr_apply_whitelist(hwe);
|
||||
|
||||
hwe->hwsp = xe_bo_create_pin_map(xe, tile, NULL, SZ_4K, ttm_bo_type_kernel,
|
||||
XE_BO_CREATE_VRAM_IF_DGFX(tile) |
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
#include "xe_gt.h"
|
||||
#include "xe_gt_mcr.h"
|
||||
#include "xe_gt_printk.h"
|
||||
#include "xe_hw_engine_types.h"
|
||||
#include "xe_macros.h"
|
||||
#include "xe_mmio.h"
|
||||
#include "xe_reg_whitelist.h"
|
||||
|
|
@ -211,12 +212,14 @@ void xe_reg_sr_apply_mmio(struct xe_reg_sr *sr, struct xe_gt *gt)
|
|||
drm_err(&xe->drm, "Failed to apply, err=%d\n", err);
|
||||
}
|
||||
|
||||
void xe_reg_sr_apply_whitelist(struct xe_reg_sr *sr, u32 mmio_base,
|
||||
struct xe_gt *gt)
|
||||
void xe_reg_sr_apply_whitelist(struct xe_hw_engine *hwe)
|
||||
{
|
||||
struct xe_reg_sr *sr = &hwe->reg_whitelist;
|
||||
struct xe_gt *gt = hwe->gt;
|
||||
struct xe_device *xe = gt_to_xe(gt);
|
||||
struct xe_reg_sr_entry *entry;
|
||||
struct drm_printer p;
|
||||
u32 mmio_base = hwe->mmio_base;
|
||||
unsigned long reg;
|
||||
unsigned int slot = 0;
|
||||
int err;
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
struct xe_device;
|
||||
struct xe_gt;
|
||||
struct xe_hw_engine;
|
||||
struct drm_printer;
|
||||
|
||||
int xe_reg_sr_init(struct xe_reg_sr *sr, const char *name, struct xe_device *xe);
|
||||
|
|
@ -22,7 +23,6 @@ void xe_reg_sr_dump(struct xe_reg_sr *sr, struct drm_printer *p);
|
|||
int xe_reg_sr_add(struct xe_reg_sr *sr, const struct xe_reg_sr_entry *e,
|
||||
struct xe_gt *gt);
|
||||
void xe_reg_sr_apply_mmio(struct xe_reg_sr *sr, struct xe_gt *gt);
|
||||
void xe_reg_sr_apply_whitelist(struct xe_reg_sr *sr, u32 mmio_base,
|
||||
struct xe_gt *gt);
|
||||
void xe_reg_sr_apply_whitelist(struct xe_hw_engine *hwe);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user