mirror of
https://github.com/torvalds/linux.git
synced 2026-06-04 04:23:35 +02:00
Driver Changes:
- Add steering info support for GuC register lists (Jesus Narvaez) - Add means to wait for reset and synchronous reset (Maciej) - Make changing ccs_mode a synchronous action (Maciej) - Add missing mux registers (Ashutosh) - Mark ComputeCS read mode as UC on iGPU, unblocking ULLS on iGPU (Matt Brost) -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRskUM7w1oG5rx2IZO4FpNVCsYGvwUCZ4lk5wAKCRC4FpNVCsYG v9MbAQC4nZSeGqn4h82TEnaVk7kMRaKQQki64HmpXba3TwhcwgEAwNLRTj5ST5Md qbJURxPSjExGvBMNAyrPN/97l+1Buww= =RZDr -----END PGP SIGNATURE----- Merge tag 'drm-xe-fixes-2025-01-16' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes Driver Changes: - Add steering info support for GuC register lists (Jesus Narvaez) - Add means to wait for reset and synchronous reset (Maciej) - Make changing ccs_mode a synchronous action (Maciej) - Add missing mux registers (Ashutosh) - Mark ComputeCS read mode as UC on iGPU, unblocking ULLS on iGPU (Matt Brost) Signed-off-by: Dave Airlie <airlied@redhat.com> From: Thomas Hellstrom <thomas.hellstrom@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/Z4ll3F1anLEwCvrf@fedora
This commit is contained in:
commit
9b1c673a16
|
|
@ -257,10 +257,9 @@ static int evict_test_run_tile(struct xe_device *xe, struct xe_tile *tile, struc
|
|||
* however seems quite fragile not to also restart the GT. Try
|
||||
* to do that here by triggering a GT reset.
|
||||
*/
|
||||
for_each_gt(__gt, xe, id) {
|
||||
xe_gt_reset_async(__gt);
|
||||
flush_work(&__gt->reset.worker);
|
||||
}
|
||||
for_each_gt(__gt, xe, id)
|
||||
xe_gt_reset(__gt);
|
||||
|
||||
if (err) {
|
||||
KUNIT_FAIL(test, "restore kernel err=%pe\n",
|
||||
ERR_PTR(err));
|
||||
|
|
|
|||
|
|
@ -162,8 +162,7 @@ static int mocs_reset_test_run_device(struct xe_device *xe)
|
|||
if (flags & HAS_LNCF_MOCS)
|
||||
read_l3cc_table(gt, &mocs.table);
|
||||
|
||||
xe_gt_reset_async(gt);
|
||||
flush_work(>->reset.worker);
|
||||
xe_gt_reset(gt);
|
||||
|
||||
kunit_info(test, "mocs_reset_test after reset\n");
|
||||
if (flags & HAS_GLOBAL_MOCS)
|
||||
|
|
|
|||
|
|
@ -56,6 +56,31 @@ void xe_gt_sanitize(struct xe_gt *gt);
|
|||
int xe_gt_sanitize_freq(struct xe_gt *gt);
|
||||
void xe_gt_remove(struct xe_gt *gt);
|
||||
|
||||
/**
|
||||
* xe_gt_wait_for_reset - wait for gt's async reset to finalize.
|
||||
* @gt: GT structure
|
||||
* Return:
|
||||
* %true if it waited for the work to finish execution,
|
||||
* %false if there was no scheduled reset or it was done.
|
||||
*/
|
||||
static inline bool xe_gt_wait_for_reset(struct xe_gt *gt)
|
||||
{
|
||||
return flush_work(>->reset.worker);
|
||||
}
|
||||
|
||||
/**
|
||||
* xe_gt_reset - perform synchronous reset
|
||||
* @gt: GT structure
|
||||
* Return:
|
||||
* %true if it waited for the reset to finish,
|
||||
* %false if there was no scheduled reset.
|
||||
*/
|
||||
static inline bool xe_gt_reset(struct xe_gt *gt)
|
||||
{
|
||||
xe_gt_reset_async(gt);
|
||||
return xe_gt_wait_for_reset(gt);
|
||||
}
|
||||
|
||||
/**
|
||||
* xe_gt_any_hw_engine_by_reset_domain - scan the list of engines and return the
|
||||
* first that matches the same reset domain as @class
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ ccs_mode_store(struct device *kdev, struct device_attribute *attr,
|
|||
xe_gt_info(gt, "Setting compute mode to %d\n", num_engines);
|
||||
gt->ccs_mode = num_engines;
|
||||
xe_gt_record_user_engines(gt);
|
||||
xe_gt_reset_async(gt);
|
||||
xe_gt_reset(gt);
|
||||
}
|
||||
|
||||
mutex_unlock(&xe->drm.filelist_mutex);
|
||||
|
|
|
|||
|
|
@ -132,11 +132,9 @@ static int force_reset(struct xe_gt *gt, struct drm_printer *p)
|
|||
static int force_reset_sync(struct xe_gt *gt, struct drm_printer *p)
|
||||
{
|
||||
xe_pm_runtime_get(gt_to_xe(gt));
|
||||
xe_gt_reset_async(gt);
|
||||
xe_gt_reset(gt);
|
||||
xe_pm_runtime_put(gt_to_xe(gt));
|
||||
|
||||
flush_work(>->reset.worker);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -550,9 +550,9 @@ void xe_gt_mcr_set_implicit_defaults(struct xe_gt *gt)
|
|||
* Returns true if the caller should steer to the @group/@instance values
|
||||
* returned. Returns false if the caller need not perform any steering
|
||||
*/
|
||||
static bool xe_gt_mcr_get_nonterminated_steering(struct xe_gt *gt,
|
||||
struct xe_reg_mcr reg_mcr,
|
||||
u8 *group, u8 *instance)
|
||||
bool xe_gt_mcr_get_nonterminated_steering(struct xe_gt *gt,
|
||||
struct xe_reg_mcr reg_mcr,
|
||||
u8 *group, u8 *instance)
|
||||
{
|
||||
const struct xe_reg reg = to_xe_reg(reg_mcr);
|
||||
const struct xe_mmio_range *implicit_ranges;
|
||||
|
|
|
|||
|
|
@ -26,6 +26,10 @@ void xe_gt_mcr_unicast_write(struct xe_gt *gt, struct xe_reg_mcr mcr_reg,
|
|||
void xe_gt_mcr_multicast_write(struct xe_gt *gt, struct xe_reg_mcr mcr_reg,
|
||||
u32 value);
|
||||
|
||||
bool xe_gt_mcr_get_nonterminated_steering(struct xe_gt *gt,
|
||||
struct xe_reg_mcr reg_mcr,
|
||||
u8 *group, u8 *instance);
|
||||
|
||||
void xe_gt_mcr_steering_dump(struct xe_gt *gt, struct drm_printer *p);
|
||||
void xe_gt_mcr_get_dss_steering(struct xe_gt *gt, unsigned int dss, u16 *group, u16 *instance);
|
||||
u32 xe_gt_mcr_steering_info_to_dss_id(struct xe_gt *gt, u16 group, u16 instance);
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
#include "xe_platform_types.h"
|
||||
#include "xe_uc_fw.h"
|
||||
#include "xe_wa.h"
|
||||
#include "xe_gt_mcr.h"
|
||||
|
||||
/* Slack of a few additional entries per engine */
|
||||
#define ADS_REGSET_EXTRA_MAX 8
|
||||
|
|
@ -701,6 +702,20 @@ static void guc_mmio_regset_write_one(struct xe_guc_ads *ads,
|
|||
.flags = reg.masked ? GUC_REGSET_MASKED : 0,
|
||||
};
|
||||
|
||||
if (reg.mcr) {
|
||||
struct xe_reg_mcr mcr_reg = XE_REG_MCR(reg.addr);
|
||||
u8 group, instance;
|
||||
|
||||
bool steer = xe_gt_mcr_get_nonterminated_steering(ads_to_gt(ads), mcr_reg,
|
||||
&group, &instance);
|
||||
|
||||
if (steer) {
|
||||
entry.flags |= FIELD_PREP(GUC_REGSET_STEERING_GROUP, group);
|
||||
entry.flags |= FIELD_PREP(GUC_REGSET_STEERING_INSTANCE, instance);
|
||||
entry.flags |= GUC_REGSET_STEERING_NEEDED;
|
||||
}
|
||||
}
|
||||
|
||||
xe_map_memcpy_to(ads_to_xe(ads), regset_map, n_entry * sizeof(entry),
|
||||
&entry, sizeof(entry));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -419,7 +419,7 @@ hw_engine_setup_default_state(struct xe_hw_engine *hwe)
|
|||
* Bspec: 72161
|
||||
*/
|
||||
const u8 mocs_write_idx = gt->mocs.uc_index;
|
||||
const u8 mocs_read_idx = hwe->class == XE_ENGINE_CLASS_COMPUTE &&
|
||||
const u8 mocs_read_idx = hwe->class == XE_ENGINE_CLASS_COMPUTE && IS_DGFX(xe) &&
|
||||
(GRAPHICS_VER(xe) >= 20 || xe->info.platform == XE_PVC) ?
|
||||
gt->mocs.wb_index : gt->mocs.uc_index;
|
||||
u32 ring_cmd_cctl_val = REG_FIELD_PREP(CMD_CCTL_WRITE_OVERRIDE_MASK, mocs_write_idx) |
|
||||
|
|
|
|||
|
|
@ -2198,6 +2198,7 @@ static const struct xe_mmio_range xe2_oa_mux_regs[] = {
|
|||
{ .start = 0x5194, .end = 0x5194 }, /* SYS_MEM_LAT_MEASURE_MERTF_GRP_3D */
|
||||
{ .start = 0x8704, .end = 0x8704 }, /* LMEM_LAT_MEASURE_MCFG_GRP */
|
||||
{ .start = 0xB1BC, .end = 0xB1BC }, /* L3_BANK_LAT_MEASURE_LBCF_GFX */
|
||||
{ .start = 0xD0E0, .end = 0xD0F4 }, /* VISACTL */
|
||||
{ .start = 0xE18C, .end = 0xE18C }, /* SAMPLER_MODE */
|
||||
{ .start = 0xE590, .end = 0xE590 }, /* TDL_LSC_LAT_MEASURE_TDL_GFX */
|
||||
{ .start = 0x13000, .end = 0x137FC }, /* PES_0_PESL0 - PES_63_UPPER_PESL3 */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user