]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
Merge tag 'gvt-fixes-2017-07-26' of https://github.com/01org/gvt-linux into drm-intel...
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 27 Jul 2017 20:07:52 +0000 (22:07 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 27 Jul 2017 20:07:53 +0000 (22:07 +0200)
gvt-fixes-2017-07-26

- Turn on KBL support for more SKUs (Jianjun)
- Fix vblank timer close bug (Fred)

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20170726075621.hrauvik62gi2jecj@zhen-hp.sh.intel.com
drivers/gpu/drm/i915/gvt/display.c
drivers/gpu/drm/i915/intel_gvt.c

index 2deb05f618fb11054064122a4b86f468d148c73b..7cb0818a13debecc1d3f08e4fb10042a3536b1e9 100644 (file)
@@ -323,27 +323,27 @@ void intel_gvt_check_vblank_emulation(struct intel_gvt *gvt)
 {
        struct intel_gvt_irq *irq = &gvt->irq;
        struct intel_vgpu *vgpu;
-       bool have_enabled_pipe = false;
        int pipe, id;
 
        if (WARN_ON(!mutex_is_locked(&gvt->lock)))
                return;
 
-       hrtimer_cancel(&irq->vblank_timer.timer);
-
        for_each_active_vgpu(gvt, vgpu, id) {
                for (pipe = 0; pipe < I915_MAX_PIPES; pipe++) {
-                       have_enabled_pipe =
-                               pipe_is_enabled(vgpu, pipe);
-                       if (have_enabled_pipe)
-                               break;
+                       if (pipe_is_enabled(vgpu, pipe))
+                               goto out;
                }
        }
 
-       if (have_enabled_pipe)
-               hrtimer_start(&irq->vblank_timer.timer,
-                       ktime_add_ns(ktime_get(), irq->vblank_timer.period),
-                       HRTIMER_MODE_ABS);
+       /* all the pipes are disabled */
+       hrtimer_cancel(&irq->vblank_timer.timer);
+       return;
+
+out:
+       hrtimer_start(&irq->vblank_timer.timer,
+               ktime_add_ns(ktime_get(), irq->vblank_timer.period),
+               HRTIMER_MODE_ABS);
+
 }
 
 static void emulate_vblank_on_pipe(struct intel_vgpu *vgpu, int pipe)
index 52d5b82790d9fa5461a3c75977b320bd4348d407..c17ed0e62b6757b678272056326062c74f71ee6b 100644 (file)
@@ -45,7 +45,7 @@ static bool is_supported_device(struct drm_i915_private *dev_priv)
                return true;
        if (IS_SKYLAKE(dev_priv))
                return true;
-       if (IS_KABYLAKE(dev_priv) && INTEL_DEVID(dev_priv) == 0x591D)
+       if (IS_KABYLAKE(dev_priv))
                return true;
        return false;
 }