Merge tag 'gvt-fixes-2019-04-04' of https://github.com/intel/gvt-linux into drm-intel-fixes
gvt-fixes-2019-04-04 - Fix shadow mm pin count (Yan) - Fix cmd parser error path recover (Yan) - Fix vGPU display plane size calculation (Xiong) - Fix kerneldoc (Chris) Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> From: Zhenyu Wang <zhenyuw@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190404003957.GB8327@zhen-hp.sh.intel.com
This commit is contained in:
commit
57cbec02f9
|
@ -448,7 +448,7 @@ void intel_gvt_emulate_vblank(struct intel_gvt *gvt)
|
||||||
/**
|
/**
|
||||||
* intel_vgpu_emulate_hotplug - trigger hotplug event for vGPU
|
* intel_vgpu_emulate_hotplug - trigger hotplug event for vGPU
|
||||||
* @vgpu: a vGPU
|
* @vgpu: a vGPU
|
||||||
* @conncted: link state
|
* @connected: link state
|
||||||
*
|
*
|
||||||
* This function is used to trigger hotplug interrupt for vGPU
|
* This function is used to trigger hotplug interrupt for vGPU
|
||||||
*
|
*
|
||||||
|
|
|
@ -238,9 +238,6 @@ static int vgpu_get_plane_info(struct drm_device *dev,
|
||||||
default:
|
default:
|
||||||
gvt_vgpu_err("invalid tiling mode: %x\n", p.tiled);
|
gvt_vgpu_err("invalid tiling mode: %x\n", p.tiled);
|
||||||
}
|
}
|
||||||
|
|
||||||
info->size = (((p.stride * p.height * p.bpp) / 8) +
|
|
||||||
(PAGE_SIZE - 1)) >> PAGE_SHIFT;
|
|
||||||
} else if (plane_id == DRM_PLANE_TYPE_CURSOR) {
|
} else if (plane_id == DRM_PLANE_TYPE_CURSOR) {
|
||||||
ret = intel_vgpu_decode_cursor_plane(vgpu, &c);
|
ret = intel_vgpu_decode_cursor_plane(vgpu, &c);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
@ -262,14 +259,13 @@ static int vgpu_get_plane_info(struct drm_device *dev,
|
||||||
info->x_hot = UINT_MAX;
|
info->x_hot = UINT_MAX;
|
||||||
info->y_hot = UINT_MAX;
|
info->y_hot = UINT_MAX;
|
||||||
}
|
}
|
||||||
|
|
||||||
info->size = (((info->stride * c.height * c.bpp) / 8)
|
|
||||||
+ (PAGE_SIZE - 1)) >> PAGE_SHIFT;
|
|
||||||
} else {
|
} else {
|
||||||
gvt_vgpu_err("invalid plane id:%d\n", plane_id);
|
gvt_vgpu_err("invalid plane id:%d\n", plane_id);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
info->size = (info->stride * info->height + PAGE_SIZE - 1)
|
||||||
|
>> PAGE_SHIFT;
|
||||||
if (info->size == 0) {
|
if (info->size == 0) {
|
||||||
gvt_vgpu_err("fb size is zero\n");
|
gvt_vgpu_err("fb size is zero\n");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
|
@ -1946,7 +1946,7 @@ void _intel_vgpu_mm_release(struct kref *mm_ref)
|
||||||
*/
|
*/
|
||||||
void intel_vgpu_unpin_mm(struct intel_vgpu_mm *mm)
|
void intel_vgpu_unpin_mm(struct intel_vgpu_mm *mm)
|
||||||
{
|
{
|
||||||
atomic_dec(&mm->pincount);
|
atomic_dec_if_positive(&mm->pincount);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1486,8 +1486,9 @@ intel_vgpu_create_workload(struct intel_vgpu *vgpu, int ring_id,
|
||||||
intel_runtime_pm_put_unchecked(dev_priv);
|
intel_runtime_pm_put_unchecked(dev_priv);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret && (vgpu_is_vm_unhealthy(ret))) {
|
if (ret) {
|
||||||
enter_failsafe_mode(vgpu, GVT_FAILSAFE_GUEST_ERR);
|
if (vgpu_is_vm_unhealthy(ret))
|
||||||
|
enter_failsafe_mode(vgpu, GVT_FAILSAFE_GUEST_ERR);
|
||||||
intel_vgpu_destroy_workload(workload);
|
intel_vgpu_destroy_workload(workload);
|
||||||
return ERR_PTR(ret);
|
return ERR_PTR(ret);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue