]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915/blt: don't assume pinned intel_context
authorMatthew Auld <matthew.auld@intel.com>
Sat, 10 Aug 2019 09:17:47 +0000 (10:17 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Sat, 10 Aug 2019 10:18:59 +0000 (11:18 +0100)
Currently we just pass in bcs0->engine_context so it matters not, but in
the future we may want to pass in something that is not a
kernel_context, so try to be a bit more generic.

Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20190810091748.10972-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gem/i915_gem_client_blt.c
drivers/gpu/drm/i915/gem/i915_gem_object_blt.c

index de6616bdb3a6d81ca3e52df04fa9e9d58fd9df4c..08a84c940d8d10fb6bee6943075f73c6150c6832 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include "i915_drv.h"
+#include "gt/intel_context.h"
 #include "i915_gem_client_blt.h"
 #include "i915_gem_object_blt.h"
 
@@ -175,7 +176,7 @@ static void clear_pages_worker(struct work_struct *work)
        if (unlikely(err))
                goto out_unlock;
 
-       rq = i915_request_create(w->ce);
+       rq = intel_context_create_request(w->ce);
        if (IS_ERR(rq)) {
                err = PTR_ERR(rq);
                goto out_unpin;
index 837dd6636dd1fab022ede6c41b82555e18a0b544..fa90c38c8b07d03f17b8f7ad3e210e4e0f876f4e 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include "i915_drv.h"
+#include "gt/intel_context.h"
 #include "i915_gem_clflush.h"
 #include "i915_gem_object_blt.h"
 
@@ -64,7 +65,7 @@ int i915_gem_object_fill_blt(struct drm_i915_gem_object *obj,
                i915_gem_object_unlock(obj);
        }
 
-       rq = i915_request_create(ce);
+       rq = intel_context_create_request(ce);
        if (IS_ERR(rq)) {
                err = PTR_ERR(rq);
                goto out_unpin;