Skip to contentSkip to conversation

lib/igt_fb: Fix -Werror=missing-braces compilation on clang.

PATCH In review Maarten Lankhorst 3 participants 7 messages Nov 19, 2018 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 lib/igt_fb: Fix -Werror=missing-braces compilation on clang.

Clang fails to compile with:
error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]

Make the initializer empty to fix this issue.

---
 lib/igt_fb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
lib/igt_fb.c +2 -2
index 01efd269714b..2462d6ba6fab 100644
@@ -1995,7 +1995,7 @@ static void destroy_cairo_surface__convert(void *arg)
 static void create_cairo_surface__convert(int fd, struct igt_fb *fb)
 {
 	struct fb_convert_blit_upload *blit = malloc(sizeof(*blit));
-	struct fb_convert cvt = { 0 };
+	struct fb_convert cvt = { };
 
 	igt_assert(blit);
 
@@ -2188,7 +2188,7 @@ void igt_remove_fb(int fd, struct igt_fb *fb)
 unsigned int igt_fb_convert(struct igt_fb *dst, struct igt_fb *src,
 			    uint32_t dst_fourcc)
 {
-	struct fb_convert cvt = { 0 };
+	struct fb_convert cvt = { };
 	void *dst_ptr, *src_ptr;
 	int fb_id;
 
Signature · 6 lines
2.19.1

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

PATCH 2/2 tests/i915/gem_render_tiled_blits: Make sure igt_buf is initially zero'd

gen8_bind_buf looks at buf->aux.stride/offset, which is not set by the test. When I added the bpp field, it was enough to make the test fail, fix this by making sure that the buf is initially zero'd explicitly, which fixes the test to run reliably 100% of the time.

---
 tests/i915/gem_render_tiled_blits.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/i915/gem_render_tiled_blits.c +1 -1
index 3007f2abd655..129500616315 100644
@@ -121,7 +121,7 @@ static void run_test (int fd, int count)
 		igt_info("Using a snoop linear buffer for comparisons\n");
 	}
 
-	buf = malloc(sizeof(*buf)*count);
+	buf = calloc(sizeof(*buf), count);
 	start_val = malloc(sizeof(*start_val)*count);
 
 	for (i = 0; i < count; i++) {
Signature · 6 lines
2.19.1

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

Re: [igt-dev] [PATCH i-g-t 2/2] tests/i915/gem_render_tiled_blits: Make sure igt_buf is initially zero'd

Quoting Maarten Lankhorst (2018-11-19 11:05:28)

Quoted 4 lines

gen8_bind_buf looks at buf->aux.stride/offset, which is not set by the test. When I added the bpp field, it was enough to make the test fail, fix this by making sure that the buf is initially zero'd explicitly, which fixes the test to run reliably 100% of the time.

What?
-Chris
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#3 lore raw

Re: [igt-dev] [PATCH i-g-t 2/2] tests/i915/gem_render_tiled_blits: Make sure igt_buf is initially zero'd

Quoting Chris Wilson (2018-11-19 12:05:18)

Quoted 7 lines

Quoting Maarten Lankhorst (2018-11-19 11:05:28)

Quoted 4 lines

gen8_bind_buf looks at buf->aux.stride/offset, which is not set by the test. When I added the bpp field, it was enough to make the test fail, fix this by making sure that the buf is initially zero'd explicitly, which fixes the test to run reliably 100% of the time.

What?

Not gem_tiled_fence_blits, which doesn't use libdrm. -Chris
_______________________________________________
igt-dev mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#4 lore raw

Re: [igt-dev] [PATCH i-g-t 2/2] tests/i915/gem_render_tiled_blits: Make sure igt_buf is initially zero'd

Op 19-11-18 om 13:08 schreef Chris Wilson:

Quoted 9 lines

Quoting Chris Wilson (2018-11-19 12:05:18)

Quoted 6 lines

Quoting Maarten Lankhorst (2018-11-19 11:05:28)

Quoted 4 lines

gen8_bind_buf looks at buf->aux.stride/offset, which is not set by the test. When I added the bpp field, it was enough to make the test fail, fix this by making sure that the buf is initially zero'd explicitly, which fixes the test to run reliably 100% of the time.

What?

Not gem_tiled_fence_blits, which doesn't use libdrm. -Chris

Yeah but gem_render_tiled_blits does, pushed with Petri's irc r-b. :)

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

#5 lore raw

[igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] lib/igt_fb: Fix -Werror=missing-braces compilation on clang.

In reply to Maarten Lankhorst
== Series Details ==

== Series Details ==

Series: series starting with [i-g-t,1/2] lib/igt_fb: Fix -Werror=missing-braces compilation on clang.
URL : https://patchwork.freedesktop.org/series/52685/
State : success

== Summary ==

= CI Bug Log - changes from IGT_4719 -> IGTPW_2073 =

== Summary - SUCCESS ==

No regressions found.

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

== Possible new issues ==

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

=== IGT changes ===

    ==== Possible regressions ====

    {igt@runner@aborted}:
      fi-cfl-8109u:       NOTRUN -> FAIL
      fi-icl-u:           NOTRUN -> FAIL

== Known issues ==

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

=== IGT changes ===

    ==== Issues hit ====

    igt@gem_exec_suspend@basic-s3:
      fi-cfl-8109u:       PASS -> DMESG-WARN (fdo#106612)

    igt@i915_selftest@live_contexts:
      fi-icl-u:           NOTRUN -> INCOMPLETE (fdo#108315)

    igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a-frame-sequence:
      fi-byt-clapper:     PASS -> FAIL (fdo#107362, fdo#103191)

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
      fi-blb-e6850:       PASS -> INCOMPLETE (fdo#107718)

    
    ==== Possible fixes ====

    igt@i915_selftest@live_coherency:
      fi-gdg-551:         DMESG-FAIL (fdo#107164) -> PASS

    igt@kms_pipe_crc_basic@hang-read-crc-pipe-a:
      fi-byt-clapper:     FAIL (fdo#107362, fdo#103191) -> PASS

    igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b:
      fi-byt-clapper:     FAIL (fdo#107362) -> PASS

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

fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#106612 https://bugs.freedesktop.org/show_bug.cgi?id=106612
fdo#107164 https://bugs.freedesktop.org/show_bug.cgi?id=107164
fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
fdo#107718 https://bugs.freedesktop.org/show_bug.cgi?id=107718
fdo#108315 https://bugs.freedesktop.org/show_bug.cgi?id=108315

== Participating hosts (49 -> 47) ==

Additional (2): fi-glk-j4005 fi-icl-u
Missing (4): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-hsw-4200u

== Build changes ==

* IGT: IGT_4719 -> IGTPW_2073

CI_DRM_5154: 2ba924da1cb3a684f538e0c25e2409b942a5a35a @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2073: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2073/
IGT_4719: 38b0749a09755cf94a3d9281ad163e21f37d1e47 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

#6 lore raw

[igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/2] lib/igt_fb: Fix -Werror=missing-braces compilation on clang.

In reply to Maarten Lankhorst
== Series Details ==

== Series Details ==

Series: series starting with [i-g-t,1/2] lib/igt_fb: Fix -Werror=missing-braces compilation on clang.
URL : https://patchwork.freedesktop.org/series/52685/
State : success

== Summary ==

= CI Bug Log - changes from IGT_4719_full -> IGTPW_2073_full =

== Summary - WARNING ==

Minor unknown changes coming with IGTPW_2073_full need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in IGTPW_2073_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/52685/revisions/1/mbox/

== Possible new issues ==

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

=== IGT changes ===

    ==== Possible regressions ====

    {igt@runner@aborted}:
      {shard-iclb}:       NOTRUN -> FAIL

    
    ==== Warnings ====

    igt@pm_rc6_residency@rc6-accuracy:
      shard-kbl:          PASS -> SKIP

== Known issues ==

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

=== IGT changes ===

    ==== Issues hit ====

    igt@gem_exec_schedule@pi-ringfull-bsd:
      {shard-iclb}:       NOTRUN -> FAIL (fdo#103158) +3

    igt@gem_ppgtt@blt-vs-render-ctxn:
      shard-apl:          PASS -> INCOMPLETE (fdo#103927)

    igt@i915_selftest@live_contexts:
      {shard-iclb}:       NOTRUN -> INCOMPLETE (fdo#108315)

    igt@i915_suspend@shrink:
      {shard-iclb}:       NOTRUN -> DMESG-WARN (fdo#108784)

    igt@kms_available_modes_crc@available_mode_test_crc:
      {shard-iclb}:       NOTRUN -> FAIL (fdo#106641)

    igt@kms_busy@extended-modeset-hang-newfb-render-a:
      {shard-iclb}:       NOTRUN -> DMESG-WARN (fdo#107956) +7

    igt@kms_busy@extended-modeset-hang-newfb-render-c:
      {shard-iclb}:       NOTRUN -> DMESG-WARN (fdo#107956, fdo#107724)

    igt@kms_ccs@pipe-a-crc-primary-rotation-180:
      {shard-iclb}:       NOTRUN -> FAIL (fdo#107725) +7

    igt@kms_ccs@pipe-c-bad-pixel-format:
      {shard-iclb}:       NOTRUN -> DMESG-WARN (fdo#107724) +24

    igt@kms_color@pipe-b-legacy-gamma:
      shard-apl:          PASS -> FAIL (fdo#104782) +1

    igt@kms_color@pipe-c-degamma:
      shard-kbl:          PASS -> FAIL (fdo#104782)

    igt@kms_cursor_crc@cursor-128x128-suspend:
      shard-apl:          PASS -> FAIL (fdo#103191, fdo#103232) +1

    igt@kms_cursor_crc@cursor-256x256-random:
      shard-glk:          PASS -> FAIL (fdo#103232) +5

    igt@kms_cursor_crc@cursor-256x256-suspend:
      shard-kbl:          PASS -> FAIL (fdo#103191, fdo#103232)

    igt@kms_cursor_crc@cursor-256x85-onscreen:
      shard-apl:          PASS -> FAIL (fdo#103232) +5

    igt@kms_cursor_crc@cursor-64x21-sliding:
      {shard-iclb}:       NOTRUN -> FAIL (fdo#103232) +22

    igt@kms_cursor_crc@cursor-64x64-dpms:
      shard-kbl:          PASS -> FAIL (fdo#103232)

    igt@kms_cursor_legacy@cursorb-vs-flipb-atomic-transitions-varying-size:
      shard-glk:          PASS -> DMESG-WARN (fdo#106538, fdo#105763) +1

    igt@kms_draw_crc@draw-method-xrgb8888-render-xtiled:
      shard-glk:          PASS -> FAIL (fdo#107791)

    igt@kms_draw_crc@draw-method-xrgb8888-render-ytiled:
      {shard-iclb}:       NOTRUN -> WARN (fdo#108336)

    igt@kms_fbcon_fbt@psr-suspend:
      {shard-iclb}:       NOTRUN -> FAIL (fdo#107882) +1

    igt@kms_flip@flip-vs-expired-vblank-interruptible:
      shard-snb:          PASS -> FAIL (fdo#102887)

    igt@kms_flip_tiling@flip-changes-tiling:
      {shard-iclb}:       NOTRUN -> DMESG-WARN (fdo#108336, fdo#107724) +8

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-cpu:
      shard-kbl:          PASS -> FAIL (fdo#103167) +1

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-gtt:
      shard-apl:          PASS -> FAIL (fdo#103167) +4

    igt@kms_frontbuffer_tracking@fbc-2p-primscrn-cur-indfb-draw-blt:
      shard-glk:          PASS -> FAIL (fdo#103167) +8

    igt@kms_frontbuffer_tracking@fbcpsr-1p-offscren-pri-indfb-draw-render:
      {shard-iclb}:       NOTRUN -> DMESG-FAIL (fdo#107724) +3

    igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-fullscreen:
      {shard-iclb}:       NOTRUN -> FAIL (fdo#103167) +10

    igt@kms_hdmi_inject@inject-audio:
      {shard-iclb}:       NOTRUN -> FAIL (fdo#102370)

    igt@kms_plane@pixel-format-pipe-a-planes:
      {shard-iclb}:       NOTRUN -> FAIL (fdo#103166) +4

    igt@kms_plane@pixel-format-pipe-b-planes:
      shard-apl:          PASS -> FAIL (fdo#103166) +3

    igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max:
      shard-kbl:          PASS -> FAIL (fdo#108145)
      shard-apl:          PASS -> FAIL (fdo#108145)

    igt@kms_plane_alpha_blend@pipe-b-alpha-opaque-fb:
      shard-glk:          PASS -> FAIL (fdo#108145) +3

    igt@kms_plane_multiple@atomic-pipe-c-tiling-x:
      shard-glk:          PASS -> FAIL (fdo#103166)

    igt@kms_properties@connector-properties-atomic:
      {shard-iclb}:       NOTRUN -> FAIL (fdo#108642)

    igt@kms_setmode@basic:
      {shard-iclb}:       NOTRUN -> FAIL (fdo#99912)

    igt@kms_vblank@pipe-a-ts-continuation-dpms-suspend:
      shard-kbl:          PASS -> INCOMPLETE (fdo#103665)

    igt@pm_backlight@fade_with_suspend:
      {shard-iclb}:       NOTRUN -> FAIL (fdo#107847)

    igt@pm_rps@min-max-config-loaded:
      {shard-iclb}:       NOTRUN -> FAIL (fdo#102250)

    igt@pm_rps@reset:
      {shard-iclb}:       NOTRUN -> FAIL (fdo#102250, fdo#108059) +1

    
    ==== Possible fixes ====

    igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-a:
      shard-hsw:          DMESG-WARN (fdo#107956) -> PASS

    igt@kms_cursor_crc@cursor-128x128-random:
      shard-apl:          FAIL (fdo#103232) -> PASS +3

    igt@kms_flip@2x-flip-vs-expired-vblank:
      shard-glk:          FAIL (fdo#105363) -> PASS +1
      shard-hsw:          FAIL (fdo#102887) -> PASS

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-mmap-wc:
      shard-apl:          FAIL (fdo#103167) -> PASS

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-onoff:
      shard-kbl:          FAIL (fdo#103167) -> PASS +1

    igt@kms_frontbuffer_tracking@fbc-2p-primscrn-cur-indfb-draw-mmap-cpu:
      shard-glk:          FAIL (fdo#103167) -> PASS +3

    igt@kms_plane@plane-position-covered-pipe-a-planes:
      shard-apl:          FAIL (fdo#103166) -> PASS +1

    igt@kms_plane_multiple@atomic-pipe-b-tiling-x:
      shard-glk:          FAIL (fdo#103166) -> PASS +1
      shard-kbl:          FAIL (fdo#103166) -> PASS

    igt@kms_setmode@basic:
      shard-kbl:          FAIL (fdo#99912) -> PASS

    igt@kms_vblank@pipe-c-wait-busy:
      shard-glk:          DMESG-WARN (fdo#106538, fdo#105763) -> PASS +1

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

fdo#102250 https://bugs.freedesktop.org/show_bug.cgi?id=102250
fdo#102370 https://bugs.freedesktop.org/show_bug.cgi?id=102370
fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
fdo#103158 https://bugs.freedesktop.org/show_bug.cgi?id=103158
fdo#103166 https://bugs.freedesktop.org/show_bug.cgi?id=103166
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#103232 https://bugs.freedesktop.org/show_bug.cgi?id=103232
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
fdo#104782 https://bugs.freedesktop.org/show_bug.cgi?id=104782
fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
fdo#105763 https://bugs.freedesktop.org/show_bug.cgi?id=105763
fdo#106538 https://bugs.freedesktop.org/show_bug.cgi?id=106538
fdo#106641 https://bugs.freedesktop.org/show_bug.cgi?id=106641
fdo#107724 https://bugs.freedesktop.org/show_bug.cgi?id=107724
fdo#107725 https://bugs.freedesktop.org/show_bug.cgi?id=107725
fdo#107791 https://bugs.freedesktop.org/show_bug.cgi?id=107791
fdo#107847 https://bugs.freedesktop.org/show_bug.cgi?id=107847
fdo#107882 https://bugs.freedesktop.org/show_bug.cgi?id=107882
fdo#107956 https://bugs.freedesktop.org/show_bug.cgi?id=107956
fdo#108059 https://bugs.freedesktop.org/show_bug.cgi?id=108059
fdo#108145 https://bugs.freedesktop.org/show_bug.cgi?id=108145
fdo#108315 https://bugs.freedesktop.org/show_bug.cgi?id=108315
fdo#108336 https://bugs.freedesktop.org/show_bug.cgi?id=108336
fdo#108642 https://bugs.freedesktop.org/show_bug.cgi?id=108642
fdo#108784 https://bugs.freedesktop.org/show_bug.cgi?id=108784
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912

== Participating hosts (6 -> 6) ==

Additional (1): shard-iclb
Missing (1): shard-skl

== Build changes ==

* IGT: IGT_4719 -> IGTPW_2073

CI_DRM_5154: 2ba924da1cb3a684f538e0c25e2409b942a5a35a @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2073: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2073/
IGT_4719: 38b0749a09755cf94a3d9281ad163e21f37d1e47 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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