All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 1/2] lib/igt_fb: Don't use blitter for large buffers
@ 2019-03-28 17:54 Ville Syrjala
  2019-03-28 17:54 ` [igt-dev] [PATCH i-g-t 2/2] lib/igt_fb: Don't leak the bufmgr and batch for converted surfaces Ville Syrjala
                   ` (6 more replies)
  0 siblings, 7 replies; 16+ messages in thread
From: Ville Syrjala @ 2019-03-28 17:54 UTC (permalink / raw)
  To: igt-dev; +Cc: Dhinakaran Pandiyan

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

The blitter stride is limited to <32k. Fall back to gtt mmap or
rendercopy if we're about to exceed that.

Not quite sure why we're not just using gtt mmap for Y tiling
always. But let's keep it like that for now.

v2: Use rendercopy as the fallback for Yf

Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 lib/igt_fb.c | 25 ++++++++++++++++++-------
 1 file changed, 18 insertions(+), 7 deletions(-)

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index fcd7c4c5d187..8b6adf55a338 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -1502,6 +1502,20 @@ struct fb_blit_upload {
 	struct intel_batchbuffer *batch;
 };
 
+static bool use_rendercopy(const struct igt_fb *fb)
+{
+	return is_ccs_modifier(fb->modifier) ||
+		(fb->modifier == I915_FORMAT_MOD_Yf_TILED &&
+		 fb->strides[0] >= 32768);
+}
+
+static bool use_blitter(const struct igt_fb *fb)
+{
+	return (fb->modifier == I915_FORMAT_MOD_Y_TILED ||
+		fb->modifier == I915_FORMAT_MOD_Yf_TILED) &&
+		fb->strides[0] < 32768;
+}
+
 static void init_buf(struct fb_blit_upload *blit,
 		     struct igt_buf *buf,
 		     const struct igt_fb *fb,
@@ -2511,7 +2525,7 @@ static void create_cairo_surface__convert(int fd, struct igt_fb *fb)
 	blit->base.fd = fd;
 	blit->base.fb = fb;
 
-	if (is_ccs_modifier(fb->modifier)) {
+	if (use_rendercopy(fb)) {
 		blit->base.bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
 		blit->base.batch = intel_batchbuffer_alloc(blit->base.bufmgr,
 						   intel_get_drm_devid(fd));
@@ -2523,9 +2537,7 @@ static void create_cairo_surface__convert(int fd, struct igt_fb *fb)
 							     &blit->shadow_fb);
 	igt_assert(blit->shadow_ptr);
 
-	if (fb->modifier == LOCAL_I915_FORMAT_MOD_Y_TILED ||
-	    fb->modifier == LOCAL_I915_FORMAT_MOD_Yf_TILED ||
-	    is_ccs_modifier(fb->modifier)) {
+	if (use_rendercopy(fb) || use_blitter(fb)) {
 		setup_linear_mapping(&blit->base);
 	} else {
 		blit->base.linear.fb = *fb;
@@ -2605,10 +2617,9 @@ cairo_surface_t *igt_get_cairo_surface(int fd, struct igt_fb *fb)
 		    ((f->cairo_id == CAIRO_FORMAT_INVALID) &&
 		     (f->pixman_id != PIXMAN_invalid)))
 			create_cairo_surface__convert(fd, fb);
-		else if (is_ccs_modifier(fb->modifier))
+		else if (use_rendercopy(fb))
 			create_cairo_surface__rendercopy(fd, fb);
-		else if (fb->modifier == LOCAL_I915_FORMAT_MOD_Y_TILED ||
-			 fb->modifier == LOCAL_I915_FORMAT_MOD_Yf_TILED)
+		else if (use_blitter(fb))
 			create_cairo_surface__blit(fd, fb);
 		else
 			create_cairo_surface__gtt(fd, fb);
-- 
2.19.2

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [igt-dev] [PATCH i-g-t 2/2] lib/igt_fb: Don't leak the bufmgr and batch for converted surfaces
  2019-03-28 17:54 [igt-dev] [PATCH i-g-t 1/2] lib/igt_fb: Don't use blitter for large buffers Ville Syrjala
@ 2019-03-28 17:54 ` Ville Syrjala
  2019-04-02 23:01   ` Dhinakaran Pandiyan
  2019-03-28 18:17 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] lib/igt_fb: Don't use blitter for large buffers Patchwork
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 16+ messages in thread
From: Ville Syrjala @ 2019-03-28 17:54 UTC (permalink / raw)
  To: igt-dev; +Cc: Dhinakaran Pandiyan

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Remember to free the bufmgr and batch after the convert surface is
destroyed. We'll do that by sucking the relevant code into
free_linear_mapping(), and for the sake of symmetry we'll move
the setup code into setup_linear_mapping().

Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 lib/igt_fb.c | 24 +++++++++++-------------
 1 file changed, 11 insertions(+), 13 deletions(-)

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 8b6adf55a338..99766d2d08f9 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -1604,6 +1604,11 @@ static void free_linear_mapping(struct fb_blit_upload *blit)
 
 	gem_sync(fd, linear->fb.gem_handle);
 	gem_close(fd, linear->fb.gem_handle);
+
+	if (blit->batch) {
+		intel_batchbuffer_free(blit->batch);
+		drm_intel_bufmgr_destroy(blit->bufmgr);
+	}
 }
 
 static void destroy_cairo_surface__blit(void *arg)
@@ -1625,9 +1630,6 @@ static void destroy_cairo_surface__rendercopy(void *arg)
 
 	free_linear_mapping(blit);
 
-	intel_batchbuffer_free(blit->batch);
-	drm_intel_bufmgr_destroy(blit->bufmgr);
-
 	free(blit);
 }
 
@@ -1637,6 +1639,12 @@ static void setup_linear_mapping(struct fb_blit_upload *blit)
 	struct igt_fb *fb = blit->fb;
 	struct fb_blit_linear *linear = &blit->linear;
 
