drm/i915/gvt: refactor function intel_vgpu_submit_execlist
authorChangbin Du <changbin.du@intel.com>
Thu, 4 May 2017 10:36:54 +0000 (18:36 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Thu, 8 Jun 2017 05:59:14 +0000 (13:59 +0800)
commit5d0f5de16ef3d127469aa09dcdf07bec5174937f
treecec02cf59baf5281b009af5e78bd827552dec430
parentffc197763e636b928963c5dd9a3eaea8146345e3
drm/i915/gvt: refactor function intel_vgpu_submit_execlist

The function intel_vgpu_submit_execlist could be more simpler. It
actually does:
  1) validate the submission. The first context must be valid,
     and all two must be privilege_access.
  2) submit valid contexts. The first one need emulate schedule_in.

We do not need a bitmap, valid desc copy valid_desc. Local variable
emulate_schedule_in also can be optimized out.

v2: dump desc content in err msg (Zhi Wang)

Signed-off-by: Changbin Du <changbin.du@intel.com>
Reviewed-by: Zhi Wang <zhi.a.wang@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/execlist.c