mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
- Fix off-by-one when processing RTP rules (Lucas)
- Use dma_fence_chain_free in chain fence unused as a sync (Brost) - Fix PL1 disable flow in xe_hwmon_power_max_write (Karthik) - Take ref to VM in delayed dump snapshot (Brost) -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEbSBwaO7dZQkcLOKj+mJfZA7rE8oFAma1BeoACgkQ+mJfZA7r E8rgagf9G63U5moSVfNdwPqRLgxV+13QwWkIagHzkSURyGyNA7Vrohn4zZdnPr+w 7NUWuNMhUPFRhz86GLU9/5w0Lssq0sEVn38ll8vEk9hdUm0P1wc94XNrzcc9c6WD JnM0+PwOSQoBW7OXHP8K+mSNWjaa+36tRwQWDTmKKO+iuyY29k9L6dj5JDd2fi+Q ssbU1s1jM42rK6Tdxs/yT1fk+pAwAMRVL1ZS0c8gVYRi0QHjt7iOTQF4/TSJhfeN PUclYMvYsj12me8qZ5UbEVZTlSXxVtCe8DWQTHXe0ESey2J3XjfOfWfQ+KpbFijW 5hgSxGmbwrnFV+fp1hhiaknt59cHAg== =rwP7 -----END PGP SIGNATURE----- Merge tag 'drm-xe-fixes-2024-08-08' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes - Fix off-by-one when processing RTP rules (Lucas) - Use dma_fence_chain_free in chain fence unused as a sync (Brost) - Fix PL1 disable flow in xe_hwmon_power_max_write (Karthik) - Take ref to VM in delayed dump snapshot (Brost) Signed-off-by: Dave Airlie <airlied@redhat.com> From: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/ZrUGgVrgTJ_vF2PS@intel.com
This commit is contained in:
commit
fe0ce0d622
@ -203,9 +203,10 @@ static int xe_hwmon_power_max_write(struct xe_hwmon *hwmon, int channel, long va
|
||||
reg_val = xe_mmio_rmw32(hwmon->gt, rapl_limit, PKG_PWR_LIM_1_EN, 0);
|
||||
reg_val = xe_mmio_read32(hwmon->gt, rapl_limit);
|
||||
if (reg_val & PKG_PWR_LIM_1_EN) {
|
||||
drm_warn(>_to_xe(hwmon->gt)->drm, "PL1 disable is not supported!\n");
|
||||
ret = -EOPNOTSUPP;
|
||||
goto unlock;
|
||||
}
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
/* Computation in 64-bits to avoid overflow. Round to nearest. */
|
||||
|
@ -1634,6 +1634,9 @@ struct xe_lrc_snapshot *xe_lrc_snapshot_capture(struct xe_lrc *lrc)
|
||||
if (!snapshot)
|
||||
return NULL;
|
||||
|
||||
if (lrc->bo && lrc->bo->vm)
|
||||
xe_vm_get(lrc->bo->vm);
|
||||
|
||||
snapshot->context_desc = xe_lrc_ggtt_addr(lrc);
|
||||
snapshot->indirect_context_desc = xe_lrc_indirect_ring_ggtt_addr(lrc);
|
||||
snapshot->head = xe_lrc_ring_head(lrc);
|
||||
@ -1653,12 +1656,14 @@ struct xe_lrc_snapshot *xe_lrc_snapshot_capture(struct xe_lrc *lrc)
|
||||
void xe_lrc_snapshot_capture_delayed(struct xe_lrc_snapshot *snapshot)
|
||||
{
|
||||
struct xe_bo *bo;
|
||||
struct xe_vm *vm;
|
||||
struct iosys_map src;
|
||||
|
||||
if (!snapshot)
|
||||
return;
|
||||
|
||||
bo = snapshot->lrc_bo;
|
||||
vm = bo->vm;
|
||||
snapshot->lrc_bo = NULL;
|
||||
|
||||
snapshot->lrc_snapshot = kvmalloc(snapshot->lrc_size, GFP_KERNEL);
|
||||
@ -1678,6 +1683,8 @@ void xe_lrc_snapshot_capture_delayed(struct xe_lrc_snapshot *snapshot)
|
||||
xe_bo_unlock(bo);
|
||||
put_bo:
|
||||
xe_bo_put(bo);
|
||||
if (vm)
|
||||
xe_vm_put(vm);
|
||||
}
|
||||
|
||||
void xe_lrc_snapshot_print(struct xe_lrc_snapshot *snapshot, struct drm_printer *p)
|
||||
@ -1727,8 +1734,14 @@ void xe_lrc_snapshot_free(struct xe_lrc_snapshot *snapshot)
|
||||
return;
|
||||
|
||||
kvfree(snapshot->lrc_snapshot);
|
||||
if (snapshot->lrc_bo)
|
||||
if (snapshot->lrc_bo) {
|
||||
struct xe_vm *vm;
|
||||
|
||||
vm = snapshot->lrc_bo->vm;
|
||||
xe_bo_put(snapshot->lrc_bo);
|
||||
if (vm)
|
||||
xe_vm_put(vm);
|
||||
}
|
||||
kfree(snapshot);
|
||||
}
|
||||
|
||||
|
@ -231,7 +231,7 @@ static void rtp_mark_active(struct xe_device *xe,
|
||||
if (first == last)
|
||||
bitmap_set(ctx->active_entries, first, 1);
|
||||
else
|
||||
bitmap_set(ctx->active_entries, first, last - first + 2);
|
||||
bitmap_set(ctx->active_entries, first, last - first + 1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -263,7 +263,7 @@ void xe_sync_entry_cleanup(struct xe_sync_entry *sync)
|
||||
if (sync->fence)
|
||||
dma_fence_put(sync->fence);
|
||||
if (sync->chain_fence)
|
||||
dma_fence_put(&sync->chain_fence->base);
|
||||
dma_fence_chain_free(sync->chain_fence);
|
||||
if (sync->ufence)
|
||||
user_fence_put(sync->ufence);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user