Skip to contentSkip to conversation

Some bits from the LMEM series

PATCH In review Matthew Auld 4 participants 14 messages Aug 9, 2019 – Aug 10, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover Some bits from the LMEM series

We are going to want the blt improvements and they can go in without everything else. Also the buddy allocator is fairly standalone at this point, and includes a set of selftests(some donated by Chris) and is unlikely to change much.

Matthew Auld (3):
drm/i915: buddy allocator
drm/i915/blt: don't assume pinned intel_context
drm/i915/blt: bump the size restriction

 drivers/gpu/drm/i915/Makefile                 |   1 +
 .../gpu/drm/i915/gem/i915_gem_client_blt.c    |  34 +-
 .../gpu/drm/i915/gem/i915_gem_object_blt.c    | 142 +++-
 .../gpu/drm/i915/gem/i915_gem_object_blt.h    |   9 +-
 .../i915/gem/selftests/i915_gem_client_blt.c  |  16 +-
 .../i915/gem/selftests/i915_gem_object_blt.c  |  22 +-
 drivers/gpu/drm/i915/i915_buddy.c             | 433 +++++++++++
 drivers/gpu/drm/i915/i915_buddy.h             | 126 +++
 drivers/gpu/drm/i915/i915_globals.c           |   1 +
 drivers/gpu/drm/i915/i915_globals.h           |   1 +
 drivers/gpu/drm/i915/selftests/i915_buddy.c   | 719 ++++++++++++++++++
 .../drm/i915/selftests/i915_mock_selftests.h  |   1 +
 12 files changed, 1456 insertions(+), 49 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/i915_buddy.c
 create mode 100644 drivers/gpu/drm/i915/i915_buddy.h
 create mode 100644 drivers/gpu/drm/i915/selftests/i915_buddy.c
Signature · 6 lines
2.20.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

PATCH 1/3 drm/i915: buddy allocator

Simple buddy allocator. We want to allocate properly aligned power-of-two blocks to promote usage of huge-pages for the GTT, so 64K, 2M and possibly even 1G. While we do support allocating stuff at a specific offset, it is more intended for preallocating portions of the address space, say for an initial framebuffer, for other uses drm_mm is probably a much better fit. Anyway, hopefully this can all be thrown away if we eventually move to having the core MM manage device memory.

---
 drivers/gpu/drm/i915/Makefile                 |   1 +
 drivers/gpu/drm/i915/i915_buddy.c             | 433 +++++++++++
 drivers/gpu/drm/i915/i915_buddy.h             | 126 +++
 drivers/gpu/drm/i915/i915_globals.c           |   1 +
 drivers/gpu/drm/i915/i915_globals.h           |   1 +
 drivers/gpu/drm/i915/selftests/i915_buddy.c   | 719 ++++++++++++++++++
 .../drm/i915/selftests/i915_mock_selftests.h  |   1 +
 7 files changed, 1282 insertions(+)
 create mode 100644 drivers/gpu/drm/i915/i915_buddy.c
 create mode 100644 drivers/gpu/drm/i915/i915_buddy.h
 create mode 100644 drivers/gpu/drm/i915/selftests/i915_buddy.c
drivers/gpu/drm/i915/Makefile +1 -0
index d3ca46dc54ae..3962d9728dd7 100644
@@ -126,6 +126,7 @@ gem-y += \
 i915-y += \
 	  $(gem-y) \
 	  i915_active.o \
+	  i915_buddy.o \
 	  i915_cmd_parser.o \
 	  i915_gem_evict.o \
 	  i915_gem_fence_reg.o \
drivers/gpu/drm/i915/i915_buddy.c new file +433 -0

433 lines not on this page · raw message

drivers/gpu/drm/i915/i915_buddy.h new file +126 -0

126 lines not on this page · raw message

drivers/gpu/drm/i915/i915_globals.c +1 -0
index 2d5fcba98841..be127cd28931 100644
@@ -62,6 +62,7 @@ static void __i915_globals_cleanup(void)
 
 static __initconst int (* const initfn[])(void) = {
 	i915_global_active_init,
+	i915_global_buddy_init,
 	i915_global_context_init,
 	i915_global_gem_context_init,
 	i915_global_objects_init,
drivers/gpu/drm/i915/i915_globals.h +1 -0
index 2d199f411a4a..b2f5cd9b9b1a 100644
@@ -27,6 +27,7 @@ void i915_globals_exit(void);
 
 /* constructors */
 int i915_global_active_init(void);
+int i915_global_buddy_init(void);
 int i915_global_context_init(void);
 int i915_global_gem_context_init(void);
 int i915_global_objects_init(void);
drivers/gpu/drm/i915/selftests/i915_buddy.c new file +719 -0

719 lines not on this page · raw message

drivers/gpu/drm/i915/selftests/i915_mock_selftests.h +1 -0
index b55da4d9ccba..b88084fe3269 100644
@@ -25,3 +25,4 @@ selftest(evict, i915_gem_evict_mock_selftests)
 selftest(gtt, i915_gem_gtt_mock_selftests)
 selftest(hugepages, i915_gem_huge_page_mock_selftests)
 selftest(contexts, i915_gem_context_mock_selftests)
+selftest(buddy, i915_buddy_mock_selftests)
Signature · 6 lines
2.20.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw

Re: [PATCH 1/3] drm/i915: buddy allocator

Quoting Matthew Auld (2019-08-09 21:29:24)

Quoted 10 lines
drivers/gpu/drm/i915/i915_buddy.c new file +10 -0
+int i915_buddy_alloc_range(struct i915_buddy_mm *mm,
+                          struct list_head *blocks,
+                          u64 start, u64 size)
+{
+       struct i915_buddy_block *block;
+       struct i915_buddy_block *buddy;
+       LIST_HEAD(allocated);
+       LIST_HEAD(dfs);
+       u64 end;
+       int err;

drivers/gpu/drm/i915/i915_buddy.c line 358

Quoted 10 lines
drivers/gpu/drm/i915/i915_buddy.c new file +10 -0
+       int i;
+
+       if (size < mm->chunk_size)
+               return -EINVAL;
+
+       if (!IS_ALIGNED(start, mm->chunk_size))
+               return -EINVAL;
+
+       if (!size || !IS_ALIGNED(size, mm->chunk_size))
+               return -EINVAL;

chunk_size can't be 0 and size can't be less than chunk_size, ergo size is non-zero.

if (!IS_ALIGNED(start | size, mm->chunk_size))

	return -EINVAL;

My last brain cell dies happy,
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reviewed-by on v1 1/3
#3 lore raw

Re: [PATCH 1/3] drm/i915: buddy allocator

In reply to Matthew Auld

Quoting Matthew Auld (2019-08-09 21:29:24)

Quoted 10 lines

Simple buddy allocator. We want to allocate properly aligned power-of-two blocks to promote usage of huge-pages for the GTT, so 64K, 2M and possibly even 1G. While we do support allocating stuff at a specific offset, it is more intended for preallocating portions of the address space, say for an initial framebuffer, for other uses drm_mm is probably a much better fit. Anyway, hopefully this can all be thrown away if we eventually move to having the core MM manage device memory.

It does what it says on the tin. Some debate over the overall motivation of the patch, but in regards to implementing a very simple buddy allocator that can stand amongst the many other allocations (that unfortunately are tied to their users, despite the kernel having many advanced allocators e.g. slub, none are available for managing a driver address block -- quite a number of drivers have their own drm_mm equivalents, including vmalloc!) it looks useful. I regard this as being more lib/ material than anything else. Maybe once we have the eviction schemes fleshed out, we can lift it to lib/

I would liked to have a bit more on the theory of operation (how) inside the buddy.c and some more of the why inside the buddy.h, especially for libification where potential users need to see if it fits, and I would like a suite of perf metrics (builtin performance tests, supplemental fragmentation statistics)... So I think there is a bit more work to be done to make it suitable for lib/, i.e. something that other people will want to use!

-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#4 lore raw

PATCH 2/3 drm/i915/blt: don't assume pinned intel_context

In reply to Matthew Auld

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.

---
 drivers/gpu/drm/i915/gem/i915_gem_client_blt.c | 3 ++-
 drivers/gpu/drm/i915/gem/i915_gem_object_blt.c | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/gem/i915_gem_client_blt.c +2 -1
index de6616bdb3a6..08a84c940d8d 100644
@@ -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;
drivers/gpu/drm/i915/gem/i915_gem_object_blt.c +2 -1
index 837dd6636dd1..fa90c38c8b07 100644
@@ -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;
Signature · 6 lines
2.20.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 2/3
#5 lore raw

Re: [PATCH 2/3] drm/i915/blt: don't assume pinned intel_context

Quoting Matthew Auld (2019-08-09 21:29:25)

Quoted 7 lines

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.

-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#6 lore raw

PATCH 3/3 drm/i915/blt: bump the size restriction

In reply to Matthew Auld

As pointed out by Chris, with our current approach we are actually limited to S16_MAX * PAGE_SIZE for our size when using the blt to clear pages. Keeping things simple try to fix this by reducing the copy to a sequence of S16_MAX * PAGE_SIZE blocks.

---
 .../gpu/drm/i915/gem/i915_gem_client_blt.c    |  31 +++-
 .../gpu/drm/i915/gem/i915_gem_object_blt.c    | 139 ++++++++++++++----
 .../gpu/drm/i915/gem/i915_gem_object_blt.h    |   9 +-
 .../i915/gem/selftests/i915_gem_client_blt.c  |  16 +-
 .../i915/gem/selftests/i915_gem_object_blt.c  |  22 ++-
 5 files changed, 170 insertions(+), 47 deletions(-)
drivers/gpu/drm/i915/gem/i915_gem_client_blt.c +29 -2
index 08a84c940d8d..4b096309a97e 100644
@@ -5,6 +5,8 @@
 
 #include "i915_drv.h"
 #include "gt/intel_context.h"
+#include "gt/intel_engine_pm.h"
+#include "gt/intel_engine_pool.h"
 #include "i915_gem_client_blt.h"
 #include "i915_gem_object_blt.h"
 
@@ -156,7 +158,9 @@ static void clear_pages_worker(struct work_struct *work)
 	struct drm_i915_private *i915 = w->ce->engine->i915;
 	struct drm_i915_gem_object *obj = w->sleeve->vma->obj;
 	struct i915_vma *vma = w->sleeve->vma;
+	struct intel_engine_pool_node *pool;
 	struct i915_request *rq;
+	struct i915_vma *batch;
 	int err = w->dma.error;
 
 	if (unlikely(err))
@@ -176,10 +180,17 @@ static void clear_pages_worker(struct work_struct *work)
 	if (unlikely(err))
 		goto out_unlock;
 
+	intel_engine_pm_get(w->ce->engine);
+	batch = intel_emit_vma_fill_blt(&pool, w->ce, vma, w->value);
+	if (IS_ERR(batch)) {
+		err = PTR_ERR(batch);
+		goto out_unpin;
+	}
+
 	rq = intel_context_create_request(w->ce);
 	if (IS_ERR(rq)) {
 		err = PTR_ERR(rq);
-		goto out_unpin;
+		goto out_batch;
 	}
 
 	/* There's no way the fence has signalled */
@@ -187,6 +198,16 @@ static void clear_pages_worker(struct work_struct *work)
 				   clear_pages_dma_fence_cb))
 		GEM_BUG_ON(1);
 
