]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gvt: Use force single submit flag to distinguish gvt request from i915 request
authorChangbin Du <changbin.du@intel.com>
Wed, 22 Mar 2017 04:35:31 +0000 (12:35 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Wed, 22 Mar 2017 05:18:56 +0000 (13:18 +0800)
commitf2703982bc7088ab37508249f7aa34d91eefe93f
tree1e9800f79a9250fc5c60d7909330d577e32ad48d
parent84102b35ad2381514c5d6f5e138ae54f3e43598a
drm/i915/gvt: Use force single submit flag to distinguish gvt request from i915 request

In my previous Commit ab9da627906a ("drm/i915: make context status
notifier head be per engine") rely on scheduler->current_workload[x]
to distinguish gvt spacial request from i915 request. But this is
not always true since no synchronization between workload_thread and
lrc irq handler.

    lrc irq handler               workload_thread
         ----                          ----
  pick i915 requests;
                                intel_vgpu_submit_execlist();
                                current_workload[x] = xxx;
  shadow_context_status_change();

Then current_workload[x] is not null but current request is of i915 self.
So instead we check ctx flag CONTEXT_FORCE_SINGLE_SUBMISSION. Only gvt
request set this flag and always set.

v2: Reverse the order of multi-condition 'if' statement.

Fixes: ab9da6279 ("drm/i915: make context status notifier head be per engine")
Signed-off-by: Changbin Du <changbin.du@intel.com>
Reviewed-by: Yulei Zhang <yulei.zhang@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/scheduler.c