Skip to content

Commit 23b5f42

Browse files
committed
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: Dave Airlie <airlied@redhat.com> From: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190404161116.GA14522@intel.com
2 parents 2ded188 + 57cbec0 commit 23b5f42

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

drivers/gpu/drm/i915/gvt/display.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ void intel_gvt_emulate_vblank(struct intel_gvt *gvt)
448448
/**
449449
* intel_vgpu_emulate_hotplug - trigger hotplug event for vGPU
450450
* @vgpu: a vGPU
451-
* @conncted: link state
451+
* @connected: link state
452452
*
453453
* This function is used to trigger hotplug interrupt for vGPU
454454
*

drivers/gpu/drm/i915/gvt/dmabuf.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,6 @@ static int vgpu_get_plane_info(struct drm_device *dev,
238238
default:
239239
gvt_vgpu_err("invalid tiling mode: %x\n", p.tiled);
240240
}
241-
242-
info->size = (((p.stride * p.height * p.bpp) / 8) +
243-
(PAGE_SIZE - 1)) >> PAGE_SHIFT;
244241
} else if (plane_id == DRM_PLANE_TYPE_CURSOR) {
245242
ret = intel_vgpu_decode_cursor_plane(vgpu, &c);
246243
if (ret)
@@ -262,14 +259,13 @@ static int vgpu_get_plane_info(struct drm_device *dev,
262259
info->x_hot = UINT_MAX;
263260
info->y_hot = UINT_MAX;
264261
}
265-
266-
info->size = (((info->stride * c.height * c.bpp) / 8)
267-
+ (PAGE_SIZE - 1)) >> PAGE_SHIFT;
268262
} else {
269263
gvt_vgpu_err("invalid plane id:%d\n", plane_id);
270264
return -EINVAL;
271265
}
272266

267+
info->size = (info->stride * info->height + PAGE_SIZE - 1)
268+
>> PAGE_SHIFT;
273269
if (info->size == 0) {
274270
gvt_vgpu_err("fb size is zero\n");
275271
return -EINVAL;

drivers/gpu/drm/i915/gvt/gtt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1946,7 +1946,7 @@ void _intel_vgpu_mm_release(struct kref *mm_ref)
19461946
*/
19471947
void intel_vgpu_unpin_mm(struct intel_vgpu_mm *mm)
19481948
{
1949-
atomic_dec(&mm->pincount);
1949+
atomic_dec_if_positive(&mm->pincount);
19501950
}
19511951

19521952
/**

drivers/gpu/drm/i915/gvt/scheduler.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1486,8 +1486,9 @@ intel_vgpu_create_workload(struct intel_vgpu *vgpu, int ring_id,
14861486
intel_runtime_pm_put_unchecked(dev_priv);
14871487
}
14881488

1489-
if (ret && (vgpu_is_vm_unhealthy(ret))) {
1490-
enter_failsafe_mode(vgpu, GVT_FAILSAFE_GUEST_ERR);
1489+
if (ret) {
1490+
if (vgpu_is_vm_unhealthy(ret))
1491+
enter_failsafe_mode(vgpu, GVT_FAILSAFE_GUEST_ERR);
14911492
intel_vgpu_destroy_workload(workload);
14921493
return ERR_PTR(ret);
14931494
}

drivers/gpu/drm/i915/i915_debugfs.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4830,7 +4830,10 @@ static int i915_dsc_fec_support_show(struct seq_file *m, void *data)
48304830
ret = drm_modeset_lock(&dev->mode_config.connection_mutex,
48314831
&ctx);
48324832
if (ret) {
4833-
ret = -EINTR;
4833+
if (ret == -EDEADLK && !drm_modeset_backoff(&ctx)) {
4834+
try_again = true;
4835+
continue;
4836+
}
48344837
break;
48354838
}
48364839
crtc = connector->state->crtc;

0 commit comments

Comments
 (0)