+	i915_vma_lock(batch);
+	err = i915_vma_move_to_active(batch, rq, 0);
+	i915_vma_unlock(batch);
+	if (unlikely(err))
+		goto out_request;
+
+	err = intel_engine_pool_mark_active(pool, rq);
+	if (unlikely(err))
+		goto out_request;
+
 	if (w->ce->engine->emit_init_breadcrumb) {
 		err = w->ce->engine->emit_init_breadcrumb(rq);
 		if (unlikely(err))
@@ -202,7 +223,9 @@ static void clear_pages_worker(struct work_struct *work)
 	if (err)
 		goto out_request;
 
-	err = intel_emit_vma_fill_blt(rq, vma, w->value);
+	err = w->ce->engine->emit_bb_start(rq,
+					   batch->node.start, batch->node.size,
+					   0);
 out_request:
 	if (unlikely(err)) {
 		i915_request_skip(rq, err);
@@ -210,7 +233,11 @@ static void clear_pages_worker(struct work_struct *work)
 	}
 
 	i915_request_add(rq);
+out_batch:
+	i915_vma_unpin(batch);
+	intel_engine_pool_put(pool);
 out_unpin:
+	intel_engine_pm_put(w->ce->engine);
 	i915_vma_unpin(vma);
 out_unlock:
 	mutex_unlock(&i915->drm.struct_mutex);
drivers/gpu/drm/i915/gem/i915_gem_object_blt.c +108 -31

182 lines not on this page · raw message

drivers/gpu/drm/i915/gem/i915_gem_object_blt.h +5 -4
index 7ec7de6ac0c0..a7425c234d50 100644
@@ -9,13 +9,14 @@
 #include <linux/types.h>
 
 struct drm_i915_gem_object;
+struct intel_engine_pool_node;
 struct intel_context;
-struct i915_request;
 struct i915_vma;
 
-int intel_emit_vma_fill_blt(struct i915_request *rq,
-			    struct i915_vma *vma,
-			    u32 value);
+struct i915_vma *intel_emit_vma_fill_blt(struct intel_engine_pool_node **p,
+					 struct intel_context *ce,
+					 struct i915_vma *vma,
+					 u32 value);
 
 int i915_gem_object_fill_blt(struct drm_i915_gem_object *obj,
 			     struct intel_context *ce,
drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c +11 -5
index 275c28926067..d8804a847945 100644
@@ -9,6 +9,7 @@
 
 #include "selftests/igt_flush_test.h"
 #include "selftests/mock_drm.h"
+#include "huge_gem_object.h"
 #include "mock_context.h"
 
 static int igt_client_fill(void *arg)
@@ -24,15 +25,19 @@ static int igt_client_fill(void *arg)
 	prandom_seed_state(&prng, i915_selftest.random_seed);
 
 	do {
-		u32 sz = prandom_u32_state(&prng) % SZ_32M;
+		const u32 max_block_size = S16_MAX * PAGE_SIZE;
+		u32 sz = min_t(u64, ce->vm->total >> 4, prandom_u32_state(&prng));
+		u32 phys_sz = sz % (max_block_size + 1);
 		u32 val = prandom_u32_state(&prng);
 		u32 i;
 
 		sz = round_up(sz, PAGE_SIZE);
+		phys_sz = round_up(phys_sz, PAGE_SIZE);
 
-		pr_debug("%s with sz=%x, val=%x\n", __func__, sz, val);
+		pr_debug("%s with phys_sz= %x, sz=%x, val=%x\n", __func__,
+			 phys_sz, sz, val);
 
-		obj = i915_gem_object_create_internal(i915, sz);
+		obj = huge_gem_object(i915, phys_sz, sz);
 		if (IS_ERR(obj)) {
 			err = PTR_ERR(obj);
 			goto err_flush;
@@ -54,7 +59,8 @@ static int igt_client_fill(void *arg)
 		 * values after we do the set_to_cpu_domain and pick it up as a
 		 * test failure.
 		 */
-		memset32(vaddr, val ^ 0xdeadbeaf, obj->base.size / sizeof(u32));
+		memset32(vaddr, val ^ 0xdeadbeaf,
+			 huge_gem_object_phys_size(obj) / sizeof(u32));
 
 		if (!(obj->cache_coherent & I915_BO_CACHE_COHERENT_FOR_WRITE))
 			obj->cache_dirty = true;
@@ -71,7 +77,7 @@ static int igt_client_fill(void *arg)
 		if (err)
 			goto err_unpin;
 
-		for (i = 0; i < obj->base.size / sizeof(u32); ++i) {
+		for (i = 0; i < huge_gem_object_phys_size(obj) / sizeof(u32); ++i) {
 			if (vaddr[i] != val) {
 				pr_err("vaddr[%u]=%x, expected=%x\n", i,
 				       vaddr[i], val);
drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c +17 -5
index 19843acc84d3..c6e1eebe53f5 100644
@@ -9,6 +9,7 @@
 
 #include "selftests/igt_flush_test.h"
 #include "selftests/mock_drm.h"
+#include "huge_gem_object.h"
 #include "mock_context.h"
 
 static int igt_fill_blt(void *arg)
@@ -23,16 +24,26 @@ static int igt_fill_blt(void *arg)
 
 	prandom_seed_state(&prng, i915_selftest.random_seed);
 
+	/*
+	 * XXX: needs some threads to scale all these tests, also maybe throw
+	 * in submission from higher priority context to see if we are
+	 * preempted for very large objects...
+	 */
+
 	do {
-		u32 sz = prandom_u32_state(&prng) % SZ_32M;
+		const u32 max_block_size = S16_MAX * PAGE_SIZE;
+		u32 sz = min_t(u64, ce->vm->total >> 4, prandom_u32_state(&prng));
+		u32 phys_sz = sz % (max_block_size + 1);
 		u32 val = prandom_u32_state(&prng);
 		u32 i;
 
 		sz = round_up(sz, PAGE_SIZE);
+		phys_sz = round_up(phys_sz, PAGE_SIZE);
 
-		pr_debug("%s with sz=%x, val=%x\n", __func__, sz, val);
+		pr_debug("%s with phys_sz= %x, sz=%x, val=%x\n", __func__,
+			 phys_sz, sz, val);
 
-		obj = i915_gem_object_create_internal(i915, sz);
+		obj = huge_gem_object(i915, phys_sz, sz);
 		if (IS_ERR(obj)) {
 			err = PTR_ERR(obj);
 			goto err_flush;
@@ -48,7 +59,8 @@ static int igt_fill_blt(void *arg)
 		 * Make sure the potentially async clflush does its job, if
 		 * required.
 		 */
-		memset32(vaddr, val ^ 0xdeadbeaf, obj->base.size / sizeof(u32));
+		memset32(vaddr, val ^ 0xdeadbeaf,
+			 huge_gem_object_phys_size(obj) / sizeof(u32));
 
 		if (!(obj->cache_coherent & I915_BO_CACHE_COHERENT_FOR_WRITE))
 			obj->cache_dirty = true;
@@ -65,7 +77,7 @@ static int igt_fill_blt(void *arg)
 		if (err)
 			goto err_unpin;
 
-		for (i = 0; i < obj->base.size / sizeof(u32); ++i) {
+		for (i = 0; i < huge_gem_object_phys_size(obj) / sizeof(u32); ++i) {
 			if (vaddr[i] != val) {
 				pr_err("vaddr[%u]=%x, expected=%x\n", i,
 				       vaddr[i], val);
Signature · 6 lines
2.20.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 3/3
#7 lore raw

Re: [PATCH 3/3] drm/i915/blt: bump the size restriction

Quoting Matthew Auld (2019-08-09 21:29:26)

Quoted 40 lines

As pointed out by Chris, with our current approach we are actually limited to S16_MAX * PAGE_SIZE for our size when using the blt to clear pages. Keeping things simple try to fix this by reducing the copy to a sequence of S16_MAX * PAGE_SIZE blocks.

---
 .../gpu/drm/i915/gem/i915_gem_client_blt.c    |  31 +++-
 .../gpu/drm/i915/gem/i915_gem_object_blt.c    | 139 ++++++++++++++----
 .../gpu/drm/i915/gem/i915_gem_object_blt.h    |   9 +-
 .../i915/gem/selftests/i915_gem_client_blt.c  |  16 +-
 .../i915/gem/selftests/i915_gem_object_blt.c  |  22 ++-
 5 files changed, 170 insertions(+), 47 deletions(-)
drivers/gpu/drm/i915/gem/i915_gem_client_blt.c +4 -0
index 08a84c940d8d..4b096309a97e 100644
@@ -5,6 +5,8 @@
 
 #include "i915_drv.h"
 #include "gt/intel_context.h"
+#include "gt/intel_engine_pm.h"
+#include "gt/intel_engine_pool.h"
 #include "i915_gem_client_blt.h"
 #include "i915_gem_object_blt.h"
 
@@ -156,7 +158,9 @@ static void clear_pages_worker(struct work_struct *work)
        struct drm_i915_private *i915 = w->ce->engine->i915;
        struct drm_i915_gem_object *obj = w->sleeve->vma->obj;
        struct i915_vma *vma = w->sleeve->vma;
+       struct intel_engine_pool_node *pool;
        struct i915_request *rq;
+       struct i915_vma *batch;
        int err = w->dma.error;
 
        if (unlikely(err))

drivers/gpu/drm/i915/gem/i915_gem_client_blt.c static void clear_pages_worker(struct work_struct *work) · line 184

Quoted 5 lines
drivers/gpu/drm/i915/gem/i915_gem_client_blt.c +2 -0
@@ -176,10 +180,17 @@ static void clear_pages_worker(struct work_struct *work)
        if (unlikely(err))
                goto out_unlock;
 
+       intel_engine_pm_get(w->ce->engine);
+       batch = intel_emit_vma_fill_blt(&pool, w->ce, vma, w->value);

I had to search for where pool was being set!

Hmm, batch is from pool right? So we are the owner of the batch, and we could set batch->private = pool.

Quoted 140 lines
drivers/gpu/drm/i915/gem/i915_gem_client_blt.c +23 -2
+       if (IS_ERR(batch)) {
+               err = PTR_ERR(batch);
+               goto out_unpin;
+       }
+
        rq = intel_context_create_request(w->ce);
        if (IS_ERR(rq)) {
                err = PTR_ERR(rq);
-               goto out_unpin;
+               goto out_batch;
        }
 
        /* There's no way the fence has signalled */
@@ -187,6 +198,16 @@ static void clear_pages_worker(struct work_struct *work)
                                   clear_pages_dma_fence_cb))
                GEM_BUG_ON(1);
 
+       i915_vma_lock(batch);
+       err = i915_vma_move_to_active(batch, rq, 0);
+       i915_vma_unlock(batch);
+       if (unlikely(err))
+               goto out_request;
+
+       err = intel_engine_pool_mark_active(pool, rq);
+       if (unlikely(err))
+               goto out_request;
+
        if (w->ce->engine->emit_init_breadcrumb) {
                err = w->ce->engine->emit_init_breadcrumb(rq);
                if (unlikely(err))
@@ -202,7 +223,9 @@ static void clear_pages_worker(struct work_struct *work)
        if (err)
                goto out_request;
 
-       err = intel_emit_vma_fill_blt(rq, vma, w->value);
+       err = w->ce->engine->emit_bb_start(rq,
+                                          batch->node.start, batch->node.size,
+                                          0);
 out_request:
        if (unlikely(err)) {
                i915_request_skip(rq, err);
@@ -210,7 +233,11 @@ static void clear_pages_worker(struct work_struct *work)
        }
 
        i915_request_add(rq);
+out_batch:
+       i915_vma_unpin(batch);
+       intel_engine_pool_put(pool);
 out_unpin:
+       intel_engine_pm_put(w->ce->engine);
        i915_vma_unpin(vma);
 out_unlock:
        mutex_unlock(&i915->drm.struct_mutex);
drivers/gpu/drm/i915/gem/i915_gem_object_blt.c +48 -27
index fa90c38c8b07..c1e5edd1e359 100644
@@ -5,49 +5,103 @@
 
 #include "i915_drv.h"
 #include "gt/intel_context.h"
+#include "gt/intel_engine_pm.h"
+#include "gt/intel_engine_pool.h"
+#include "gt/intel_gt.h"
 #include "i915_gem_clflush.h"
 #include "i915_gem_object_blt.h"
 
-int intel_emit_vma_fill_blt(struct i915_request *rq,
-                           struct i915_vma *vma,
-                           u32 value)
+struct i915_vma *intel_emit_vma_fill_blt(struct intel_engine_pool_node **p,
+                                        struct intel_context *ce,
+                                        struct i915_vma *vma,
+                                        u32 value)
 {
-       u32 *cs;
-
-       cs = intel_ring_begin(rq, 8);
-       if (IS_ERR(cs))
-               return PTR_ERR(cs);
-
-       if (INTEL_GEN(rq->i915) >= 8) {
-               *cs++ = XY_COLOR_BLT_CMD | BLT_WRITE_RGBA | (7 - 2);
-               *cs++ = BLT_DEPTH_32 | BLT_ROP_COLOR_COPY | PAGE_SIZE;
-               *cs++ = 0;
-               *cs++ = vma->size >> PAGE_SHIFT << 16 | PAGE_SIZE / 4;
-               *cs++ = lower_32_bits(vma->node.start);
-               *cs++ = upper_32_bits(vma->node.start);
-               *cs++ = value;
-               *cs++ = MI_NOOP;
-       } else {
-               *cs++ = XY_COLOR_BLT_CMD | BLT_WRITE_RGBA | (6 - 2);
-               *cs++ = BLT_DEPTH_32 | BLT_ROP_COLOR_COPY | PAGE_SIZE;
-               *cs++ = 0;
-               *cs++ = vma->size >> PAGE_SHIFT << 16 | PAGE_SIZE / 4;
-               *cs++ = vma->node.start;
-               *cs++ = value;
-               *cs++ = MI_NOOP;
-               *cs++ = MI_NOOP;
+       struct drm_i915_private *i915 = ce->vm->i915;
+       const u32 block_size = S16_MAX * PAGE_SIZE;
+       struct intel_engine_pool_node *pool;
+       struct i915_vma *batch;
+       u64 offset;
+       u64 count;
+       u64 rem;
+       u32 size;
+       u32 *cmd;
+       int err;
+
+       count = div_u64(vma->size, block_size);
+       size = (1 + 8 * count) * sizeof(u32);
+       size = round_up(size, PAGE_SIZE);
+       pool = intel_engine_pool_get(&ce->engine->pool, size);
+       if (IS_ERR(pool))
+               return ERR_CAST(pool);
+
+       cmd = i915_gem_object_pin_map(pool->obj, I915_MAP_WC);
+       if (IS_ERR(cmd)) {
+               err = PTR_ERR(cmd);
+               goto out_put;
+       }
+
+       rem = vma->size;
+       offset = vma->node.start;
+
+       do {
+               u32 size = min_t(u64, rem, block_size);
+
+               GEM_BUG_ON(size >> PAGE_SHIFT > S16_MAX);
+
+               if (INTEL_GEN(i915) >= 8) {
+                       *cmd++ = XY_COLOR_BLT_CMD | BLT_WRITE_RGBA | (7 - 2);
+                       *cmd++ = BLT_DEPTH_32 | BLT_ROP_COLOR_COPY | PAGE_SIZE;
+                       *cmd++ = 0;
+                       *cmd++ = size >> PAGE_SHIFT << 16 | PAGE_SIZE / 4;
+                       *cmd++ = lower_32_bits(offset);
+                       *cmd++ = upper_32_bits(offset);
+                       *cmd++ = value;
+               } else {

drivers/gpu/drm/i915/gem/i915_gem_object_blt.c line 69

Quoted 10 lines
drivers/gpu/drm/i915/gem/i915_gem_object_blt.c +10 -0
+                       *cmd++ = XY_COLOR_BLT_CMD | BLT_WRITE_RGBA | (6 - 2);
+                       *cmd++ = BLT_DEPTH_32 | BLT_ROP_COLOR_COPY | PAGE_SIZE;
+                       *cmd++ = 0;
+                       *cmd++ = size >> PAGE_SHIFT << 16 | PAGE_SIZE / 4;
+                       *cmd++ = offset;
+                       *cmd++ = value;
+               }
+
+               /* Allow ourselves to be preempted in between blocks. */
+               *cmd++ = MI_ARB_CHECK;

That I thought was a nice touch.

Quoted 182 lines
drivers/gpu/drm/i915/gem/i915_gem_object_blt.c +50 -4
+
+               offset += size;
+               rem -= size;
+       } while (rem);
+
+       *cmd = MI_BATCH_BUFFER_END;
+       intel_gt_chipset_flush(ce->vm->gt);
+
+       i915_gem_object_unpin_map(pool->obj);
+
+       batch = i915_vma_instance(pool->obj, ce->vm, NULL);
+       if (IS_ERR(batch)) {
+               err = PTR_ERR(batch);
+               goto out_put;
        }
 
-       intel_ring_advance(rq, cs);
+       err = i915_vma_pin(batch, 0, 0, PIN_USER);
+       if (unlikely(err))
+               goto out_put;
+
+       *p = pool;
+       return batch;
 
-       return 0;
+out_put:
+       intel_engine_pool_put(pool);
+       return ERR_PTR(err);
 }
 
 int i915_gem_object_fill_blt(struct drm_i915_gem_object *obj,
                             struct intel_context *ce,
                             u32 value)
 {
+       struct intel_engine_pool_node *pool;
        struct i915_request *rq;
+       struct i915_vma *batch;
        struct i915_vma *vma;
        int err;
 
@@ -65,12 +119,29 @@ int i915_gem_object_fill_blt(struct drm_i915_gem_object *obj,
                i915_gem_object_unlock(obj);
        }
 
+       intel_engine_pm_get(ce->engine);
+       batch = intel_emit_vma_fill_blt(&pool, ce, vma, value);
+       if (IS_ERR(batch)) {
+               err = PTR_ERR(batch);
+               goto out_unpin;
+       }
+
        rq = intel_context_create_request(ce);
        if (IS_ERR(rq)) {
                err = PTR_ERR(rq);
-               goto out_unpin;
+               goto out_batch;
        }
 
+       i915_vma_lock(batch);
+       err = i915_vma_move_to_active(batch, rq, 0);
+       i915_vma_unlock(batch);
+       if (unlikely(err))
+               goto out_request;
+
+       err = intel_engine_pool_mark_active(pool, rq);
+       if (unlikely(err))
+               goto out_request;
+
        err = i915_request_await_object(rq, obj, true);
        if (unlikely(err))
                goto out_request;
@@ -87,13 +158,19 @@ int i915_gem_object_fill_blt(struct drm_i915_gem_object *obj,
        if (unlikely(err))
                goto out_request;
 
-       err = intel_emit_vma_fill_blt(rq, vma, value);
+       err = ce->engine->emit_bb_start(rq,
+                                       batch->node.start, batch->node.size,
+                                       0);
 out_request:
        if (unlikely(err))
                i915_request_skip(rq, err);
 
        i915_request_add(rq);
+out_batch:
+       i915_vma_unpin(batch);
+       intel_engine_pool_put(pool);
 out_unpin:
+       intel_engine_pm_put(ce->engine);
        i915_vma_unpin(vma);
        return err;
 }
drivers/gpu/drm/i915/gem/i915_gem_object_blt.h +5 -4
index 7ec7de6ac0c0..a7425c234d50 100644
@@ -9,13 +9,14 @@
 #include <linux/types.h>
 
 struct drm_i915_gem_object;
+struct intel_engine_pool_node;
 struct intel_context;
-struct i915_request;
 struct i915_vma;
 
-int intel_emit_vma_fill_blt(struct i915_request *rq,
-                           struct i915_vma *vma,
-                           u32 value);
+struct i915_vma *intel_emit_vma_fill_blt(struct intel_engine_pool_node **p,
+                                        struct intel_context *ce,
+                                        struct i915_vma *vma,
+                                        u32 value);
 
 int i915_gem_object_fill_blt(struct drm_i915_gem_object *obj,
                             struct intel_context *ce,
drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c +11 -5
index 275c28926067..d8804a847945 100644
@@ -9,6 +9,7 @@
 
 #include "selftests/igt_flush_test.h"
 #include "selftests/mock_drm.h"
+#include "huge_gem_object.h"
 #include "mock_context.h"
 
 static int igt_client_fill(void *arg)
@@ -24,15 +25,19 @@ static int igt_client_fill(void *arg)
        prandom_seed_state(&prng, i915_selftest.random_seed);
 
        do {
-               u32 sz = prandom_u32_state(&prng) % SZ_32M;
+               const u32 max_block_size = S16_MAX * PAGE_SIZE;
+               u32 sz = min_t(u64, ce->vm->total >> 4, prandom_u32_state(&prng));
+               u32 phys_sz = sz % (max_block_size + 1);
                u32 val = prandom_u32_state(&prng);
                u32 i;
 
                sz = round_up(sz, PAGE_SIZE);
+               phys_sz = round_up(phys_sz, PAGE_SIZE);
 
-               pr_debug("%s with sz=%x, val=%x\n", __func__, sz, val);
+               pr_debug("%s with phys_sz= %x, sz=%x, val=%x\n", __func__,
+                        phys_sz, sz, val);
 
-               obj = i915_gem_object_create_internal(i915, sz);
+               obj = huge_gem_object(i915, phys_sz, sz);
                if (IS_ERR(obj)) {
                        err = PTR_ERR(obj);
                        goto err_flush;
@@ -54,7 +59,8 @@ static int igt_client_fill(void *arg)
                 * values after we do the set_to_cpu_domain and pick it up as a
                 * test failure.
                 */
-               memset32(vaddr, val ^ 0xdeadbeaf, obj->base.size / sizeof(u32));
+               memset32(vaddr, val ^ 0xdeadbeaf,
+                        huge_gem_object_phys_size(obj) / sizeof(u32));
 
                if (!(obj->cache_coherent & I915_BO_CACHE_COHERENT_FOR_WRITE))
                        obj->cache_dirty = true;
@@ -71,7 +77,7 @@ static int igt_client_fill(void *arg)
                if (err)
                        goto err_unpin;
 
-               for (i = 0; i < obj->base.size / sizeof(u32); ++i) {
+               for (i = 0; i < huge_gem_object_phys_size(obj) / sizeof(u32); ++i) {
                        if (vaddr[i] != val) {
                                pr_err("vaddr[%u]=%x, expected=%x\n", i,
                                       vaddr[i], val);
drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c +1 -0
index 19843acc84d3..c6e1eebe53f5 100644
@@ -9,6 +9,7 @@
 
 #include "selftests/igt_flush_test.h"
 #include "selftests/mock_drm.h"
+#include "huge_gem_object.h"
 #include "mock_context.h"
 
 static int igt_fill_blt(void *arg)

drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c static int igt_fill_blt(void *arg) · line 31

Quoted 8 lines
drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c +5 -0
@@ -23,16 +24,26 @@ static int igt_fill_blt(void *arg)
 
        prandom_seed_state(&prng, i915_selftest.random_seed);
 
+       /*
+        * XXX: needs some threads to scale all these tests, also maybe throw
+        * in submission from higher priority context to see if we are
+        * preempted for very large objects...
+        */

A challenge!

Quoted 22 lines
drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c +8 -3
+
        do {
-               u32 sz = prandom_u32_state(&prng) % SZ_32M;
+               const u32 max_block_size = S16_MAX * PAGE_SIZE;
+               u32 sz = min_t(u64, ce->vm->total >> 4, prandom_u32_state(&prng));
+               u32 phys_sz = sz % (max_block_size + 1);
                u32 val = prandom_u32_state(&prng);
                u32 i;
 
                sz = round_up(sz, PAGE_SIZE);
+               phys_sz = round_up(phys_sz, PAGE_SIZE);
 
-               pr_debug("%s with sz=%x, val=%x\n", __func__, sz, val);
+               pr_debug("%s with phys_sz= %x, sz=%x, val=%x\n", __func__,
+                        phys_sz, sz, val);
 
-               obj = i915_gem_object_create_internal(i915, sz);
+               obj = huge_gem_object(i915, phys_sz, sz);
                if (IS_ERR(obj)) {
                        err = PTR_ERR(obj);
                        goto err_flush;

drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c static int igt_fill_blt(void *arg) · line 63

Quoted 6 lines
drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c +2 -1
@@ -48,7 +59,8 @@ static int igt_fill_blt(void *arg)
                 * Make sure the potentially async clflush does its job, if
                 * required.
                 */
-               memset32(vaddr, val ^ 0xdeadbeaf, obj->base.size / sizeof(u32));
+               memset32(vaddr, val ^ 0xdeadbeaf,
+                        huge_gem_object_phys_size(obj) / sizeof(u32));

Ok, using huge_object is a little interesting for a fill as we will write the same pages over and over again. Doesn't break the test, but it will be important when considering doing a huge copy.

drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c static int igt_fill_blt(void *arg) · line 83

Quoted 11 lines
drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c +1 -1
                if (!(obj->cache_coherent & I915_BO_CACHE_COHERENT_FOR_WRITE))
                        obj->cache_dirty = true;
@@ -65,7 +77,7 @@ static int igt_fill_blt(void *arg)
                if (err)
                        goto err_unpin;
 
-               for (i = 0; i < obj->base.size / sizeof(u32); ++i) {
+               for (i = 0; i < huge_gem_object_phys_size(obj) / sizeof(u32); ++i) {
                        if (vaddr[i] != val) {
                                pr_err("vaddr[%u]=%x, expected=%x\n", i,
                                       vaddr[i], val);

I thinking passing pool via batch->private isn't too bad of an idea (I had a double take when I couldn't see an assignment to pool), but nevertheless

-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#8 lore raw

Re: [PATCH 3/3] drm/i915/blt: bump the size restriction

Quoted 10 lines

-----Original Message-----
From: Intel-gfx [mailto:[email protected]] On Behalf Of Chris Wilson
Sent: Friday, August 9, 2019 2:18 PM
To: Auld, Matthew <[email protected]>; intel- [email protected]
Subject: Re: [Intel-gfx] [PATCH 3/3] drm/i915/blt: bump the size restriction

Quoted 5 lines

Quoting Matthew Auld (2019-08-09 21:29:26)

Quoted 4 lines

As pointed out by Chris, with our current approach we are actually limited to S16_MAX * PAGE_SIZE for our size when using the blt to clear pages. Keeping things simple try to fix this by reducing the copy to a sequence of S16_MAX * PAGE_SIZE blocks.

Just a general question. If the address space is limited to 1G, for example, and we want to copy between two 1G-size objects. Do we do fragmentation inside the blitter copying routine?

This could happen during swapping. We pre-allocate 1G PPGTT, and reserve the rest of address space, so only 1G space can be used.

--CQ

Quoted 460 lines
Quoted 7 lines
---
 .../gpu/drm/i915/gem/i915_gem_client_blt.c    |  31 +++-
 .../gpu/drm/i915/gem/i915_gem_object_blt.c    | 139 ++++++++++++++---

-

drivers/gpu/drm/i915/gem/i915_gem_client_blt.c static void clear_pages_worker(struct work_struct

Quoted 20 lines
 .../gpu/drm/i915/gem/i915_gem_object_blt.h    |   9 +-
 .../i915/gem/selftests/i915_gem_client_blt.c  |  16 +-
.../i915/gem/selftests/i915_gem_object_blt.c  |  22 ++-
 5 files changed, 170 insertions(+), 47 deletions(-)
drivers/gpu/drm/i915/gem/i915_gem_client_blt.c +2 -0
index 08a84c940d8d..4b096309a97e 100644
@@ -5,6 +5,8 @@
 
 #include "i915_drv.h"
 #include "gt/intel_context.h"
+#include "gt/intel_engine_pm.h"
+#include "gt/intel_engine_pool.h"
 #include "i915_gem_client_blt.h"
 #include "i915_gem_object_blt.h"
 
@@ -156,7 +158,9 @@ static void clear_pages_worker(struct work_struct

*work)

drivers/gpu/drm/i915/gem/i915_gem_client_blt.c static void clear_pages_worker(struct

Quoted 10 lines
drivers/gpu/drm/i915/gem/i915_gem_client_blt.c +2 -0
        struct drm_i915_private *i915 = w->ce->engine->i915;
        struct drm_i915_gem_object *obj = w->sleeve->vma->obj;
        struct i915_vma *vma = w->sleeve->vma;
+       struct intel_engine_pool_node *pool;
        struct i915_request *rq;
+       struct i915_vma *batch;
        int err = w->dma.error;
 
        if (unlikely(err))
@@ -176,10 +180,17 @@ static void clear_pages_worker(struct

work_struct *work)

drivers/gpu/drm/i915/gem/i915_gem_client_blt.c static void clear_pages_worker(struct work_struct *work) · line 184

Quoted 5 lines
drivers/gpu/drm/i915/gem/i915_gem_client_blt.c +2 -0
        if (unlikely(err))
                goto out_unlock;
 
+       intel_engine_pm_get(w->ce->engine);
+       batch = intel_emit_vma_fill_blt(&pool, w->ce, vma, w->value);

I had to search for where pool was being set!

Hmm, batch is from pool right? So we are the owner of the batch, and we could set batch->private = pool.

drivers/gpu/drm/i915/gem/i915_gem_client_blt.c static void clear_pages_worker(struct work_struct

Quoted 31 lines
drivers/gpu/drm/i915/gem/i915_gem_client_blt.c +6 -1
+       if (IS_ERR(batch)) {
+               err = PTR_ERR(batch);
+               goto out_unpin;
+       }
+
        rq = intel_context_create_request(w->ce);
        if (IS_ERR(rq)) {
                err = PTR_ERR(rq);
-               goto out_unpin;
+               goto out_batch;
        }
 
        /* There's no way the fence has signalled */ @@ -187,6 +198,16

@@ static void clear_pages_worker(struct work_struct *work)

                                   clear_pages_dma_fence_cb))
                GEM_BUG_ON(1);
drivers/gpu/drm/i915/gem/i915_gem_client_blt.c +10 -0
+       i915_vma_lock(batch);
+       err = i915_vma_move_to_active(batch, rq, 0);
+       i915_vma_unlock(batch);
+       if (unlikely(err))
+               goto out_request;
+
+       err = intel_engine_pool_mark_active(pool, rq);
+       if (unlikely(err))
+               goto out_request;
+
        if (w->ce->engine->emit_init_breadcrumb) {
                err = w->ce->engine->emit_init_breadcrumb(rq);
                if (unlikely(err))
@@ -202,7 +223,9 @@ static void clear_pages_worker(struct work_struct

*work)

Quoted 31 lines
drivers/gpu/drm/i915/gem/i915_gem_client_blt.c +3 -1
        if (err)
                goto out_request;
 
-       err = intel_emit_vma_fill_blt(rq, vma, w->value);
+       err = w->ce->engine->emit_bb_start(rq,
+                                          batch->node.start, batch->node.size,
+                                          0);
 out_request:
        if (unlikely(err)) {
                i915_request_skip(rq, err); @@ -210,7 +233,11 @@

static void clear_pages_worker(struct work_struct *work)

        }

        i915_request_add(rq);
drivers/gpu/drm/i915/gem/i915_gem_client_blt.c +4 -0
+out_batch:
+       i915_vma_unpin(batch);
+       intel_engine_pool_put(pool);
 out_unpin:
+       intel_engine_pm_put(w->ce->engine);
        i915_vma_unpin(vma);
 out_unlock:
        mutex_unlock(&i915->drm.struct_mutex);
drivers/gpu/drm/i915/gem/i915_gem_object_blt.c +0 -0
index fa90c38c8b07..c1e5edd1e359 100644
@@ -5,49 +5,103 @@
 
 #include "i915_drv.h"
 #include "gt/intel_context.h"

drivers/gpu/drm/i915/gem/i915_gem_object_blt.c line 14

Quoted 10 lines
drivers/gpu/drm/i915/gem/i915_gem_object_blt.c +4 -3
+#include "gt/intel_engine_pm.h"
+#include "gt/intel_engine_pool.h"
+#include "gt/intel_gt.h"
 #include "i915_gem_clflush.h"
 #include "i915_gem_object_blt.h"
 
-int intel_emit_vma_fill_blt(struct i915_request *rq,
-                           struct i915_vma *vma,
-                           u32 value)
+struct i915_vma *intel_emit_vma_fill_blt(struct intel_engine_pool_node

**p,

Quoted 53 lines
drivers/gpu/drm/i915/gem/i915_gem_object_blt.c +28 -24
+                                        struct intel_context *ce,
+                                        struct i915_vma *vma,
+                                        u32 value)
 {
-       u32 *cs;
-
-       cs = intel_ring_begin(rq, 8);
-       if (IS_ERR(cs))
-               return PTR_ERR(cs);
-
-       if (INTEL_GEN(rq->i915) >= 8) {
-               *cs++ = XY_COLOR_BLT_CMD | BLT_WRITE_RGBA | (7 - 2);
-               *cs++ = BLT_DEPTH_32 | BLT_ROP_COLOR_COPY | PAGE_SIZE;
-               *cs++ = 0;
-               *cs++ = vma->size >> PAGE_SHIFT << 16 | PAGE_SIZE / 4;
-               *cs++ = lower_32_bits(vma->node.start);
-               *cs++ = upper_32_bits(vma->node.start);
-               *cs++ = value;
-               *cs++ = MI_NOOP;
-       } else {
-               *cs++ = XY_COLOR_BLT_CMD | BLT_WRITE_RGBA | (6 - 2);
-               *cs++ = BLT_DEPTH_32 | BLT_ROP_COLOR_COPY | PAGE_SIZE;
-               *cs++ = 0;
-               *cs++ = vma->size >> PAGE_SHIFT << 16 | PAGE_SIZE / 4;
-               *cs++ = vma->node.start;
-               *cs++ = value;
-               *cs++ = MI_NOOP;
-               *cs++ = MI_NOOP;
+       struct drm_i915_private *i915 = ce->vm->i915;
+       const u32 block_size = S16_MAX * PAGE_SIZE;
+       struct intel_engine_pool_node *pool;
+       struct i915_vma *batch;
+       u64 offset;
+       u64 count;
+       u64 rem;
+       u32 size;
+       u32 *cmd;
+       int err;
+
+       count = div_u64(vma->size, block_size);
+       size = (1 + 8 * count) * sizeof(u32);
+       size = round_up(size, PAGE_SIZE);
+       pool = intel_engine_pool_get(&ce->engine->pool, size);
+       if (IS_ERR(pool))
+               return ERR_CAST(pool);
+
+       cmd = i915_gem_object_pin_map(pool->obj, I915_MAP_WC);
+       if (IS_ERR(cmd)) {
+               err = PTR_ERR(cmd);
+               goto out_put;
+       }
+
+       rem = vma->size;

drivers/gpu/drm/i915/gem/i915_gem_object_blt.c

Quoted 10 lines
drivers/gpu/drm/i915/gem/i915_gem_object_blt.c +10 -0
+       offset = vma->node.start;
+
+       do {
+               u32 size = min_t(u64, rem, block_size);
+
+               GEM_BUG_ON(size >> PAGE_SHIFT > S16_MAX);
+
+               if (INTEL_GEN(i915) >= 8) {
+                       *cmd++ = XY_COLOR_BLT_CMD | BLT_WRITE_RGBA | (7 - 2);
+                       *cmd++ = BLT_DEPTH_32 | BLT_ROP_COLOR_COPY |

PAGE_SIZE;

drivers/gpu/drm/i915/gem/i915_gem_object_blt.c

Quoted 8 lines
drivers/gpu/drm/i915/gem/i915_gem_object_blt.c +8 -0
+                       *cmd++ = 0;
+                       *cmd++ = size >> PAGE_SHIFT << 16 | PAGE_SIZE / 4;
+                       *cmd++ = lower_32_bits(offset);
+                       *cmd++ = upper_32_bits(offset);
+                       *cmd++ = value;
+               } else {
+                       *cmd++ = XY_COLOR_BLT_CMD | BLT_WRITE_RGBA | (6 - 2);
+                       *cmd++ = BLT_DEPTH_32 | BLT_ROP_COLOR_COPY |

PAGE_SIZE;

drivers/gpu/drm/i915/gem/i915_gem_object_blt.c line 69

Quoted 8 lines
drivers/gpu/drm/i915/gem/i915_gem_object_blt.c +8 -0
+                       *cmd++ = 0;
+                       *cmd++ = size >> PAGE_SHIFT << 16 | PAGE_SIZE / 4;
+                       *cmd++ = offset;
+                       *cmd++ = value;
+               }
+
+               /* Allow ourselves to be preempted in between blocks. */
+               *cmd++ = MI_ARB_CHECK;

That I thought was a nice touch.

drivers/gpu/drm/i915/gem/i915_gem_object_blt.c int i915_gem_object_fill_blt(struct

Quoted 40 lines
drivers/gpu/drm/i915/gem/i915_gem_object_blt.c +25 -2
+
+               offset += size;
+               rem -= size;
+       } while (rem);
+
+       *cmd = MI_BATCH_BUFFER_END;
+       intel_gt_chipset_flush(ce->vm->gt);
+
+       i915_gem_object_unpin_map(pool->obj);
+
+       batch = i915_vma_instance(pool->obj, ce->vm, NULL);
+       if (IS_ERR(batch)) {
+               err = PTR_ERR(batch);
+               goto out_put;
        }
 
-       intel_ring_advance(rq, cs);
+       err = i915_vma_pin(batch, 0, 0, PIN_USER);
+       if (unlikely(err))
+               goto out_put;
+
+       *p = pool;
+       return batch;
 
-       return 0;
+out_put:
+       intel_engine_pool_put(pool);
+       return ERR_PTR(err);
 }
 
 int i915_gem_object_fill_blt(struct drm_i915_gem_object *obj,
                             struct intel_context *ce,
                             u32 value)  {
+       struct intel_engine_pool_node *pool;
        struct i915_request *rq;
+       struct i915_vma *batch;
        struct i915_vma *vma;
        int err;
 
@@ -65,12 +119,29 @@ int i915_gem_object_fill_blt(struct

drm_i915_gem_object *obj,

drivers/gpu/drm/i915/gem/i915_gem_object_blt.c int i915_gem_object_fill_blt(struct

Quoted 31 lines
drivers/gpu/drm/i915/gem/i915_gem_object_blt.c +18 -1
                i915_gem_object_unlock(obj);
        }
 
+       intel_engine_pm_get(ce->engine);
+       batch = intel_emit_vma_fill_blt(&pool, ce, vma, value);
+       if (IS_ERR(batch)) {
+               err = PTR_ERR(batch);
+               goto out_unpin;
+       }
+
        rq = intel_context_create_request(ce);
        if (IS_ERR(rq)) {
                err = PTR_ERR(rq);
-               goto out_unpin;
+               goto out_batch;
        }
 
+       i915_vma_lock(batch);
+       err = i915_vma_move_to_active(batch, rq, 0);
+       i915_vma_unlock(batch);
+       if (unlikely(err))
+               goto out_request;
+
+       err = intel_engine_pool_mark_active(pool, rq);
+       if (unlikely(err))
+               goto out_request;
+
        err = i915_request_await_object(rq, obj, true);
        if (unlikely(err))
                goto out_request;
@@ -87,13 +158,19 @@ int i915_gem_object_fill_blt(struct

drm_i915_gem_object *obj,

Quoted 28 lines
drivers/gpu/drm/i915/gem/i915_gem_object_blt.c +7 -1
        if (unlikely(err))
                goto out_request;
 
-       err = intel_emit_vma_fill_blt(rq, vma, value);
+       err = ce->engine->emit_bb_start(rq,
+                                       batch->node.start, batch->node.size,
+                                       0);
 out_request:
        if (unlikely(err))
                i915_request_skip(rq, err);
 
        i915_request_add(rq);
+out_batch:
+       i915_vma_unpin(batch);
+       intel_engine_pool_put(pool);
 out_unpin:
+       intel_engine_pm_put(ce->engine);
        i915_vma_unpin(vma);
        return err;
 }
drivers/gpu/drm/i915/gem/i915_gem_object_blt.h +0 -0
index 7ec7de6ac0c0..a7425c234d50 100644
@@ -9,13 +9,14 @@
 #include <linux/types.h>
 

drivers/gpu/drm/i915/gem/i915_gem_object_blt.h line 16

Quoted 10 lines
drivers/gpu/drm/i915/gem/i915_gem_object_blt.h +2 -4
 struct drm_i915_gem_object;
+struct intel_engine_pool_node;
 struct intel_context;
-struct i915_request;
 struct i915_vma;
 
-int intel_emit_vma_fill_blt(struct i915_request *rq,
-                           struct i915_vma *vma,
-                           u32 value);
+struct i915_vma *intel_emit_vma_fill_blt(struct intel_engine_pool_node

**p,

Quoted 23 lines
drivers/gpu/drm/i915/gem/i915_gem_object_blt.h +3 -0
+                                        struct intel_context *ce,
+                                        struct i915_vma *vma,
+                                        u32 value);
 
 int i915_gem_object_fill_blt(struct drm_i915_gem_object *obj,
                             struct intel_context *ce, diff --git

a/drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c b/drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c index 275c28926067..d8804a847945 100644

drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c +1 -0
@@ -9,6 +9,7 @@
 
 #include "selftests/igt_flush_test.h"
 #include "selftests/mock_drm.h"
+#include "huge_gem_object.h"
 #include "mock_context.h"
 
 static int igt_client_fill(void *arg) @@ -24,15 +25,19 @@ static int

igt_client_fill(void *arg)

        prandom_seed_state(&prng, i915_selftest.random_seed);

        do {

drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c static int igt_client_fill(void *arg)

Quoted 3 lines
drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c +2 -1
-               u32 sz = prandom_u32_state(&prng) % SZ_32M;
+               const u32 max_block_size = S16_MAX * PAGE_SIZE;
+               u32 sz = min_t(u64, ce->vm->total >> 4,

prandom_u32_state(&prng));

Quoted 20 lines
drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c +5 -2
+               u32 phys_sz = sz % (max_block_size + 1);
                u32 val = prandom_u32_state(&prng);
                u32 i;
 
                sz = round_up(sz, PAGE_SIZE);
+               phys_sz = round_up(phys_sz, PAGE_SIZE);
 
-               pr_debug("%s with sz=%x, val=%x\n", __func__, sz, val);
+               pr_debug("%s with phys_sz= %x, sz=%x, val=%x\n", __func__,
+                        phys_sz, sz, val);
 
-               obj = i915_gem_object_create_internal(i915, sz);
+               obj = huge_gem_object(i915, phys_sz, sz);
                if (IS_ERR(obj)) {
                        err = PTR_ERR(obj);
                        goto err_flush; @@ -54,7 +59,8 @@ static int

igt_client_fill(void *arg)
* values after we do the set_to_cpu_domain and pick it up as a
* test failure.
*/

drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c static int igt_client_fill(void *arg)

Quoted 6 lines
drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c +3 -1
-               memset32(vaddr, val ^ 0xdeadbeaf, obj->base.size / sizeof(u32));
+               memset32(vaddr, val ^ 0xdeadbeaf,
+                        huge_gem_object_phys_size(obj) /
+ sizeof(u32));
 
                if (!(obj->cache_coherent &

I915_BO_CACHE_COHERENT_FOR_WRITE))

Quoted 25 lines
                        obj->cache_dirty = true; @@ -71,7 +77,7 @@
static int igt_client_fill(void *arg)
                if (err)
                        goto err_unpin;
drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c +2 -1
-               for (i = 0; i < obj->base.size / sizeof(u32); ++i) {
+               for (i = 0; i < huge_gem_object_phys_size(obj) /
+ sizeof(u32); ++i) {
                        if (vaddr[i] != val) {
                                pr_err("vaddr[%u]=%x, expected=%x\n", i,
                                       vaddr[i], val); diff --git

a/drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c b/drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c index 19843acc84d3..c6e1eebe53f5 100644

drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c +1 -0
@@ -9,6 +9,7 @@
 
 #include "selftests/igt_flush_test.h"
 #include "selftests/mock_drm.h"
+#include "huge_gem_object.h"
 #include "mock_context.h"
 
 static int igt_fill_blt(void *arg)

drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c static int igt_fill_blt(void *arg) · line 31

Quoted 8 lines
drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c +5 -0
@@ -23,16 +24,26 @@ static int igt_fill_blt(void *arg)
 
        prandom_seed_state(&prng, i915_selftest.random_seed);
 
+       /*
+        * XXX: needs some threads to scale all these tests, also maybe throw
+        * in submission from higher priority context to see if we are
+        * preempted for very large objects...
+        */

A challenge!

drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c static int igt_fill_blt(void *arg)

Quoted 5 lines
drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c +3 -1
+
        do {
-               u32 sz = prandom_u32_state(&prng) % SZ_32M;
+               const u32 max_block_size = S16_MAX * PAGE_SIZE;
+               u32 sz = min_t(u64, ce->vm->total >> 4,

prandom_u32_state(&prng));

Quoted 20 lines
drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c +5 -2
+               u32 phys_sz = sz % (max_block_size + 1);
                u32 val = prandom_u32_state(&prng);
                u32 i;
 
                sz = round_up(sz, PAGE_SIZE);
+               phys_sz = round_up(phys_sz, PAGE_SIZE);
 
-               pr_debug("%s with sz=%x, val=%x\n", __func__, sz, val);
+               pr_debug("%s with phys_sz= %x, sz=%x, val=%x\n", __func__,
+                        phys_sz, sz, val);
 
-               obj = i915_gem_object_create_internal(i915, sz);
+               obj = huge_gem_object(i915, phys_sz, sz);
                if (IS_ERR(obj)) {
                        err = PTR_ERR(obj);
                        goto err_flush; @@ -48,7 +59,8 @@ static int

igt_fill_blt(void *arg)
* Make sure the potentially async clflush does its job, if
* required.
*/

drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c

Quoted 4 lines
drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c +3 -1
-               memset32(vaddr, val ^ 0xdeadbeaf, obj->base.size / sizeof(u32));
+               memset32(vaddr, val ^ 0xdeadbeaf,
+                        huge_gem_object_phys_size(obj) /
+ sizeof(u32));

Ok, using huge_object is a little interesting for a fill as we will write the same pages over and over again. Doesn't break the test, but it will be important when considering doing a huge copy.

Quoted 1 line
                if (!(obj->cache_coherent &

I915_BO_CACHE_COHERENT_FOR_WRITE))

drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c

Quoted 11 lines
                        obj->cache_dirty = true; @@ -65,7 +77,7 @@
static int igt_fill_blt(void *arg)
                if (err)
                        goto err_unpin;
drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c +2 -1
-               for (i = 0; i < obj->base.size / sizeof(u32); ++i) {
+               for (i = 0; i < huge_gem_object_phys_size(obj) /
+ sizeof(u32); ++i) {
                        if (vaddr[i] != val) {
                                pr_err("vaddr[%u]=%x, expected=%x\n", i,
                                       vaddr[i], val);
Quoted 7 lines

I thinking passing pool via batch->private isn't too bad of an idea (I had a double take when I couldn't see an assignment to pool), but nevertheless

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#9 lore raw

Re: [PATCH 3/3] drm/i915/blt: bump the size restriction

Quoted 27 lines

-----Original Message-----
From: Intel-gfx [mailto:[email protected]] On Behalf Of Tang, CQ
Sent: Friday, August 9, 2019 3:21 PM
To: Chris Wilson <[email protected]>; Auld, Matthew <[email protected]>; [email protected]
Subject: Re: [Intel-gfx] [PATCH 3/3] drm/i915/blt: bump the size restriction

Quoted 9 lines

-----Original Message-----
From: Intel-gfx [mailto:[email protected]] On Behalf Of Chris Wilson
Sent: Friday, August 9, 2019 2:18 PM
To: Auld, Matthew <[email protected]>; intel- [email protected]
Subject: Re: [Intel-gfx] [PATCH 3/3] drm/i915/blt: bump the size restriction

Quoted 5 lines

Quoting Matthew Auld (2019-08-09 21:29:26)

Quoted 4 lines

As pointed out by Chris, with our current approach we are actually limited to S16_MAX * PAGE_SIZE for our size when using the blt to clear pages. Keeping things simple try to fix this by reducing the copy to a sequence of S16_MAX * PAGE_SIZE blocks.

Quoted 6 lines

Just a general question. If the address space is limited to 1G, for example, and we want to copy between two 1G-size objects.
Do we do fragmentation inside the blitter copying routine?

This could happen during swapping. We pre-allocate 1G PPGTT, and reserve the rest of address space, so only 1G space can be used.

Or, can we add offset and size into the copying object, like the pread/pwrite to specify offset/size to read/write. Then we can do loop in caller. But prefer to do fragmentation inside.

--CQ

Quoted 479 lines

--CQ

Quoted 7 lines
Quoted 7 lines
---
 .../gpu/drm/i915/gem/i915_gem_client_blt.c    |  31 +++-
 .../gpu/drm/i915/gem/i915_gem_object_blt.c    | 139 ++++++++++++++-

--

Quoted 396 lines

-

Quoted 20 lines
 .../gpu/drm/i915/gem/i915_gem_object_blt.h    |   9 +-
 .../i915/gem/selftests/i915_gem_client_blt.c  |  16 +-
.../i915/gem/selftests/i915_gem_object_blt.c  |  22 ++-
 5 files changed, 170 insertions(+), 47 deletions(-)
drivers/gpu/drm/i915/gem/i915_gem_client_blt.c +2 -0
index 08a84c940d8d..4b096309a97e 100644
@@ -5,6 +5,8 @@
 
 #include "i915_drv.h"
 #include "gt/intel_context.h"
+#include "gt/intel_engine_pm.h"
+#include "gt/intel_engine_pool.h"
 #include "i915_gem_client_blt.h"
 #include "i915_gem_object_blt.h"
 
@@ -156,7 +158,9 @@ static void clear_pages_worker(struct
Quoted 1 line

work_struct

*work)

drivers/gpu/drm/i915/gem/i915_gem_client_blt.c static void clear_pages_worker(struct

Quoted 10 lines
        struct drm_i915_private *i915 = w->ce->engine->i915;
        struct drm_i915_gem_object *obj = w->sleeve->vma->obj;
        struct i915_vma *vma = w->sleeve->vma;
drivers/gpu/drm/i915/gem/i915_gem_client_blt.c +2 -0
+       struct intel_engine_pool_node *pool;
        struct i915_request *rq;
+       struct i915_vma *batch;
        int err = w->dma.error;
 
        if (unlikely(err))
@@ -176,10 +180,17 @@ static void clear_pages_worker(struct

work_struct *work)

drivers/gpu/drm/i915/gem/i915_gem_client_blt.c static void clear_pages_worker(struct work_struct *work)

Quoted 6 lines
drivers/gpu/drm/i915/gem/i915_gem_client_blt.c +3 -0
        if (unlikely(err))
                goto out_unlock;
 
+       intel_engine_pm_get(w->ce->engine);
+       batch = intel_emit_vma_fill_blt(&pool, w->ce, vma,
+ w->value);

I had to search for where pool was being set!

Hmm, batch is from pool right? So we are the owner of the batch, and we could set batch->private = pool.

Quoted 31 lines
drivers/gpu/drm/i915/gem/i915_gem_client_blt.c +17 -1
+       if (IS_ERR(batch)) {
+               err = PTR_ERR(batch);
+               goto out_unpin;
+       }
+
        rq = intel_context_create_request(w->ce);
        if (IS_ERR(rq)) {
                err = PTR_ERR(rq);
-               goto out_unpin;
+               goto out_batch;
        }
 
        /* There's no way the fence has signalled */ @@ -187,6
+198,16 @@ static void clear_pages_worker(struct work_struct *work)
                                   clear_pages_dma_fence_cb))
                GEM_BUG_ON(1);
 
+       i915_vma_lock(batch);
+       err = i915_vma_move_to_active(batch, rq, 0);
+       i915_vma_unlock(batch);
+       if (unlikely(err))
+               goto out_request;
+
+       err = intel_engine_pool_mark_active(pool, rq);
+       if (unlikely(err))
+               goto out_request;
+
        if (w->ce->engine->emit_init_breadcrumb) {
                err = w->ce->engine->emit_init_breadcrumb(rq);
                if (unlikely(err))
@@ -202,7 +223,9 @@ static void clear_pages_worker(struct
Quoted 1 line

work_struct

*work)

Quoted 32 lines
        if (err)
                goto out_request;
drivers/gpu/drm/i915/gem/i915_gem_client_blt.c +3 -1
-       err = intel_emit_vma_fill_blt(rq, vma, w->value);
+       err = w->ce->engine->emit_bb_start(rq,
+                                          batch->node.start, batch->node.size,
+                                          0);
 out_request:
        if (unlikely(err)) {
                i915_request_skip(rq, err); @@ -210,7 +233,11 @@

static void clear_pages_worker(struct work_struct *work)

        }

        i915_request_add(rq);
drivers/gpu/drm/i915/gem/i915_gem_client_blt.c +4 -0
+out_batch:
+       i915_vma_unpin(batch);
+       intel_engine_pool_put(pool);
 out_unpin:
+       intel_engine_pm_put(w->ce->engine);
        i915_vma_unpin(vma);
 out_unlock:
        mutex_unlock(&i915->drm.struct_mutex);
drivers/gpu/drm/i915/gem/i915_gem_object_blt.c +1 -0
index fa90c38c8b07..c1e5edd1e359 100644
@@ -5,49 +5,103 @@
 
 #include "i915_drv.h"
 #include "gt/intel_context.h"
+#include "gt/intel_engine_pm.h"

drivers/gpu/drm/i915/gem/i915_gem_object_blt.c line 15

Quoted 10 lines
drivers/gpu/drm/i915/gem/i915_gem_object_blt.c +4 -3
+#include "gt/intel_engine_pool.h"
+#include "gt/intel_gt.h"
 #include "i915_gem_clflush.h"
 #include "i915_gem_object_blt.h"
 
-int intel_emit_vma_fill_blt(struct i915_request *rq,
-                           struct i915_vma *vma,
-                           u32 value)
+struct i915_vma *intel_emit_vma_fill_blt(struct
+intel_engine_pool_node

**p,

Quoted 53 lines
drivers/gpu/drm/i915/gem/i915_gem_object_blt.c +28 -24
+                                        struct intel_context *ce,
+                                        struct i915_vma *vma,
+                                        u32 value)
 {
-       u32 *cs;
-
-       cs = intel_ring_begin(rq, 8);
-       if (IS_ERR(cs))
-               return PTR_ERR(cs);
-
-       if (INTEL_GEN(rq->i915) >= 8) {
-               *cs++ = XY_COLOR_BLT_CMD | BLT_WRITE_RGBA | (7 - 2);
-               *cs++ = BLT_DEPTH_32 | BLT_ROP_COLOR_COPY | PAGE_SIZE;
-               *cs++ = 0;
-               *cs++ = vma->size >> PAGE_SHIFT << 16 | PAGE_SIZE / 4;
-               *cs++ = lower_32_bits(vma->node.start);
-               *cs++ = upper_32_bits(vma->node.start);
-               *cs++ = value;
-               *cs++ = MI_NOOP;
-       } else {
-               *cs++ = XY_COLOR_BLT_CMD | BLT_WRITE_RGBA | (6 - 2);
-               *cs++ = BLT_DEPTH_32 | BLT_ROP_COLOR_COPY | PAGE_SIZE;
-               *cs++ = 0;
-               *cs++ = vma->size >> PAGE_SHIFT << 16 | PAGE_SIZE / 4;
-               *cs++ = vma->node.start;
-               *cs++ = value;
-               *cs++ = MI_NOOP;
-               *cs++ = MI_NOOP;
+       struct drm_i915_private *i915 = ce->vm->i915;
+       const u32 block_size = S16_MAX * PAGE_SIZE;
+       struct intel_engine_pool_node *pool;
+       struct i915_vma *batch;
+       u64 offset;
+       u64 count;
+       u64 rem;
+       u32 size;
+       u32 *cmd;
+       int err;
+
+       count = div_u64(vma->size, block_size);
+       size = (1 + 8 * count) * sizeof(u32);
+       size = round_up(size, PAGE_SIZE);
+       pool = intel_engine_pool_get(&ce->engine->pool, size);
+       if (IS_ERR(pool))
+               return ERR_CAST(pool);
+
+       cmd = i915_gem_object_pin_map(pool->obj, I915_MAP_WC);
+       if (IS_ERR(cmd)) {
+               err = PTR_ERR(cmd);
+               goto out_put;
+       }
+
+       rem = vma->size;

drivers/gpu/drm/i915/gem/i915_gem_object_blt.c

Quoted 10 lines
drivers/gpu/drm/i915/gem/i915_gem_object_blt.c +10 -0
+       offset = vma->node.start;
+
+       do {
+               u32 size = min_t(u64, rem, block_size);
+
+               GEM_BUG_ON(size >> PAGE_SHIFT > S16_MAX);
+
+               if (INTEL_GEN(i915) >= 8) {
+                       *cmd++ = XY_COLOR_BLT_CMD | BLT_WRITE_RGBA | (7 - 2);
+                       *cmd++ = BLT_DEPTH_32 | BLT_ROP_COLOR_COPY |

PAGE_SIZE;

drivers/gpu/drm/i915/gem/i915_gem_object_blt.c

Quoted 8 lines
drivers/gpu/drm/i915/gem/i915_gem_object_blt.c +8 -0
+                       *cmd++ = 0;
+                       *cmd++ = size >> PAGE_SHIFT << 16 | PAGE_SIZE / 4;
+                       *cmd++ = lower_32_bits(offset);
+                       *cmd++ = upper_32_bits(offset);
+                       *cmd++ = value;
+               } else {
+                       *cmd++ = XY_COLOR_BLT_CMD | BLT_WRITE_RGBA | (6 - 2);
+                       *cmd++ = BLT_DEPTH_32 | BLT_ROP_COLOR_COPY |

PAGE_SIZE;

drivers/gpu/drm/i915/gem/i915_gem_object_blt.c line 69

Quoted 8 lines
drivers/gpu/drm/i915/gem/i915_gem_object_blt.c +8 -0
+                       *cmd++ = 0;
+                       *cmd++ = size >> PAGE_SHIFT << 16 | PAGE_SIZE / 4;
+                       *cmd++ = offset;
+                       *cmd++ = value;
+               }
+
+               /* Allow ourselves to be preempted in between blocks. */
+               *cmd++ = MI_ARB_CHECK;

That I thought was a nice touch.

drivers/gpu/drm/i915/gem/i915_gem_object_blt.c int i915_gem_object_fill_blt(struct

Quoted 40 lines
drivers/gpu/drm/i915/gem/i915_gem_object_blt.c +25 -2
+
+               offset += size;
+               rem -= size;
+       } while (rem);
+
+       *cmd = MI_BATCH_BUFFER_END;
+       intel_gt_chipset_flush(ce->vm->gt);
+
+       i915_gem_object_unpin_map(pool->obj);
+
+       batch = i915_vma_instance(pool->obj, ce->vm, NULL);
+       if (IS_ERR(batch)) {
+               err = PTR_ERR(batch);
+               goto out_put;
        }
 
-       intel_ring_advance(rq, cs);
+       err = i915_vma_pin(batch, 0, 0, PIN_USER);
+       if (unlikely(err))
+               goto out_put;
+
+       *p = pool;
+       return batch;
 
-       return 0;
+out_put:
+       intel_engine_pool_put(pool);
+       return ERR_PTR(err);
 }
 
 int i915_gem_object_fill_blt(struct drm_i915_gem_object *obj,
                             struct intel_context *ce,
                             u32 value)  {
+       struct intel_engine_pool_node *pool;
        struct i915_request *rq;
+       struct i915_vma *batch;
        struct i915_vma *vma;
        int err;
 
@@ -65,12 +119,29 @@ int i915_gem_object_fill_blt(struct

drm_i915_gem_object *obj,

drivers/gpu/drm/i915/gem/i915_gem_object_blt.c int i915_gem_object_fill_blt(struct

Quoted 31 lines
drivers/gpu/drm/i915/gem/i915_gem_object_blt.c +18 -1
                i915_gem_object_unlock(obj);
        }
 
+       intel_engine_pm_get(ce->engine);
+       batch = intel_emit_vma_fill_blt(&pool, ce, vma, value);
+       if (IS_ERR(batch)) {
+               err = PTR_ERR(batch);
+               goto out_unpin;
+       }
+
        rq = intel_context_create_request(ce);
        if (IS_ERR(rq)) {
                err = PTR_ERR(rq);
-               goto out_unpin;
+               goto out_batch;
        }
 
+       i915_vma_lock(batch);
+       err = i915_vma_move_to_active(batch, rq, 0);
+       i915_vma_unlock(batch);
+       if (unlikely(err))
+               goto out_request;
+
+       err = intel_engine_pool_mark_active(pool, rq);
+       if (unlikely(err))
+               goto out_request;
+
        err = i915_request_await_object(rq, obj, true);
        if (unlikely(err))
                goto out_request;
@@ -87,13 +158,19 @@ int i915_gem_object_fill_blt(struct

drm_i915_gem_object *obj,

Quoted 29 lines
drivers/gpu/drm/i915/gem/i915_gem_object_blt.c +7 -1
        if (unlikely(err))
                goto out_request;
 
-       err = intel_emit_vma_fill_blt(rq, vma, value);
+       err = ce->engine->emit_bb_start(rq,
+                                       batch->node.start, batch->node.size,
+                                       0);
 out_request:
        if (unlikely(err))
                i915_request_skip(rq, err);
 
        i915_request_add(rq);
+out_batch:
+       i915_vma_unpin(batch);
+       intel_engine_pool_put(pool);
 out_unpin:
+       intel_engine_pm_put(ce->engine);
        i915_vma_unpin(vma);
        return err;
 }
drivers/gpu/drm/i915/gem/i915_gem_object_blt.h +0 -0
index 7ec7de6ac0c0..a7425c234d50 100644
@@ -9,13 +9,14 @@
 #include <linux/types.h>
 
 struct drm_i915_gem_object;

drivers/gpu/drm/i915/gem/i915_gem_object_blt.h line 17

Quoted 10 lines
drivers/gpu/drm/i915/gem/i915_gem_object_blt.h +3 -4
+struct intel_engine_pool_node;
 struct intel_context;
-struct i915_request;
 struct i915_vma;
 
-int intel_emit_vma_fill_blt(struct i915_request *rq,
-                           struct i915_vma *vma,
-                           u32 value);
+struct i915_vma *intel_emit_vma_fill_blt(struct
+intel_engine_pool_node

**p,

Quoted 23 lines
drivers/gpu/drm/i915/gem/i915_gem_object_blt.h +3 -0
+                                        struct intel_context *ce,
+                                        struct i915_vma *vma,
+                                        u32 value);
 
 int i915_gem_object_fill_blt(struct drm_i915_gem_object *obj,
                             struct intel_context *ce, diff --git

a/drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c b/drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c index 275c28926067..d8804a847945 100644

drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c +1 -0
@@ -9,6 +9,7 @@
 
 #include "selftests/igt_flush_test.h"
 #include "selftests/mock_drm.h"
+#include "huge_gem_object.h"
 #include "mock_context.h"
 
 static int igt_client_fill(void *arg) @@ -24,15 +25,19 @@ static

int igt_client_fill(void *arg)

        prandom_seed_state(&prng, i915_selftest.random_seed);

        do {

drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c static int igt_client_fill(void *arg)

Quoted 3 lines
drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c +2 -1
-               u32 sz = prandom_u32_state(&prng) % SZ_32M;
+               const u32 max_block_size = S16_MAX * PAGE_SIZE;
+               u32 sz = min_t(u64, ce->vm->total >> 4,

prandom_u32_state(&prng));

Quoted 20 lines
drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c +5 -2
+               u32 phys_sz = sz % (max_block_size + 1);
                u32 val = prandom_u32_state(&prng);
                u32 i;
 
                sz = round_up(sz, PAGE_SIZE);
+               phys_sz = round_up(phys_sz, PAGE_SIZE);
 
-               pr_debug("%s with sz=%x, val=%x\n", __func__, sz, val);
+               pr_debug("%s with phys_sz= %x, sz=%x, val=%x\n", __func__,
+                        phys_sz, sz, val);
 
-               obj = i915_gem_object_create_internal(i915, sz);
+               obj = huge_gem_object(i915, phys_sz, sz);
                if (IS_ERR(obj)) {
                        err = PTR_ERR(obj);
                        goto err_flush; @@ -54,7 +59,8 @@ static int

igt_client_fill(void *arg)
* values after we do the set_to_cpu_domain and pick it up as a
* test failure.
*/

drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c static int igt_client_fill(void *arg)

Quoted 6 lines
drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c +3 -1
-               memset32(vaddr, val ^ 0xdeadbeaf, obj->base.size / sizeof(u32));
+               memset32(vaddr, val ^ 0xdeadbeaf,
+                        huge_gem_object_phys_size(obj) /
+ sizeof(u32));
 
                if (!(obj->cache_coherent &

I915_BO_CACHE_COHERENT_FOR_WRITE))

Quoted 23 lines
                        obj->cache_dirty = true; @@ -71,7 +77,7 @@
static int igt_client_fill(void *arg)
                if (err)
                        goto err_unpin;
drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c +2 -1
-               for (i = 0; i < obj->base.size / sizeof(u32); ++i) {
+               for (i = 0; i < huge_gem_object_phys_size(obj) /
+ sizeof(u32); ++i) {
                        if (vaddr[i] != val) {
                                pr_err("vaddr[%u]=%x, expected=%x\n", i,
                                       vaddr[i], val); diff --git

a/drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c b/drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c index 19843acc84d3..c6e1eebe53f5 100644

drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c +1 -0
@@ -9,6 +9,7 @@
 
 #include "selftests/igt_flush_test.h"
 #include "selftests/mock_drm.h"
+#include "huge_gem_object.h"
 #include "mock_context.h"
 
Quoted 7 lines

drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c static int igt_fill_blt(void *arg) · line 28

Quoted 7 lines
drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c +2 -0
 static int igt_fill_blt(void *arg)
@@ -23,16 +24,26 @@ static int igt_fill_blt(void *arg)
 
        prandom_seed_state(&prng, i915_selftest.random_seed);
 
+       /*
+        * XXX: needs some threads to scale all these tests, also maybe

throw

Quoted 55 lines

drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c static int igt_fill_blt(void *arg) · line 31

Quoted 3 lines
drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c +3 -0
+        * in submission from higher priority context to see if we are
+        * preempted for very large objects...
+        */

A challenge!

drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c static int igt_fill_blt(void *arg)

Quoted 5 lines
drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c +3 -1
+
        do {
-               u32 sz = prandom_u32_state(&prng) % SZ_32M;
+               const u32 max_block_size = S16_MAX * PAGE_SIZE;
+               u32 sz = min_t(u64, ce->vm->total >> 4,

prandom_u32_state(&prng));

Quoted 20 lines
drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c +5 -2
+               u32 phys_sz = sz % (max_block_size + 1);
                u32 val = prandom_u32_state(&prng);
                u32 i;
 
                sz = round_up(sz, PAGE_SIZE);
+               phys_sz = round_up(phys_sz, PAGE_SIZE);
 
-               pr_debug("%s with sz=%x, val=%x\n", __func__, sz, val);
+               pr_debug("%s with phys_sz= %x, sz=%x, val=%x\n", __func__,
+                        phys_sz, sz, val);
 
-               obj = i915_gem_object_create_internal(i915, sz);
+               obj = huge_gem_object(i915, phys_sz, sz);
                if (IS_ERR(obj)) {
                        err = PTR_ERR(obj);
                        goto err_flush; @@ -48,7 +59,8 @@ static int

igt_fill_blt(void *arg)
* Make sure the potentially async clflush does its job, if
* required.
*/

drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c

Quoted 4 lines
drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c +3 -1
-               memset32(vaddr, val ^ 0xdeadbeaf, obj->base.size / sizeof(u32));
+               memset32(vaddr, val ^ 0xdeadbeaf,
+                        huge_gem_object_phys_size(obj) /
+ sizeof(u32));

Ok, using huge_object is a little interesting for a fill as we will write the same pages over and over again. Doesn't break the test, but it will be important when considering doing a huge copy.

Quoted 1 line
                if (!(obj->cache_coherent &

I915_BO_CACHE_COHERENT_FOR_WRITE))

drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c

Quoted 11 lines
                        obj->cache_dirty = true; @@ -65,7 +77,7 @@
static int igt_fill_blt(void *arg)
                if (err)
                        goto err_unpin;
drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c +2 -1
-               for (i = 0; i < obj->base.size / sizeof(u32); ++i) {
+               for (i = 0; i < huge_gem_object_phys_size(obj) /
+ sizeof(u32); ++i) {
                        if (vaddr[i] != val) {
                                pr_err("vaddr[%u]=%x, expected=%x\n", i,
                                       vaddr[i], val);
Quoted 8 lines

I thinking passing pool via batch->private isn't too bad of an idea (I had a double take when I couldn't see an assignment to pool), but nevertheless

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Quoted 4 lines

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#10 lore raw

✗ Fi.CI.CHECKPATCH: warning for Some bits from the LMEM series

In reply to Matthew Auld
== Series Details ==

== Series Details ==

Series: Some bits from the LMEM series
URL : https://patchwork.freedesktop.org/series/64994/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
94ffded7068a drm/i915: buddy allocator
-:30: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#30: 
new file mode 100644

-:457: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #457: FILE: drivers/gpu/drm/i915/i915_buddy.c:423:
+ if (buddy && (i915_buddy_block_is_free(block) &&
+ i915_buddy_block_is_free(buddy)))

total: 0 errors, 1 warnings, 1 checks, 1303 lines checked 891750b1695e drm/i915/blt: don't assume pinned intel_context 2dafb186902e drm/i915/blt: bump the size restriction

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#11 lore raw

✗ Fi.CI.SPARSE: warning for Some bits from the LMEM series

In reply to Matthew Auld
== Series Details ==

== Series Details ==

Series: Some bits from the LMEM series
URL : https://patchwork.freedesktop.org/series/64994/
State : warning

== Summary ==

$ dim sparse origin/drm-tip
Sparse version: v0.5.2
Commit: drm/i915: buddy allocator
+drivers/gpu/drm/i915/selftests/i915_buddy.c:292:13: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/selftests/i915_buddy.c:292:13: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/selftests/i915_buddy.c:647:24: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/selftests/i915_buddy.c:647:24: warning: expression using sizeof(void)
+./include/linux/slab.h:672:13: error: not a function <noident>
+./include/linux/slab.h:672:13: error: undefined identifier '__builtin_mul_overflow'
+./include/linux/slab.h:672:13: warning: call with no type!

Commit: drm/i915/blt: don't assume pinned intel_context Okay!

Commit: drm/i915/blt: bump the size restriction
-
+drivers/gpu/drm/i915/gem/i915_gem_object_blt.c:47:28: warning: expression using sizeof(void) +drivers/gpu/drm/i915/gem/i915_gem_object_blt.c:47:28: warning: expression using sizeof(void) +drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c:29:26: warning: expression using sizeof(void) +drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c:29:26: warning: expression using sizeof(void) +drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c:35:26: warning: expression using sizeof(void) +drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c:35:26: warning: expression using sizeof(void)

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#12 lore raw

✓ Fi.CI.BAT: success for Some bits from the LMEM series

In reply to Matthew Auld
== Series Details ==

== Series Details ==

Series: Some bits from the LMEM series
URL : https://patchwork.freedesktop.org/series/64994/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6670 -> Patchwork_13955
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13955/

Known issues
------------

Here are the changes found in Patchwork_13955 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_busy@busy-all:
- fi-icl-u3: [PASS][1] -> [DMESG-WARN][2] ([fdo#107724])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6670/fi-icl-u3/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13955/fi-icl-u3/igt@[email protected]

* igt@kms_busy@basic-flip-a:
- fi-kbl-7567u: [PASS][3] -> [SKIP][4] ([fdo#109271] / [fdo#109278]) +2 similar issues
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6670/fi-kbl-7567u/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13955/fi-kbl-7567u/igt@[email protected]

* igt@kms_frontbuffer_tracking@basic:
- fi-hsw-peppy: [PASS][5] -> [DMESG-WARN][6] ([fdo#102614])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6670/fi-hsw-peppy/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13955/fi-hsw-peppy/igt@[email protected]

#### Possible fixes ####

* igt@gem_cpu_reloc@basic:
- fi-icl-u3: [DMESG-WARN][7] ([fdo#107724]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6670/fi-icl-u3/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13955/fi-icl-u3/igt@[email protected]

* igt@i915_selftest@live_execlists:
- fi-skl-gvtdvm: [DMESG-FAIL][9] ([fdo#111108]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6670/fi-skl-gvtdvm/igt@i915_selftest@live_execlists.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13955/fi-skl-gvtdvm/igt@i915_selftest@live_execlists.html

* igt@kms_chamelium@common-hpd-after-suspend:
- fi-kbl-7567u: [WARN][11] ([fdo#109380]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6670/fi-kbl-7567u/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13955/fi-kbl-7567u/igt@[email protected]

* igt@kms_pipe_crc_basic@read-crc-pipe-c:
- fi-kbl-7567u: [SKIP][13] ([fdo#109271]) -> [PASS][14] +23 similar issues
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6670/fi-kbl-7567u/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13955/fi-kbl-7567u/igt@[email protected]

[fdo#102614]: https://bugs.freedesktop.org/show_bug.cgi?id=102614
[fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109380]: https://bugs.freedesktop.org/show_bug.cgi?id=109380
[fdo#111108]: https://bugs.freedesktop.org/show_bug.cgi?id=111108

Participating hosts (53 -> 47)
------------------------------

Additional (1): fi-bsw-n3050
Missing (7): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-icl-y fi-byt-clapper fi-bdw-samus

Build changes
-------------

* CI: CI-20190529 -> None
* Linux: CI_DRM_6670 -> Patchwork_13955

CI-20190529: 20190529
CI_DRM_6670: dca4867439f21c056afbde56cd4eb241b50f35d4 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5127: f43f5fa12ac1b93febfe3eeb9e9985f5f3e2eff0 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_13955: 2dafb186902e64ceaf531ee27bd58f985ced2886 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

2dafb186902e drm/i915/blt: bump the size restriction 891750b1695e drm/i915/blt: don't assume pinned intel_context 94ffded7068a drm/i915: buddy allocator

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13955/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#13 lore raw

✓ Fi.CI.IGT: success for Some bits from the LMEM series

In reply to Matthew Auld
== Series Details ==

== Series Details ==

Series: Some bits from the LMEM series
URL : https://patchwork.freedesktop.org/series/64994/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6670_full -> Patchwork_13955_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

New tests
---------

New tests have been introduced between CI_DRM_6670_full and Patchwork_13955_full:

### New IGT tests (1) ###

* igt@i915_selftest@mock_buddy:
- Statuses : 7 pass(s)
- Exec time: [0.10, 22.81] s

Known issues
------------

Here are the changes found in Patchwork_13955_full that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_schedule@reorder-wide-bsd:
- shard-iclb: [PASS][1] -> [SKIP][2] ([fdo#111325]) +4 similar issues
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6670/shard-iclb5/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13955/shard-iclb1/igt@[email protected]

* igt@kms_cursor_crc@pipe-a-cursor-suspend:
- shard-apl: [PASS][3] -> [DMESG-WARN][4] ([fdo#108566]) +1 similar issue
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6670/shard-apl4/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13955/shard-apl8/igt@[email protected]

* igt@kms_cursor_crc@pipe-c-cursor-suspend:
- shard-kbl: [PASS][5] -> [DMESG-WARN][6] ([fdo#108566]) +1 similar issue
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6670/shard-kbl2/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13955/shard-kbl3/igt@[email protected]

* igt@kms_cursor_legacy@long-nonblocking-modeset-vs-cursor-atomic:
- shard-skl: [PASS][7] -> [DMESG-WARN][8] ([fdo#105541])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6670/shard-skl1/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13955/shard-skl7/igt@[email protected]

* igt@kms_flip@flip-vs-expired-vblank:
- shard-skl: [PASS][9] -> [FAIL][10] ([fdo#105363])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6670/shard-skl6/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13955/shard-skl8/igt@[email protected]

* igt@kms_flip@modeset-vs-vblank-race-interruptible:
- shard-glk: [PASS][11] -> [FAIL][12] ([fdo#103060])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6670/shard-glk2/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13955/shard-glk2/igt@[email protected]

* igt@kms_flip@plain-flip-ts-check-interruptible:
- shard-iclb: [PASS][13] -> [INCOMPLETE][14] ([fdo#107713])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6670/shard-iclb4/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13955/shard-iclb7/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-pwrite:
- shard-iclb: [PASS][15] -> [FAIL][16] ([fdo#103167]) +2 similar issues
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6670/shard-iclb3/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-pwrite.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13955/shard-iclb7/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-pwrite.html

* igt@kms_frontbuffer_tracking@fbc-suspend:
- shard-skl: [PASS][17] -> [INCOMPLETE][18] ([fdo#104108])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6670/shard-skl10/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13955/shard-skl10/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min:
- shard-skl: [PASS][19] -> [FAIL][20] ([fdo#108145]) +1 similar issue
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6670/shard-skl8/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13955/shard-skl6/igt@[email protected]

* igt@kms_psr@psr2_sprite_mmap_cpu:
- shard-iclb: [PASS][21] -> [SKIP][22] ([fdo#109441]) +1 similar issue
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6670/shard-iclb2/igt@kms_psr@psr2_sprite_mmap_cpu.html
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13955/shard-iclb1/igt@kms_psr@psr2_sprite_mmap_cpu.html

* igt@kms_vblank@pipe-a-accuracy-idle:
- shard-glk: [PASS][23] -> [FAIL][24] ([fdo#102583])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6670/shard-glk5/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13955/shard-glk7/igt@[email protected]

* igt@perf@blocking:
- shard-skl: [PASS][25] -> [FAIL][26] ([fdo#110728]) +1 similar issue
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6670/shard-skl6/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13955/shard-skl4/igt@[email protected]

* igt@prime_vgem@fence-wait-bsd2:
- shard-iclb: [PASS][27] -> [SKIP][28] ([fdo#109276]) +9 similar issues
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6670/shard-iclb1/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13955/shard-iclb8/igt@[email protected]

#### Possible fixes ####

* igt@gem_ctx_isolation@bcs0-s3:
- shard-kbl: [DMESG-WARN][29] ([fdo#108566]) -> [PASS][30] +1 similar issue
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6670/shard-kbl1/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13955/shard-kbl1/igt@[email protected]

* igt@gem_ctx_shared@exec-single-timeline-bsd:
- shard-iclb: [SKIP][31] ([fdo#110841]) -> [PASS][32]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6670/shard-iclb1/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13955/shard-iclb3/igt@[email protected]

* igt@gem_exec_blt@dumb-buf-min:
- shard-iclb: [INCOMPLETE][33] ([fdo#107713]) -> [PASS][34]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6670/shard-iclb7/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13955/shard-iclb4/igt@[email protected]

* igt@gem_exec_schedule@preempt-contexts-bsd2:
- shard-iclb: [SKIP][35] ([fdo#109276]) -> [PASS][36] +12 similar issues
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6670/shard-iclb6/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13955/shard-iclb1/igt@[email protected]

* igt@gem_exec_schedule@preemptive-hang-bsd:
- shard-iclb: [SKIP][37] ([fdo#111325]) -> [PASS][38] +5 similar issues
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6670/shard-iclb1/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13955/shard-iclb5/igt@[email protected]

* igt@kms_cursor_legacy@pipe-b-single-bo:
- shard-apl: [INCOMPLETE][39] ([fdo#103927]) -> [PASS][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6670/shard-apl7/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13955/shard-apl3/igt@[email protected]

* igt@kms_flip@flip-vs-suspend-interruptible:
- shard-apl: [DMESG-WARN][41] ([fdo#108566]) -> [PASS][42]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6670/shard-apl7/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13955/shard-apl4/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-b-constant-alpha-min:
- shard-skl: [FAIL][43] ([fdo#108145]) -> [PASS][44]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6670/shard-skl9/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13955/shard-skl2/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-b-coverage-7efc:
- shard-skl: [FAIL][45] ([fdo#108145] / [fdo#110403]) -> [PASS][46]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6670/shard-skl5/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13955/shard-skl7/igt@[email protected]

* igt@kms_psr@no_drrs:
- shard-iclb: [FAIL][47] ([fdo#108341]) -> [PASS][48]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6670/shard-iclb1/igt@kms_psr@no_drrs.html
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13955/shard-iclb7/igt@kms_psr@no_drrs.html

* igt@kms_psr@psr2_sprite_plane_move:
- shard-iclb: [SKIP][49] ([fdo#109441]) -> [PASS][50] +2 similar issues
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6670/shard-iclb4/igt@kms_psr@psr2_sprite_plane_move.html
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13955/shard-iclb2/igt@kms_psr@psr2_sprite_plane_move.html

* igt@kms_setmode@basic:
- shard-apl: [FAIL][51] ([fdo#99912]) -> [PASS][52]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6670/shard-apl1/igt@[email protected]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13955/shard-apl5/igt@[email protected]

* igt@perf_pmu@rc6-runtime-pm-long:
- shard-apl: [FAIL][53] ([fdo#105010]) -> [PASS][54]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6670/shard-apl7/igt@[email protected]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13955/shard-apl8/igt@[email protected]
- shard-glk: [FAIL][55] ([fdo#105010]) -> [PASS][56]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6670/shard-glk5/igt@[email protected]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13955/shard-glk3/igt@[email protected]

#### Warnings ####

* igt@gem_mocs_settings@mocs-isolation-bsd2:
- shard-iclb: [SKIP][57] ([fdo#109276]) -> [FAIL][58] ([fdo#111330])
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6670/shard-iclb5/igt@[email protected]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13955/shard-iclb1/igt@[email protected]

* igt@kms_dp_dsc@basic-dsc-enable-edp:
- shard-iclb: [DMESG-WARN][59] ([fdo#107724]) -> [SKIP][60] ([fdo#109349])
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6670/shard-iclb2/igt@[email protected]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13955/shard-iclb6/igt@[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#102583]: https://bugs.freedesktop.org/show_bug.cgi?id=102583
[fdo#103060]: https://bugs.freedesktop.org/show_bug.cgi?id=103060
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
[fdo#105010]: https://bugs.freedesktop.org/show_bug.cgi?id=105010
[fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
[fdo#105541]: https://bugs.freedesktop.org/show_bug.cgi?id=105541
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108341]: https://bugs.freedesktop.org/show_bug.cgi?id=108341
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109349]: https://bugs.freedesktop.org/show_bug.cgi?id=109349
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#110403]: https://bugs.freedesktop.org/show_bug.cgi?id=110403
[fdo#110728]: https://bugs.freedesktop.org/show_bug.cgi?id=110728
[fdo#110841]: https://bugs.freedesktop.org/show_bug.cgi?id=110841
[fdo#111325]: https://bugs.freedesktop.org/show_bug.cgi?id=111325
[fdo#111330]: https://bugs.freedesktop.org/show_bug.cgi?id=111330
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912

Participating hosts (10 -> 10)
------------------------------

No changes in participating hosts

Build changes
-------------

* CI: CI-20190529 -> None
* Linux: CI_DRM_6670 -> Patchwork_13955

CI-20190529: 20190529
CI_DRM_6670: dca4867439f21c056afbde56cd4eb241b50f35d4 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5127: f43f5fa12ac1b93febfe3eeb9e9985f5f3e2eff0 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_13955: 2dafb186902e64ceaf531ee27bd58f985ced2886 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13955/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx