Merge tag 'tags/drm-for-v4.12' into drm-intel-next-queued
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 3 May 2017 19:41:35 +0000 (21:41 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 3 May 2017 19:41:35 +0000 (21:41 +0200)
Backmerge the main drm-next pull to sync up.

Chris also pointed out that

commit ade0b0c965f59176daddbef9c4717354034f9bce
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sat Apr 22 09:15:37 2017 +0100

    drm/i915: Confirm the request is still active before adding it to the await

is double-applied in the git merge, so make sure we get this right.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
1  2 
drivers/gpu/drm/i915/gvt/scheduler.c

index ac538dcfff61a2a25eca2843058ab70665f1db10,bada32b332378af50e5384d9d8a700b751f61b90..1256fe21850b0305f2b6a63f1ef36ac9980a65ec
@@@ -69,7 -69,8 +69,7 @@@ static int populate_shadow_context(stru
        gvt_dbg_sched("ring id %d workload lrca %x", ring_id,
                        workload->ctx_desc.lrca);
  
 -      context_page_num = intel_lr_context_size(
 -                      gvt->dev_priv->engine[ring_id]);
 +      context_page_num = gvt->dev_priv->engine[ring_id]->context_size;
  
        context_page_num = context_page_num >> PAGE_SHIFT;
  
@@@ -278,11 -279,8 +278,8 @@@ static struct intel_vgpu_workload *pick
                goto out;
        }
  
-       if (list_empty(workload_q_head(scheduler->current_vgpu, ring_id))) {
-               gvt_dbg_sched("ring id %d stop - no available workload\n",
-                               ring_id);
+       if (list_empty(workload_q_head(scheduler->current_vgpu, ring_id)))
                goto out;
-       }
  
        /*
         * still have current workload, maybe the workload disptacher
@@@ -332,7 -330,8 +329,7 @@@ static void update_guest_context(struc
        gvt_dbg_sched("ring id %d workload lrca %x\n", ring_id,
                        workload->ctx_desc.lrca);
  
 -      context_page_num = intel_lr_context_size(
 -                      gvt->dev_priv->engine[ring_id]);
 +      context_page_num = gvt->dev_priv->engine[ring_id]->context_size;
  
        context_page_num = context_page_num >> PAGE_SHIFT;