Skip to contentSkip to conversation

lib/igt_fb: Add a check on stride alignment for pixman conversion

PATCH In review Paul Kocialkowski 2 participants 4 messages Dec 13, 2018 – Jan 14, 2019 Library code

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 lib/igt_fb: Add a check on stride alignment for pixman conversion

Pixman requires buffer strides the be aligned to 32-bit words in order to create internal representations of buffers. If this condition is not met, it will fail and IGT will not be able to report the error cause, making it hard to debug the issue.

Add an explicit check in our code prior to calling pixman when converting buffer so that the error can be understood if it occurs.

---

Changes since v1:
* Added missing Signed-Off-By;
* Added Maxime's Reviewed-By.

 lib/igt_fb.c | 4 ++++
 1 file changed, 4 insertions(+)
lib/igt_fb.c +4 -0
index 2462d6ba6fab..513a66b7098e 100644
@@ -1901,6 +1901,10 @@ static void convert_pixman(struct fb_convert *cvt)
 	igt_assert((src_pixman != PIXMAN_invalid) &&
 		   (dst_pixman != PIXMAN_invalid));
 
+	/* Pixman requires the stride to be aligned to 32 bits. */
+	igt_assert((cvt->src.fb->strides[0] % sizeof(uint32_t)) == 0);
+	igt_assert((cvt->dst.fb->strides[0] % sizeof(uint32_t)) == 0);
+
 	src_ptr = convert_src_get(cvt);
 
 	src_image = pixman_image_create_bits(src_pixman,
Signature · 6 lines
2.19.2

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

[igt-dev] ✓ Fi.CI.BAT: success for lib/igt_fb: Add a check on stride alignment for pixman conversion (rev2)

== Series Details ==

== Series Details ==

Series: lib/igt_fb: Add a check on stride alignment for pixman conversion (rev2)
URL : https://patchwork.freedesktop.org/series/53728/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5311 -> IGTPW_2152
====================================================

Summary
-------

**WARNING**

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

If you think the reported changes have nothing to do with the changes introduced in IGTPW_2152, 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/53728/revisions/2/mbox/

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

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

### IGT changes ###

#### Warnings ####

* igt@kms_pipe_crc_basic@nonblocking-crc-pipe-c:
- fi-kbl-7567u: PASS -> SKIP +33

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

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

### IGT changes ###

#### Issues hit ####

* igt@i915_module_load@reload-with-fault-injection:
- fi-kbl-7567u: PASS -> DMESG-WARN [fdo#105602] / [fdo#108529] +1

* igt@kms_flip@basic-flip-vs-dpms:
- fi-icl-u3: NOTRUN -> DMESG-WARN [fdo#108924] / [fdo#109044]

* 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]

* igt@pm_rpm@module-reload:
- fi-kbl-7567u: PASS -> DMESG-WARN [fdo#108529]

* {igt@runner@aborted}:
- fi-icl-u3: NOTRUN -> FAIL [fdo#108924]
- fi-icl-y: NOTRUN -> FAIL [fdo#108070]

#### Possible fixes ####

* igt@gem_ctx_create@basic-files:
- fi-kbl-7560u: INCOMPLETE [fdo#103665] -> PASS

#### Warnings ####

* igt@kms_chamelium@common-hpd-after-suspend:
- fi-kbl-7567u: DMESG-WARN [fdo#108473] -> DMESG-FAIL [fdo#105079]

{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#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
[fdo#105079]: https://bugs.freedesktop.org/show_bug.cgi?id=105079
[fdo#105602]: https://bugs.freedesktop.org/show_bug.cgi?id=105602
[fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
[fdo#108070]: https://bugs.freedesktop.org/show_bug.cgi?id=108070
[fdo#108473]: https://bugs.freedesktop.org/show_bug.cgi?id=108473
[fdo#108529]: https://bugs.freedesktop.org/show_bug.cgi?id=108529
[fdo#108924]: https://bugs.freedesktop.org/show_bug.cgi?id=108924
[fdo#109044]: https://bugs.freedesktop.org/show_bug.cgi?id=109044

Participating hosts (47 -> 45)
------------------------------

Additional (2): fi-icl-y fi-icl-u3
Missing (4): fi-kbl-soraka fi-ctg-p8600 fi-byt-squawks fi-ilk-m540

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

* IGT: IGT_4746 -> IGTPW_2152

CI_DRM_5311: a42fd8bf199784ee4ff1cdb5ee03eedd9a535d4a @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2152: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2152/
IGT_4746: 2c793666d8c8328733f5769b16ae5858fee97f3f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

#2 lore raw

[igt-dev] ✓ Fi.CI.IGT: success for lib/igt_fb: Add a check on stride alignment for pixman conversion (rev2)

In reply to Paul Kocialkowski
== Series Details ==

== Series Details ==

Series: lib/igt_fb: Add a check on stride alignment for pixman conversion (rev2)
URL : https://patchwork.freedesktop.org/series/53728/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5311_full -> IGTPW_2152_full
====================================================

Summary
-------

**WARNING**

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

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

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

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

### IGT changes ###

#### Warnings ####

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

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_schedule@pi-ringfull-bsd:
- shard-apl: NOTRUN -> FAIL [fdo#103158]

* igt@kms_available_modes_crc@available_mode_test_crc:
- shard-apl: PASS -> FAIL [fdo#106641]

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

* igt@kms_ccs@pipe-b-crc-sprite-planes-basic:
- shard-apl: PASS -> FAIL [fdo#106510] / [fdo#108145]
- shard-kbl: PASS -> FAIL [fdo#107725] / [fdo#108145]

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

* igt@kms_cursor_crc@cursor-256x256-onscreen:
- shard-kbl: PASS -> FAIL [fdo#103232] +1

* igt@kms_cursor_crc@cursor-256x256-random:
- shard-glk: PASS -> FAIL [fdo#103232] +5

* igt@kms_cursor_crc@cursor-64x21-random:
- shard-apl: PASS -> FAIL [fdo#103232] +7

* igt@kms_flip@basic-flip-vs-modeset:
- shard-hsw: PASS -> DMESG-WARN [fdo#102614]

* igt@kms_flip@dpms-vs-vblank-race-interruptible:
- shard-kbl: PASS -> FAIL [fdo#103060]

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

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

* igt@kms_frontbuffer_tracking@fbc-2p-primscrn-cur-indfb-draw-mmap-cpu:
- shard-glk: PASS -> FAIL [fdo#103167] +12

* igt@kms_plane@pixel-format-pipe-c-planes:
- shard-apl: PASS -> FAIL [fdo#103166] +2

* igt@kms_plane_multiple@atomic-pipe-a-tiling-y:
- shard-glk: PASS -> FAIL [fdo#103166] +6
- shard-kbl: PASS -> FAIL [fdo#103166] +1

* igt@kms_rotation_crc@multiplane-rotation-cropping-top:
- shard-kbl: PASS -> DMESG-WARN [fdo#105604]

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

* igt@perf@blocking:
- shard-hsw: PASS -> FAIL [fdo#102252]

#### Possible fixes ####

* igt@kms_cursor_crc@cursor-256x256-sliding:
- shard-glk: FAIL [fdo#103232] -> PASS

* igt@kms_cursor_crc@cursor-256x85-sliding:
- shard-kbl: FAIL [fdo#103232] -> PASS
- shard-apl: FAIL [fdo#103232] -> PASS +1

* igt@kms_cursor_crc@cursor-512x512-onscreen:
- shard-apl: INCOMPLETE [fdo#103927] -> SKIP

* igt@kms_flip@modeset-vs-vblank-race:
- shard-apl: FAIL [fdo#103060] -> PASS

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

* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-indfb-pgflip-blt:
- shard-snb: INCOMPLETE [fdo#105411] / [fdo#107469] -> SKIP

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

* igt@kms_plane_alpha_blend@pipe-c-constant-alpha-max:
- shard-glk: FAIL [fdo#108145] -> PASS +2

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

* igt@kms_vblank@pipe-b-ts-continuation-suspend:
- shard-kbl: INCOMPLETE [fdo#103665] -> PASS

[fdo#102252]: https://bugs.freedesktop.org/show_bug.cgi?id=102252
[fdo#102614]: https://bugs.freedesktop.org/show_bug.cgi?id=102614
[fdo#103060]: https://bugs.freedesktop.org/show_bug.cgi?id=103060
[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#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#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
[fdo#105604]: https://bugs.freedesktop.org/show_bug.cgi?id=105604
[fdo#106510]: https://bugs.freedesktop.org/show_bug.cgi?id=106510
[fdo#106641]: https://bugs.freedesktop.org/show_bug.cgi?id=106641
[fdo#107469]: https://bugs.freedesktop.org/show_bug.cgi?id=107469
[fdo#107725]: https://bugs.freedesktop.org/show_bug.cgi?id=107725
[fdo#107956]: https://bugs.freedesktop.org/show_bug.cgi?id=107956
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108147]: https://bugs.freedesktop.org/show_bug.cgi?id=108147
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912

Participating hosts (7 -> 5)
------------------------------

Missing (2): shard-skl shard-iclb

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

* IGT: IGT_4746 -> IGTPW_2152
* Piglit: piglit_4509 -> None

CI_DRM_5311: a42fd8bf199784ee4ff1cdb5ee03eedd9a535d4a @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2152: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2152/
IGT_4746: 2c793666d8c8328733f5769b16ae5858fee97f3f @ 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_2152/
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#3 lore raw
In reply to Paul Kocialkowski

Hi,

Quoted 7 lines · Paul Kocialkowski

Pixman requires buffer strides the be aligned to 32-bit words in order to create internal representations of buffers. If this condition is not met, it will fail and IGT will not be able to report the error cause, making it hard to debug the issue.

Add an explicit check in our code prior to calling pixman when converting buffer so that the error can be understood if it occurs.

Looks like this patch was reviewed and CI-tested, so it should be ready for inclusion. Would someone like to pick it up?

Thanks in advance!

Cheers,

Paul

Quoted 26 lines

---

Changes since v1:
* Added missing Signed-Off-By;
* Added Maxime's Reviewed-By.

 lib/igt_fb.c | 4 ++++
 1 file changed, 4 insertions(+)
lib/igt_fb.c +4 -0
index 2462d6ba6fab..513a66b7098e 100644
@@ -1901,6 +1901,10 @@ static void convert_pixman(struct fb_convert *cvt)
 	igt_assert((src_pixman != PIXMAN_invalid) &&
 		   (dst_pixman != PIXMAN_invalid));
 
+	/* Pixman requires the stride to be aligned to 32 bits. */
+	igt_assert((cvt->src.fb->strides[0] % sizeof(uint32_t)) == 0);
+	igt_assert((cvt->dst.fb->strides[0] % sizeof(uint32_t)) == 0);
+
 	src_ptr = convert_src_get(cvt);
 
 	src_image = pixman_image_create_bits(src_pixman,
Signature · 8 lines
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com

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