lib/fb: introduce __igt_create_fb_with_bo_size() and __igt_create_fb()
Subsystems (2)
PATCH v2 1/2 lib/fb: introduce __igt_create_fb_with_bo_size() and __igt_create_fb()
They are the same as their non-underscored counterparts, except they will return the error rather than dying when an error occurs.
--- lib/igt_fb.c | 102 +++++++++++++++++++++++++++++++++++++++++++++++++---------- lib/igt_fb.h | 8 +++++ 2 files changed, 94 insertions(+), 16 deletions(-)
lib/igt_fb.c +86 -16
@@ -751,6 +751,7 @@ void igt_paint_image(cairo_t *cr, const char *filename,* @fb: pointer to an #igt_fb structure * @bo_size: size of the backing bo (0 for automatic size) * @bo_stride: stride of the backing bo (0 for automatic stride) +* @fb_id: if not NULL, returns the kms id of the created framebuffer * * This function allocates a gem buffer object suitable to back a framebuffer * with the requested properties and then wraps it up in a drm framebuffer
@@ -759,18 +760,17 @@ void igt_paint_image(cairo_t *cr, const char *filename,* The backing storage of the framebuffer is filled with all zeros, i.e. black * for rgb pixel formats. * -* Returns: -* The kms id of the created framebuffer. +* Returns: 0 in case of success, the error otherwise. */ -unsigned int -igt_create_fb_with_bo_size (int fd,int width,int height, -uint32_t format,uint64_t tiling, -struct igt_fb *fb,unsigned bo_size, -unsigned bo_stride) +int +__igt_create_fb_with_bo_size (int fd,int width,int height, +uint32_t format,uint64_t tiling, +struct igt_fb *fb,unsigned bo_size, +unsigned bo_stride,uint32_t *fb_id/* out */ ) {struct format_desc_struct *f =lookup_drm_format (format); -uint32_t fb_id; -int i; +uint32_t _fb_id; +int ret, i;igt_assert_f (f,"DRM format %08x not found\n" , format);
@@ -789,9 +789,14 @@ igt_create_fb_with_bo_size(int fd, int width, int height,if (tiling !=LOCAL_DRM_FORMAT_MOD_NONE && tiling !=LOCAL_I915_FORMAT_MOD_X_TILED ) { -do_or_die (__kms_addfb (fd, fb->gem_handle, width, height, - fb->stride, format, tiling, fb->offsets, -LOCAL_DRM_MODE_FB_MODIFIERS , &fb_id)); + ret =__kms_addfb (fd, fb->gem_handle, width, height, + fb->stride, format, tiling, fb->offsets, +LOCAL_DRM_MODE_FB_MODIFIERS , &_fb_id); +if (ret) { +igt_debug ("%s: __kms_addfb() failed: %d (%s)\n" , + __func__, errno,strerror (errno)); +return ret; + } }else {uint32_t handles[4 ];uint32_t pitches[4 ];
@@ -806,16 +811,21 @@ igt_create_fb_with_bo_size(int fd, int width, int height, pitches[i] = fb->stride; } -do_or_die (drmModeAddFB2 (fd, width, height, format, - handles, pitches, fb->offsets, - &fb_id,0 )); + ret =drmModeAddFB2 (fd, width, height, format, + handles, pitches, fb->offsets, + &_fb_id,0 ); +if (ret) { +igt_debug ("%s: drmModeAddFB2() failed: %d (%s)\n" , + __func__, errno,strerror (errno)); +return ret; + } } fb->width = width; fb->height = height; fb->tiling = tiling; fb->drm_format = format; - fb->fb_id = fb_id; + fb->fb_id = _fb_id; fb->fd = fd; fb->num_planes = f->planes ?:1 ; fb->plane_bpp[0 ] = f->bpp;
@@ -829,6 +839,44 @@ igt_create_fb_with_bo_size(int fd, int width, int height, fb->plane_width[i] =planar_width (f, width, i); } +if (fb_id) + *fb_id = _fb_id; + +return 0 ; +} + +/** +* igt_create_fb_with_bo_size: +* @fd: open i915 drm file descriptor +* @width: width of the framebuffer in pixel +* @height: height of the framebuffer in pixel +* @format: drm fourcc pixel format code +* @tiling: tiling layout of the framebuffer (as framebuffer modifier) +* @fb: pointer to an #igt_fb structure +* @bo_size: size of the backing bo (0 for automatic size) +* @bo_stride: stride of the backing bo (0 for automatic stride) +* +* This function allocates a gem buffer object suitable to back a framebuffer +* with the requested properties and then wraps it up in a drm framebuffer +* object of the requested size. All metadata is stored in @fb. +* +* The backing storage of the framebuffer is filled with all zeros, i.e. black +* for rgb pixel formats. +* +* Returns: +* The kms id of the created framebuffer. +*/ +unsigned int +igt_create_fb_with_bo_size (int fd,int width,int height, +uint32_t format,uint64_t tiling, +struct igt_fb *fb,unsigned bo_size, +unsigned bo_stride) +{ +uint32_t fb_id; + +do_or_die (__igt_create_fb_with_bo_size (fd, width, height, format, + tiling, fb, bo_size, bo_stride, + &fb_id));return fb_id; }
@@ -858,6 +906,28 @@ unsigned int igt_create_fb(int fd, int width, int height, uint32_t format, 0, 0); } +/** +* __igt_create_fb: +* @fd: open i915 drm file descriptor +* @width: width of the framebuffer in pixel +* @height: height of the framebuffer in pixel +* @format: drm fourcc pixel format code +* @tiling: tiling layout of the framebuffer +* @fb: pointer to an #igt_fb structure +* @fb_id: if not NULL, returns the kms id of the created framebuffer +* +* Same as igt_create_fb, but return an error if it failed rather than failing. +* +* Returns: 0 in case of success, the error otherwise. +*/ +int __igt_create_fb (int fd,int width,int height,uint32_t format, +uint64_t tiling,struct igt_fb *fb, +uint32_t *fb_id/* out */ ) +{ +return __igt_create_fb_with_bo_size (fd, width, height, format, tiling, + fb,0 ,0 , fb_id); +} +/** * igt_create_color_fb: * @fd: open i915 drm file descriptor
lib/igt_fb.h +8 -0
@@ -102,11 +102,19 @@ void igt_get_fb_tile_size(int fd, uint64_t tiling, int fb_bpp, unsigned *width_ret, unsigned *height_ret);void igt_calc_fb_size (int fd,int width,int height,uint32_t format,uint64_t tiling,unsigned *size_ret,unsigned *stride_ret); +int +__igt_create_fb_with_bo_size (int fd,int width,int height, +uint32_t format,uint64_t tiling, +struct igt_fb *fb,unsigned bo_size, +unsigned bo_stride,uint32_t *fb_id/* out */ );unsigned int igt_create_fb_with_bo_size (int fd,int width,int height,uint32_t format,uint64_t tiling,struct igt_fb *fb,unsigned bo_size,unsigned bo_stride); +int __igt_create_fb (int fd,int width,int height,uint32_t format, +uint64_t tiling,struct igt_fb *fb, +uint32_t *fb_id/* out */ );unsigned int igt_create_fb (int fd,int width,int height,uint32_t format,uint64_t tiling,struct igt_fb *fb); unsigned int igt_create_color_fb(int fd, int width, int height,
Signature · 6 lines
2.16.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
PATCH v2 2/2 add a kms_fb_stride test
This test checks what strides are actually supported by each plane of each pipe. The tested strides are 4K, 8K, and 16K. The tested formats are DRM_FORMAT_RGB565 (16 bits) and DRM_FORMAT_XRGB8888 (32 bits).
To verify that the display controler is OK with the stride, the test uses the pipe crc and verifies that a test image blitted to a hdisplay x vdisplay framebuffer appears the same when blitted to a stride x vdisplay framebuffer (with stride varying from 4K to 16K).
Any thoughts?
v2:
- SKIP when a stride/format is not supported by the kernel
- perform a modeset at a low resolution on all pipes before running a test in order to be fast and provide coverage even without a display attached (requires a VGA or HDMI connector).
- generate a subtest per pipe, plane, format and stride
--- tests/Makefile.sources | 1 + tests/kms_fb_stride.c | 312 +++++++++++++++++++++++++++++++++++++++++++++++++ tests/meson.build | 1 + 3 files changed, 314 insertions(+) create mode 100644 tests/kms_fb_stride.c
tests/Makefile.sources +1 -0
@@ -181,6 +181,7 @@ TESTS_progs = \ kms_cursor_legacy \ kms_draw_crc \ kms_fbcon_fbt \ + kms_fb_stride \ kms_fence_pin_leak \ kms_flip \ kms_flip_event_leak \
tests/kms_fb_stride.c new file +312 -0
312 lines not on this page · raw message
tests/meson.build +1 -0
@@ -159,6 +159,7 @@ test_progs = [ 'kms_cursor_legacy', 'kms_draw_crc', 'kms_fbcon_fbt', + 'kms_fb_stride', 'kms_fence_pin_leak', 'kms_flip', 'kms_flip_event_leak',
Signature · 6 lines
2.16.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
PATCH v3 1/1 add a kms_fb_stride test
This test checks what strides are actually supported by each plane of each pipe. The tested strides are 4K, 8K, and 16K. The tested formats are DRM_FORMAT_RGB565 (16 bits) and DRM_FORMAT_XRGB8888 (32 bits).
To verify that the display controler is OK with the stride, the test uses the pipe crc and verifies that a test image blitted to a hdisplay x vdisplay framebuffer appears the same when blitted to a stride x vdisplay framebuffer (with stride varying from 4K to 16K).
v2:
- SKIP when a stride/format is not supported by the kernel
- perform a modeset at a low resolution on all pipes before running a test in order to be fast and provide coverage even without a display attached (requires a VGA or HDMI connector).
- generate a subtest per pipe, plane, format and stride
v3:
- if not VGA or HDMI connectors are found, fallback to any connected connector
--- tests/Makefile.sources | 1 + tests/kms_fb_stride.c | 323 +++++++++++++++++++++++++++++++++++++++++++++++++ tests/meson.build | 1 + 3 files changed, 325 insertions(+) create mode 100644 tests/kms_fb_stride.c
tests/Makefile.sources +1 -0
@@ -181,6 +181,7 @@ TESTS_progs = \ kms_cursor_legacy \ kms_draw_crc \ kms_fbcon_fbt \ + kms_fb_stride \ kms_fence_pin_leak \ kms_flip \ kms_flip_event_leak \
tests/kms_fb_stride.c new file +323 -0
323 lines not on this page · raw message
tests/meson.build +1 -0
@@ -159,6 +159,7 @@ test_progs = [ 'kms_cursor_legacy', 'kms_draw_crc', 'kms_fbcon_fbt', + 'kms_fb_stride', 'kms_fence_pin_leak', 'kms_flip', 'kms_flip_event_leak',
Signature · 6 lines
2.16.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v2,1/2] lib/fb: introduce __igt_create_fb_with_bo_size() and __igt_create_fb()
In reply to Martin Peres== Series Details ==
== Series Details ==
Series: series starting with [i-g-t,v2,1/2] lib/fb: introduce __igt_create_fb_with_bo_size() and __igt_create_fb()
URL : https://patchwork.freedesktop.org/series/38268/
State : success
== Summary ==
IGT patchset tested on top of latest successful build 1d227a47223d2ff5c6745c0d82e96e70d456d5de lib/kms: Clear unused fields for getproperty ioctl
with latest DRM-Tip kernel build CI_DRM_37745ad7866768dc drm-tip: 2018y-02m-14d-15h-14m-50s UTC integration manifest
Testlist changes:
+++ 144 lines
--- 0 lines
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
pass -> INCOMPLETE (fi-snb-2520m) fdo#103713fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fi-bdw-5557u total:288 pass:267 dwarn:0 dfail:0 fail:0 skip:21 time:422s fi-bdw-gvtdvm total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:435s fi-blb-e6850 total:288 pass:223 dwarn:1 dfail:0 fail:0 skip:64 time:378s fi-bsw-n3050 total:288 pass:242 dwarn:0 dfail:0 fail:0 skip:46 time:494s fi-bwr-2160 total:288 pass:183 dwarn:0 dfail:0 fail:0 skip:105 time:289s fi-bxt-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:484s fi-bxt-j4205 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:486s fi-byt-j1900 total:288 pass:253 dwarn:0 dfail:0 fail:0 skip:35 time:474s fi-byt-n2820 total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:464s fi-cfl-s2 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:569s fi-cnl-y3 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:574s fi-elk-e7500 total:288 pass:229 dwarn:0 dfail:0 fail:0 skip:59 time:419s fi-gdg-551 total:288 pass:179 dwarn:0 dfail:0 fail:1 skip:108 time:283s fi-glk-1 total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:511s fi-hsw-4770 total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:390s fi-ilk-650 total:288 pass:228 dwarn:0 dfail:0 fail:0 skip:60 time:413s fi-ivb-3520m total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:461s fi-ivb-3770 total:288 pass:255 dwarn:0 dfail:0 fail:0 skip:33 time:414s fi-kbl-7500u total:288 pass:263 dwarn:1 dfail:0 fail:0 skip:24 time:461s fi-kbl-7560u total:288 pass:269 dwarn:0 dfail:0 fail:0 skip:19 time:497s fi-kbl-r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:502s fi-pnv-d510 total:288 pass:222 dwarn:1 dfail:0 fail:0 skip:65 time:574s fi-skl-6260u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:434s fi-skl-6600u total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:508s fi-skl-6700hq total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:530s fi-skl-6700k2 total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:488s fi-skl-6770hq total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:479s fi-skl-guc total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:413s fi-skl-gvtdvm total:288 pass:265 dwarn:0 dfail:0 fail:0 skip:23 time:433s fi-snb-2520m total:245 pass:211 dwarn:0 dfail:0 fail:0 skip:33 fi-snb-2600 total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:403s Blacklisted hosts: fi-glk-dsi total:246 pass:218 dwarn:0 dfail:0 fail:1 skip:26 fi-kbl-7567u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:455s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_914/issues.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✗ Fi.CI.IGT: failure for series starting with [i-g-t,v2,1/2] lib/fb: introduce __igt_create_fb_with_bo_size() and __igt_create_fb()
In reply to Martin Peres== Series Details ==
== Series Details ==
Series: series starting with [i-g-t,v2,1/2] lib/fb: introduce __igt_create_fb_with_bo_size() and __igt_create_fb()
URL : https://patchwork.freedesktop.org/series/38268/
State : failure
== Summary ==
Test kms_plane:
Subgroup plane-panning-bottom-right-suspend-pipe-a-planes:
pass -> INCOMPLETE (shard-hsw) fdo#103540 +1
Test gem_eio:
Subgroup in-flight-external:
fail -> PASS (shard-hsw) fdo#104676
Test kms_vblank:
Subgroup pipe-a-ts-continuation-modeset:
skip -> PASS (shard-snb)
Subgroup crtc-id:
skip -> PASS (shard-snb)
Test perf_pmu:
Subgroup render-node-busy-idle-vcs0:
pass -> FAIL (shard-snb)
Subgroup busy-idle-rcs0:
pass -> FAIL (shard-apl)
Test kms_cursor_legacy:
Subgroup flip-vs-cursor-legacy:
pass -> FAIL (shard-hsw) fdo#102670
Test perf:
Subgroup oa-exponents:
fail -> PASS (shard-apl) fdo#102254
Test kms_force_connector_basic:
Subgroup force-load-detect:
skip -> PASS (shard-snb)
Test kms_draw_crc:
Subgroup draw-method-xrgb2101010-mmap-wc-xtiled:
pass -> SKIP (shard-snb)fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#104676 https://bugs.freedesktop.org/show_bug.cgi?id=104676
fdo#102670 https://bugs.freedesktop.org/show_bug.cgi?id=102670
fdo#102254 https://bugs.freedesktop.org/show_bug.cgi?id=102254
shard-apl total:3553 pass:1766 dwarn:1 dfail:0 fail:21 skip:1764 time:13953s shard-hsw total:3537 pass:1752 dwarn:1 dfail:0 fail:11 skip:1771 time:14212s shard-snb total:3571 pass:1358 dwarn:1 dfail:0 fail:11 skip:2201 time:7684s
Blacklisted hosts:
shard-kbl total:3534 pass:1888 dwarn:1 dfail:0 fail:18 skip:1625 time:10660s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_914/shards.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v2,1/2] lib/fb: introduce __igt_create_fb_with_bo_size() and __igt_create_fb() (rev2)
In reply to Martin Peres== Series Details ==
== Series Details ==
Series: series starting with [i-g-t,v2,1/2] lib/fb: introduce __igt_create_fb_with_bo_size() and __igt_create_fb() (rev2)
URL : https://patchwork.freedesktop.org/series/38268/
State : success
== Summary ==
IGT patchset tested on top of latest successful build 8de9f5f973fe7e8e96e4327ecd2c02d3dce24a1f tests/perf_pmu: Verify engine busyness accuracy
with latest DRM-Tip kernel build CI_DRM_37853313cf61f29d drm-tip: 2018y-02m-16d-16h-19m-05s UTC integration manifest
Testlist changes:
+++ 144 lines
--- 0 lines
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
incomplete -> PASS (fi-snb-2520m) fdo#103713fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fi-bdw-5557u total:288 pass:267 dwarn:0 dfail:0 fail:0 skip:21 time:419s fi-bdw-gvtdvm total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:425s fi-blb-e6850 total:288 pass:223 dwarn:1 dfail:0 fail:0 skip:64 time:378s fi-bsw-n3050 total:288 pass:242 dwarn:0 dfail:0 fail:0 skip:46 time:494s fi-bwr-2160 total:288 pass:183 dwarn:0 dfail:0 fail:0 skip:105 time:289s fi-bxt-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:487s fi-bxt-j4205 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:487s fi-byt-j1900 total:288 pass:253 dwarn:0 dfail:0 fail:0 skip:35 time:473s fi-byt-n2820 total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:470s fi-cfl-s2 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:581s fi-cnl-y3 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:582s fi-elk-e7500 total:288 pass:229 dwarn:0 dfail:0 fail:0 skip:59 time:419s fi-gdg-551 total:288 pass:179 dwarn:0 dfail:0 fail:1 skip:108 time:286s fi-glk-1 total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:510s fi-hsw-4770 total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:391s fi-ilk-650 total:288 pass:228 dwarn:0 dfail:0 fail:0 skip:60 time:413s fi-ivb-3520m total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:460s fi-ivb-3770 total:288 pass:255 dwarn:0 dfail:0 fail:0 skip:33 time:409s fi-kbl-7500u total:288 pass:263 dwarn:1 dfail:0 fail:0 skip:24 time:457s fi-kbl-7560u total:288 pass:269 dwarn:0 dfail:0 fail:0 skip:19 time:498s fi-kbl-7567u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:454s fi-kbl-r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:504s fi-pnv-d510 total:288 pass:222 dwarn:1 dfail:0 fail:0 skip:65 time:573s fi-skl-6260u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:435s fi-skl-6600u total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:512s fi-skl-6700hq total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:528s fi-skl-6700k2 total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:493s fi-skl-6770hq total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:478s fi-skl-guc total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:414s fi-skl-gvtdvm total:288 pass:265 dwarn:0 dfail:0 fail:0 skip:23 time:433s fi-snb-2520m total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:534s fi-snb-2600 total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:399s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_939/issues.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,v2,1/2] lib/fb: introduce __igt_create_fb_with_bo_size() and __igt_create_fb() (rev2)
In reply to Martin Peres== Series Details ==
== Series Details ==
Series: series starting with [i-g-t,v2,1/2] lib/fb: introduce __igt_create_fb_with_bo_size() and __igt_create_fb() (rev2)
URL : https://patchwork.freedesktop.org/series/38268/
State : success
== Summary ==
Test kms_flip:
Subgroup dpms-vs-vblank-race:
pass -> FAIL (shard-hsw) fdo#103060
Test perf:
Subgroup oa-exponents:
pass -> FAIL (shard-apl) fdo#102254
Test kms_frontbuffer_tracking:
Subgroup fbc-1p-pri-indfb-multidraw:
pass -> FAIL (shard-snb) fdo#103167 +1
Subgroup fbc-1p-primscrn-shrfb-pgflip-blt:
pass -> FAIL (shard-apl) fdo#101623
Test gem_eio:
Subgroup in-flight:
dmesg-warn -> PASS (shard-snb) fdo#104058
Test kms_cursor_legacy:
Subgroup flip-vs-cursor-atomic-transitions-varying-size:
fail -> PASS (shard-apl) fdo#102670fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
fdo#102254 https://bugs.freedesktop.org/show_bug.cgi?id=102254
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#104058 https://bugs.freedesktop.org/show_bug.cgi?id=104058
fdo#102670 https://bugs.freedesktop.org/show_bug.cgi?id=102670
shard-apl total:3566 pass:1820 dwarn:1 dfail:0 fail:17 skip:1727 time:12352s shard-hsw total:3574 pass:1773 dwarn:1 dfail:0 fail:5 skip:1794 time:11778s shard-snb total:3574 pass:1358 dwarn:1 dfail:0 fail:5 skip:2210 time:6666s
Blacklisted hosts:
shard-kbl total:3556 pass:1923 dwarn:1 dfail:0 fail:16 skip:1615 time:9616s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_939/shards.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoted 29 lines · Martin Peres
They are the same as their non-underscored counterparts, except they will return the error rather than dying when an error occurs.
Signed-off-by Martin Peres <[email protected]>--- lib/igt_fb.c | 102 +++++++++++++++++++++++++++++++++++++++++++++++++---------- lib/igt_fb.h | 8 +++++ 2 files changed, 94 insertions(+), 16 deletions(-)lib/igt_fb.c +2
-2@@ -751,6 +751,7 @@ void igt_paint_image(cairo_t *cr, const char *filename,* @fb: pointer to an #igt_fb structure * @bo_size: size of the backing bo (0 for automatic size) * @bo_stride: stride of the backing bo (0 for automatic stride) +* @fb_id: if not NULL, returns the kms id of the created framebuffer * * This function allocates a gem buffer object suitable to back a framebuffer * with the requested properties and then wraps it up in a drm framebuffer @@ -759,18 +760,17 @@ void igt_paint_image(cairo_t *cr, const char *filename,* The backing storage of the framebuffer is filled with all zeros, i.e. black * for rgb pixel formats. * -* Returns: -* The kms id of the created framebuffer. +* Returns: 0 in case of success, the error otherwise. */
lib/igt_fb.c void igt_paint_image(cairo_t *cr, const char *filename, · line 769
Quoted 10 lines
lib/igt_fb.c +5
-5-unsigned int -igt_create_fb_with_bo_size (int fd,int width,int height, -uint32_t format,uint64_t tiling, -struct igt_fb *fb,unsigned bo_size, -unsigned bo_stride) +int +__igt_create_fb_with_bo_size (int fd,int width,int height, +uint32_t format,uint64_t tiling, +struct igt_fb *fb,unsigned bo_size, +unsigned bo_stride,uint32_t *fb_id/* out */ )
We'll stuff the fb_id into fb->fb_id, so I think we shouldn't need the the out parameter.
Apart from that things look reasonable to me.
Quoted 158 lines
lib/igt_fb.c +79
-9{struct format_desc_struct *f =lookup_drm_format (format); -uint32_t fb_id; -int i; +uint32_t _fb_id; +int ret, i;igt_assert_f (f,"DRM format %08x not found\n" , format);@@ -789,9 +789,14 @@ igt_create_fb_with_bo_size(int fd, int width, int height,if (tiling !=LOCAL_DRM_FORMAT_MOD_NONE && tiling !=LOCAL_I915_FORMAT_MOD_X_TILED ) { -do_or_die (__kms_addfb (fd, fb->gem_handle, width, height, - fb->stride, format, tiling, fb->offsets, -LOCAL_DRM_MODE_FB_MODIFIERS , &fb_id)); + ret =__kms_addfb (fd, fb->gem_handle, width, height, + fb->stride, format, tiling, fb->offsets, +LOCAL_DRM_MODE_FB_MODIFIERS , &_fb_id); +if (ret) { +igt_debug ("%s: __kms_addfb() failed: %d (%s)\n" , + __func__, errno,strerror (errno)); +return ret; + } }else {uint32_t handles[4 ];uint32_t pitches[4 ];@@ -806,16 +811,21 @@ igt_create_fb_with_bo_size(int fd, int width, int height, pitches[i] = fb->stride; } -do_or_die (drmModeAddFB2 (fd, width, height, format, - handles, pitches, fb->offsets, - &fb_id,0 )); + ret =drmModeAddFB2 (fd, width, height, format, + handles, pitches, fb->offsets, + &_fb_id,0 ); +if (ret) { +igt_debug ("%s: drmModeAddFB2() failed: %d (%s)\n" , + __func__, errno,strerror (errno)); +return ret; + } } fb->width = width; fb->height = height; fb->tiling = tiling; fb->drm_format = format; - fb->fb_id = fb_id; + fb->fb_id = _fb_id; fb->fd = fd; fb->num_planes = f->planes ?:1 ; fb->plane_bpp[0 ] = f->bpp;@@ -829,6 +839,44 @@ igt_create_fb_with_bo_size(int fd, int width, int height, fb->plane_width[i] =planar_width (f, width, i); } +if (fb_id) + *fb_id = _fb_id; + +return 0 ; +} + +/** +* igt_create_fb_with_bo_size: +* @fd: open i915 drm file descriptor +* @width: width of the framebuffer in pixel +* @height: height of the framebuffer in pixel +* @format: drm fourcc pixel format code +* @tiling: tiling layout of the framebuffer (as framebuffer modifier) +* @fb: pointer to an #igt_fb structure +* @bo_size: size of the backing bo (0 for automatic size) +* @bo_stride: stride of the backing bo (0 for automatic stride) +* +* This function allocates a gem buffer object suitable to back a framebuffer +* with the requested properties and then wraps it up in a drm framebuffer +* object of the requested size. All metadata is stored in @fb. +* +* The backing storage of the framebuffer is filled with all zeros, i.e. black +* for rgb pixel formats. +* +* Returns: +* The kms id of the created framebuffer. +*/ +unsigned int +igt_create_fb_with_bo_size (int fd,int width,int height, +uint32_t format,uint64_t tiling, +struct igt_fb *fb,unsigned bo_size, +unsigned bo_stride) +{ +uint32_t fb_id; + +do_or_die (__igt_create_fb_with_bo_size (fd, width, height, format, + tiling, fb, bo_size, bo_stride, + &fb_id));return fb_id; }@@ -858,6 +906,28 @@ unsigned int igt_create_fb(int fd, int width, int height, uint32_t format, 0, 0); } +/** +* __igt_create_fb: +* @fd: open i915 drm file descriptor +* @width: width of the framebuffer in pixel +* @height: height of the framebuffer in pixel +* @format: drm fourcc pixel format code +* @tiling: tiling layout of the framebuffer +* @fb: pointer to an #igt_fb structure +* @fb_id: if not NULL, returns the kms id of the created framebuffer +* +* Same as igt_create_fb, but return an error if it failed rather than failing. +* +* Returns: 0 in case of success, the error otherwise. +*/ +int __igt_create_fb (int fd,int width,int height,uint32_t format, +uint64_t tiling,struct igt_fb *fb, +uint32_t *fb_id/* out */ ) +{ +return __igt_create_fb_with_bo_size (fd, width, height, format, tiling, + fb,0 ,0 , fb_id); +} +/** * igt_create_color_fb: * @fd: open i915 drm file descriptor lib/igt_fb.h +8
-0@@ -102,11 +102,19 @@ void igt_get_fb_tile_size(int fd, uint64_t tiling, int fb_bpp, unsigned *width_ret, unsigned *height_ret);void igt_calc_fb_size (int fd,int width,int height,uint32_t format,uint64_t tiling,unsigned *size_ret,unsigned *stride_ret); +int +__igt_create_fb_with_bo_size (int fd,int width,int height, +uint32_t format,uint64_t tiling, +struct igt_fb *fb,unsigned bo_size, +unsigned bo_stride,uint32_t *fb_id/* out */ );unsigned int igt_create_fb_with_bo_size (int fd,int width,int height,uint32_t format,uint64_t tiling,struct igt_fb *fb,unsigned bo_size,unsigned bo_stride); +int __igt_create_fb (int fd,int width,int height,uint32_t format, +uint64_t tiling,struct igt_fb *fb, +uint32_t *fb_id/* out */ );unsigned int igt_create_fb (int fd,int width,int height,uint32_t format,uint64_t tiling,struct igt_fb *fb); unsigned int igt_create_color_fb(int fd, int width, int height,Signature · 6 lines
2.16.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev