]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915/gvt: Convert macro queue_workload to a function
authorChangbin Du <changbin.du@intel.com>
Wed, 29 Nov 2017 07:40:06 +0000 (15:40 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Mon, 4 Dec 2017 03:24:34 +0000 (11:24 +0800)
Convert the macro to a function which should always be preferred.

Signed-off-by: Changbin Du <changbin.du@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/execlist.c
drivers/gpu/drm/i915/gvt/scheduler.c
drivers/gpu/drm/i915/gvt/scheduler.h

index fa4929584744a5c8ddea2b48337d47cba629e4e2..769c1c24ae7598e9299c1301a93e7fce284de29f 100644 (file)
@@ -458,7 +458,7 @@ static int submit_context(struct intel_vgpu *vgpu, int ring_id,
        gvt_dbg_el("workload %p emulate schedule_in %d\n", workload,
                        emulate_schedule_in);
 
-       queue_workload(workload);
+       intel_vgpu_queue_workload(workload);
        return 0;
 }
 
index 13ccc00f0d408140ace45c80ba4e10ca0d12d63e..abf71be092f8568dfcce15906e37f47c4032d714 100644 (file)
@@ -1328,3 +1328,14 @@ intel_vgpu_create_workload(struct intel_vgpu *vgpu, int ring_id,
 
        return workload;
 }
+
+/**
+ * intel_vgpu_queue_workload - Qeue a vGPU workload
+ * @workload: the workload to queue in
+ */
+void intel_vgpu_queue_workload(struct intel_vgpu_workload *workload)
+{
+       list_add_tail(&workload->list,
+               workload_q_head(workload->vgpu, workload->ring_id));
+       wake_up(&workload->vgpu->gvt->scheduler.waitq[workload->ring_id]);
+}
index e4a9f9acd4a953a2b747588203de7985282efa04..3de77dfa7c59f27d6daaa1249cb81f5e803c7561 100644 (file)
@@ -125,12 +125,7 @@ struct intel_vgpu_shadow_bb {
 #define workload_q_head(vgpu, ring_id) \
        (&(vgpu->submission.workload_q_head[ring_id]))
 
-#define queue_workload(workload) do { \
-       list_add_tail(&workload->list, \
-       workload_q_head(workload->vgpu, workload->ring_id)); \
-       wake_up(&workload->vgpu->gvt-> \
-       scheduler.waitq[workload->ring_id]); \
-} while (0)
+void intel_vgpu_queue_workload(struct intel_vgpu_workload *workload);
 
 int intel_gvt_init_workload_scheduler(struct intel_gvt *gvt);