forked from luck/tmp_suning_uos_patched
Merge tag 'gvt-fixes-2018-11-26' of https://github.com/intel/gvt-linux into drm-intel-fixes
gvt-fixes-2018-11-26 - Fix engine check for correct MOCS regs load (Xinyun) - Fix rpm locking for vGPU ggtt init (Henry) - Fix use-after-free when destroy partial ggtt entries (Chris) Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> From: Zhenyu Wang <zhenyuw@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20181126021820.GL12743@zhen-hp.sh.intel.com
This commit is contained in:
commit
2455facbb7
|
@ -61,10 +61,12 @@ static int alloc_gm(struct intel_vgpu *vgpu, bool high_gm)
|
|||
}
|
||||
|
||||
mutex_lock(&dev_priv->drm.struct_mutex);
|
||||
mmio_hw_access_pre(dev_priv);
|
||||
ret = i915_gem_gtt_insert(&dev_priv->ggtt.vm, node,
|
||||
size, I915_GTT_PAGE_SIZE,
|
||||
I915_COLOR_UNEVICTABLE,
|
||||
start, end, flags);
|
||||
mmio_hw_access_post(dev_priv);
|
||||
mutex_unlock(&dev_priv->drm.struct_mutex);
|
||||
if (ret)
|
||||
gvt_err("fail to alloc %s gm space from host\n",
|
||||
|
|
|
@ -2447,10 +2447,11 @@ static void intel_vgpu_destroy_all_ppgtt_mm(struct intel_vgpu *vgpu)
|
|||
|
||||
static void intel_vgpu_destroy_ggtt_mm(struct intel_vgpu *vgpu)
|
||||
{
|
||||
struct intel_gvt_partial_pte *pos;
|
||||
struct intel_gvt_partial_pte *pos, *next;
|
||||
|
||||
list_for_each_entry(pos,
|
||||
&vgpu->gtt.ggtt_mm->ggtt_mm.partial_pte_list, list) {
|
||||
list_for_each_entry_safe(pos, next,
|
||||
&vgpu->gtt.ggtt_mm->ggtt_mm.partial_pte_list,
|
||||
list) {
|
||||
gvt_dbg_mm("partial PTE update on hold 0x%lx : 0x%llx\n",
|
||||
pos->offset, pos->data);
|
||||
kfree(pos);
|
||||
|
|
|
@ -158,6 +158,8 @@ static void load_render_mocs(struct drm_i915_private *dev_priv)
|
|||
int ring_id, i;
|
||||
|
||||
for (ring_id = 0; ring_id < ARRAY_SIZE(regs); ring_id++) {
|
||||
if (!HAS_ENGINE(dev_priv, ring_id))
|
||||
continue;
|
||||
offset.reg = regs[ring_id];
|
||||
for (i = 0; i < GEN9_MOCS_SIZE; i++) {
|
||||
gen9_render_mocs.control_table[ring_id][i] =
|
||||
|
|
Loading…
Reference in New Issue
Block a user