+	if (use_rendercopy(fb)) {
+		blit->bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
+		blit->batch = intel_batchbuffer_alloc(blit->bufmgr,
+						      intel_get_drm_devid(fd));
+	}
+
 	/*
 	 * We create a linear BO that we'll map for the CPU to write to (using
 	 * cairo). This linear bo will be then blitted to its final
@@ -1706,10 +1714,6 @@ static void create_cairo_surface__rendercopy(int fd, struct igt_fb *fb)
 	blit->fd = fd;
 	blit->fb = fb;
 
-	blit->bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
-	blit->batch = intel_batchbuffer_alloc(blit->bufmgr,
-					      intel_get_drm_devid(fd));
-
 	setup_linear_mapping(blit);
 
 	cairo_format = drm_format_to_cairo(fb->drm_format);
@@ -2525,12 +2529,6 @@ static void create_cairo_surface__convert(int fd, struct igt_fb *fb)
 	blit->base.fd = fd;
 	blit->base.fb = fb;
 
-	if (use_rendercopy(fb)) {
-		blit->base.bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
-		blit->base.batch = intel_batchbuffer_alloc(blit->base.bufmgr,
-						   intel_get_drm_devid(fd));
-	}
-
 	blit->shadow_ptr = igt_fb_create_cairo_shadow_buffer(fd, drm_format,
 							     fb->width,
 							     fb->height,
-- 
2.19.2

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] lib/igt_fb: Don't use blitter for large buffers
  2019-03-28 17:54 [igt-dev] [PATCH i-g-t 1/2] lib/igt_fb: Don't use blitter for large buffers Ville Syrjala
  2019-03-28 17:54 ` [igt-dev] [PATCH i-g-t 2/2] lib/igt_fb: Don't leak the bufmgr and batch for converted surfaces Ville Syrjala
@ 2019-03-28 18:17 ` Patchwork
  2019-03-28 18:25 ` [igt-dev] [PATCH i-g-t 1/2] " Chris Wilson
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 16+ messages in thread
From: Patchwork @ 2019-03-28 18:17 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,1/2] lib/igt_fb: Don't use blitter for large buffers
URL   : https://patchwork.freedesktop.org/series/58685/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5831 -> IGTPW_2727
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/58685/revisions/1/mbox/

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_suspend@basic-s3:
    - fi-blb-e6850:       PASS -> INCOMPLETE [fdo#107718]

  * igt@kms_frontbuffer_tracking@basic:
    - fi-byt-clapper:     PASS -> FAIL [fdo#103167]

  * igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b:
    - fi-byt-clapper:     PASS -> FAIL [fdo#107362]

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
    - fi-byt-clapper:     PASS -> FAIL [fdo#103191] / [fdo#107362] +4

  
#### Possible fixes ####

  * igt@i915_selftest@live_execlists:
    - fi-apl-guc:         INCOMPLETE [fdo#103927] / [fdo#109720] -> PASS

  * igt@kms_frontbuffer_tracking@basic:
    - fi-icl-u3:          FAIL [fdo#103167] -> PASS
    - fi-icl-u2:          FAIL [fdo#103167] -> PASS

  
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
  [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
  [fdo#109720]: https://bugs.freedesktop.org/show_bug.cgi?id=109720


Participating hosts (43 -> 38)
------------------------------

  Missing    (5): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-bsw-cyan fi-pnv-d510 


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

    * IGT: IGT_4911 -> IGTPW_2727

  CI_DRM_5831: 8cac0cc264d2a6af0b33370b542b12d516e022c5 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2727: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2727/
  IGT_4911: d9fe699ea45406e279b78d1afdb4d57a205a3c99 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2727/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [igt-dev] [PATCH i-g-t 1/2] lib/igt_fb: Don't use blitter for large buffers
  2019-03-28 17:54 [igt-dev] [PATCH i-g-t 1/2] lib/igt_fb: Don't use blitter for large buffers Ville Syrjala
  2019-03-28 17:54 ` [igt-dev] [PATCH i-g-t 2/2] lib/igt_fb: Don't leak the bufmgr and batch for converted surfaces Ville Syrjala
  2019-03-28 18:17 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] lib/igt_fb: Don't use blitter for large buffers Patchwork
@ 2019-03-28 18:25 ` Chris Wilson
  2019-04-02 22:41   ` Dhinakaran Pandiyan
  2019-03-29  4:20 ` [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/2] " Patchwork
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 16+ messages in thread
From: Chris Wilson @ 2019-03-28 18:25 UTC (permalink / raw)
  To: Ville Syrjala, igt-dev; +Cc: Dhinakaran Pandiyan

Quoting Ville Syrjala (2019-03-28 17:54:49)
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> The blitter stride is limited to <32k. Fall back to gtt mmap or
> rendercopy if we're about to exceed that.
> 
> Not quite sure why we're not just using gtt mmap for Y tiling
> always. But let's keep it like that for now.
> 
> v2: Use rendercopy as the fallback for Yf
> 
> Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  lib/igt_fb.c | 25 ++++++++++++++++++-------
>  1 file changed, 18 insertions(+), 7 deletions(-)
> 
> diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> index fcd7c4c5d187..8b6adf55a338 100644
> --- a/lib/igt_fb.c
> +++ b/lib/igt_fb.c
> @@ -1502,6 +1502,20 @@ struct fb_blit_upload {
>         struct intel_batchbuffer *batch;
>  };
>  
> +static bool use_rendercopy(const struct igt_fb *fb)
> +{
> +       return is_ccs_modifier(fb->modifier) ||
> +               (fb->modifier == I915_FORMAT_MOD_Yf_TILED &&
> +                fb->strides[0] >= 32768);

And probably wise to assert <= 256k.

> +
> +static bool use_blitter(const struct igt_fb *fb)
> +{
> +       return (fb->modifier == I915_FORMAT_MOD_Y_TILED ||
> +               fb->modifier == I915_FORMAT_MOD_Yf_TILED) &&
> +               fb->strides[0] < 32768;

32k dwords is the limit for tiled blits (on gen4+). I presume strides[]
is in bytes.
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/2] lib/igt_fb: Don't use blitter for large buffers
  2019-03-28 17:54 [igt-dev] [PATCH i-g-t 1/2] lib/igt_fb: Don't use blitter for large buffers Ville Syrjala
                   ` (2 preceding siblings ...)
  2019-03-28 18:25 ` [igt-dev] [PATCH i-g-t 1/2] " Chris Wilson
@ 2019-03-29  4:20 ` Patchwork
  2019-04-08 17:13 ` [igt-dev] [PATCH i-g-t v3 1/2] " Ville Syrjala
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 16+ messages in thread
From: Patchwork @ 2019-03-29  4:20 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,1/2] lib/igt_fb: Don't use blitter for large buffers
URL   : https://patchwork.freedesktop.org/series/58685/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5831_full -> IGTPW_2727_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/58685/revisions/1/mbox/

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

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

### IGT changes ###

#### Issues hit ####

  * igt@kms_atomic_transition@6x-modeset-transitions-fencing:
    - shard-glk:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278]

  * igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-a:
    - shard-hsw:          PASS -> DMESG-WARN [fdo#110222]
    - shard-kbl:          PASS -> DMESG-WARN [fdo#110222]

  * igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-b:
    - shard-snb:          PASS -> DMESG-WARN [fdo#110222]

  * igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-f:
    - shard-apl:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278]

  * igt@kms_cursor_crc@cursor-256x256-dpms:
    - shard-apl:          PASS -> FAIL [fdo#103232]
    - shard-kbl:          PASS -> FAIL [fdo#103232]

  * igt@kms_cursor_legacy@2x-long-flip-vs-cursor-legacy:
    - shard-glk:          PASS -> FAIL [fdo#104873]

  * igt@kms_fbcon_fbt@fbc:
    - shard-glk:          NOTRUN -> SKIP [fdo#109271] +14

  * igt@kms_plane_alpha_blend@pipe-b-alpha-transparant-fb:
    - shard-apl:          NOTRUN -> FAIL [fdo#108145]

  * igt@kms_psr@basic:
    - shard-apl:          NOTRUN -> SKIP [fdo#109271] +15

  * igt@kms_rotation_crc@multiplane-rotation-cropping-top:
    - shard-kbl:          PASS -> FAIL [fdo#109016] +1

  * igt@kms_vblank@pipe-a-ts-continuation-suspend:
    - shard-apl:          PASS -> FAIL [fdo#104894] +1

  * igt@kms_vblank@pipe-b-query-forked:
    - shard-snb:          PASS -> SKIP [fdo#109271] +2

  
#### Possible fixes ####

  * igt@kms_busy@extended-modeset-hang-newfb-render-b:
    - shard-hsw:          DMESG-WARN [fdo#110222] -> PASS +1
    - shard-kbl:          DMESG-WARN [fdo#110222] -> PASS +1
    - shard-snb:          DMESG-WARN [fdo#110222] -> PASS +1

  * igt@kms_cursor_crc@cursor-128x128-dpms:
    - shard-kbl:          FAIL [fdo#103232] -> PASS
    - shard-apl:          FAIL [fdo#103232] -> PASS

  * igt@kms_draw_crc@draw-method-xrgb8888-render-xtiled:
    - shard-glk:          FAIL [fdo#107791] -> PASS

  * igt@kms_flip@flip-vs-suspend:
    - shard-kbl:          DMESG-WARN [fdo#108566] -> PASS

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-cpu:
    - shard-apl:          FAIL [fdo#103167] -> PASS
    - shard-kbl:          FAIL [fdo#103167] -> PASS

  * igt@kms_frontbuffer_tracking@fbc-2p-primscrn-shrfb-plflip-blt:
    - shard-glk:          FAIL [fdo#103167] -> PASS

  * igt@kms_plane_alpha_blend@pipe-b-constant-alpha-max:
    - shard-apl:          FAIL [fdo#108145] -> PASS

  * igt@kms_sequence@queue-idle:
    - shard-apl:          INCOMPLETE [fdo#103927] -> PASS

  * igt@kms_setmode@basic:
    - shard-kbl:          FAIL [fdo#99912] -> PASS

  * igt@kms_vblank@pipe-a-ts-continuation-modeset:
    - shard-apl:          FAIL [fdo#104894] -> PASS
    - shard-kbl:          FAIL [fdo#104894] -> PASS

  
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#104873]: https://bugs.freedesktop.org/show_bug.cgi?id=104873
  [fdo#104894]: https://bugs.freedesktop.org/show_bug.cgi?id=104894
  [fdo#107791]: https://bugs.freedesktop.org/show_bug.cgi?id=107791
  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
  [fdo#109016]: https://bugs.freedesktop.org/show_bug.cgi?id=109016
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#110222]: https://bugs.freedesktop.org/show_bug.cgi?id=110222
  [fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912


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

  Missing    (5): shard-skl pig-hsw-4770r pig-glk-j5005 shard-iclb pig-skl-6260u 


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

    * IGT: IGT_4911 -> IGTPW_2727
    * Piglit: piglit_4509 -> None

  CI_DRM_5831: 8cac0cc264d2a6af0b33370b542b12d516e022c5 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2727: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2727/
  IGT_4911: d9fe699ea45406e279b78d1afdb4d57a205a3c99 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2727/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [igt-dev] [PATCH i-g-t 1/2] lib/igt_fb: Don't use blitter for large buffers
  2019-03-28 18:25 ` [igt-dev] [PATCH i-g-t 1/2] " Chris Wilson
@ 2019-04-02 22:41   ` Dhinakaran Pandiyan
  2019-04-03 15:24     ` Ville Syrjälä
  0 siblings, 1 reply; 16+ messages in thread
From: Dhinakaran Pandiyan @ 2019-04-02 22:41 UTC (permalink / raw)
  To: Chris Wilson, Ville Syrjala, igt-dev

On Thu, 2019-03-28 at 18:25 +0000, Chris Wilson wrote:
> Quoting Ville Syrjala (2019-03-28 17:54:49)
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > The blitter stride is limited to <32k. Fall back to gtt mmap or
> > rendercopy if we're about to exceed that.
> > 
> > Not quite sure why we're not just using gtt mmap for Y tiling
> > always. But let's keep it like that for now.
> > 
> > v2: Use rendercopy as the fallback for Yf
> > 
> > Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  lib/igt_fb.c | 25 ++++++++++++++++++-------
> >  1 file changed, 18 insertions(+), 7 deletions(-)
> > 
> > diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> > index fcd7c4c5d187..8b6adf55a338 100644
> > --- a/lib/igt_fb.c
> > +++ b/lib/igt_fb.c
> > @@ -1502,6 +1502,20 @@ struct fb_blit_upload {
> >         struct intel_batchbuffer *batch;
> >  };
> >  
> > +static bool use_rendercopy(const struct igt_fb *fb)
> > +{
> > +       return is_ccs_modifier(fb->modifier) ||
> > +               (fb->modifier == I915_FORMAT_MOD_Yf_TILED &&
> > +                fb->strides[0] >= 32768);
> 
> And probably wise to assert <= 256k.
Is that a hardware limitation for the render engine?

> 
> > +
> > +static bool use_blitter(const struct igt_fb *fb)
> > +{
> > +       return (fb->modifier == I915_FORMAT_MOD_Y_TILED ||
> > +               fb->modifier == I915_FORMAT_MOD_Yf_TILED) &&
> > +               fb->strides[0] < 32768;
> 
> 32k dwords is the limit for tiled blits (on gen4+). I presume strides[]
> is in bytes.

I see conflicting limits in bspec for this, the Data Size Limitations page says
"up to 32,768 bytes per scan line" whereas the docs for XY_SRC_COPY_BLT claims
32k dwords.





> -Chris
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [igt-dev] [PATCH i-g-t 2/2] lib/igt_fb: Don't leak the bufmgr and batch for converted surfaces
  2019-03-28 17:54 ` [igt-dev] [PATCH i-g-t 2/2] lib/igt_fb: Don't leak the bufmgr and batch for converted surfaces Ville Syrjala
@ 2019-04-02 23:01   ` Dhinakaran Pandiyan
  0 siblings, 0 replies; 16+ messages in thread
From: Dhinakaran Pandiyan @ 2019-04-02 23:01 UTC (permalink / raw)
  To: Ville Syrjala, igt-dev

On Thu, 2019-03-28 at 19:54 +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Remember to free the bufmgr and batch after the convert surface is
> destroyed. We'll do that by sucking the relevant code into
> free_linear_mapping(), and for the sake of symmetry we'll move
> the setup code into setup_linear_mapping().
> 
> Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>

Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>


> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  lib/igt_fb.c | 24 +++++++++++-------------
>  1 file changed, 11 insertions(+), 13 deletions(-)
> 
> diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> index 8b6adf55a338..99766d2d08f9 100644
> --- a/lib/igt_fb.c
> +++ b/lib/igt_fb.c
> @@ -1604,6 +1604,11 @@ static void free_linear_mapping(struct fb_blit_upload
> *blit)
>  
>  	gem_sync(fd, linear->fb.gem_handle);
>  	gem_close(fd, linear->fb.gem_handle);
> +
> +	if (blit->batch) {
> +		intel_batchbuffer_free(blit->batch);
> +		drm_intel_bufmgr_destroy(blit->bufmgr);
> +	}
>  }
>  
>  static void destroy_cairo_surface__blit(void *arg)
> @@ -1625,9 +1630,6 @@ static void destroy_cairo_surface__rendercopy(void *arg)
>  
>  	free_linear_mapping(blit);
>  
> -	intel_batchbuffer_free(blit->batch);
> -	drm_intel_bufmgr_destroy(blit->bufmgr);
> -
>  	free(blit);
>  }
>  
> @@ -1637,6 +1639,12 @@ static void setup_linear_mapping(struct fb_blit_upload
> *blit)
>  	struct igt_fb *fb = blit->fb;
>  	struct fb_blit_linear *linear = &blit->linear;
>  
> +	if (use_rendercopy(fb)) {
> +		blit->bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
> +		blit->batch = intel_batchbuffer_alloc(blit->bufmgr,
> +						      intel_get_drm_devid(fd));
> +	}
> +
>  	/*
>  	 * We create a linear BO that we'll map for the CPU to write to (using
>  	 * cairo). This linear bo will be then blitted to its final
> @@ -1706,10 +1714,6 @@ static void create_cairo_surface__rendercopy(int fd,
> struct igt_fb *fb)
>  	blit->fd = fd;
>  	blit->fb = fb;
>  
> -	blit->bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
> -	blit->batch = intel_batchbuffer_alloc(blit->bufmgr,
> -					      intel_get_drm_devid(fd));
> -
>  	setup_linear_mapping(blit);
>  
>  	cairo_format = drm_format_to_cairo(fb->drm_format);
> @@ -2525,12 +2529,6 @@ static void create_cairo_surface__convert(int fd,
> struct igt_fb *fb)
>  	blit->base.fd = fd;
>  	blit->base.fb = fb;
>  
> -	if (use_rendercopy(fb)) {
> -		blit->base.bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
> -		blit->base.batch = intel_batchbuffer_alloc(blit->base.bufmgr,
> -						   intel_get_drm_devid(fd));
> -	}
> -
>  	blit->shadow_ptr = igt_fb_create_cairo_shadow_buffer(fd, drm_format,
>  							     fb->width,
>  							     fb->height,

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [igt-dev] [PATCH i-g-t 1/2] lib/igt_fb: Don't use blitter for large buffers
  2019-04-02 22:41   ` Dhinakaran Pandiyan
@ 2019-04-03 15:24     ` Ville Syrjälä
  0 siblings, 0 replies; 16+ messages in thread
From: Ville Syrjälä @ 2019-04-03 15:24 UTC (permalink / raw)
  To: Dhinakaran Pandiyan; +Cc: igt-dev

On Tue, Apr 02, 2019 at 03:41:43PM -0700, Dhinakaran Pandiyan wrote:
> On Thu, 2019-03-28 at 18:25 +0000, Chris Wilson wrote:
> > Quoting Ville Syrjala (2019-03-28 17:54:49)
> > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > 
> > > The blitter stride is limited to <32k. Fall back to gtt mmap or
> > > rendercopy if we're about to exceed that.
> > > 
> > > Not quite sure why we're not just using gtt mmap for Y tiling
> > > always. But let's keep it like that for now.
> > > 
> > > v2: Use rendercopy as the fallback for Yf
> > > 
> > > Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > ---
> > >  lib/igt_fb.c | 25 ++++++++++++++++++-------
> > >  1 file changed, 18 insertions(+), 7 deletions(-)
> > > 
> > > diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> > > index fcd7c4c5d187..8b6adf55a338 100644
> > > --- a/lib/igt_fb.c
> > > +++ b/lib/igt_fb.c
> > > @@ -1502,6 +1502,20 @@ struct fb_blit_upload {
> > >         struct intel_batchbuffer *batch;
> > >  };
> > >  
> > > +static bool use_rendercopy(const struct igt_fb *fb)
> > > +{
> > > +       return is_ccs_modifier(fb->modifier) ||
> > > +               (fb->modifier == I915_FORMAT_MOD_Yf_TILED &&
> > > +                fb->strides[0] >= 32768);
> > 
> > And probably wise to assert <= 256k.
> Is that a hardware limitation for the render engine?

I think the limits are:
gen2/3: 8k
gen4+: 128k
gen7+: 256k

I guess a 256k check here would make sense since we're only
interested in ccs and yf, and those are gen9+ only. Or maybe 
I should just toss some asserts into the rendercopy functions
themselves.

> 
> > 
> > > +
> > > +static bool use_blitter(const struct igt_fb *fb)
> > > +{
> > > +       return (fb->modifier == I915_FORMAT_MOD_Y_TILED ||
> > > +               fb->modifier == I915_FORMAT_MOD_Yf_TILED) &&
> > > +               fb->strides[0] < 32768;
> > 
> > 32k dwords is the limit for tiled blits (on gen4+). I presume strides[]
> > is in bytes.
> 
> I see conflicting limits in bspec for this, the Data Size Limitations page says
> "up to 32,768 bytes per scan line" whereas the docs for XY_SRC_COPY_BLT claims
> 32k dwords.

I always found the docs confusing when it comes to the blitter
stride. But the code we have works with the /4 for tiled so it
must be right :) I'll respin with this.

-- 
Ville Syrjälä
Intel
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [igt-dev] [PATCH i-g-t v3 1/2] lib/igt_fb: Don't use blitter for large buffers
  2019-03-28 17:54 [igt-dev] [PATCH i-g-t 1/2] lib/igt_fb: Don't use blitter for large buffers Ville Syrjala
                   ` (3 preceding siblings ...)
  2019-03-29  4:20 ` [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/2] " Patchwork
@ 2019-04-08 17:13 ` Ville Syrjala
  2019-04-08 17:19   ` Chris Wilson
  2019-04-08 18:02 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v3,1/2] lib/igt_fb: Don't use blitter for large buffers (rev2) Patchwork
  2019-04-08 21:09 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  6 siblings, 1 reply; 16+ messages in thread
From: Ville Syrjala @ 2019-04-08 17:13 UTC (permalink / raw)
  To: igt-dev; +Cc: Dhinakaran Pandiyan

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

The blitter stride is limited to <32k. Fall back to gtt mmap or
rendercopy if we're about to exceed that.

Not quite sure why we're not just using gtt mmap for Y tiling
always. But let's keep it like that for now.

v2: Use rendercopy as the fallback for Yf
v3: Deal with gen4+ tiled stride correctly (Chris)

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 lib/igt_fb.c | 36 +++++++++++++++++++++++++++++-------
 1 file changed, 29 insertions(+), 7 deletions(-)

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 6adf422228e8..d2f756dba2e9 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -1576,6 +1576,31 @@ struct fb_blit_upload {
 	struct intel_batchbuffer *batch;
 };
 
+static int max_blitter_stride(int fd, uint64_t modifier)
+{
+	int stride = 32768;
+
+	if (intel_gen(intel_get_drm_devid(fd)) >= 4 &&
+	    modifier != DRM_FORMAT_MOD_NONE)
+		stride *= 4;
+
+	return stride;
+}
+
+static bool use_rendercopy(const struct igt_fb *fb)
+{
+	return is_ccs_modifier(fb->modifier) ||
+		(fb->modifier == I915_FORMAT_MOD_Yf_TILED &&
+		 fb->strides[0] >= max_blitter_stride(fb->fd, fb->modifier));
+}
+
+static bool use_blitter(const struct igt_fb *fb)
+{
+	return (fb->modifier == I915_FORMAT_MOD_Y_TILED ||
+		fb->modifier == I915_FORMAT_MOD_Yf_TILED) &&
+		fb->strides[0] < max_blitter_stride(fb->fd, fb->modifier);
+}
+
 static void init_buf(struct fb_blit_upload *blit,
 		     struct igt_buf *buf,
 		     const struct igt_fb *fb,
@@ -2755,7 +2780,7 @@ static void create_cairo_surface__convert(int fd, struct igt_fb *fb)
 	blit->base.fd = fd;
 	blit->base.fb = fb;
 
-	if (is_ccs_modifier(fb->modifier)) {
+	if (use_rendercopy(fb)) {
 		blit->base.bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
 		blit->base.batch = intel_batchbuffer_alloc(blit->base.bufmgr,
 						   intel_get_drm_devid(fd));
@@ -2767,9 +2792,7 @@ static void create_cairo_surface__convert(int fd, struct igt_fb *fb)
 							     &blit->shadow_fb);
 	igt_assert(blit->shadow_ptr);
 
-	if (fb->modifier == LOCAL_I915_FORMAT_MOD_Y_TILED ||
-	    fb->modifier == LOCAL_I915_FORMAT_MOD_Yf_TILED ||
-	    is_ccs_modifier(fb->modifier)) {
+	if (use_rendercopy(fb) || use_blitter(fb)) {
 		setup_linear_mapping(&blit->base);
 	} else {
 		blit->base.linear.fb = *fb;
@@ -2849,10 +2872,9 @@ cairo_surface_t *igt_get_cairo_surface(int fd, struct igt_fb *fb)
 		    ((f->cairo_id == CAIRO_FORMAT_INVALID) &&
 		     (f->pixman_id != PIXMAN_invalid)))
 			create_cairo_surface__convert(fd, fb);
-		else if (is_ccs_modifier(fb->modifier))
+		else if (use_rendercopy(fb))
 			create_cairo_surface__rendercopy(fd, fb);
-		else if (fb->modifier == LOCAL_I915_FORMAT_MOD_Y_TILED ||
-			 fb->modifier == LOCAL_I915_FORMAT_MOD_Yf_TILED)
+		else if (use_blitter(fb))
 			create_cairo_surface__blit(fd, fb);
 		else
 			create_cairo_surface__gtt(fd, fb);
-- 
2.21.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [igt-dev] [PATCH i-g-t v3 1/2] lib/igt_fb: Don't use blitter for large buffers
  2019-04-08 17:13 ` [igt-dev] [PATCH i-g-t v3 1/2] " Ville Syrjala
@ 2019-04-08 17:19   ` Chris Wilson
  2019-04-08 17:20     ` Chris Wilson
  0 siblings, 1 reply; 16+ messages in thread
From: Chris Wilson @ 2019-04-08 17:19 UTC (permalink / raw)
  To: Ville Syrjala, igt-dev; +Cc: Dhinakaran Pandiyan

Quoting Ville Syrjala (2019-04-08 18:13:06)
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> The blitter stride is limited to <32k. Fall back to gtt mmap or
> rendercopy if we're about to exceed that.
> 
> Not quite sure why we're not just using gtt mmap for Y tiling
> always. But let's keep it like that for now.
> 
> v2: Use rendercopy as the fallback for Yf
> v3: Deal with gen4+ tiled stride correctly (Chris)
> 
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  lib/igt_fb.c | 36 +++++++++++++++++++++++++++++-------
>  1 file changed, 29 insertions(+), 7 deletions(-)
> 
> diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> index 6adf422228e8..d2f756dba2e9 100644
> --- a/lib/igt_fb.c
> +++ b/lib/igt_fb.c
> @@ -1576,6 +1576,31 @@ struct fb_blit_upload {
>         struct intel_batchbuffer *batch;
>  };
>  
> +static int max_blitter_stride(int fd, uint64_t modifier)
> +{
> +       int stride = 32768;
> +
> +       if (intel_gen(intel_get_drm_devid(fd)) >= 4 &&
> +           modifier != DRM_FORMAT_MOD_NONE)

* fingers crossed that the modifier is the single truth

> +               stride *= 4;
> +
> +       return stride;
> +}
> +
> +static bool use_rendercopy(const struct igt_fb *fb)
> +{
> +       return is_ccs_modifier(fb->modifier) ||
> +               (fb->modifier == I915_FORMAT_MOD_Yf_TILED &&
> +                fb->strides[0] >= max_blitter_stride(fb->fd, fb->modifier));
> +}
> +
> +static bool use_blitter(const struct igt_fb *fb)
> +{
> +       return (fb->modifier == I915_FORMAT_MOD_Y_TILED ||
> +               fb->modifier == I915_FORMAT_MOD_Yf_TILED) &&
> +               fb->strides[0] < max_blitter_stride(fb->fd, fb->modifier);

max_blitter_stride() looks correctly used.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [igt-dev] [PATCH i-g-t v3 1/2] lib/igt_fb: Don't use blitter for large buffers
  2019-04-08 17:19   ` Chris Wilson
@ 2019-04-08 17:20     ` Chris Wilson
  2019-04-09 12:25       ` Ville Syrjälä
  0 siblings, 1 reply; 16+ messages in thread
From: Chris Wilson @ 2019-04-08 17:20 UTC (permalink / raw)
  To: Ville Syrjala, igt-dev; +Cc: Dhinakaran Pandiyan

Quoting Chris Wilson (2019-04-08 18:19:26)
> Quoting Ville Syrjala (2019-04-08 18:13:06)
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > The blitter stride is limited to <32k. Fall back to gtt mmap or
> > rendercopy if we're about to exceed that.
> > 
> > Not quite sure why we're not just using gtt mmap for Y tiling
> > always. But let's keep it like that for now.
> > 
> > v2: Use rendercopy as the fallback for Yf
> > v3: Deal with gen4+ tiled stride correctly (Chris)
> > 
> > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  lib/igt_fb.c | 36 +++++++++++++++++++++++++++++-------
> >  1 file changed, 29 insertions(+), 7 deletions(-)
> > 
> > diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> > index 6adf422228e8..d2f756dba2e9 100644
> > --- a/lib/igt_fb.c
> > +++ b/lib/igt_fb.c
> > @@ -1576,6 +1576,31 @@ struct fb_blit_upload {
> >         struct intel_batchbuffer *batch;
> >  };
> >  
> > +static int max_blitter_stride(int fd, uint64_t modifier)
> > +{
> > +       int stride = 32768;
> > +
> > +       if (intel_gen(intel_get_drm_devid(fd)) >= 4 &&
> > +           modifier != DRM_FORMAT_MOD_NONE)
> 
> * fingers crossed that the modifier is the single truth
> 
> > +               stride *= 4;
> > +
> > +       return stride;
> > +}
> > +
> > +static bool use_rendercopy(const struct igt_fb *fb)
> > +{
> > +       return is_ccs_modifier(fb->modifier) ||
> > +               (fb->modifier == I915_FORMAT_MOD_Yf_TILED &&
> > +                fb->strides[0] >= max_blitter_stride(fb->fd, fb->modifier));
> > +}
> > +
> > +static bool use_blitter(const struct igt_fb *fb)
> > +{
> > +       return (fb->modifier == I915_FORMAT_MOD_Y_TILED ||
> > +               fb->modifier == I915_FORMAT_MOD_Yf_TILED) &&

Oh but you would prefer to use rendercopy for Y_TILED (not just
Yf_TILED). The blitter does work with Y_TILED, but it is quite slow.
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v3,1/2] lib/igt_fb: Don't use blitter for large buffers (rev2)
  2019-03-28 17:54 [igt-dev] [PATCH i-g-t 1/2] lib/igt_fb: Don't use blitter for large buffers Ville Syrjala
                   ` (4 preceding siblings ...)
  2019-04-08 17:13 ` [igt-dev] [PATCH i-g-t v3 1/2] " Ville Syrjala
@ 2019-04-08 18:02 ` Patchwork
  2019-04-08 21:09 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  6 siblings, 0 replies; 16+ messages in thread
From: Patchwork @ 2019-04-08 18:02 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,v3,1/2] lib/igt_fb: Don't use blitter for large buffers (rev2)
URL   : https://patchwork.freedesktop.org/series/58685/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5889 -> IGTPW_2818
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/58685/revisions/2/mbox/

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_suspend@basic-s3:
    - fi-blb-e6850:       PASS -> INCOMPLETE [fdo#107718]

  * igt@i915_selftest@live_uncore:
    - fi-ivb-3770:        PASS -> DMESG-FAIL [fdo#110210]

  * igt@kms_cursor_legacy@basic-flip-after-cursor-varying-size:
    - fi-glk-dsi:         PASS -> INCOMPLETE [fdo#103359] / [k.org#198133]

  * igt@kms_frontbuffer_tracking@basic:
    - fi-byt-clapper:     PASS -> FAIL [fdo#103167]

  * igt@kms_pipe_crc_basic@read-crc-pipe-b-frame-sequence:
    - fi-byt-clapper:     PASS -> FAIL [fdo#103191] / [fdo#107362]

  
#### Possible fixes ####

  * igt@i915_selftest@live_evict:
    - fi-bsw-kefka:       DMESG-WARN [fdo#107709] -> PASS

  * igt@i915_selftest@live_execlists:
    - fi-apl-guc:         INCOMPLETE [fdo#103927] / [fdo#109720] -> PASS

  * igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b-frame-sequence:
    - fi-byt-clapper:     FAIL [fdo#103191] / [fdo#107362] -> PASS +1

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

  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
  [fdo#103359]: https://bugs.freedesktop.org/show_bug.cgi?id=103359
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
  [fdo#107709]: https://bugs.freedesktop.org/show_bug.cgi?id=107709
  [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
  [fdo#109720]: https://bugs.freedesktop.org/show_bug.cgi?id=109720
  [fdo#110210]: https://bugs.freedesktop.org/show_bug.cgi?id=110210
  [fdo#110246]: https://bugs.freedesktop.org/show_bug.cgi?id=110246
  [k.org#198133]: https://bugzilla.kernel.org/show_bug.cgi?id=198133


Participating hosts (49 -> 44)
------------------------------

  Additional (1): fi-icl-u2 
  Missing    (6): fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-icl-y fi-bdw-samus 


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

    * IGT: IGT_4932 -> IGTPW_2818

  CI_DRM_5889: 7cb7ad99a4f507f6025706637baae5fd16e491eb @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2818: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2818/
  IGT_4932: 08cf63a8fac11e3594b57580331fb319241a0d69 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2818/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,v3,1/2] lib/igt_fb: Don't use blitter for large buffers (rev2)
  2019-03-28 17:54 [igt-dev] [PATCH i-g-t 1/2] lib/igt_fb: Don't use blitter for large buffers Ville Syrjala
                   ` (5 preceding siblings ...)
  2019-04-08 18:02 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v3,1/2] lib/igt_fb: Don't use blitter for large buffers (rev2) Patchwork
@ 2019-04-08 21:09 ` Patchwork
  6 siblings, 0 replies; 16+ messages in thread
From: Patchwork @ 2019-04-08 21:09 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,v3,1/2] lib/igt_fb: Don't use blitter for large buffers (rev2)
URL   : https://patchwork.freedesktop.org/series/58685/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5889_full -> IGTPW_2818_full
====================================================

Summary
-------

  **WARNING**

  Minor unknown changes coming with IGTPW_2818_full need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_2818_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/58685/revisions/2/mbox/

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in IGTPW_2818_full:

### IGT changes ###

#### Warnings ####

  * igt@gem_tiled_swapping@non-threaded:
    - shard-iclb:         FAIL [fdo#108686] -> INCOMPLETE

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_capture@capture-bsd2:
    - shard-snb:          NOTRUN -> SKIP [fdo#109271] +32

  * igt@gem_ppgtt@blt-vs-render-ctx0:
    - shard-iclb:         PASS -> INCOMPLETE [fdo#109801]

  * igt@gem_pread@stolen-uncached:
    - shard-iclb:         NOTRUN -> SKIP [fdo#109277]

  * igt@gem_pwrite@huge-gtt-forwards:
    - shard-iclb:         NOTRUN -> SKIP [fdo#109290]

  * igt@gem_tiled_pread_pwrite:
    - shard-iclb:         PASS -> TIMEOUT [fdo#109673]

  * igt@gem_tiled_swapping@non-threaded:
    - shard-hsw:          PASS -> FAIL [fdo#108686]

  * igt@gen3_render_tiledy_blits:
    - shard-iclb:         NOTRUN -> SKIP [fdo#109289]

  * igt@i915_pm_rpm@gem-execbuf-stress:
    - shard-glk:          PASS -> DMESG-WARN [fdo#109513]

  * igt@i915_pm_rpm@pc8-residency:
    - shard-iclb:         NOTRUN -> SKIP [fdo#109293]

  * igt@kms_atomic_transition@1x-modeset-transitions-nonblocking:
    - shard-apl:          NOTRUN -> FAIL [fdo#109660]
    - shard-kbl:          PASS -> FAIL [fdo#109660]

  * igt@kms_atomic_transition@2x-modeset-transitions-nonblocking:
    - shard-iclb:         NOTRUN -> SKIP [fdo#109280] +5

  * igt@kms_atomic_transition@3x-modeset-transitions-nonblocking-fencing:
    - shard-kbl:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +6

  * igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-d:
    - shard-iclb:         NOTRUN -> SKIP [fdo#109278]

  * igt@kms_chamelium@hdmi-edid-change-during-suspend:
    - shard-apl:          NOTRUN -> SKIP [fdo#109271] +221

  * igt@kms_chamelium@hdmi-edid-read:
    - shard-iclb:         NOTRUN -> SKIP [fdo#109284] +3

  * igt@kms_content_protection@atomic:
    - shard-apl:          NOTRUN -> FAIL [fdo#110321] / [fdo#110336]

  * igt@kms_content_protection@legacy:
    - shard-iclb:         NOTRUN -> SKIP [fdo#109300]

  * igt@kms_cursor_crc@cursor-512x512-rapid-movement:
    - shard-iclb:         NOTRUN -> SKIP [fdo#109279]

  * igt@kms_cursor_crc@cursor-alpha-opaque:
    - shard-kbl:          PASS -> FAIL [fdo#109350]
    - shard-apl:          PASS -> FAIL [fdo#109350]
    - shard-glk:          PASS -> FAIL [fdo#109350]

  * igt@kms_cursor_legacy@2x-long-cursor-vs-flip-legacy:
    - shard-hsw:          PASS -> FAIL [fdo#105767]

  * igt@kms_cursor_legacy@2x-long-flip-vs-cursor-legacy:
    - shard-iclb:         NOTRUN -> SKIP [fdo#109274] +1

  * igt@kms_cursor_legacy@cursor-vs-flip-varying-size:
    - shard-iclb:         PASS -> FAIL [fdo#103355] +1

  * igt@kms_fbcon_fbt@fbc:
    - shard-iclb:         PASS -> DMESG-WARN [fdo#109593]

  * igt@kms_flip@2x-flip-vs-suspend:
    - shard-glk:          PASS -> INCOMPLETE [fdo#103359] / [k.org#198133]

  * igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-mmap-cpu:
    - shard-glk:          PASS -> FAIL [fdo#103167]

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-offscren-pri-shrfb-draw-render:
    - shard-iclb:         PASS -> FAIL [fdo#103167] +1

  * igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-fullscreen:
    - shard-iclb:         PASS -> FAIL [fdo#109247] +20

  * igt@kms_lease@page_flip_implicit_plane:
    - shard-apl:          NOTRUN -> FAIL [fdo#110281]

  * igt@kms_panel_fitting@legacy:
    - shard-kbl:          NOTRUN -> SKIP [fdo#109271] +33

  * igt@kms_pipe_crc_basic@nonblocking-crc-pipe-d:
    - shard-apl:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +17

  * igt@kms_plane@pixel-format-pipe-b-planes:
    - shard-glk:          PASS -> SKIP [fdo#109271]

  * igt@kms_plane_alpha_blend@pipe-b-alpha-basic:
    - shard-kbl:          NOTRUN -> FAIL [fdo#108145] / [fdo#108590]

  * igt@kms_plane_alpha_blend@pipe-b-alpha-transparant-fb:
    - shard-apl:          NOTRUN -> FAIL [fdo#108145] +2

  * igt@kms_plane_scaling@pipe-a-scaler-with-pixel-format:
    - shard-glk:          PASS -> SKIP [fdo#109271] / [fdo#109278] +1

  * igt@kms_psr@psr2_cursor_plane_onoff:
    - shard-iclb:         PASS -> SKIP [fdo#109441]

  * igt@kms_psr@psr2_sprite_blt:
    - shard-iclb:         NOTRUN -> SKIP [fdo#109441]

  * igt@kms_psr@sprite_mmap_cpu:
    - shard-iclb:         PASS -> FAIL [fdo#107383] / [fdo#110215] +4

  * igt@kms_setmode@basic:
    - shard-kbl:          PASS -> FAIL [fdo#99912]

  * igt@kms_universal_plane@cursor-fb-leak-pipe-e:
    - shard-snb:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +2

  * igt@kms_vblank@pipe-a-ts-continuation-dpms-suspend:
    - shard-apl:          NOTRUN -> FAIL [fdo#104894]

  * igt@prime_busy@after-bsd2:
    - shard-iclb:         NOTRUN -> SKIP [fdo#109276] +4

  * igt@prime_mmap@test_reprime:
    - shard-apl:          PASS -> INCOMPLETE [fdo#103927]

  * igt@prime_nv_api@i915_self_import:
    - shard-glk:          NOTRUN -> SKIP [fdo#109271] +6

  * igt@prime_nv_test@i915_import_gtt_mmap:
    - shard-iclb:         NOTRUN -> SKIP [fdo#109291]

  * igt@runner@aborted:
    - shard-iclb:         NOTRUN -> FAIL [fdo#109593]

  * igt@tools_test@sysfs_l3_parity:
    - shard-iclb:         NOTRUN -> SKIP [fdo#109307]

  * igt@v3d_get_param@get-bad-flags:
    - shard-iclb:         NOTRUN -> SKIP [fdo#109315]

  
#### Possible fixes ####

  * igt@gem_exec_nop@basic-series:
    - shard-iclb:         FAIL -> PASS

  * igt@i915_selftest@live_workarounds:
    - shard-iclb:         DMESG-FAIL [fdo#108954] -> PASS

  * igt@i915_suspend@sysfs-reader:
    - shard-kbl:          INCOMPLETE [fdo#103665] -> PASS

  * igt@kms_color@pipe-a-ctm-max:
    - shard-apl:          FAIL [fdo#108147] -> PASS

  * igt@kms_cursor_crc@cursor-64x64-sliding:
    - shard-kbl:          FAIL [fdo#103232] -> PASS

  * igt@kms_cursor_legacy@2x-nonblocking-modeset-vs-cursor-atomic:
    - shard-glk:          FAIL [fdo#106509] / [fdo#107409] -> PASS

  * igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-shrfb-plflip-blt:
    - shard-glk:          FAIL [fdo#103167] -> PASS

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-render:
    - shard-iclb:         FAIL [fdo#103167] -> PASS +1

  * igt@kms_frontbuffer_tracking@fbcpsr-rgb101010-draw-blt:
    - shard-iclb:         FAIL [fdo#105682] / [fdo#109247] -> PASS

  * igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-shrfb-draw-mmap-gtt:
    - shard-iclb:         FAIL [fdo#109247] -> PASS +4

  * igt@kms_plane_scaling@pipe-a-scaler-with-clipping-clamping:
    - shard-glk:          SKIP [fdo#109271] / [fdo#109278] -> PASS

  * igt@kms_psr@cursor_mmap_gtt:
    - shard-iclb:         FAIL [fdo#107383] / [fdo#110215] -> PASS

  * igt@kms_psr@psr2_sprite_plane_move:
    - shard-iclb:         SKIP [fdo#109441] -> PASS +3

  * igt@kms_vblank@pipe-b-ts-continuation-modeset-rpm:
    - shard-kbl:          FAIL [fdo#104894] -> PASS

  
#### Warnings ####

  * igt@kms_dp_dsc@basic-dsc-enable-edp:
    - shard-iclb:         SKIP [fdo#109349] -> FAIL [fdo#110270]

  * igt@kms_frontbuffer_tracking@fbcpsr-rgb565-draw-mmap-wc:
    - shard-hsw:          SKIP [fdo#109271] -> INCOMPLETE [fdo#103540]

  * igt@runner@aborted:
    - shard-glk:          FAIL [fdo#109373] / [k.org#202321] -> ( 2 FAIL ) [fdo#109373] / [k.org#202321]

  
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
  [fdo#103355]: https://bugs.freedesktop.org/show_bug.cgi?id=103355
  [fdo#103359]: https://bugs.freedesktop.org/show_bug.cgi?id=103359
  [fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
  [fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#104894]: https://bugs.freedesktop.org/show_bug.cgi?id=104894
  [fdo#105682]: https://bugs.freedesktop.org/show_bug.cgi?id=105682
  [fdo#105767]: https://bugs.freedesktop.org/show_bug.cgi?id=105767
  [fdo#106509]: https://bugs.freedesktop.org/show_bug.cgi?id=106509
  [fdo#107383]: https://bugs.freedesktop.org/show_bug.cgi?id=107383
  [fdo#107409]: https://bugs.freedesktop.org/show_bug.cgi?id=107409
  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#108147]: https://bugs.freedesktop.org/show_bug.cgi?id=108147
  [fdo#108590]: https://bugs.freedesktop.org/show_bug.cgi?id=108590
  [fdo#108686]: https://bugs.freedesktop.org/show_bug.cgi?id=108686
  [fdo#108954]: https://bugs.freedesktop.org/show_bug.cgi?id=108954
  [fdo#109247]: https://bugs.freedesktop.org/show_bug.cgi?id=109247
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
  [fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
  [fdo#109277]: https://bugs.freedesktop.org/show_bug.cgi?id=109277
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#109279]: https://bugs.freedesktop.org/show_bug.cgi?id=109279
  [fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
  [fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284
  [fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
  [fdo#109290]: https://bugs.freedesktop.org/show_bug.cgi?id=109290
  [fdo#109291]: https://bugs.freedesktop.org/show_bug.cgi?id=109291
  [fdo#109293]: https://bugs.freedesktop.org/show_bug.cgi?id=109293
  [fdo#109300]: https://bugs.freedesktop.org/show_bug.cgi?id=109300
  [fdo#109307]: https://bugs.freedesktop.org/show_bug.cgi?id=109307
  [fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
  [fdo#109349]: https://bugs.freedesktop.org/show_bug.cgi?id=109349
  [fdo#109350]: https://bugs.freedesktop.org/show_bug.cgi?id=109350
  [fdo#109373]: https://bugs.freedesktop.org/show_bug.cgi?id=109373
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#109513]: https://bugs.freedesktop.org/show_bug.cgi?id=109513
  [fdo#109593]: https://bugs.freedesktop.org/show_bug.cgi?id=109593
  [fdo#109660]: https://bugs.freedesktop.org/show_bug.cgi?id=109660
  [fdo#109673]: https://bugs.freedesktop.org/show_bug.cgi?id=109673
  [fdo#109801]: https://bugs.freedesktop.org/show_bug.cgi?id=109801
  [fdo#110215]: https://bugs.freedesktop.org/show_bug.cgi?id=110215
  [fdo#110270]: https://bugs.freedesktop.org/show_bug.cgi?id=110270
  [fdo#110281]: https://bugs.freedesktop.org/show_bug.cgi?id=110281
  [fdo#110321]: https://bugs.freedesktop.org/show_bug.cgi?id=110321
  [fdo#110336]: https://bugs.freedesktop.org/show_bug.cgi?id=110336
  [fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912
  [k.org#198133]: https://bugzilla.kernel.org/show_bug.cgi?id=198133
  [k.org#202321]: https://bugzilla.kernel.org/show_bug.cgi?id=202321


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

  Missing    (4): pig-skl-6260u shard-skl pig-hsw-4770r pig-glk-j5005 


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

    * IGT: IGT_4932 -> IGTPW_2818
    * Piglit: piglit_4509 -> None

  CI_DRM_5889: 7cb7ad99a4f507f6025706637baae5fd16e491eb @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2818: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2818/
  IGT_4932: 08cf63a8fac11e3594b57580331fb319241a0d69 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2818/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [igt-dev] [PATCH i-g-t v3 1/2] lib/igt_fb: Don't use blitter for large buffers
  2019-04-08 17:20     ` Chris Wilson
@ 2019-04-09 12:25       ` Ville Syrjälä
  2019-04-09 19:49         ` Chris Wilson
  0 siblings, 1 reply; 16+ messages in thread
From: Ville Syrjälä @ 2019-04-09 12:25 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev, Dhinakaran Pandiyan

On Mon, Apr 08, 2019 at 06:20:50PM +0100, Chris Wilson wrote:
> Quoting Chris Wilson (2019-04-08 18:19:26)
> > Quoting Ville Syrjala (2019-04-08 18:13:06)
> > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > 
> > > The blitter stride is limited to <32k. Fall back to gtt mmap or
> > > rendercopy if we're about to exceed that.
> > > 
> > > Not quite sure why we're not just using gtt mmap for Y tiling
> > > always. But let's keep it like that for now.
> > > 
> > > v2: Use rendercopy as the fallback for Yf
> > > v3: Deal with gen4+ tiled stride correctly (Chris)
> > > 
> > > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > > Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > ---
> > >  lib/igt_fb.c | 36 +++++++++++++++++++++++++++++-------
> > >  1 file changed, 29 insertions(+), 7 deletions(-)
> > > 
> > > diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> > > index 6adf422228e8..d2f756dba2e9 100644
> > > --- a/lib/igt_fb.c
> > > +++ b/lib/igt_fb.c
> > > @@ -1576,6 +1576,31 @@ struct fb_blit_upload {
> > >         struct intel_batchbuffer *batch;
> > >  };
> > >  
> > > +static int max_blitter_stride(int fd, uint64_t modifier)
> > > +{
> > > +       int stride = 32768;
> > > +
> > > +       if (intel_gen(intel_get_drm_devid(fd)) >= 4 &&
> > > +           modifier != DRM_FORMAT_MOD_NONE)
> > 
> > * fingers crossed that the modifier is the single truth
> > 
> > > +               stride *= 4;
> > > +
> > > +       return stride;
> > > +}
> > > +
> > > +static bool use_rendercopy(const struct igt_fb *fb)
> > > +{
> > > +       return is_ccs_modifier(fb->modifier) ||
> > > +               (fb->modifier == I915_FORMAT_MOD_Yf_TILED &&
> > > +                fb->strides[0] >= max_blitter_stride(fb->fd, fb->modifier));
> > > +}
> > > +
> > > +static bool use_blitter(const struct igt_fb *fb)
> > > +{
> > > +       return (fb->modifier == I915_FORMAT_MOD_Y_TILED ||
> > > +               fb->modifier == I915_FORMAT_MOD_Yf_TILED) &&
> 
> Oh but you would prefer to use rendercopy for Y_TILED (not just
> Yf_TILED). The blitter does work with Y_TILED, but it is quite slow.

Or we could just switch Y tiled to always use gtt mmap?
I'm not sure why it wants to use the blitter. Some historical
reason I presume.

-- 
Ville Syrjälä
Intel
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [igt-dev] [PATCH i-g-t v3 1/2] lib/igt_fb: Don't use blitter for large buffers
  2019-04-09 12:25       ` Ville Syrjälä
@ 2019-04-09 19:49         ` Chris Wilson
  2019-04-09 20:12           ` Ville Syrjälä
  0 siblings, 1 reply; 16+ messages in thread
From: Chris Wilson @ 2019-04-09 19:49 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: igt-dev, Dhinakaran Pandiyan

Quoting Ville Syrjälä (2019-04-09 13:25:55)
> On Mon, Apr 08, 2019 at 06:20:50PM +0100, Chris Wilson wrote:
> > Quoting Chris Wilson (2019-04-08 18:19:26)
> > > Quoting Ville Syrjala (2019-04-08 18:13:06)
> > > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > 
> > > > The blitter stride is limited to <32k. Fall back to gtt mmap or
> > > > rendercopy if we're about to exceed that.
> > > > 
> > > > Not quite sure why we're not just using gtt mmap for Y tiling
> > > > always. But let's keep it like that for now.
> > > > 
> > > > v2: Use rendercopy as the fallback for Yf
> > > > v3: Deal with gen4+ tiled stride correctly (Chris)
> > > > 
> > > > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > > > Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> > > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > ---
> > > >  lib/igt_fb.c | 36 +++++++++++++++++++++++++++++-------
> > > >  1 file changed, 29 insertions(+), 7 deletions(-)
> > > > 
> > > > diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> > > > index 6adf422228e8..d2f756dba2e9 100644
> > > > --- a/lib/igt_fb.c
> > > > +++ b/lib/igt_fb.c
> > > > @@ -1576,6 +1576,31 @@ struct fb_blit_upload {
> > > >         struct intel_batchbuffer *batch;
> > > >  };
> > > >  
> > > > +static int max_blitter_stride(int fd, uint64_t modifier)
> > > > +{
> > > > +       int stride = 32768;
> > > > +
> > > > +       if (intel_gen(intel_get_drm_devid(fd)) >= 4 &&
> > > > +           modifier != DRM_FORMAT_MOD_NONE)
> > > 
> > > * fingers crossed that the modifier is the single truth
> > > 
> > > > +               stride *= 4;
> > > > +
> > > > +       return stride;
> > > > +}
> > > > +
> > > > +static bool use_rendercopy(const struct igt_fb *fb)
> > > > +{
> > > > +       return is_ccs_modifier(fb->modifier) ||
> > > > +               (fb->modifier == I915_FORMAT_MOD_Yf_TILED &&
> > > > +                fb->strides[0] >= max_blitter_stride(fb->fd, fb->modifier));
> > > > +}
> > > > +
> > > > +static bool use_blitter(const struct igt_fb *fb)
> > > > +{
> > > > +       return (fb->modifier == I915_FORMAT_MOD_Y_TILED ||
> > > > +               fb->modifier == I915_FORMAT_MOD_Yf_TILED) &&
> > 
> > Oh but you would prefer to use rendercopy for Y_TILED (not just
> > Yf_TILED). The blitter does work with Y_TILED, but it is quite slow.
> 
> Or we could just switch Y tiled to always use gtt mmap?

We could, just make sure to use memcpy_from_wc to speed it up. Although
GTT is on the way out, I doubt it affects these use cases.

> I'm not sure why it wants to use the blitter. Some historical
> reason I presume.

Having redundant methods available is not a bad thing when we want to
cross-check.
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [igt-dev] [PATCH i-g-t v3 1/2] lib/igt_fb: Don't use blitter for large buffers
  2019-04-09 19:49         ` Chris Wilson
@ 2019-04-09 20:12           ` Ville Syrjälä
  0 siblings, 0 replies; 16+ messages in thread
From: Ville Syrjälä @ 2019-04-09 20:12 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev, Dhinakaran Pandiyan

On Tue, Apr 09, 2019 at 08:49:30PM +0100, Chris Wilson wrote:
> Quoting Ville Syrjälä (2019-04-09 13:25:55)
> > On Mon, Apr 08, 2019 at 06:20:50PM +0100, Chris Wilson wrote:
> > > Quoting Chris Wilson (2019-04-08 18:19:26)
> > > > Quoting Ville Syrjala (2019-04-08 18:13:06)
> > > > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > > 
> > > > > The blitter stride is limited to <32k. Fall back to gtt mmap or
> > > > > rendercopy if we're about to exceed that.
> > > > > 
> > > > > Not quite sure why we're not just using gtt mmap for Y tiling
> > > > > always. But let's keep it like that for now.
> > > > > 
> > > > > v2: Use rendercopy as the fallback for Yf
> > > > > v3: Deal with gen4+ tiled stride correctly (Chris)
> > > > > 
> > > > > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > > > > Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> > > > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > > ---
> > > > >  lib/igt_fb.c | 36 +++++++++++++++++++++++++++++-------
> > > > >  1 file changed, 29 insertions(+), 7 deletions(-)
> > > > > 
> > > > > diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> > > > > index 6adf422228e8..d2f756dba2e9 100644
> > > > > --- a/lib/igt_fb.c
> > > > > +++ b/lib/igt_fb.c
> > > > > @@ -1576,6 +1576,31 @@ struct fb_blit_upload {
> > > > >         struct intel_batchbuffer *batch;
> > > > >  };
> > > > >  
> > > > > +static int max_blitter_stride(int fd, uint64_t modifier)
> > > > > +{
> > > > > +       int stride = 32768;
> > > > > +
> > > > > +       if (intel_gen(intel_get_drm_devid(fd)) >= 4 &&
> > > > > +           modifier != DRM_FORMAT_MOD_NONE)
> > > > 
> > > > * fingers crossed that the modifier is the single truth
> > > > 
> > > > > +               stride *= 4;
> > > > > +
> > > > > +       return stride;
> > > > > +}
> > > > > +
> > > > > +static bool use_rendercopy(const struct igt_fb *fb)
> > > > > +{
> > > > > +       return is_ccs_modifier(fb->modifier) ||
> > > > > +               (fb->modifier == I915_FORMAT_MOD_Yf_TILED &&
> > > > > +                fb->strides[0] >= max_blitter_stride(fb->fd, fb->modifier));
> > > > > +}
> > > > > +
> > > > > +static bool use_blitter(const struct igt_fb *fb)
> > > > > +{
> > > > > +       return (fb->modifier == I915_FORMAT_MOD_Y_TILED ||
> > > > > +               fb->modifier == I915_FORMAT_MOD_Yf_TILED) &&
> > > 
> > > Oh but you would prefer to use rendercopy for Y_TILED (not just
> > > Yf_TILED). The blitter does work with Y_TILED, but it is quite slow.
> > 
> > Or we could just switch Y tiled to always use gtt mmap?
> 
> We could, just make sure to use memcpy_from_wc to speed it up. Although
> GTT is on the way out, I doubt it affects these use cases.

Right. I guess I'd like to keep the dependencies as minimal as
possible. Getting rendercopy updated for new hardware hasn't always
happened in the most timely manner. If we start depending on it too
much we may end up blocking early display testing. But as you say
gtt is on its way out so maybe we should think about minimizing its
use instead.

I suppose use_rendercopy() should check that rendercopy is actually
available. That way we could prefer rendercopy over the other methods
while still allowing graceful fallback. Well, assuming that our
rendercopy implementation and hw actually works.

-- 
Ville Syrjälä
Intel
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2019-04-09 20:12 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-28 17:54 [igt-dev] [PATCH i-g-t 1/2] lib/igt_fb: Don't use blitter for large buffers Ville Syrjala
2019-03-28 17:54 ` [igt-dev] [PATCH i-g-t 2/2] lib/igt_fb: Don't leak the bufmgr and batch for converted surfaces Ville Syrjala
2019-04-02 23:01   ` Dhinakaran Pandiyan
2019-03-28 18:17 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] lib/igt_fb: Don't use blitter for large buffers Patchwork
2019-03-28 18:25 ` [igt-dev] [PATCH i-g-t 1/2] " Chris Wilson
2019-04-02 22:41   ` Dhinakaran Pandiyan
2019-04-03 15:24     ` Ville Syrjälä
2019-03-29  4:20 ` [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/2] " Patchwork
2019-04-08 17:13 ` [igt-dev] [PATCH i-g-t v3 1/2] " Ville Syrjala
2019-04-08 17:19   ` Chris Wilson
2019-04-08 17:20     ` Chris Wilson
2019-04-09 12:25       ` Ville Syrjälä
2019-04-09 19:49         ` Chris Wilson
2019-04-09 20:12           ` Ville Syrjälä
2019-04-08 18:02 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v3,1/2] lib/igt_fb: Don't use blitter for large buffers (rev2) Patchwork
2019-04-08 21:09 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.