Commit cf30f509 authored by Jani Nikula's avatar Jani Nikula

Merge tag 'gvt-next-2016-11-30' of https://github.com/01org/gvt-linux into drm-intel-next-fixes

From Zhenyu Wang <zhenyuw@linux.intel.com>

gvt-next-2016-11-30

- initialize vgpu as primary for correct cfg space setting
- fix 64 bit bar emulation
- fix un-released lock issue on dispatch workload err path
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parents e9cbc4bd 53d6f812
...@@ -361,6 +361,8 @@ static inline void intel_vgpu_write_pci_bar(struct intel_vgpu *vgpu, ...@@ -361,6 +361,8 @@ static inline void intel_vgpu_write_pci_bar(struct intel_vgpu *vgpu,
* leave the bit 3 - bit 0 unchanged. * leave the bit 3 - bit 0 unchanged.
*/ */
*pval = (val & GENMASK(31, 4)) | (*pval & GENMASK(3, 0)); *pval = (val & GENMASK(31, 4)) | (*pval & GENMASK(3, 0));
} else {
*pval = val;
} }
} }
......
...@@ -177,8 +177,8 @@ static int dispatch_workload(struct intel_vgpu_workload *workload) ...@@ -177,8 +177,8 @@ static int dispatch_workload(struct intel_vgpu_workload *workload)
rq = i915_gem_request_alloc(dev_priv->engine[ring_id], shadow_ctx); rq = i915_gem_request_alloc(dev_priv->engine[ring_id], shadow_ctx);
if (IS_ERR(rq)) { if (IS_ERR(rq)) {
gvt_err("fail to allocate gem request\n"); gvt_err("fail to allocate gem request\n");
workload->status = PTR_ERR(rq); ret = PTR_ERR(rq);
return workload->status; goto out;
} }
gvt_dbg_sched("ring id %d get i915 gem request %p\n", ring_id, rq); gvt_dbg_sched("ring id %d get i915 gem request %p\n", ring_id, rq);
...@@ -212,6 +212,7 @@ static int dispatch_workload(struct intel_vgpu_workload *workload) ...@@ -212,6 +212,7 @@ static int dispatch_workload(struct intel_vgpu_workload *workload)
if (ret) if (ret)
workload->status = ret; workload->status = ret;
if (!IS_ERR_OR_NULL(rq))
i915_add_request_no_flush(rq); i915_add_request_no_flush(rq);
mutex_unlock(&dev_priv->drm.struct_mutex); mutex_unlock(&dev_priv->drm.struct_mutex);
return ret; return ret;
...@@ -460,6 +461,7 @@ static int workload_thread(void *priv) ...@@ -460,6 +461,7 @@ static int workload_thread(void *priv)
complete_current_workload(gvt, ring_id); complete_current_workload(gvt, ring_id);
if (workload->req)
i915_gem_request_put(fetch_and_zero(&workload->req)); i915_gem_request_put(fetch_and_zero(&workload->req));
if (need_force_wake) if (need_force_wake)
......
...@@ -378,6 +378,7 @@ struct intel_vgpu *intel_gvt_create_vgpu(struct intel_gvt *gvt, ...@@ -378,6 +378,7 @@ struct intel_vgpu *intel_gvt_create_vgpu(struct intel_gvt *gvt,
struct intel_vgpu *vgpu; struct intel_vgpu *vgpu;
param.handle = 0; param.handle = 0;
param.primary = 1;
param.low_gm_sz = type->low_gm_size; param.low_gm_sz = type->low_gm_size;
param.high_gm_sz = type->high_gm_size; param.high_gm_sz = type->high_gm_size;
param.fence_sz = type->fence; param.fence_sz = type->fence;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment