Skip to contentSkip to conversation

Refactoring of *_fill libraries

PATCH Superseded Katarzyna Dec 3 participants 8 messages Apr 10, 2018

Subsystems (2)

v4 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

v4 cover Refactoring of *_fill libraries

This series is removing duplications in gpgpu_fill and media_fill libraries. As a first step I moved gpgpu and media helper functions to gpu_fill library. In second patch I adjusted code to our coding style. In the third not obvious duplications were removed (like adding in gen7 functions conditions for future gens). Last patch adds missing parameters that make GPU hang on gen9 and gen9+.

In first version of this series there was a comment about moving batch_alloc/copy etc. functions to intel_batchbuffer library. Because there is a lot of code to review already this change will be introduced in another series (rendercopy, media_fill, gpgpu_fill and media_spin code is affected by this).

It is possible that more changes around gen*_media.h and media_spin is needed, but this will be done as a next step.

v2: Removed not obvious duplications. Adjusted code to review comments.
v3: Series needed reorganization because it introduced bug to ALP,
which was hard to find. That is why patch 1 is now almost only moving functions to gpu_fill with removing duplications, such as the same functions. Also applied comments from review.
v4: Added #defines and copyrights to new gpu_fill library. Changed functions
order in gpu_fill library.

Cc Lukasz Kalamarz <[email protected]>
Cc Daniele Ceraolo Spurio <[email protected]>

Katarzyna Dec (4):
lib: Move common gpgpu/media fill functions to gpu_fill library
lib: Remove duplications in gpu_fill library lib/gpgpu_fill: Add missing configuration parameters for gpgpu_fill
lib: Adjust refactored gpu_fill library to our coding style

 lib/Makefile.sources    |   3 +-
 lib/gpgpu_fill.c        | 600 ++--------------------------------------------
 lib/gpgpu_fill.h        |  12 +-
 lib/gpu_fill.c          | 624 ++++++++++++++++++++++++++++++++++++++++++++++++
 lib/gpu_fill.h          | 135 +++++++++++
 lib/intel_batchbuffer.c |   4 +-
 lib/media_fill.h        |  23 +-
 lib/media_fill_gen7.c   | 278 +--------------------
 lib/media_fill_gen8.c   | 305 +----------------------
 lib/media_fill_gen8lp.c | 367 ----------------------------
 lib/media_fill_gen9.c   | 308 +-----------------------
 lib/meson.build         |   2 +-
 12 files changed, 815 insertions(+), 1846 deletions(-)
 create mode 100644 lib/gpu_fill.c
 create mode 100644 lib/gpu_fill.h
 delete mode 100644 lib/media_fill_gen8lp.c
Signature · 6 lines
2.14.3

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

PATCH v4 1/4 lib: Move common gpgpu/media fill functions to gpu_fill library

Gpgpu_fill and media_fill libraries are very similar and many functions can be shared. I have created library gpu_fill with all functions needed for implementing gpgpu_fill and media_fill tests for all Gens. For reviewing and debugging purposes this patch should be only moving functions from few libraries to one removing functions identical for both media and gpgpu.
Places in the code that required more changes:
Removing gen7_fill_gpgpu_kernel function that is identical to
gen7_fill_media_kernel and introduces conflict with moving genX_fill_interface_descriptor, which are the same for media and gpgpu.
Function gen8_fill_media_kernel is not removed in this patch
(although it is identical with gen7 version), because this patch should be as much as possible functions movement.
gen8_fill_interface_descriptor was unified for media and gpgpu
by adding kernel and its size as a parameter (this parameters were missing in media gen8, gen8lp and gen9 functions)
gen8_emit_state_base_address was unified, the one for gpgpu was
configured like it would be using indirect state (while we are using CURBE). I have checked that media fill version (OUT_BATCH(0 | BASE_ADDRESS_MODIFY)) works fine on gpgpu gen8 and newer.

v2: Changed code layout. GenX_fill_media_kernel was identical to genX_fill_gpgpu_kernel so this function was unified to gen7_fill_kernel. There were 2 very similar functions gen8_emit_state_base_address for media and gpgpu, where the one for gpgpu was configured like it would be using indirect state (while we are using CURBE). I have checked if media fill version works fine in gpgpu test on Gen8 and unified them.

v3: Made patch easier for reviewing moving changes unifying code for various gens (that were included v1) to other patch, leaving only the most critical code changes.

Cc Lukasz Kalamarz <[email protected]>
Cc Daniele Ceraolo Spurio <[email protected]>
---
 lib/Makefile.sources    |   2 +
 lib/gpgpu_fill.c        | 571 +-----------------------------------
 lib/gpu_fill.c          | 758 ++++++++++++++++++++++++++++++++++++++++++++++++
 lib/gpu_fill.h          | 138 +++++++++
 lib/media_fill_gen7.c   | 271 +----------------
 lib/media_fill_gen8.c   | 290 +-----------------
 lib/media_fill_gen8lp.c | 284 +-----------------
 lib/media_fill_gen9.c   | 298 +------------------
 lib/meson.build         |   1 +
 9 files changed, 908 insertions(+), 1705 deletions(-)
 create mode 100644 lib/gpu_fill.c
 create mode 100644 lib/gpu_fill.h
lib/Makefile.sources +2 -0
index 3d37ef1d..45e65dd7 100644
@@ -64,6 +64,8 @@ lib_source_list =	 	\
 	media_spin.c		\
 	gpgpu_fill.h		\
 	gpgpu_fill.c		\
+	gpu_fill.h		\
+	gpu_fill.c		\
 	gen7_media.h            \
 	gen8_media.h            \
 	rendercopy_i915.c	\
lib/gpgpu_fill.c +2 -569

584 lines not on this page · raw message

lib/gpu_fill.c new file +758 -0

758 lines not on this page · raw message

lib/gpu_fill.h new file +138 -0

138 lines not on this page · raw message

lib/media_fill_gen7.c +1 -270

283 lines not on this page · raw message

lib/media_fill_gen8.c +2 -288

309 lines not on this page · raw message

lib/media_fill_gen8lp.c +2 -282

302 lines not on this page · raw message

lib/media_fill_gen9.c +2 -296

318 lines not on this page · raw message

