]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915: Add an implementation for i915_gem_ww_ctx locking, v2.
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Wed, 19 Aug 2020 14:08:45 +0000 (16:08 +0200)
committerJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Mon, 7 Sep 2020 11:29:44 +0000 (14:29 +0300)
i915_gem_ww_ctx is used to lock all gem bo's for pinning and memory
eviction. We don't use it yet, but lets start adding the definition
first.

To use it, we have to pass a non-NULL ww to gem_object_lock, and don't
unlock directly. It is done in i915_gem_ww_ctx_fini.

Changes since v1:
- Change ww_ctx and obj order in locking functions (Jonas Lahtinen)

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Thomas Hellström <thomas.hellstrom@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200819140904.1708856-6-maarten.lankhorst@linux.intel.com
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
22 files changed:
drivers/gpu/drm/i915/display/intel_display.c
drivers/gpu/drm/i915/gem/i915_gem_client_blt.c
drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
drivers/gpu/drm/i915/gem/i915_gem_domain.c
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
drivers/gpu/drm/i915/gem/i915_gem_object.h
drivers/gpu/drm/i915/gem/i915_gem_object_types.h
drivers/gpu/drm/i915/gem/i915_gem_pm.c
drivers/gpu/drm/i915/gem/i915_gem_tiling.c
drivers/gpu/drm/i915/gem/selftests/huge_pages.c
drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c
drivers/gpu/drm/i915/gem/selftests/i915_gem_coherency.c
drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c
drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c
drivers/gpu/drm/i915/gem/selftests/i915_gem_phys.c
drivers/gpu/drm/i915/gt/selftest_workarounds.c
drivers/gpu/drm/i915/gvt/cmd_parser.c
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem.h
drivers/gpu/drm/i915/selftests/i915_gem.c
drivers/gpu/drm/i915/selftests/i915_vma.c
drivers/gpu/drm/i915/selftests/intel_memory_region.c

index 7d50b7177d402efdf7bc8950e76b5a0a172a1723..27c0a2140441dae9b36dcd2650f975a2cd24b096 100644 (file)
@@ -2311,7 +2311,7 @@ err:
 
 void intel_unpin_fb_vma(struct i915_vma *vma, unsigned long flags)
 {
-       i915_gem_object_lock(vma->obj);
+       i915_gem_object_lock(vma->obj, NULL);
        if (flags & PLANE_HAS_FENCE)
                i915_vma_unpin_fence(vma);
        i915_gem_object_unpin_from_display_plane(vma);
@@ -17194,7 +17194,7 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
        if (!intel_fb->frontbuffer)
                return -ENOMEM;
 
-       i915_gem_object_lock(obj);
+       i915_gem_object_lock(obj, NULL);
        tiling = i915_gem_object_get_tiling(obj);
        stride = i915_gem_object_get_stride(obj);
        i915_gem_object_unlock(obj);
index 947c8aa8e13ed835f49e95e60da98eda0ff963a5..a85907f29c53841fa7e0407e423b16b2421e3315 100644 (file)
@@ -288,7 +288,7 @@ int i915_gem_schedule_fill_pages_blt(struct drm_i915_gem_object *obj,
        dma_fence_init(&work->dma, &clear_pages_work_ops, &fence_lock, 0, 0);
        i915_sw_fence_init(&work->wait, clear_pages_work_notify);
 
-       i915_gem_object_lock(obj);
+       i915_gem_object_lock(obj, NULL);
        err = i915_sw_fence_await_reservation(&work->wait,
                                              obj->base.resv, NULL, true, 0,
                                              I915_FENCE_GFP);
index 2679380159fc74f29a1ecf1e991276e55e2dd7db..27fddc22a7c6fef5d07b8a6fcb9299c70971d797 100644 (file)
@@ -128,7 +128,7 @@ static int i915_gem_begin_cpu_access(struct dma_buf *dma_buf, enum dma_data_dire
        if (err)
                return err;
 
-       err = i915_gem_object_lock_interruptible(obj);
+       err = i915_gem_object_lock_interruptible(obj, NULL);
        if (err)
                goto out;
 
@@ -149,7 +149,7 @@ static int i915_gem_end_cpu_access(struct dma_buf *dma_buf, enum dma_data_direct
        if (err)
                return err;
 
-       err = i915_gem_object_lock_interruptible(obj);
+       err = i915_gem_object_lock_interruptible(obj, NULL);
        if (err)
                goto out;
 
index 7f76fc68f498aa872a208166023ddfb4f98cf347..c0acfc97fae305ff30b26e07b4c76c1c6e6fbb43 100644 (file)
@@ -32,7 +32,7 @@ void i915_gem_object_flush_if_display(struct drm_i915_gem_object *obj)
        if (!i915_gem_object_is_framebuffer(obj))
                return;
 
-       i915_gem_object_lock(obj);
+       i915_gem_object_lock(obj, NULL);
        __i915_gem_object_flush_for_display(obj);
        i915_gem_object_unlock(obj);
 }
@@ -197,7 +197,7 @@ int i915_gem_object_set_cache_level(struct drm_i915_gem_object *obj,
        if (ret)
                return ret;
 
-       ret = i915_gem_object_lock_interruptible(obj);
+       ret = i915_gem_object_lock_interruptible(obj, NULL);
        if (ret)
                return ret;
 
@@ -536,7 +536,7 @@ i915_gem_set_domain_ioctl(struct drm_device *dev, void *data,
        if (err)
                goto out;
 
-       err = i915_gem_object_lock_interruptible(obj);
+       err = i915_gem_object_lock_interruptible(obj, NULL);
        if (err)
                goto out_unpin;
 
@@ -576,7 +576,7 @@ int i915_gem_object_prepare_read(struct drm_i915_gem_object *obj,
        if (!i915_gem_object_has_struct_page(obj))
                return -ENODEV;
 
-       ret = i915_gem_object_lock_interruptible(obj);
+       ret = i915_gem_object_lock_interruptible(obj, NULL);
        if (ret)
                return ret;
 
@@ -630,7 +630,7 @@ int i915_gem_object_prepare_write(struct drm_i915_gem_object *obj,
        if (!i915_gem_object_has_struct_page(obj))
                return -ENODEV;
 
-       ret = i915_gem_object_lock_interruptible(obj);
+       ret = i915_gem_object_lock_interruptible(obj, NULL);
        if (ret)
                return ret;
 
index ccaaf9e599a0dfb51aabe6cf0ae43963e6860ba1..51395a0ceb159875e8a8332f02104c52bc62ccf0 100644 (file)
@@ -1076,7 +1076,7 @@ static void *reloc_iomap(struct drm_i915_gem_object *obj,
                if (use_cpu_reloc(cache, obj))
                        return NULL;
 
-               i915_gem_object_lock(obj);
+               i915_gem_object_lock(obj, NULL);
                err = i915_gem_object_set_to_gtt_domain(obj, true);
                i915_gem_object_unlock(obj);
                if (err)
index e5b9276d254c01d054c5c94ea9acdeb2b578c72a..488459143366452ecd1f07b7c2389a80eab1361d 100644 (file)
@@ -110,20 +110,44 @@ i915_gem_object_put(struct drm_i915_gem_object *obj)
 
 #define assert_object_held(obj) dma_resv_assert_held((obj)->base.resv)
 
-static inline void i915_gem_object_lock(struct drm_i915_gem_object *obj)
+static inline int __i915_gem_object_lock(struct drm_i915_gem_object *obj,
+                                        struct i915_gem_ww_ctx *ww,
+                                        bool intr)
 {
-       dma_resv_lock(obj->base.resv, NULL);
+       int ret;
+
+       if (intr)
+               ret = dma_resv_lock_interruptible(obj->base.resv, ww ? &ww->ctx : NULL);
+       else
+               ret = dma_resv_lock(obj->base.resv, ww ? &ww->ctx : NULL);
+
+       if (!ret && ww)
+               list_add_tail(&obj->obj_link, &ww->obj_list);
+       if (ret == -EALREADY)
+               ret = 0;
+
+       if (ret == -EDEADLK)
+               ww->contended = obj;
+
+       return ret;
 }
 
-static inline bool i915_gem_object_trylock(struct drm_i915_gem_object *obj)
+static inline int i915_gem_object_lock(struct drm_i915_gem_object *obj,
+                                      struct i915_gem_ww_ctx *ww)
 {
-       return dma_resv_trylock(obj->base.resv);
+       return __i915_gem_object_lock(obj, ww, ww && ww->intr);
 }
 
-static inline int
-i915_gem_object_lock_interruptible(struct drm_i915_gem_object *obj)
+static inline int i915_gem_object_lock_interruptible(struct drm_i915_gem_object *obj,
+                                                    struct i915_gem_ww_ctx *ww)
 {
-       return dma_resv_lock_interruptible(obj->base.resv, NULL);
+       WARN_ON(ww && !ww->intr);
+       return __i915_gem_object_lock(obj, ww, true);
+}
+
+static inline bool i915_gem_object_trylock(struct drm_i915_gem_object *obj)
+{
+       return dma_resv_trylock(obj->base.resv);
 }
 
 static inline void i915_gem_object_unlock(struct drm_i915_gem_object *obj)
index d0847d7896f953ca1adcc5c13b0625bb24f5c4aa..b5c15557cc87b8eaced85355b8e1eb5d4abfcabd 100644 (file)
@@ -123,6 +123,15 @@ struct drm_i915_gem_object {
        struct list_head lut_list;
        spinlock_t lut_lock; /* guards lut_list */
 
+       /**
+        * @obj_link: Link into @i915_gem_ww_ctx.obj_list
+        *
+        * When we lock this object through i915_gem_object_lock() with a
+        * context, we add it to the list to ensure we can unlock everything
+        * when i915_gem_ww_ctx_backoff() or i915_gem_ww_ctx_fini() are called.
+        */
+       struct list_head obj_link;
+
        /** Stolen memory for this object, instead of being backed by shmem. */
        struct drm_mm_node *stolen;
        union {
index 3d215164dd5a435653e42858f7ce5c4dae3a742d..40d3e40500fa002ce0b4dcdbfb9840314f9550fc 100644 (file)
@@ -84,7 +84,7 @@ void i915_gem_suspend_late(struct drm_i915_private *i915)
 
                        spin_unlock_irqrestore(&i915->mm.obj_lock, flags);
 
-                       i915_gem_object_lock(obj);
+                       i915_gem_object_lock(obj, NULL);
                        drm_WARN_ON(&i915->drm,
                            i915_gem_object_set_to_gtt_domain(obj, false));
                        i915_gem_object_unlock(obj);
index ff72ee2fd9cd83f3efb233b9eb1039a77cf5438f..ffcaee74a2493beec3d58fb2b224ca75b711118f 100644 (file)
@@ -249,7 +249,7 @@ i915_gem_object_set_tiling(struct drm_i915_gem_object *obj,
         * whilst executing a fenced command for an untiled object.
         */
 
-       i915_gem_object_lock(obj);
+       i915_gem_object_lock(obj, NULL);
        if (i915_gem_object_is_framebuffer(obj)) {
                i915_gem_object_unlock(obj);
                return -EBUSY;
index e2f3d014acb24d0310701d9314222274e997b185..68c3631f3746cc0219a469ae4126a981f2802a1f 100644 (file)
@@ -947,7 +947,7 @@ static int gpu_write(struct intel_context *ce,
 {
        int err;
 
-       i915_gem_object_lock(vma->obj);
+       i915_gem_object_lock(vma->obj, NULL);
        err = i915_gem_object_set_to_gtt_domain(vma->obj, true);
        i915_gem_object_unlock(vma->obj);
        if (err)
index 299c29e9ad86aa4c822e028caa9748aab4bf3a77..4e36d4897ea6512b7bdda79f81711741a3243cc9 100644 (file)
@@ -75,7 +75,7 @@ static int __igt_client_fill(struct intel_engine_cs *engine)
                if (err)
                        goto err_unpin;
 
-               i915_gem_object_lock(obj);
+               i915_gem_object_lock(obj, NULL);
                err = i915_gem_object_set_to_cpu_domain(obj, false);
                i915_gem_object_unlock(obj);
                if (err)
index 87d7d8aa080f7dcf6203d42d743e821414d1d38e..1de2959b153c5903a4df3af2b1f624e95f52490a 100644 (file)
@@ -82,7 +82,7 @@ static int gtt_set(struct context *ctx, unsigned long offset, u32 v)
        u32 __iomem *map;
        int err = 0;
 
-       i915_gem_object_lock(ctx->obj);
+       i915_gem_object_lock(ctx->obj, NULL);
        err = i915_gem_object_set_to_gtt_domain(ctx->obj, true);
        i915_gem_object_unlock(ctx->obj);
        if (err)
@@ -115,7 +115,7 @@ static int gtt_get(struct context *ctx, unsigned long offset, u32 *v)
        u32 __iomem *map;
        int err = 0;
 
-       i915_gem_object_lock(ctx->obj);
+       i915_gem_object_lock(ctx->obj, NULL);
        err = i915_gem_object_set_to_gtt_domain(ctx->obj, false);
        i915_gem_object_unlock(ctx->obj);
        if (err)
@@ -147,7 +147,7 @@ static int wc_set(struct context *ctx, unsigned long offset, u32 v)
        u32 *map;
        int err;
 
-       i915_gem_object_lock(ctx->obj);
+       i915_gem_object_lock(ctx->obj, NULL);
        err = i915_gem_object_set_to_wc_domain(ctx->obj, true);
        i915_gem_object_unlock(ctx->obj);
        if (err)
@@ -170,7 +170,7 @@ static int wc_get(struct context *ctx, unsigned long offset, u32 *v)
        u32 *map;
        int err;
 
-       i915_gem_object_lock(ctx->obj);
+       i915_gem_object_lock(ctx->obj, NULL);
        err = i915_gem_object_set_to_wc_domain(ctx->obj, false);
        i915_gem_object_unlock(ctx->obj);
        if (err)
@@ -193,7 +193,7 @@ static int gpu_set(struct context *ctx, unsigned long offset, u32 v)
        u32 *cs;
        int err;
 
-       i915_gem_object_lock(ctx->obj);
+       i915_gem_object_lock(ctx->obj, NULL);
        err = i915_gem_object_set_to_gtt_domain(ctx->obj, true);
        i915_gem_object_unlock(ctx->obj);
        if (err)
index d176b015353fb06cec504f295ff78cb20260aa75..52af9a52b7437c561f104814ab6981bed3dbe130 100644 (file)
@@ -950,7 +950,7 @@ emit_rpcs_query(struct drm_i915_gem_object *obj,
        if (IS_ERR(vma))
                return PTR_ERR(vma);
 
-       i915_gem_object_lock(obj);
+       i915_gem_object_lock(obj, NULL);
        err = i915_gem_object_set_to_gtt_domain(obj, false);
        i915_gem_object_unlock(obj);
        if (err)
@@ -1709,7 +1709,7 @@ static int read_from_scratch(struct i915_gem_context *ctx,
 
        i915_request_add(rq);
 
-       i915_gem_object_lock(obj);
+       i915_gem_object_lock(obj, NULL);
        err = i915_gem_object_set_to_cpu_domain(obj, false);
        i915_gem_object_unlock(obj);
        if (err)
index 9c7402ce5bf9c51a855ffc14b23815830c5b6c74..9fb95a45bcad38648c0cd37cc1540c59592b8c81 100644 (file)
@@ -103,7 +103,7 @@ static int check_partial_mapping(struct drm_i915_gem_object *obj,
        GEM_BUG_ON(i915_gem_object_get_tiling(obj) != tile->tiling);
        GEM_BUG_ON(i915_gem_object_get_stride(obj) != tile->stride);
 
-       i915_gem_object_lock(obj);
+       i915_gem_object_lock(obj, NULL);
        err = i915_gem_object_set_to_gtt_domain(obj, true);
        i915_gem_object_unlock(obj);
        if (err) {
@@ -188,7 +188,7 @@ static int check_partial_mappings(struct drm_i915_gem_object *obj,
        GEM_BUG_ON(i915_gem_object_get_tiling(obj) != tile->tiling);
        GEM_BUG_ON(i915_gem_object_get_stride(obj) != tile->stride);
 
-       i915_gem_object_lock(obj);
+       i915_gem_object_lock(obj, NULL);
        err = i915_gem_object_set_to_gtt_domain(obj, true);
        i915_gem_object_unlock(obj);
        if (err) {
index 34932871b3a5987d238038f6c6541fbe58244e64..a94243dc4c5cfbc375a68459f0c343a1fb15e87b 100644 (file)
@@ -44,7 +44,7 @@ static int mock_phys_object(void *arg)
        }
 
        /* Make the object dirty so that put_pages must do copy back the data */
-       i915_gem_object_lock(obj);
+       i915_gem_object_lock(obj, NULL);
        err = i915_gem_object_set_to_gtt_domain(obj, true);
        i915_gem_object_unlock(obj);
        if (err) {
index febc9e6692bac394b089766c4edfdda43621773f..61a0532d0f3d37a50ec355aac21888e2b6969e1e 100644 (file)
@@ -214,7 +214,7 @@ static int check_whitelist(struct i915_gem_context *ctx,
                return PTR_ERR(results);
 
        err = 0;
-       i915_gem_object_lock(results);
+       i915_gem_object_lock(results, NULL);
        intel_wedge_on_timeout(&wedge, engine->gt, HZ / 5) /* safety net! */
                err = i915_gem_object_set_to_cpu_domain(results, false);
        i915_gem_object_unlock(results);
index f1940939260aaa401f5dba6174d463203d9a179c..943c8d2327035c41c2b4f8dc62cea2c3f0ac26fa 100644 (file)
@@ -2982,7 +2982,7 @@ static int shadow_indirect_ctx(struct intel_shadow_wa_ctx *wa_ctx)
                goto put_obj;
        }
 
-       i915_gem_object_lock(obj);
+       i915_gem_object_lock(obj, NULL);
        ret = i915_gem_object_set_to_cpu_domain(obj, false);
        i915_gem_object_unlock(obj);
        if (ret) {
index e1de50780ed50ff0906693cf012c84063ffed7a9..4bc8fdb94019eefff96b14f7bf9432822b0fb354 100644 (file)
@@ -420,7 +420,7 @@ i915_gem_gtt_pread(struct drm_i915_gem_object *obj,
                GEM_BUG_ON(!drm_mm_node_allocated(&node));
        }
 
-       ret = i915_gem_object_lock_interruptible(obj);
+       ret = i915_gem_object_lock_interruptible(obj, NULL);
        if (ret)
                goto out_unpin;
 
@@ -619,7 +619,7 @@ i915_gem_gtt_pwrite_fast(struct drm_i915_gem_object *obj,
                GEM_BUG_ON(!drm_mm_node_allocated(&node));
        }
 
-       ret = i915_gem_object_lock_interruptible(obj);
+       ret = i915_gem_object_lock_interruptible(obj, NULL);
        if (ret)
                goto out_unpin;
 
@@ -1290,7 +1290,7 @@ int i915_gem_freeze_late(struct drm_i915_private *i915)
        i915_gem_drain_freed_objects(i915);
 
        list_for_each_entry(obj, &i915->mm.shrink_list, mm.link) {
-               i915_gem_object_lock(obj);
+               i915_gem_object_lock(obj, NULL);
                drm_WARN_ON(&i915->drm,
                            i915_gem_object_set_to_cpu_domain(obj, true));
                i915_gem_object_unlock(obj);
@@ -1326,6 +1326,52 @@ int i915_gem_open(struct drm_i915_private *i915, struct drm_file *file)
        return ret;
 }
 
+void i915_gem_ww_ctx_init(struct i915_gem_ww_ctx *ww, bool intr)
+{
+       ww_acquire_init(&ww->ctx, &reservation_ww_class);
+       INIT_LIST_HEAD(&ww->obj_list);
+       ww->intr = intr;
+       ww->contended = NULL;
+}
+
+static void i915_gem_ww_ctx_unlock_all(struct i915_gem_ww_ctx *ww)
+{
+       struct drm_i915_gem_object *obj;
+
+       while ((obj = list_first_entry_or_null(&ww->obj_list, struct drm_i915_gem_object, obj_link))) {
+               list_del(&obj->obj_link);
+               i915_gem_object_unlock(obj);
+       }
+}
+
+void i915_gem_ww_ctx_fini(struct i915_gem_ww_ctx *ww)
+{
+       i915_gem_ww_ctx_unlock_all(ww);
+       WARN_ON(ww->contended);
+       ww_acquire_fini(&ww->ctx);
+}
+
+int __must_check i915_gem_ww_ctx_backoff(struct i915_gem_ww_ctx *ww)
+{
+       int ret = 0;
+
+       if (WARN_ON(!ww->contended))
+               return -EINVAL;
+
+       i915_gem_ww_ctx_unlock_all(ww);
+       if (ww->intr)
+               ret = dma_resv_lock_slow_interruptible(ww->contended->base.resv, &ww->ctx);
+       else
+               dma_resv_lock_slow(ww->contended->base.resv, &ww->ctx);
+
+       if (!ret)
+               list_add_tail(&ww->contended->obj_link, &ww->obj_list);
+
+       ww->contended = NULL;
+
+       return ret;
+}
+
 #if IS_ENABLED(CONFIG_DRM_I915_SELFTEST)
 #include "selftests/mock_gem_device.c"
 #include "selftests/i915_gem.c"
index f333e88a2b6ed531cbc2300beb134a5ed14168ac..427ebd02fceb012ce04470e8c471359e36d3e7fe 100644 (file)
@@ -116,4 +116,15 @@ static inline bool __tasklet_is_scheduled(struct tasklet_struct *t)
        return test_bit(TASKLET_STATE_SCHED, &t->state);
 }
 
+struct i915_gem_ww_ctx {
+       struct ww_acquire_ctx ctx;
+       struct list_head obj_list;
+       bool intr;
+       struct drm_i915_gem_object *contended;
+};
+
+void i915_gem_ww_ctx_init(struct i915_gem_ww_ctx *ctx, bool intr);
+void i915_gem_ww_ctx_fini(struct i915_gem_ww_ctx *ctx);
+int __must_check i915_gem_ww_ctx_backoff(struct i915_gem_ww_ctx *ctx);
+
 #endif /* __I915_GEM_H__ */
index 88d400b9df88c35c4544c64d1ab6c1e0b02eb649..23a6132c5f4e8ad8c1f21fc8355e194c5814cebd 100644 (file)
@@ -199,11 +199,52 @@ out:
        return err;
 }
 
+static int igt_gem_ww_ctx(void *arg)
+{
+       struct drm_i915_private *i915 = arg;
+       struct drm_i915_gem_object *obj, *obj2;
+       struct i915_gem_ww_ctx ww;
+       int err = 0;
+
+       obj = i915_gem_object_create_internal(i915, PAGE_SIZE);
+       if (IS_ERR(obj))
+               return PTR_ERR(obj);
+
+       obj2 = i915_gem_object_create_internal(i915, PAGE_SIZE);
+       if (IS_ERR(obj)) {
+               err = PTR_ERR(obj);
+               goto put1;
+       }
+
+       i915_gem_ww_ctx_init(&ww, true);
+retry:
+       /* Lock the objects, twice for good measure (-EALREADY handling) */
+       err = i915_gem_object_lock(obj, &ww);
+       if (!err)
+               err = i915_gem_object_lock_interruptible(obj, &ww);
+       if (!err)
+               err = i915_gem_object_lock_interruptible(obj2, &ww);
+       if (!err)
+               err = i915_gem_object_lock(obj2, &ww);
+
+       if (err == -EDEADLK) {
+               err = i915_gem_ww_ctx_backoff(&ww);
+               if (!err)
+                       goto retry;
+       }
+       i915_gem_ww_ctx_fini(&ww);
+       i915_gem_object_put(obj2);
+put1:
+       i915_gem_object_put(obj);
+       return err;
+}
+
 int i915_gem_live_selftests(struct drm_i915_private *i915)
 {
        static const struct i915_subtest tests[] = {
                SUBTEST(igt_gem_suspend),
                SUBTEST(igt_gem_hibernate),
+               SUBTEST(igt_gem_ww_ctx),
        };
 
        if (intel_gt_is_wedged(&i915->gt))
index af89c7fc8f59340bad9d38628b0c6f751caed521..88c5e9acb84c79e8040383b8e8c6939cd24cbf71 100644 (file)
@@ -892,7 +892,7 @@ static int igt_vma_remapped_gtt(void *arg)
                        unsigned int x, y;
                        int err;
 
-                       i915_gem_object_lock(obj);
+                       i915_gem_object_lock(obj, NULL);
                        err = i915_gem_object_set_to_gtt_domain(obj, true);
                        i915_gem_object_unlock(obj);
                        if (err)
index 741270fcb6b992d3cfd972ff8f8b4121e795d89f..93a38a3235843fb5ed580a64b17d275168615b7f 100644 (file)
@@ -509,7 +509,7 @@ static int igt_lmem_write_cpu(void *arg)
        if (err)
                goto out_unpin;
 
-       i915_gem_object_lock(obj);
+       i915_gem_object_lock(obj, NULL);
        err = i915_gem_object_set_to_wc_domain(obj, true);
        i915_gem_object_unlock(obj);
        if (err)