]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/gpu/drm/i915/gvt/execlist.c
Merge tag 'drm-intel-next-fixes-2017-04-27' of git://anongit.freedesktop.org/git...
[karo-tx-linux.git] / drivers / gpu / drm / i915 / gvt / execlist.c
index 536bde8638c817040d343be68c010cd5e9a2bf26..dca989eb2d42ed48f6c13c15fe9d3f8a9cbfaab2 100644 (file)
@@ -56,8 +56,8 @@ static int context_switch_events[] = {
 
 static int ring_id_to_context_switch_event(int ring_id)
 {
-       if (WARN_ON(ring_id < RCS && ring_id >
-                               ARRAY_SIZE(context_switch_events)))
+       if (WARN_ON(ring_id < RCS ||
+                   ring_id >= ARRAY_SIZE(context_switch_events)))
                return -EINVAL;
 
        return context_switch_events[ring_id];
@@ -687,9 +687,7 @@ static int submit_context(struct intel_vgpu *vgpu, int ring_id,
        }
 
        if (emulate_schedule_in)
-               memcpy(&workload->elsp_dwords,
-                               &vgpu->execlist[ring_id].elsp_dwords,
-                               sizeof(workload->elsp_dwords));
+               workload->elsp_dwords = vgpu->execlist[ring_id].elsp_dwords;
 
        gvt_dbg_el("workload %p ring id %d head %x tail %x start %x ctl %x\n",
                        workload, ring_id, head, tail, start, ctl);