lib/meson.build +1 -0
index b3b8b14a..385e08b9 100644
@@ -30,6 +30,7 @@ lib_sources = [
 	'media_fill_gen9.c',
 	'media_spin.c',
 	'gpgpu_fill.c',
+	'gpu_fill.c',
 	'rendercopy_i915.c',
 	'rendercopy_i830.c',
 	'rendercopy_gen6.c',
Signature · 6 lines
2.14.3

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

PATCH v4 2/4 lib: Remove duplications in gpu_fill library

In reply to Katarzyna Dec

After moving all functions needed for gpgpu and media fill testing there is a lot of duplications which can be removed:
Library media_fill_gen8 and media_fill_gen8lp for CHT was removed,
media state flush for !CHT was added to gen7_emit_media_objects.
Many gen8 functions were replaced with gen7 version with devid
parameter (gen7_fill_curbe_load, gen7_emit_interface_descriptor, gen7_fill_binding_table, gen7_emit_media_objects). Unified fill kernel function so it is applicable to all gens and both media and gpgpu (merged gen7_fill_media_kernel and gen8_fill_media_kernel).
Duplicated constants like GEN8_MEDIA_VFE_STATE, GEN8_MEDIA_CURBE_LOAD,
GEN8_MEDIA_INTERFACE_DESCRIPTOR_LOAD, GEN8_MEDIA_OBJECT were replaced by GEN7 version. However this constants were not removed from gen8_media.h library, because they are used by other tests for Gen8+. More refactoring in this gen*_media.h libraries is needed.

It seems that further unification of *_fillfunc functions will introduce more confusion in understanding what the tests are doing and what were changes between Gens.

v2: Moved some reduntant changes from Move gpgpu/media fill to gpu_fill... to this patch. Applied comments from review.

Cc Lukasz Kalamarz <[email protected]>
Cc Daniele Ceraolo Spurio <[email protected]>
---
 lib/Makefile.sources    |   1 -
 lib/gpgpu_fill.c        |   2 +-
 lib/gpu_fill.c          | 172 +++++++-----------------------------------------
 lib/gpu_fill.h          |  67 +++++++++----------
 lib/intel_batchbuffer.c |   4 +-
 lib/media_fill.h        |   7 --
 lib/media_fill_gen8.c   |  10 +--
 lib/media_fill_gen8lp.c |  87 ------------------------
 lib/media_fill_gen9.c   |  10 +--
 lib/meson.build         |   1 -
 10 files changed, 68 insertions(+), 293 deletions(-)
 delete mode 100644 lib/media_fill_gen8lp.c
lib/Makefile.sources +0 -1
index 45e65dd7..9c0150c1 100644
@@ -58,7 +58,6 @@ lib_source_list =	 	\
 	media_fill.h            \
 	media_fill_gen7.c       \
 	media_fill_gen8.c       \
-	media_fill_gen8lp.c     \
 	media_fill_gen9.c       \
 	media_spin.h		\
 	media_spin.c		\
lib/gpgpu_fill.c +1 -1
index f2765fd6..579ce78d 100644
@@ -180,7 +180,7 @@ gen8_gpgpu_fillfunc(struct intel_batchbuffer *batch,
 	gen8_emit_state_base_address(batch);
 	gen8_emit_vfe_state_gpgpu(batch);
 	gen7_emit_curbe_load(batch, curbe_buffer);
-	gen8_emit_interface_descriptor_load(batch, interface_descriptor);
+	gen7_emit_interface_descriptor_load(batch, interface_descriptor);
 	gen8_emit_gpgpu_walk(batch, x, y, width, height);
 
 	OUT_BATCH(MI_BATCH_BUFFER_END);
lib/gpu_fill.c +24 -148

241 lines not on this page · raw message

lib/gpu_fill.h +32 -35

103 lines not on this page · raw message

lib/intel_batchbuffer.c +1 -3
index 7c04ccf3..10d4dce8 100644
@@ -796,12 +796,10 @@ igt_fillfunc_t igt_get_media_fillfunc(int devid)
 
 	if (IS_GEN9(devid))
 		fill = gen9_media_fillfunc;
-	else if (IS_BROADWELL(devid))
+	else if (IS_GEN8(devid))
 		fill = gen8_media_fillfunc;
 	else if (IS_GEN7(devid))
 		fill = gen7_media_fillfunc;
-	else if (IS_CHERRYVIEW(devid))
-		fill = gen8lp_media_fillfunc;
 
 	return fill;
 }
lib/media_fill.h +0 -7
index 226489cb..161af8cf 100644
@@ -18,13 +18,6 @@ gen7_media_fillfunc(struct intel_batchbuffer *batch,
                 unsigned width, unsigned height,
                 uint8_t color);
 
-void
-gen8lp_media_fillfunc(struct intel_batchbuffer *batch,
-		struct igt_buf *dst,
-		unsigned x, unsigned y,
-		unsigned width, unsigned height,
-		uint8_t color);
-
 void
 gen9_media_fillfunc(struct intel_batchbuffer *batch,
                 struct igt_buf *dst,
lib/media_fill_gen8.c +5 -5
index 4270997e..362abd61 100644
@@ -62,7 +62,7 @@ gen8_media_fillfunc(struct intel_batchbuffer *batch,
 	/* setup states */
 	batch->ptr = &batch->buffer[BATCH_STATE_SPLIT];
 
-	curbe_buffer = gen8_fill_curbe_buffer_data(batch, color);
+	curbe_buffer = gen7_fill_curbe_buffer_data(batch, color);
 	interface_descriptor = gen8_fill_interface_descriptor(batch, dst, media_kernel, sizeof(media_kernel));
 	igt_assert(batch->ptr < &batch->buffer[4095]);
 
@@ -73,17 +73,17 @@ gen8_media_fillfunc(struct intel_batchbuffer *batch,
 
 	gen8_emit_vfe_state(batch);
 
-	gen8_emit_curbe_load(batch, curbe_buffer);
+	gen7_emit_curbe_load(batch, curbe_buffer);
 
-	gen8_emit_interface_descriptor_load(batch, interface_descriptor);
+	gen7_emit_interface_descriptor_load(batch, interface_descriptor);
 
-	gen8_emit_media_objects(batch, x, y, width, height);
+	gen7_emit_media_objects(batch, x, y, width, height);
 
 	OUT_BATCH(MI_BATCH_BUFFER_END);
 
 	batch_end = batch_align(batch, 8);
 	igt_assert(batch_end < BATCH_STATE_SPLIT);
 
-	gen8_render_flush(batch, batch_end);
+	gen7_render_flush(batch, batch_end);
 	intel_batchbuffer_reset(batch);
 }
lib/media_fill_gen8lp.c deleted +0 -87

87 lines not on this page · raw message

lib/media_fill_gen9.c +5 -5
index 6accdbe4..d1335fe6 100644
@@ -59,7 +59,7 @@ gen9_media_fillfunc(struct intel_batchbuffer *batch,
 	/* setup states */
 	batch->ptr = &batch->buffer[BATCH_STATE_SPLIT];
 
-	curbe_buffer = gen8_fill_curbe_buffer_data(batch, color);
+	curbe_buffer = gen7_fill_curbe_buffer_data(batch, color);
 	interface_descriptor = gen8_fill_interface_descriptor(batch, dst, media_kernel, sizeof(media_kernel));
 	assert(batch->ptr < &batch->buffer[4095]);
 
@@ -75,11 +75,11 @@ gen9_media_fillfunc(struct intel_batchbuffer *batch,
 
 	gen8_emit_vfe_state(batch);
 
-	gen8_emit_curbe_load(batch, curbe_buffer);
+	gen7_emit_curbe_load(batch, curbe_buffer);
 
-	gen8_emit_interface_descriptor_load(batch, interface_descriptor);
+	gen7_emit_interface_descriptor_load(batch, interface_descriptor);
 
-	gen8_emit_media_objects(batch, x, y, width, height);
+	gen7_emit_media_objects(batch, x, y, width, height);
 
 	OUT_BATCH(GEN8_PIPELINE_SELECT | PIPELINE_SELECT_MEDIA |
 			GEN9_FORCE_MEDIA_AWAKE_DISABLE |
@@ -93,6 +93,6 @@ gen9_media_fillfunc(struct intel_batchbuffer *batch,
 	batch_end = batch_align(batch, 8);
 	assert(batch_end < BATCH_STATE_SPLIT);
 
-	gen8_render_flush(batch, batch_end);
+	gen7_render_flush(batch, batch_end);
 	intel_batchbuffer_reset(batch);
 }
lib/meson.build +0 -1
index 385e08b9..5f2567fb 100644
@@ -26,7 +26,6 @@ lib_sources = [
 	'ioctl_wrappers.c',
 	'media_fill_gen7.c',
 	'media_fill_gen8.c',
-	'media_fill_gen8lp.c',
 	'media_fill_gen9.c',
 	'media_spin.c',
 	'gpgpu_fill.c',
Signature · 6 lines
2.14.3

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#3 lore raw

PATCH v4 3/4 lib/gpgpu_fill: Add missing configuration parameters for gpgpu_fill

In reply to Katarzyna Dec

There are missing parameters for Gen8 configuration of gpgpu_fill that are causing GPU hangs on newer hardware. We need to set the number of threads in TG in gen8_fill_interface_descriptor. This field was omitted (apparently without any side effects), but according to bspec from BDW this field cannot be set to 0. We also need to use pipeline selection mask to gen9_gpgpu_fillfunc, which is necessary from SKL.

v2: rebased on refactored library
v3: Removed replacing gen7_emit_interface_descriptor_load with gen8 version in gen9_gpgpgu_fillfunc, because during refactoring gen8 function was removed.
v4: rebase on series new version

Cc Lukasz Kalamarz <[email protected]>
Cc Daniele Ceraolo Spurio <[email protected]>
---
 lib/gpgpu_fill.c | 3 ++-
 lib/gpu_fill.c   | 2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)
lib/gpgpu_fill.c +2 -1
index 579ce78d..5a77ebd4 100644
@@ -223,7 +223,8 @@ gen9_gpgpu_fillfunc(struct intel_batchbuffer *batch,
 	batch->ptr = batch->buffer;
 
 	/* GPGPU pipeline */
-	OUT_BATCH(GEN7_PIPELINE_SELECT | PIPELINE_SELECT_GPGPU);
+	OUT_BATCH(GEN7_PIPELINE_SELECT | GEN9_PIPELINE_SELECTION_MASK |
+		  PIPELINE_SELECT_GPGPU);
 
 	gen9_emit_state_base_address(batch);
 	gen8_emit_vfe_state_gpgpu(batch);
lib/gpu_fill.c +2 -0
index 7d99dfd9..102f141b 100644
@@ -438,6 +438,8 @@ gen8_fill_interface_descriptor(struct intel_batchbuffer *batch, struct igt_buf *
 	idd->desc5.constant_urb_entry_read_offset = 0;
 	idd->desc5.constant_urb_entry_read_length = 1; /* grf 1 */
 
+	idd->desc6.num_threads_in_tg = 1;
+
 	return offset;
 }
 
Signature · 6 lines
2.14.3

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#4 lore raw

PATCH v4 4/4 lib: Adjust refactored gpu_fill library to our coding style

In reply to Katarzyna Dec

While I am making changes in gpgpu and media fill area let's adjust code to our coding style.

v2: rebased on series new version (patch is now last from series so change seems larger)
v3: rebased

Cc Lukasz Kalamarz <[email protected]>
Cc Daniele Ceraolo Spurio <[email protected]>
---
 lib/gpgpu_fill.c      |  24 ++++-----
 lib/gpgpu_fill.h      |  12 ++---
 lib/gpu_fill.c        | 142 +++++++++++++++++++++++---------------------------
 lib/media_fill.h      |  20 +++----
 lib/media_fill_gen7.c |   7 ++-
 lib/media_fill_gen8.c |   7 +--
 lib/media_fill_gen9.c |   7 +--
 7 files changed, 105 insertions(+), 114 deletions(-)
lib/gpgpu_fill.c +12 -12
index 5a77ebd4..72a1445a 100644
@@ -99,8 +99,8 @@ static const uint32_t gen9_gpgpu_kernel[][4] = {
 void
 gen7_gpgpu_fillfunc(struct intel_batchbuffer *batch,
 		    struct igt_buf *dst,
-		    unsigned x, unsigned y,
-		    unsigned width, unsigned height,
+		    unsigned int x, unsigned int y,
+		    unsigned int width, unsigned int height,
 		    uint8_t color)
 {
 	uint32_t curbe_buffer, interface_descriptor;
@@ -120,8 +120,8 @@ gen7_gpgpu_fillfunc(struct intel_batchbuffer *batch,
 	curbe_buffer = gen7_fill_curbe_buffer_data(batch, color);
 
 	interface_descriptor = gen7_fill_interface_descriptor(batch, dst,
-							      gen7_gpgpu_kernel,
-							      sizeof(gen7_gpgpu_kernel));
+				gen7_gpgpu_kernel, sizeof(gen7_gpgpu_kernel));
+
 	igt_assert(batch->ptr < &batch->buffer[4095]);
 
 	batch->ptr = batch->buffer;
@@ -147,8 +147,8 @@ gen7_gpgpu_fillfunc(struct intel_batchbuffer *batch,
 void
 gen8_gpgpu_fillfunc(struct intel_batchbuffer *batch,
 		    struct igt_buf *dst,
-		    unsigned x, unsigned y,
-		    unsigned width, unsigned height,
+		    unsigned int x, unsigned int y,
+		    unsigned int width, unsigned int height,
 		    uint8_t color)
 {
 	uint32_t curbe_buffer, interface_descriptor;
@@ -168,8 +168,8 @@ gen8_gpgpu_fillfunc(struct intel_batchbuffer *batch,
 	curbe_buffer = gen7_fill_curbe_buffer_data(batch, color);
 
 	interface_descriptor = gen8_fill_interface_descriptor(batch, dst,
-							      gen8_gpgpu_kernel,
-							      sizeof(gen8_gpgpu_kernel));
+				gen8_gpgpu_kernel, sizeof(gen8_gpgpu_kernel));
+
 	igt_assert(batch->ptr < &batch->buffer[4095]);
 
 	batch->ptr = batch->buffer;
@@ -195,8 +195,8 @@ gen8_gpgpu_fillfunc(struct intel_batchbuffer *batch,
 void
 gen9_gpgpu_fillfunc(struct intel_batchbuffer *batch,
 		    struct igt_buf *dst,
-		    unsigned x, unsigned y,
-		    unsigned width, unsigned height,
+		    unsigned int x, unsigned int y,
+		    unsigned int width, unsigned int height,
 		    uint8_t color)
 {
 	uint32_t curbe_buffer, interface_descriptor;
@@ -216,8 +216,8 @@ gen9_gpgpu_fillfunc(struct intel_batchbuffer *batch,
 	curbe_buffer = gen7_fill_curbe_buffer_data(batch, color);
 
 	interface_descriptor = gen8_fill_interface_descriptor(batch, dst,
-							      gen9_gpgpu_kernel,
-							      sizeof(gen9_gpgpu_kernel));
+				gen9_gpgpu_kernel, sizeof(gen9_gpgpu_kernel));
+
 	igt_assert(batch->ptr < &batch->buffer[4095]);
 
 	batch->ptr = batch->buffer;
lib/gpgpu_fill.h +6 -6
index 7b5c8322..f0d188ae 100644
@@ -30,22 +30,22 @@
 void
 gen7_gpgpu_fillfunc(struct intel_batchbuffer *batch,
 		    struct igt_buf *dst,
-		    unsigned x, unsigned y,
-		    unsigned width, unsigned height,
+		    unsigned int x, unsigned int y,
+		    unsigned int width, unsigned int height,
 		    uint8_t color);
 
 void
 gen8_gpgpu_fillfunc(struct intel_batchbuffer *batch,
 		    struct igt_buf *dst,
-		    unsigned x, unsigned y,
-		    unsigned width, unsigned height,
+		    unsigned int x, unsigned int y,
+		    unsigned int width, unsigned int height,
 		    uint8_t color);
 
 void
 gen9_gpgpu_fillfunc(struct intel_batchbuffer *batch,
 		    struct igt_buf *dst,
-		    unsigned x, unsigned y,
-		    unsigned width, unsigned height,
+		    unsigned int x, unsigned int y,
+		    unsigned int width, unsigned int height,
 		    uint8_t color);
 
 #endif /* GPGPU_FILL_H */
lib/gpu_fill.c +66 -76

271 lines not on this page · raw message

lib/media_fill.h +10 -10
index 161af8cf..f6db734e 100644
@@ -7,22 +7,22 @@
 void
 gen8_media_fillfunc(struct intel_batchbuffer *batch,
 		struct igt_buf *dst,
-		unsigned x, unsigned y,
-		unsigned width, unsigned height,
+		unsigned int x, unsigned int y,
+		unsigned int width, unsigned int height,
 		uint8_t color);
 
 void
 gen7_media_fillfunc(struct intel_batchbuffer *batch,
-                struct igt_buf *dst,
-                unsigned x, unsigned y,
-                unsigned width, unsigned height,
-                uint8_t color);
+		struct igt_buf *dst,
+		unsigned int x, unsigned int y,
+		unsigned int width, unsigned int height,
+		uint8_t color);
 
 void
 gen9_media_fillfunc(struct intel_batchbuffer *batch,
-                struct igt_buf *dst,
-                unsigned x, unsigned y,
-                unsigned width, unsigned height,
-                uint8_t color);
+		struct igt_buf *dst,
+		unsigned int x, unsigned int y,
+		unsigned int width, unsigned int height,
+		uint8_t color);
 
 #endif /* RENDE_MEDIA_FILL_H */
lib/media_fill_gen7.c +3 -4
index c97555a6..5a8c32fb 100644
@@ -47,8 +47,8 @@ static const uint32_t media_kernel[][4] = {
 void
 gen7_media_fillfunc(struct intel_batchbuffer *batch,
 		struct igt_buf *dst,
-		unsigned x, unsigned y,
-		unsigned width, unsigned height,
+		unsigned int x, unsigned int y,
+		unsigned int width, unsigned int height,
 		uint8_t color)
 {
 	uint32_t curbe_buffer, interface_descriptor;
@@ -61,8 +61,7 @@ gen7_media_fillfunc(struct intel_batchbuffer *batch,
 
 	curbe_buffer = gen7_fill_curbe_buffer_data(batch, color);
 	interface_descriptor = gen7_fill_interface_descriptor(batch, dst,
-							      media_kernel,
-							      sizeof(media_kernel));
+					media_kernel, sizeof(media_kernel));
 	igt_assert(batch->ptr < &batch->buffer[4095]);
 
 	/* media pipeline */
lib/media_fill_gen8.c +4 -3
index 362abd61..d6dd7410 100644
@@ -50,8 +50,8 @@ static const uint32_t media_kernel[][4] = {
 void
 gen8_media_fillfunc(struct intel_batchbuffer *batch,
 		struct igt_buf *dst,
-		unsigned x, unsigned y,
-		unsigned width, unsigned height,
+		unsigned int x, unsigned int y,
+		unsigned int width, unsigned int height,
 		uint8_t color)
 {
 	uint32_t curbe_buffer, interface_descriptor;
@@ -63,7 +63,8 @@ gen8_media_fillfunc(struct intel_batchbuffer *batch,
 	batch->ptr = &batch->buffer[BATCH_STATE_SPLIT];
 
 	curbe_buffer = gen7_fill_curbe_buffer_data(batch, color);
-	interface_descriptor = gen8_fill_interface_descriptor(batch, dst, media_kernel, sizeof(media_kernel));
+	interface_descriptor = gen8_fill_interface_descriptor(batch, dst,
+					media_kernel, sizeof(media_kernel));
 	igt_assert(batch->ptr < &batch->buffer[4095]);
 
 	/* media pipeline */
lib/media_fill_gen9.c +4 -3
index d1335fe6..a9a829f2 100644
@@ -47,8 +47,8 @@ static const uint32_t media_kernel[][4] = {
 void
 gen9_media_fillfunc(struct intel_batchbuffer *batch,
 		struct igt_buf *dst,
-		unsigned x, unsigned y,
-		unsigned width, unsigned height,
+		unsigned int x, unsigned int y,
+		unsigned int width, unsigned int height,
 		uint8_t color)
 {
 	uint32_t curbe_buffer, interface_descriptor;
@@ -60,7 +60,8 @@ gen9_media_fillfunc(struct intel_batchbuffer *batch,
 	batch->ptr = &batch->buffer[BATCH_STATE_SPLIT];
 
 	curbe_buffer = gen7_fill_curbe_buffer_data(batch, color);
-	interface_descriptor = gen8_fill_interface_descriptor(batch, dst, media_kernel, sizeof(media_kernel));
+	interface_descriptor = gen8_fill_interface_descriptor(batch, dst,
+					media_kernel, sizeof(media_kernel));
 	assert(batch->ptr < &batch->buffer[4095]);
 
 	/* media pipeline */
Signature · 6 lines
2.14.3

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#5 lore raw
In reply to Katarzyna Dec
Quoted 13 lines · Katarzyna Dec

This series is removing duplications in gpgpu_fill and media_fill libraries. As a first step I moved gpgpu and media helper functions to gpu_fill library. In second patch I adjusted code to our coding style. In the third not obvious duplications were removed (like adding in gen7 functions conditions for future gens). Last patch adds missing parameters that make GPU hang on gen9 and gen9+.

In first version of this series there was a comment about moving batch_alloc/copy etc. functions to intel_batchbuffer library. Because there is a lot of code to review already this change will be introduced in another series (rendercopy, media_fill, gpgpu_fill and media_spin code is affected by this).

Quoted 8 lines

It is possible that more changes around gen*_media.h and media_spin is needed, but this will be done as a next step.

v2: Removed not obvious duplications. Adjusted code to review comments.
v3: Series needed reorganization because it introduced bug to ALP,
which was hard to find. That is why patch 1 is now almost only moving functions to gpu_fill with removing duplications, such as the same functions. Also applied comments from review.
v4: Added #defines and copyrights to new gpu_fill library. Changed functions
order in gpu_fill library.

If you mean the header guards with #defines, they need to be there in patch 1 already. Patch 1 alone doesn't build.

Signature · 5 lines
Petri Latvala
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#6 lore raw
Quoted 24 lines · Petri Latvala
Quoted 13 lines · Katarzyna Dec

This series is removing duplications in gpgpu_fill and media_fill libraries. As a first step I moved gpgpu and media helper functions to gpu_fill library. In second patch I adjusted code to our coding style. In the third not obvious duplications were removed (like adding in gen7 functions conditions for future gens). Last patch adds missing parameters that make GPU hang on gen9 and gen9+.

In first version of this series there was a comment about moving batch_alloc/copy etc. functions to intel_batchbuffer library. Because there is a lot of code to review already this change will be introduced in another series (rendercopy, media_fill, gpgpu_fill and media_spin code is affected by this).

Quoted 8 lines

It is possible that more changes around gen*_media.h and media_spin is needed, but this will be done as a next step.

v2: Removed not obvious duplications. Adjusted code to review comments.
v3: Series needed reorganization because it introduced bug to ALP,
which was hard to find. That is why patch 1 is now almost only moving functions to gpu_fill with removing duplications, such as the same functions. Also applied comments from review.
v4: Added #defines and copyrights to new gpu_fill library. Changed functions
order in gpu_fill library.

Quoted 6 lines

If you mean the header guards with #defines, they need to be there in patch 1 already. Patch 1 alone doesn't build.

Signature · 1 line
Petri Latvala

You're right, I added it to wrong patch. I will fix it :) Kasia
_______________________________________________
igt-dev mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#7 lore raw

[igt-dev] ✗ Fi.CI.BAT: warning for Refactoring of *_fill libraries (rev3)

In reply to Katarzyna Dec
== Series Details ==

== Series Details ==

Series: Refactoring of *_fill libraries (rev3)
URL : https://patchwork.freedesktop.org/series/41212/
State : warning

== Summary ==

IGT patchset tested on top of latest successful build 7c474e011548d35df6b80ceed81d3e6ca560c71d tests/perf: fix gen8 small cores whitelist expectation

with latest DRM-Tip kernel build CI_DRM_4038
617cdf0bd4fd drm-tip: 2018y-04m-09d-19h-55m-54s UTC integration manifest

No testlist changes.

---- Possible new issues:

Test kms_pipe_crc_basic:

        Subgroup nonblocking-crc-pipe-a-frame-sequence:
                pass       -> DMESG-WARN (fi-glk-j4005)
        Subgroup nonblocking-crc-pipe-c-frame-sequence:
                pass       -> DMESG-WARN (fi-glk-j4005)

---- Known issues:

Test debugfs_test:

        Subgroup read_all_entries:
                pass       -> INCOMPLETE (fi-snb-2520m) fdo#103713
Test gem_exec_suspend:
        Subgroup basic-s3:
                dmesg-warn -> PASS       (fi-glk-j4005) fdo#103359
Test kms_flip:
        Subgroup basic-flip-vs-modeset:
                pass       -> DMESG-WARN (fi-elk-e7500) fdo#103989 +1
        Subgroup basic-flip-vs-wf_vblank:
                fail       -> PASS       (fi-glk-j4005) fdo#100368

fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368

fi-bdw-5557u     total:285  pass:264  dwarn:0   dfail:0   fail:0   skip:21  time:432s
fi-bdw-gvtdvm    total:285  pass:261  dwarn:0   dfail:0   fail:0   skip:24  time:445s
fi-blb-e6850     total:285  pass:220  dwarn:1   dfail:0   fail:0   skip:64  time:389s
fi-bsw-n3050     total:285  pass:239  dwarn:0   dfail:0   fail:0   skip:46  time:549s
fi-bwr-2160      total:285  pass:180  dwarn:0   dfail:0   fail:0   skip:105 time:297s
fi-bxt-dsi       total:285  pass:255  dwarn:0   dfail:0   fail:0   skip:30  time:517s
fi-bxt-j4205     total:285  pass:256  dwarn:0   dfail:0   fail:0   skip:29  time:515s
fi-byt-j1900     total:285  pass:250  dwarn:0   dfail:0   fail:0   skip:35  time:522s
fi-byt-n2820     total:285  pass:246  dwarn:0   dfail:0   fail:0   skip:39  time:518s
fi-cfl-8700k     total:285  pass:257  dwarn:0   dfail:0   fail:0   skip:28  time:411s
fi-cfl-s3        total:285  pass:259  dwarn:0   dfail:0   fail:0   skip:26  time:560s
fi-cfl-u         total:285  pass:259  dwarn:0   dfail:0   fail:0   skip:26  time:514s
fi-cnl-y3        total:285  pass:259  dwarn:0   dfail:0   fail:0   skip:26  time:586s
fi-elk-e7500     total:285  pass:224  dwarn:2   dfail:0   fail:0   skip:59  time:506s
fi-gdg-551       total:285  pass:176  dwarn:0   dfail:0   fail:1   skip:108 time:314s
fi-glk-1         total:285  pass:257  dwarn:0   dfail:0   fail:0   skip:28  time:541s
fi-glk-j4005     total:285  pass:254  dwarn:2   dfail:0   fail:0   skip:29  time:489s
fi-hsw-4770      total:285  pass:258  dwarn:0   dfail:0   fail:0   skip:27  time:405s
fi-ilk-650       total:285  pass:225  dwarn:0   dfail:0   fail:0   skip:60  time:422s
fi-ivb-3520m     total:285  pass:256  dwarn:0   dfail:0   fail:0   skip:29  time:471s
fi-ivb-3770      total:285  pass:252  dwarn:0   dfail:0   fail:0   skip:33  time:438s
fi-kbl-7500u     total:285  pass:260  dwarn:1   dfail:0   fail:0   skip:24  time:475s
fi-kbl-7567u     total:285  pass:265  dwarn:0   dfail:0   fail:0   skip:20  time:463s
fi-kbl-r         total:285  pass:258  dwarn:0   dfail:0   fail:0   skip:27  time:509s
fi-pnv-d510      total:285  pass:220  dwarn:1   dfail:0   fail:0   skip:64  time:641s
fi-skl-6260u     total:285  pass:265  dwarn:0   dfail:0   fail:0   skip:20  time:443s
fi-skl-6600u     total:285  pass:258  dwarn:0   dfail:0   fail:0   skip:27  time:531s
fi-skl-6700k2    total:285  pass:261  dwarn:0   dfail:0   fail:0   skip:24  time:501s
fi-skl-6770hq    total:285  pass:265  dwarn:0   dfail:0   fail:0   skip:20  time:499s
fi-skl-guc       total:285  pass:257  dwarn:0   dfail:0   fail:0   skip:28  time:429s
fi-skl-gvtdvm    total:285  pass:262  dwarn:0   dfail:0   fail:0   skip:23  time:447s
fi-snb-2520m     total:3    pass:2    dwarn:0   dfail:0   fail:0   skip:0  
fi-snb-2600      total:285  pass:245  dwarn:0   dfail:0   fail:0   skip:40  time:400s

== Logs ==

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