Commit 23b5f422 authored by Dave Airlie's avatar Dave Airlie

Merge tag 'drm-intel-fixes-2019-04-04' of...

Merge tag 'drm-intel-fixes-2019-04-04' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes

Only one fix for DSC (backoff after drm_modeset_lock deadlock)
and GVT's fixes including vGPU display plane size calculation,
shadow mm pin count, error recovery path for workload create
and one kerneldoc fix.
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>

From: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190404161116.GA14522@intel.com
parents 2ded1881 57cbec02
...@@ -448,7 +448,7 @@ void intel_gvt_emulate_vblank(struct intel_gvt *gvt) ...@@ -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, ...@@ -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, ...@@ -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) ...@@ -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,7 +1486,8 @@ intel_vgpu_create_workload(struct intel_vgpu *vgpu, int ring_id, ...@@ -1486,7 +1486,8 @@ 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) {
if (vgpu_is_vm_unhealthy(ret))
enter_failsafe_mode(vgpu, GVT_FAILSAFE_GUEST_ERR); 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);
......
...@@ -4830,7 +4830,10 @@ static int i915_dsc_fec_support_show(struct seq_file *m, void *data) ...@@ -4830,7 +4830,10 @@ static int i915_dsc_fec_support_show(struct seq_file *m, void *data)
ret = drm_modeset_lock(&dev->mode_config.connection_mutex, ret = drm_modeset_lock(&dev->mode_config.connection_mutex,
&ctx); &ctx);
if (ret) { if (ret) {
ret = -EINTR; if (ret == -EDEADLK && !drm_modeset_backoff(&ctx)) {
try_again = true;
continue;
}
break; break;
} }
crtc = connector->state->crtc; crtc = connector->state->crtc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment