mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
Core Changes:
- Xe Maintainers update to MAINTAINERS file. Driver Changes: - Use correct forcewake assertions. - Assert that VRAM provisioning is only done on DGFX. - Flush render caches before user-fence signalling on all engines. - Move the disable_c6 call since it was sometimes never called. -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRskUM7w1oG5rx2IZO4FpNVCsYGvwUCZmrWQwAKCRC4FpNVCsYG v5BIAP9gS5S9mRVp9h+vgo5U84h2VUDT3IoKBEFslkmhKuFATwEAsfbr2m3fD5RT idAbg0enxy5V/etTB7oK/1TaSKFAqwo= =ApmP -----END PGP SIGNATURE----- Merge tag 'drm-xe-fixes-2024-06-13' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes Core Changes: - Xe Maintainers update to MAINTAINERS file. Driver Changes: - Use correct forcewake assertions. - Assert that VRAM provisioning is only done on DGFX. - Flush render caches before user-fence signalling on all engines. - Move the disable_c6 call since it was sometimes never called. Signed-off-by: Dave Airlie <airlied@redhat.com> From: Thomas Hellstrom <thomas.hellstrom@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/ZmrXV0FoBb8M0c6J@fedora
This commit is contained in:
commit
f1909e8597
@ -11034,8 +11034,8 @@ F: include/uapi/drm/i915_drm.h
|
||||
|
||||
INTEL DRM XE DRIVER (Lunar Lake and newer)
|
||||
M: Lucas De Marchi <lucas.demarchi@intel.com>
|
||||
M: Oded Gabbay <ogabbay@kernel.org>
|
||||
M: Thomas Hellström <thomas.hellstrom@linux.intel.com>
|
||||
M: Rodrigo Vivi <rodrigo.vivi@intel.com>
|
||||
L: intel-xe@lists.freedesktop.org
|
||||
S: Supported
|
||||
W: https://drm.pages.freedesktop.org/intel-docs/
|
||||
|
@ -147,6 +147,13 @@ static const struct attribute *gt_idle_attrs[] = {
|
||||
static void gt_idle_sysfs_fini(struct drm_device *drm, void *arg)
|
||||
{
|
||||
struct kobject *kobj = arg;
|
||||
struct xe_gt *gt = kobj_to_gt(kobj->parent);
|
||||
|
||||
if (gt_to_xe(gt)->info.skip_guc_pc) {
|
||||
XE_WARN_ON(xe_force_wake_get(gt_to_fw(gt), XE_FW_GT));
|
||||
xe_gt_idle_disable_c6(gt);
|
||||
xe_force_wake_put(gt_to_fw(gt), XE_FW_GT);
|
||||
}
|
||||
|
||||
sysfs_remove_files(kobj, gt_idle_attrs);
|
||||
kobject_put(kobj);
|
||||
@ -199,7 +206,7 @@ void xe_gt_idle_enable_c6(struct xe_gt *gt)
|
||||
void xe_gt_idle_disable_c6(struct xe_gt *gt)
|
||||
{
|
||||
xe_device_assert_mem_access(gt_to_xe(gt));
|
||||
xe_force_wake_assert_held(gt_to_fw(gt), XE_FORCEWAKE_ALL);
|
||||
xe_force_wake_assert_held(gt_to_fw(gt), XE_FW_GT);
|
||||
|
||||
xe_mmio_write32(gt, PG_ENABLE, 0);
|
||||
xe_mmio_write32(gt, RC_CONTROL, 0);
|
||||
|
@ -1274,6 +1274,9 @@ static void pf_reset_vf_lmtt(struct xe_device *xe, unsigned int vfid)
|
||||
struct xe_tile *tile;
|
||||
unsigned int tid;
|
||||
|
||||
xe_assert(xe, IS_DGFX(xe));
|
||||
xe_assert(xe, IS_SRIOV_PF(xe));
|
||||
|
||||
for_each_tile(tile, xe, tid) {
|
||||
lmtt = &tile->sriov.pf.lmtt;
|
||||
xe_lmtt_drop_pages(lmtt, vfid);
|
||||
@ -1292,6 +1295,9 @@ static int pf_update_vf_lmtt(struct xe_device *xe, unsigned int vfid)
|
||||
unsigned int tid;
|
||||
int err;
|
||||
|
||||
xe_assert(xe, IS_DGFX(xe));
|
||||
xe_assert(xe, IS_SRIOV_PF(xe));
|
||||
|
||||
total = 0;
|
||||
for_each_tile(tile, xe, tid)
|
||||
total += pf_get_vf_config_lmem(tile->primary_gt, vfid);
|
||||
@ -1337,6 +1343,7 @@ fail:
|
||||
|
||||
static void pf_release_vf_config_lmem(struct xe_gt *gt, struct xe_gt_sriov_config *config)
|
||||
{
|
||||
xe_gt_assert(gt, IS_DGFX(gt_to_xe(gt)));
|
||||
xe_gt_assert(gt, !xe_gt_is_media_type(gt));
|
||||
lockdep_assert_held(xe_gt_sriov_pf_master_mutex(gt));
|
||||
|
||||
@ -1355,6 +1362,7 @@ static int pf_provision_vf_lmem(struct xe_gt *gt, unsigned int vfid, u64 size)
|
||||
int err;
|
||||
|
||||
xe_gt_assert(gt, vfid);
|
||||
xe_gt_assert(gt, IS_DGFX(xe));
|
||||
xe_gt_assert(gt, !xe_gt_is_media_type(gt));
|
||||
|
||||
size = round_up(size, pf_get_lmem_alignment(gt));
|
||||
@ -1745,11 +1753,14 @@ static void pf_reset_config_sched(struct xe_gt *gt, struct xe_gt_sriov_config *c
|
||||
static void pf_release_vf_config(struct xe_gt *gt, unsigned int vfid)
|
||||
{
|
||||
struct xe_gt_sriov_config *config = pf_pick_vf_config(gt, vfid);
|
||||
struct xe_device *xe = gt_to_xe(gt);
|
||||
|
||||
if (!xe_gt_is_media_type(gt)) {
|
||||
pf_release_vf_config_ggtt(gt, config);
|
||||
pf_release_vf_config_lmem(gt, config);
|
||||
pf_update_vf_lmtt(gt_to_xe(gt), vfid);
|
||||
if (IS_DGFX(xe)) {
|
||||
pf_release_vf_config_lmem(gt, config);
|
||||
pf_update_vf_lmtt(xe, vfid);
|
||||
}
|
||||
}
|
||||
pf_release_config_ctxs(gt, config);
|
||||
pf_release_config_dbs(gt, config);
|
||||
|
@ -895,12 +895,6 @@ int xe_guc_pc_stop(struct xe_guc_pc *pc)
|
||||
static void xe_guc_pc_fini(struct drm_device *drm, void *arg)
|
||||
{
|
||||
struct xe_guc_pc *pc = arg;
|
||||
struct xe_device *xe = pc_to_xe(pc);
|
||||
|
||||
if (xe->info.skip_guc_pc) {
|
||||
xe_gt_idle_disable_c6(pc_to_gt(pc));
|
||||
return;
|
||||
}
|
||||
|
||||
XE_WARN_ON(xe_force_wake_get(gt_to_fw(pc_to_gt(pc)), XE_FORCEWAKE_ALL));
|
||||
XE_WARN_ON(xe_guc_pc_gucrc_disable(pc));
|
||||
|
@ -80,6 +80,16 @@ static int emit_store_imm_ggtt(u32 addr, u32 value, u32 *dw, int i)
|
||||
return i;
|
||||
}
|
||||
|
||||
static int emit_flush_dw(u32 *dw, int i)
|
||||
{
|
||||
dw[i++] = MI_FLUSH_DW | MI_FLUSH_IMM_DW;
|
||||
dw[i++] = 0;
|
||||
dw[i++] = 0;
|
||||
dw[i++] = 0;
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
static int emit_flush_imm_ggtt(u32 addr, u32 value, bool invalidate_tlb,
|
||||
u32 *dw, int i)
|
||||
{
|
||||
@ -234,10 +244,12 @@ static void __emit_job_gen12_simple(struct xe_sched_job *job, struct xe_lrc *lrc
|
||||
|
||||
i = emit_bb_start(batch_addr, ppgtt_flag, dw, i);
|
||||
|
||||
if (job->user_fence.used)
|
||||
if (job->user_fence.used) {
|
||||
i = emit_flush_dw(dw, i);
|
||||
i = emit_store_imm_ppgtt_posted(job->user_fence.addr,
|
||||
job->user_fence.value,
|
||||
dw, i);
|
||||
}
|
||||
|
||||
i = emit_flush_imm_ggtt(xe_lrc_seqno_ggtt_addr(lrc), seqno, false, dw, i);
|
||||
|
||||
@ -293,10 +305,12 @@ static void __emit_job_gen12_video(struct xe_sched_job *job, struct xe_lrc *lrc,
|
||||
|
||||
i = emit_bb_start(batch_addr, ppgtt_flag, dw, i);
|
||||
|
||||
if (job->user_fence.used)
|
||||
if (job->user_fence.used) {
|
||||
i = emit_flush_dw(dw, i);
|
||||
i = emit_store_imm_ppgtt_posted(job->user_fence.addr,
|
||||
job->user_fence.value,
|
||||
dw, i);
|
||||
}
|
||||
|
||||
i = emit_flush_imm_ggtt(xe_lrc_seqno_ggtt_addr(lrc), seqno, false, dw, i);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user