Refactoring of *_fill libraries
Subsystems (2)
v7 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.
v5: Version with no changes comparing to v4 - git sent-mail sent series to wrong thread...
v6: Removed issue in gen8_emit_gpgpu_walker which was introduced during rebase
v7: Added copyrights to gpu_fill.c
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 | 660 ++++++++++++++++++++++++++++++++++++++++++++++++ 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 | 313 +---------------------- lib/meson.build | 2 +- 12 files changed, 854 insertions(+), 1848 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
PATCH v7 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 togen7_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.
v5: Added copyrights and #ifndef to gpu_fill.h
v5: Added copyrights to gpu_fill.c
--- lib/Makefile.sources | 2 + lib/gpgpu_fill.c | 571 +---------------------------------- lib/gpu_fill.c | 782 ++++++++++++++++++++++++++++++++++++++++++++++++ lib/gpu_fill.h | 167 +++++++++++ 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, 961 insertions(+), 1705 deletions(-) create mode 100644 lib/gpu_fill.c create mode 100644 lib/gpu_fill.h
lib/Makefile.sources +2 -0
@@ -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 +782 -0
782 lines not on this page · raw message
lib/gpu_fill.h new file +167 -0
167 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
@@ -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
PATCH v7 2/4 lib: Remove duplications in gpu_fill library
In reply to Katarzyna DecAfter 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.
v3: rebase
--- lib/Makefile.sources | 1 - lib/gpgpu_fill.c | 2 +- lib/gpu_fill.c | 172 +++++++----------------------------------------- lib/gpu_fill.h | 38 +---------- 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, 39 insertions(+), 293 deletions(-) delete mode 100644 lib/media_fill_gen8lp.c
lib/Makefile.sources +0 -1
@@ -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
@@ -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 +3 -35
@@ -70,12 +70,7 @@ gen7_fill_binding_table(struct intel_batchbuffer *batch, struct igt_buf *dst);uint32_t -gen7_fill_media_kernel (struct intel_batchbuffer *batch, -const uint32_t kernel[][4 ], -size_t size); - -uint32_t -gen8_fill_media_kernel (struct intel_batchbuffer *batch, +gen7_fill_kernel (struct intel_batchbuffer *batch,const uint32_t kernel[][4 ],size_t size);
@@ -108,53 +103,26 @@ gen7_emit_gpgpu_walk(struct intel_batchbuffer *batch, unsigned x, unsigned y, unsigned width, unsigned height); -void -gen8_render_flush (struct intel_batchbuffer *batch,uint32_t batch_end); - -uint32_t -gen8_fill_curbe_buffer_data (struct intel_batchbuffer *batch, -uint8_t color); -uint32_t gen8_fill_surface_state (struct intel_batchbuffer *batch,struct igt_buf *buf,uint32_t format,int is_dst); -uint32_t -gen8_fill_binding_table (struct intel_batchbuffer *batch, -struct igt_buf *dst); -uint32_t gen8_fill_interface_descriptor (struct intel_batchbuffer *batch,struct igt_buf *dst,const uint32_t kernel[][4 ],size_t size);void gen8_emit_state_base_address (struct intel_batchbuffer *batch); -void -gen8_emit_vfe_state (struct intel_batchbuffer *batch); - -void -gen8_emit_vfe_state_gpgpu (struct intel_batchbuffer *batch); - -void -gen8_emit_curbe_load (struct intel_batchbuffer *batch,uint32_t curbe_buffer); - -void -gen8_emit_interface_descriptor_load (struct intel_batchbuffer *batch,uint32_t interface_descriptor); -void gen8_emit_media_state_flush (struct intel_batchbuffer *batch);void -gen8_emit_media_objects (struct intel_batchbuffer *batch, -unsigned x,unsigned y, -unsigned width,unsigned height); +gen8_emit_vfe_state (struct intel_batchbuffer *batch);void -gen8lp_emit_media_objects (struct intel_batchbuffer *batch, -unsigned x,unsigned y, -unsigned width,unsigned height); +gen8_emit_vfe_state_gpgpu (struct intel_batchbuffer *batch); void gen8_emit_gpgpu_walk(struct intel_batchbuffer *batch,
lib/intel_batchbuffer.c +1 -3
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
PATCH v7 3/4 lib/gpgpu_fill: Add missing configuration parameters for gpgpu_fill
In reply to Katarzyna DecThere 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
--- lib/gpgpu_fill.c | 3 ++- lib/gpu_fill.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-)
lib/gpgpu_fill.c +2 -1
@@ -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
@@ -462,6 +462,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
PATCH v7 4/4 lib: Adjust refactored gpu_fill library to our coding style
In reply to Katarzyna DecWhile 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
--- lib/gpgpu_fill.c | 24 ++++++++++++------------ lib/gpgpu_fill.h | 12 ++++++------ lib/media_fill.h | 20 ++++++++++---------- lib/media_fill_gen7.c | 7 +++---- lib/media_fill_gen8.c | 7 ++++--- lib/media_fill_gen9.c | 7 ++++--- 6 files changed, 39 insertions(+), 38 deletions(-)
lib/gpgpu_fill.c +12 -12
@@ -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
@@ -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/media_fill.h +10 -10
@@ -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
@@ -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
@@ -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
@@ -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
Patchwork
CI[igt-dev] ✓ Fi.CI.BAT: success for Refactoring of *_fill libraries (rev4)
In reply to Katarzyna Dec== Series Details ==
== Series Details ==
Series: Refactoring of *_fill libraries (rev4)
URL : https://patchwork.freedesktop.org/series/41212/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4042 -> IGTPW_1244 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1244/
== Known issues ==
Here are the changes found in IGTPW_1244 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@gem_exec_suspend@basic-s3:
fi-glk-j4005: PASS -> DMESG-WARN (fdo#105771)
igt@kms_pipe_crc_basic@read-crc-pipe-a-frame-sequence:
fi-elk-e7500: PASS -> INCOMPLETE (fdo#103989)
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
fi-cnl-y3: NOTRUN -> INCOMPLETE (fdo#105058, fdo#105086)
==== Possible fixes ====
igt@debugfs_test@read_all_entries:
fi-snb-2520m: INCOMPLETE (fdo#103713) -> PASS
igt@gem_mmap_gtt@basic-small-bo-tiledx:
fi-gdg-551: FAIL (fdo#102575) -> PASS
igt@kms_pipe_crc_basic@read-crc-pipe-c-frame-sequence:
fi-cfl-s3: FAIL (fdo#103481) -> PASS fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575
fdo#103481 https://bugs.freedesktop.org/show_bug.cgi?id=103481
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#105058 https://bugs.freedesktop.org/show_bug.cgi?id=105058
fdo#105086 https://bugs.freedesktop.org/show_bug.cgi?id=105086
fdo#105771 https://bugs.freedesktop.org/show_bug.cgi?id=105771
== Participating hosts (35 -> 33) ==
Additional (1): fi-cnl-y3
Missing (3): fi-ctg-p8600 fi-ilk-m540 fi-skl-6700hq
== Build changes ==
* IGT: IGT_4418 -> IGTPW_1244
* Piglit: piglit_4418 -> piglit_4420
CI_DRM_4042: 98590826e4a407967faad1e021e3b38647a9e77f @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1244: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1244/
IGT_4418: 7c474e011548d35df6b80ceed81d3e6ca560c71d @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
piglit_4418: 45e115f293fd6acc0c9647cf2d3b76be78819ba5 @ git://anongit.freedesktop.org/piglit
piglit_4420: 45e115f293fd6acc0c9647cf2d3b76be78819ba5 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1244/issues.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✗ Fi.CI.IGT: warning for Refactoring of *_fill libraries (rev4)
In reply to Katarzyna Dec== Series Details ==
== Series Details ==
Series: Refactoring of *_fill libraries (rev4)
URL : https://patchwork.freedesktop.org/series/41212/
State : warning
== Summary ==
= CI Bug Log - changes from CI_DRM_4042_full -> IGTPW_1244_full =
== Summary - WARNING ==
Minor unknown changes coming with IGTPW_1244_full need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in IGTPW_1244_full, please notify your bug team to allow them to document this new failure mode, which will reduce the CI noise.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1244/
== Possible new issues ==
Here are the unknown changes that may have been introduced in IGTPW_1244_full:
=== IGT changes ===
==== Warnings ====
igt@gem_mocs_settings@mocs-rc6-dirty-render:
shard-kbl: PASS -> SKIP +1
igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-pwrite:
shard-snb: PASS -> SKIP +2
igt@kms_vblank@pipe-b-ts-continuation-idle-hang:
shard-snb: SKIP -> PASS +1
igt@perf_pmu@rc6:
shard-kbl: SKIP -> PASS== Known issues ==
Here are the changes found in IGTPW_1244_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@kms_flip@dpms-vs-vblank-race:
shard-hsw: PASS -> FAIL (fdo#103060)
igt@kms_flip@flip-vs-blocking-wf-vblank:
shard-hsw: PASS -> FAIL (fdo#100368)
igt@kms_flip@flip-vs-expired-vblank-interruptible:
shard-hsw: PASS -> FAIL (fdo#102887)
igt@kms_setmode@basic:
shard-kbl: PASS -> FAIL (fdo#99912)
igt@pm_rpm@universal-planes:
shard-kbl: PASS -> DMESG-WARN (fdo#103558)
==== Possible fixes ====
igt@kms_busy@extended-pageflip-hang-oldfb-render-b:
shard-kbl: DMESG-WARN (fdo#103313, fdo#103558) -> PASS +12
igt@kms_flip@2x-flip-vs-expired-vblank:
shard-hsw: FAIL (fdo#105189) -> PASS
igt@kms_flip@2x-plain-flip-fb-recreate:
shard-hsw: FAIL (fdo#100368) -> PASS
igt@kms_flip@wf_vblank-ts-check:
shard-hsw: FAIL (fdo#103928) -> PASS
igt@kms_rotation_crc@sprite-rotation-180:
shard-snb: FAIL (fdo#103925) -> PASS
igt@kms_setmode@basic:
shard-apl: FAIL (fdo#99912) -> PASS
igt@pm_rpm@legacy-planes-dpms:
shard-kbl: DMESG-WARN (fdo#103558) -> PASS +18 fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
fdo#103313 https://bugs.freedesktop.org/show_bug.cgi?id=103313
fdo#103558 https://bugs.freedesktop.org/show_bug.cgi?id=103558
fdo#103925 https://bugs.freedesktop.org/show_bug.cgi?id=103925
fdo#103928 https://bugs.freedesktop.org/show_bug.cgi?id=103928
fdo#105189 https://bugs.freedesktop.org/show_bug.cgi?id=105189
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
== Participating hosts (6 -> 4) ==
Missing (2): shard-glk shard-glkb
== Build changes ==
* IGT: IGT_4418 -> IGTPW_1244
* Piglit: piglit_4418 -> piglit_4420
CI_DRM_4042: 98590826e4a407967faad1e021e3b38647a9e77f @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1244: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1244/
IGT_4418: 7c474e011548d35df6b80ceed81d3e6ca560c71d @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
piglit_4418: 45e115f293fd6acc0c9647cf2d3b76be78819ba5 @ git://anongit.freedesktop.org/piglit
piglit_4420: 45e115f293fd6acc0c9647cf2d3b76be78819ba5 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1244/shards.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Re: [igt-dev] [PATCH i-g-t v7 2/4] lib: Remove duplications in gpu_fill library
In reply to Katarzyna Declib/gpu_fill.c gen7_fill_binding_table(struct intel_batchbuffer *batch,
Quoted 58 lines · Katarzyna Dec
After moving all functions needed for gpgpu and media fill testing there is a lot of duplications which can be removed:
Librarymedia_fill_gen8andmedia_fill_gen8lpfor CHT was removed, media state flush for !CHT was added togen7_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 (mergedgen7_fill_media_kernelandgen8_fill_media_kernel). Duplicated constants likeGEN8_MEDIA_VFE_STATE,GEN8_MEDIA_CURBE_LOAD,GEN8_MEDIA_INTERFACE_DESCRIPTOR_LOAD,GEN8_MEDIA_OBJECTwere replaced by GEN7 version. However this constants were not removed fromgen8_media.hlibrary, 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
*_fillfuncfunctions 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.v3: rebase
Signed-off-by Katarzyna Dec <[email protected]>Cc Lukasz Kalamarz <[email protected]>Cc Daniele Ceraolo Spurio <[email protected]>lib/Makefile.sources +0
-1@@ -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@@ -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 +0
-0@@ -142,26 +142,18 @@ gen7_fill_binding_table(struct intel_batchbuffer *batch,
What do you think about changing name from gen7_fill to gen_fill? This function now acts in slightly different way depending on gen.
Quoted 21 lines
binding_table=batch_alloc(batch, 32, 64); offset =batch_offset(batch, binding_table);lib/gpu_fill.c +2
-1- binding_table[0] = gen7_fill_surface_state(batch, dst, +if (IS_GEN7 (batch->devid)) + binding_table[0] = gen7_fill_surface_state(batch, dst,
GEN7_SURFACEFORMAT_R8_UNORM, 1);lib/gpu_fill.c +3
-0+else + binding_table[0] = gen8_fill_surface_state(batch, dst, + GEN8_SURFACEFORMAT_R8_UNORM,1);
return offset;
}
uint32_tlib/gpu_fill.c +0
-4-gen7_fill_media_kernel(struct intel_batchbuffer *batch, - const uint32_t kernel[][4], - size_t size) -{
lib/gpu_fill.c gen7_fill_binding_table(struct intel_batchbuffer *batch, · line 156
Quoted 10 lines
lib/gpu_fill.c +1
-9-uint32_t offset; - - offset =batch_copy (batch, kernel, size,64 ); - -return offset; -} - -uint32_t -gen8_fill_media_kernel(struct intel_batchbuffer *batch, +gen7_fill_kernel(struct intel_batchbuffer *batch,
Maybe this also could be just gen_fill_kernel if it is very same for all gens and also doesn't have anything introduced by genX?
Otherwise LGTM
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoted 28 lines · Katarzyna Dec
This series is removing duplications in
gpgpu_fillandmedia_filllibraries. As a first step I moved gpgpu and media helper functions togpu_filllibrary. 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_batchbufferlibrary. Because there is a lot of code to review already this change will be introduced in another series (rendercopy,media_fill,gpgpu_fillandmedia_spincode is affected by this).It is possible that more changes around gen*_media.h and
media_spinis 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 togpu_fillwith removing duplications, such as the same functions. Also applied comments from review.
v4: Added #defines and copyrights to newgpu_filllibrary. Changed functions order ingpu_filllibrary.
v5: Version with no changes comparing to v4 - git sent-mail sent series to wrong thread...
v6: Removed issue ingen8_emit_gpgpu_walkerwhich was introduced during rebase
v7: Added copyrights togpu_fill.c
Quoted 3 lines
Signed-off-by Katarzyna Dec <[email protected]>Cc Lukasz Kalamarz <[email protected]>Cc Daniele Ceraolo Spurio <[email protected]>
Whole series looks good to me as refactoring starter. Effort should continue to clean all libraries up.
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Re: [igt-dev] [PATCH i-g-t v7 2/4] lib: Remove duplications in gpu_fill library
In reply to Szwichtenberg, RadoslawQuoted 95 lines · Radoslaw
lib/gpu_fill.c gen7_fill_binding_table(struct intel_batchbuffer *batch,
Quoted 58 lines · Katarzyna Dec
After moving all functions needed for gpgpu and media fill testing there is a lot of duplications which can be removed:
Librarymedia_fill_gen8andmedia_fill_gen8lpfor CHT was removed, media state flush for !CHT was added togen7_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 (mergedgen7_fill_media_kernelandgen8_fill_media_kernel). Duplicated constants likeGEN8_MEDIA_VFE_STATE,GEN8_MEDIA_CURBE_LOAD,GEN8_MEDIA_INTERFACE_DESCRIPTOR_LOAD,GEN8_MEDIA_OBJECTwere replaced by GEN7 version. However this constants were not removed fromgen8_media.hlibrary, 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
*_fillfuncfunctions 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.v3: rebase
Signed-off-by Katarzyna Dec <[email protected]>Cc Lukasz Kalamarz <[email protected]>Cc Daniele Ceraolo Spurio <[email protected]>lib/Makefile.sources +0
-1@@ -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@@ -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 +0
-0@@ -142,26 +142,18 @@ gen7_fill_binding_table(struct intel_batchbuffer *batch,What do you think about changing name from
gen7_filltogen_fill? This function now acts in slightly different way depending on gen.Quoted 21 lines
binding_table=batch_alloc(batch, 32, 64); offset =batch_offset(batch, binding_table);lib/gpu_fill.c +2
-1- binding_table[0] = gen7_fill_surface_state(batch, dst, +if (IS_GEN7 (batch->devid)) + binding_table[0] = gen7_fill_surface_state(batch, dst,
GEN7_SURFACEFORMAT_R8_UNORM, 1);lib/gpu_fill.c +3
-0+else + binding_table[0] = gen8_fill_surface_state(batch, dst, + GEN8_SURFACEFORMAT_R8_UNORM,1);
return offset;
}
uint32_tlib/gpu_fill.c +0
-4-gen7_fill_media_kernel(struct intel_batchbuffer *batch, - const uint32_t kernel[][4], - size_t size) -{lib/gpu_fill.c gen7_fill_binding_table(struct intel_batchbuffer *batch, · line 156
Quoted 10 lines
lib/gpu_fill.c +1
-9-uint32_t offset; - - offset =batch_copy (batch, kernel, size,64 ); - -return offset; -} - -uint32_t -gen8_fill_media_kernel(struct intel_batchbuffer *batch, +gen7_fill_kernel(struct intel_batchbuffer *batch,Maybe this also could be just
gen_fill_kernelif it is very same for all gens and also doesn't have anything introduced by genX?
Quoted 1 line
Otherwise LGTM
It may be a bit confusing. It should not be that hard to add one more patch with name unification. Generally, the idea with staying with gen7_naming was to show in media_fillfunc/gpgpu_fillfunc changes between gens, e.g. what did change in gen8, gen9 etc.
If anyone who will be reviewing this code has similar concerns as you Radek, it will not be a problem to add another patch :)
Kasia
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoted 29 lines · Radoslaw
Quoted 28 lines · Katarzyna Dec
This series is removing duplications in
gpgpu_fillandmedia_filllibraries. As a first step I moved gpgpu and media helper functions togpu_filllibrary. 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_batchbufferlibrary. Because there is a lot of code to review already this change will be introduced in another series (rendercopy,media_fill,gpgpu_fillandmedia_spincode is affected by this).It is possible that more changes around gen*_media.h and
media_spinis 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 togpu_fillwith removing duplications, such as the same functions. Also applied comments from review.
v4: Added #defines and copyrights to newgpu_filllibrary. Changed functions order ingpu_filllibrary.
v5: Version with no changes comparing to v4 - git sent-mail sent series to wrong thread...
v6: Removed issue ingen8_emit_gpgpu_walkerwhich was introduced during rebase
v7: Added copyrights togpu_fill.c
Quoted 8 lines
Quoted 3 lines
Signed-off-by Katarzyna Dec <[email protected]>Cc Lukasz Kalamarz <[email protected]>Cc Daniele Ceraolo Spurio <[email protected]>Whole series looks good to me as refactoring starter. Effort should continue to clean all libraries up.
Reviewed-by Radoslaw Szwichtenberg <[email protected]>
I am really glad that someone took an effort to untangle this code. I've just merged this. Thanks for the patches and the review!
-Arek
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev