* [PATCH i-g-t] igt_fb: Add support for drawing to non-32bit Y/Yf tiled FBs
@ 2017-12-08 14:53 Imre Deak
2017-12-08 15:39 ` ✓ Fi.CI.BAT: success for " Patchwork
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Imre Deak @ 2017-12-08 14:53 UTC (permalink / raw)
To: intel-gfx
When drawing with cairo to Y/Yf tiled FBs we use a temporary linear
buffer which is mapped to the CPU, but the fast blit needed for this
only expects 32 bpp FBs. Add support for other bpps too.
This is needed for upcoming patches testing non-32bit bpp formats with
Y/Yf tiling.
Thanks to Ville for explaining why we need the temporary buffer. (Looks
like for Y tiling we could do without, but that's a separate topic.)
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Imre Deak <imre.deak@intel.com>
---
lib/igt_fb.c | 2 ++
lib/intel_batchbuffer.c | 33 +++++++++++++++++++++++++++++----
lib/intel_batchbuffer.h | 4 ++++
lib/intel_reg.h | 4 ++++
4 files changed, 39 insertions(+), 4 deletions(-)
diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index d4eaed71..dcae07df 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -1043,6 +1043,7 @@ static void destroy_cairo_surface__blit(void *arg)
I915_TILING_NONE,
0, 0, /* src_x, src_y */
fb->width, fb->height,
+ igt_drm_format_to_bpp(fb->drm_format),
fb->gem_handle,
fb->stride,
obj_tiling,
@@ -1090,6 +1091,7 @@ static void create_cairo_surface__blit(int fd, struct igt_fb *fb)
obj_tiling,
0, 0, /* src_x, src_y */
fb->width, fb->height,
+ igt_drm_format_to_bpp(fb->drm_format),
blit->linear.handle,
blit->linear.stride,
I915_TILING_NONE,
diff --git a/lib/intel_batchbuffer.c b/lib/intel_batchbuffer.c
index 53449894..9a53b6f8 100644
--- a/lib/intel_batchbuffer.c
+++ b/lib/intel_batchbuffer.c
@@ -519,7 +519,8 @@ static uint32_t fast_copy_dword0(unsigned int src_tiling,
}
static uint32_t fast_copy_dword1(unsigned int src_tiling,
- unsigned int dst_tiling)
+ unsigned int dst_tiling,
+ int bpp)
{
uint32_t dword1 = 0;
@@ -528,7 +529,25 @@ static uint32_t fast_copy_dword1(unsigned int src_tiling,
if (dst_tiling == I915_TILING_Yf)
dword1 |= XY_FAST_COPY_DST_TILING_Yf;
- dword1 |= XY_FAST_COPY_COLOR_DEPTH_32;
+ switch (bpp) {
+ case 8:
+ dword1 |= XY_FAST_COPY_COLOR_DEPTH_8;
+ break;
+ case 16:
+ dword1 |= XY_FAST_COPY_COLOR_DEPTH_16;
+ break;
+ case 32:
+ dword1 |= XY_FAST_COPY_COLOR_DEPTH_32;
+ break;
+ case 64:
+ dword1 |= XY_FAST_COPY_COLOR_DEPTH_64;
+ break;
+ case 128:
+ dword1 |= XY_FAST_COPY_COLOR_DEPTH_128;
+ break;
+ default:
+ igt_assert(0);
+ }
return dword1;
}
@@ -586,6 +605,7 @@ static void exec_blit(int fd,
* @src_y: Y coordinate of the source region to copy
* @width: Width of the region to copy
* @height: Height of the region to copy
+ * @bpp: source and destination bits per pixel
* @dst_handle: GEM handle of the source buffer
* @dst_stride: Stride (in bytes) of the destination buffer
* @dst_tiling: Tiling mode of the destination buffer
@@ -604,6 +624,9 @@ void igt_blitter_fast_copy__raw(int fd,
/* size */
unsigned int width, unsigned int height,
+ /* bpp */
+ int bpp,
+
/* dst */
uint32_t dst_handle,
unsigned int dst_stride,
@@ -621,7 +644,7 @@ void igt_blitter_fast_copy__raw(int fd,
src_pitch = fast_copy_pitch(src_stride, src_tiling);
dst_pitch = fast_copy_pitch(dst_stride, dst_tiling);
dword0 = fast_copy_dword0(src_tiling, dst_tiling);
- dword1 = fast_copy_dword1(src_tiling, dst_tiling);
+ dword1 = fast_copy_dword1(src_tiling, dst_tiling, bpp);
#define CHECK_RANGE(x) ((x) >= 0 && (x) < (1 << 15))
assert(CHECK_RANGE(src_x) && CHECK_RANGE(src_y) &&
@@ -671,6 +694,7 @@ void igt_blitter_fast_copy__raw(int fd,
* @src_y: source pixel y-coordination
* @width: width of the copied rectangle
* @height: height of the copied rectangle
+ * @bpp: source and destination bits per pixel
* @dst: destination i-g-t buffer object
* @dst_x: destination pixel x-coordination
* @dst_y: destination pixel y-coordination
@@ -682,6 +706,7 @@ void igt_blitter_fast_copy__raw(int fd,
void igt_blitter_fast_copy(struct intel_batchbuffer *batch,
struct igt_buf *src, unsigned src_x, unsigned src_y,
unsigned width, unsigned height,
+ int bpp,
struct igt_buf *dst, unsigned dst_x, unsigned dst_y)
{
uint32_t src_pitch, dst_pitch;
@@ -690,7 +715,7 @@ void igt_blitter_fast_copy(struct intel_batchbuffer *batch,
src_pitch = fast_copy_pitch(src->stride, src->tiling);
dst_pitch = fast_copy_pitch(dst->stride, src->tiling);
dword0 = fast_copy_dword0(src->tiling, dst->tiling);
- dword1 = fast_copy_dword1(src->tiling, dst->tiling);
+ dword1 = fast_copy_dword1(src->tiling, dst->tiling, bpp);
#define CHECK_RANGE(x) ((x) >= 0 && (x) < (1 << 15))
assert(CHECK_RANGE(src_x) && CHECK_RANGE(src_y) &&
diff --git a/lib/intel_batchbuffer.h b/lib/intel_batchbuffer.h
index 869747db..6bee4167 100644
--- a/lib/intel_batchbuffer.h
+++ b/lib/intel_batchbuffer.h
@@ -228,6 +228,7 @@ unsigned igt_buf_height(struct igt_buf *buf);
void igt_blitter_fast_copy(struct intel_batchbuffer *batch,
struct igt_buf *src, unsigned src_x, unsigned src_y,
unsigned width, unsigned height,
+ int bpp,
struct igt_buf *dst, unsigned dst_x, unsigned dst_y);
void igt_blitter_fast_copy__raw(int fd,
@@ -240,6 +241,9 @@ void igt_blitter_fast_copy__raw(int fd,
/* size */
unsigned int width, unsigned int height,
+ /* bpp */
+ int bpp,
+
/* dst */
uint32_t dst_handle,
unsigned int dst_stride,
diff --git a/lib/intel_reg.h b/lib/intel_reg.h
index 3a28c08c..f85fb742 100644
--- a/lib/intel_reg.h
+++ b/lib/intel_reg.h
@@ -2530,7 +2530,11 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/* dword 1 */
#define XY_FAST_COPY_SRC_TILING_Yf (1 << 31)
#define XY_FAST_COPY_DST_TILING_Yf (1 << 30)
+#define XY_FAST_COPY_COLOR_DEPTH_8 (0 << 24)
+#define XY_FAST_COPY_COLOR_DEPTH_16 (1 << 24)
#define XY_FAST_COPY_COLOR_DEPTH_32 (3 << 24)
+#define XY_FAST_COPY_COLOR_DEPTH_64 (4 << 24)
+#define XY_FAST_COPY_COLOR_DEPTH_128 (5 << 24)
#define MI_STORE_DWORD_IMM ((0x20<<23)|2)
#define MI_MEM_VIRTUAL (1 << 22) /* 965+ only */
--
2.11.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 5+ messages in thread
* ✓ Fi.CI.BAT: success for igt_fb: Add support for drawing to non-32bit Y/Yf tiled FBs
2017-12-08 14:53 [PATCH i-g-t] igt_fb: Add support for drawing to non-32bit Y/Yf tiled FBs Imre Deak
@ 2017-12-08 15:39 ` Patchwork
2017-12-08 16:06 ` [PATCH i-g-t] " Chris Wilson
2017-12-08 17:43 ` ✗ Fi.CI.IGT: warning for " Patchwork
2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2017-12-08 15:39 UTC (permalink / raw)
To: Imre Deak; +Cc: intel-gfx
== Series Details ==
Series: igt_fb: Add support for drawing to non-32bit Y/Yf tiled FBs
URL : https://patchwork.freedesktop.org/series/35093/
State : success
== Summary ==
IGT patchset tested on top of latest successful build
2fc64acf8a4465d5eab3d6cfec9b3c1b5df30d73 igt/perf_pmu: Tweak wait_for_rc6, yet again
with latest DRM-Tip kernel build CI_DRM_3483
b5f297e08432 drm-tip: 2017y-12m-08d-13h-53m-36s UTC integration manifest
No testlist changes.
Test gem_mmap_gtt:
Subgroup basic-small-bo-tiledx:
pass -> FAIL (fi-gdg-551) fdo#102575
fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575
fi-bdw-5557u total:288 pass:267 dwarn:0 dfail:0 fail:0 skip:21 time:445s
fi-bdw-gvtdvm total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:442s
fi-blb-e6850 total:288 pass:223 dwarn:1 dfail:0 fail:0 skip:64 time:387s
fi-bsw-n3050 total:288 pass:242 dwarn:0 dfail:0 fail:0 skip:46 time:528s
fi-bwr-2160 total:288 pass:183 dwarn:0 dfail:0 fail:0 skip:105 time:282s
fi-bxt-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:507s
fi-bxt-j4205 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:506s
fi-byt-j1900 total:288 pass:253 dwarn:0 dfail:0 fail:0 skip:35 time:492s
fi-byt-n2820 total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:478s
fi-elk-e7500 total:224 pass:163 dwarn:15 dfail:0 fail:0 skip:45
fi-gdg-551 total:288 pass:178 dwarn:1 dfail:0 fail:1 skip:108 time:278s
fi-glk-1 total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:549s
fi-hsw-4770 total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:362s
fi-hsw-4770r total:288 pass:224 dwarn:0 dfail:0 fail:0 skip:64 time:259s
fi-ilk-650 total:288 pass:228 dwarn:0 dfail:0 fail:0 skip:60 time:398s
fi-ivb-3520m total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:482s
fi-ivb-3770 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:452s
fi-kbl-7500u total:288 pass:263 dwarn:1 dfail:0 fail:0 skip:24 time:487s
fi-kbl-7560u total:288 pass:269 dwarn:0 dfail:0 fail:0 skip:19 time:532s
fi-kbl-7567u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:476s
fi-kbl-r total:288 pass:260 dwarn:1 dfail:0 fail:0 skip:27 time:534s
fi-skl-6260u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:454s
fi-skl-6600u total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:542s
fi-skl-6700hq total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:577s
fi-skl-6700k total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:522s
fi-skl-6770hq total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:508s
fi-skl-gvtdvm total:288 pass:265 dwarn:0 dfail:0 fail:0 skip:23 time:449s
fi-snb-2520m total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:552s
fi-snb-2600 total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:415s
Blacklisted hosts:
fi-cfl-s2 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:610s
fi-cnl-y total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:655s
fi-glk-dsi total:15 pass:14 dwarn:0 dfail:0 fail:0 skip:0
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_625/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH i-g-t] igt_fb: Add support for drawing to non-32bit Y/Yf tiled FBs
2017-12-08 14:53 [PATCH i-g-t] igt_fb: Add support for drawing to non-32bit Y/Yf tiled FBs Imre Deak
2017-12-08 15:39 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2017-12-08 16:06 ` Chris Wilson
2017-12-08 17:43 ` ✗ Fi.CI.IGT: warning for " Patchwork
2 siblings, 0 replies; 5+ messages in thread
From: Chris Wilson @ 2017-12-08 16:06 UTC (permalink / raw)
To: Imre Deak, intel-gfx
Quoting Imre Deak (2017-12-08 14:53:41)
> When drawing with cairo to Y/Yf tiled FBs we use a temporary linear
> buffer which is mapped to the CPU, but the fast blit needed for this
> only expects 32 bpp FBs. Add support for other bpps too.
>
> This is needed for upcoming patches testing non-32bit bpp formats with
> Y/Yf tiling.
>
> Thanks to Ville for explaining why we need the temporary buffer. (Looks
> like for Y tiling we could do without, but that's a separate topic.)
>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Imre Deak <imre.deak@intel.com>
Lgtm,
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* ✗ Fi.CI.IGT: warning for igt_fb: Add support for drawing to non-32bit Y/Yf tiled FBs
2017-12-08 14:53 [PATCH i-g-t] igt_fb: Add support for drawing to non-32bit Y/Yf tiled FBs Imre Deak
2017-12-08 15:39 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-12-08 16:06 ` [PATCH i-g-t] " Chris Wilson
@ 2017-12-08 17:43 ` Patchwork
2017-12-11 12:11 ` Imre Deak
2 siblings, 1 reply; 5+ messages in thread
From: Patchwork @ 2017-12-08 17:43 UTC (permalink / raw)
To: Imre Deak; +Cc: intel-gfx
== Series Details ==
Series: igt_fb: Add support for drawing to non-32bit Y/Yf tiled FBs
URL : https://patchwork.freedesktop.org/series/35093/
State : warning
== Summary ==
Test kms_frontbuffer_tracking:
Subgroup fbc-1p-offscren-pri-shrfb-draw-blt:
pass -> FAIL (shard-snb) fdo#101623
Test drv_suspend:
Subgroup fence-restore-tiled2untiled-hibernate:
skip -> FAIL (shard-hsw) fdo#103375
Subgroup fence-restore-tiled2untiled:
pass -> SKIP (shard-snb)
Subgroup debugfs-reader:
skip -> PASS (shard-hsw)
Subgroup forcewake:
skip -> PASS (shard-hsw)
Test drv_module_reload:
Subgroup basic-reload:
dmesg-warn -> PASS (shard-snb) fdo#102848
dmesg-warn -> PASS (shard-hsw) fdo#102707
Test gem_tiled_swapping:
Subgroup non-threaded:
pass -> INCOMPLETE (shard-hsw) fdo#104009
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
fdo#102848 https://bugs.freedesktop.org/show_bug.cgi?id=102848
fdo#102707 https://bugs.freedesktop.org/show_bug.cgi?id=102707
fdo#104009 https://bugs.freedesktop.org/show_bug.cgi?id=104009
shard-hsw total:2675 pass:1534 dwarn:1 dfail:0 fail:10 skip:1129 time:9141s
shard-snb total:2679 pass:1306 dwarn:1 dfail:0 fail:12 skip:1360 time:8073s
Blacklisted hosts:
shard-apl total:2657 pass:1655 dwarn:1 dfail:0 fail:22 skip:977 time:13318s
shard-kbl total:2603 pass:1742 dwarn:1 dfail:0 fail:23 skip:837 time:10703s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_625/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: ✗ Fi.CI.IGT: warning for igt_fb: Add support for drawing to non-32bit Y/Yf tiled FBs
2017-12-08 17:43 ` ✗ Fi.CI.IGT: warning for " Patchwork
@ 2017-12-11 12:11 ` Imre Deak
0 siblings, 0 replies; 5+ messages in thread
From: Imre Deak @ 2017-12-11 12:11 UTC (permalink / raw)
To: intel-gfx, Chris Wilson
On Fri, Dec 08, 2017 at 05:43:31PM +0000, Patchwork wrote:
> == Series Details ==
>
> Series: igt_fb: Add support for drawing to non-32bit Y/Yf tiled FBs
> URL : https://patchwork.freedesktop.org/series/35093/
> State : warning
Thanks for the review, pushed to igt.
>
> == Summary ==
>
> Test kms_frontbuffer_tracking:
> Subgroup fbc-1p-offscren-pri-shrfb-draw-blt:
> pass -> FAIL (shard-snb) fdo#101623
"""
Primary screen: VGA 1024x768, crtc 0
FBC last action not supported
Can't test PSR: no usable eDP screen.
Sink CRC not supported: primary screen is not eDP
"""
> Test drv_suspend:
> Subgroup fence-restore-tiled2untiled-hibernate:
> skip -> FAIL (shard-hsw) fdo#103375
"PM: Swap header not found!"
Looks like all (real) hibernate tests fail regardless of the platform
right now.
> Subgroup fence-restore-tiled2untiled:
> pass -> SKIP (shard-snb)
"""
rtcwake test failed with 1
This failure could mean that something is
wrong with the rtcwake tool or how your distro is set up.
"""
Maybe innaccurate RTC clock.
> Subgroup debugfs-reader:
> skip -> PASS (shard-hsw)
> Subgroup forcewake:
> skip -> PASS (shard-hsw)
> Test drv_module_reload:
> Subgroup basic-reload:
> dmesg-warn -> PASS (shard-snb) fdo#102848
> dmesg-warn -> PASS (shard-hsw) fdo#102707
> Test gem_tiled_swapping:
> Subgroup non-threaded:
> pass -> INCOMPLETE (shard-hsw) fdo#104009
Looks like a pre-existing issue. From the above bug a pstore log, although for a
different run:
"""
INFO: task gem_tiled_swapp:5950 blocked for more than 60 seconds.
<3>[ 984.536743] Tainted: G U 4.15.0-rc1-CI-CI_DRM_3434+ #1
<3>[ 984.536790] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
<6>[ 984.536845] gem_tiled_swapp D 0 5950 3464 0x00000000
<4>[ 984.536858] Call Trace:
<4>[ 984.536878] ? __schedule+0x3c3/0xaf0
<4>[ 984.536898] schedule+0x37/0x90
<4>[ 984.536910] io_schedule+0xd/0x30
<4>[ 984.536918] __lock_page+0x107/0x130
<4>[ 984.536931] ? add_to_page_cache_lru+0xc0/0xc0
<4>[ 984.536947] deferred_split_scan+0x25a/0x2b0
<4>[ 984.536964] shrink_slab.part.17+0x201/0x5d0
<4>[ 984.536992] drop_slab_node+0x26/0x50
<4>[ 984.537005] drop_caches_sysctl_handler+0x63/0xb0
<4>[ 984.537014] proc_sys_call_handler.isra.14+0xbd/0xe0
<4>[ 984.537032] __vfs_write+0x1e/0x130
<4>[ 984.537041] ? rcu_read_lock_sched_held+0x6f/0x80
<4>[ 984.537048] ? rcu_sync_lockdep_assert+0x25/0x50
<4>[ 984.537056] ? __sb_start_write+0xd5/0x1f0
<4>[ 984.537062] ? __sb_start_write+0xef/0x1f0
<4>[ 984.537075] vfs_write+0xc0/0x1b0
<4>[ 984.537088] SyS_write+0x40/0xa0
<4>[ 984.537100] entry_SYSCALL_64_fastpath+0x1c/0x89
"""
>
> fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
> fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
> fdo#102848 https://bugs.freedesktop.org/show_bug.cgi?id=102848
> fdo#102707 https://bugs.freedesktop.org/show_bug.cgi?id=102707
> fdo#104009 https://bugs.freedesktop.org/show_bug.cgi?id=104009
>
> shard-hsw total:2675 pass:1534 dwarn:1 dfail:0 fail:10 skip:1129 time:9141s
> shard-snb total:2679 pass:1306 dwarn:1 dfail:0 fail:12 skip:1360 time:8073s
> Blacklisted hosts:
> shard-apl total:2657 pass:1655 dwarn:1 dfail:0 fail:22 skip:977 time:13318s
> shard-kbl total:2603 pass:1742 dwarn:1 dfail:0 fail:23 skip:837 time:10703s
>
> == Logs ==
>
> For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_625/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-12-11 12:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-08 14:53 [PATCH i-g-t] igt_fb: Add support for drawing to non-32bit Y/Yf tiled FBs Imre Deak
2017-12-08 15:39 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-12-08 16:06 ` [PATCH i-g-t] " Chris Wilson
2017-12-08 17:43 ` ✗ Fi.CI.IGT: warning for " Patchwork
2017-12-11 12:11 ` Imre Deak
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.