Skip to contentSkip to conversation

tools/intel_dp_compliance: Use ARGB8888 format fbs for Gen 10

PATCH Superseded Radhakrishna Sripada 3 participants 4 messages Jul 10, 2018 – Jul 11, 2018

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 tools/intel_dp_compliance: Use ARGB8888 format fbs for Gen 10

According to Display WA #1172, to truly bypass the color data on Gen 10 use ARGB8888 instead of XRGB8888 to pass compliance.

v2: Use ARGB8888 format only for video pattern fb, set per pixel alpha

    value to 0xff in fill_framebuffer.(Imre)
---
 tools/intel_dp_compliance.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
tools/intel_dp_compliance.c +9 -3
index c40548e79227..468416293ef2 100644
@@ -175,7 +175,7 @@ static int tio_fd;
 struct termios saved_tio;
 
 drmModeRes *resources;
-int drm_fd, modes;
+int drm_fd, modes, gen;
 uint64_t tiling = LOCAL_DRM_FORMAT_MOD_NONE;
 uint32_t depth = 24, stride, bpp;
 int specified_mode_num = -1, specified_disp_id = -1;
@@ -506,9 +506,13 @@ static int setup_video_pattern_framebuffer(struct connector *dp_conn)
 
 	video_width = dp_conn->test_pattern.hdisplay;
 	video_height = dp_conn->test_pattern.vdisplay;
+	/*
+	 * Display WA1172: Gen10 To pass the color data unaffected set either
+	 * per-pixel alpha or Plane alpha to 0xff. Use ARGB8888 and set alpha to 0xff.
+	 */
 	dp_conn->test_pattern.fb = igt_create_fb(drm_fd,
 						 video_width, video_height,
-						 DRM_FORMAT_XRGB8888,
+						 gen == 10 ? DRM_FORMAT_ARGB8888 : DRM_FORMAT_XRGB8888,
 						 LOCAL_DRM_FORMAT_MOD_NONE,
 						 &dp_conn->test_pattern.fb_pattern);
 	igt_assert(dp_conn->test_pattern.fb);
@@ -557,7 +561,8 @@ static int fill_framebuffer(struct connector *dp_conn)
 			red_ptr[x] = pixel_val << 16;
 			green_ptr[x] = pixel_val << 8;
 			blue_ptr[x] = pixel_val << 0;
-			white_ptr[x] = red_ptr[x] | green_ptr[x] | blue_ptr[x];
+			white_ptr[x] = gen == 10 ? 0xff : (red_ptr[x] |
+				       green_ptr[x] | blue_ptr[x]);
 			if (++x >= video_width)
 				break;
 		}
@@ -1036,6 +1041,7 @@ int main(int argc, char **argv)
 	set_termio_mode();
 
 	drm_fd = drm_open_driver(DRIVER_ANY);
+	gen = intel_gen(intel_get_drm_devid(drm_fd));
 
 	kmstest_set_vt_graphics_mode();
 	setup_debugfs_files();
Signature · 6 lines
2.9.3

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

[igt-dev] ✓ Fi.CI.BAT: success for tools/intel_dp_compliance: Use ARGB8888 format fbs for Gen 10 (rev2)

== Series Details ==

== Series Details ==

Series: tools/intel_dp_compliance: Use ARGB8888 format fbs for Gen 10 (rev2)
URL : https://patchwork.freedesktop.org/series/45684/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4466 -> IGTPW_1552 =

== Summary - SUCCESS ==

No regressions found.

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

== Possible new issues ==

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

=== IGT changes ===

    ==== Possible regressions ====

    igt@gem_mmap_gtt@basic-copy:
      {fi-kbl-8809g}:     NOTRUN -> DMESG-WARN +7

== Known issues ==

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

=== IGT changes ===

    ==== Possible fixes ====

    igt@kms_flip@basic-flip-vs-dpms:
      fi-skl-6700hq:      DMESG-WARN (fdo#105998) -> PASS

    igt@kms_pipe_crc_basic@hang-read-crc-pipe-b:
      {fi-skl-iommu}:     FAIL (fdo#106686) -> SKIP +2

    
    ==== Warnings ====

    igt@gem_exec_suspend@basic-s4-devices:
      {fi-kbl-8809g}:     INCOMPLETE (fdo#107139) -> DMESG-WARN (fdo#107139)

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

fdo#105998 https://bugs.freedesktop.org/show_bug.cgi?id=105998
fdo#106686 https://bugs.freedesktop.org/show_bug.cgi?id=106686
fdo#107139 https://bugs.freedesktop.org/show_bug.cgi?id=107139

== Participating hosts (45 -> 41) ==

Additional (1): fi-kbl-guc
Missing (5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u

== Build changes ==

* IGT: IGT_4545 -> IGTPW_1552

CI_DRM_4466: 40ea4d696481930682c782e8dd7bd0cdbdfad574 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1552: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1552/
IGT_4545: c3035d8cb11459f186f712d9c7ebb6734fc99831 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

#2 lore raw

[igt-dev] ✓ Fi.CI.IGT: success for tools/intel_dp_compliance: Use ARGB8888 format fbs for Gen 10 (rev2)

In reply to Radhakrishna Sripada
== Series Details ==

== Series Details ==

Series: tools/intel_dp_compliance: Use ARGB8888 format fbs for Gen 10 (rev2)
URL : https://patchwork.freedesktop.org/series/45684/
State : success

== Summary ==

= CI Bug Log - changes from IGT_4545_full -> IGTPW_1552_full =

== Summary - WARNING ==

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

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

== Possible new issues ==

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

=== IGT changes ===

    ==== Warnings ====

    igt@gem_exec_schedule@deep-bsd1:
      shard-kbl:          PASS -> SKIP +1

    igt@gem_mocs_settings@mocs-rc6-bsd1:
      shard-kbl:          SKIP -> PASS

    igt@kms_draw_crc@draw-method-xrgb8888-pwrite-xtiled:
      shard-snb:          SKIP -> PASS +1

== Known issues ==

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

=== IGT changes ===

    ==== Issues hit ====

    igt@gem_ctx_isolation@vcs0-s3:
      shard-glk:          PASS -> FAIL (fdo#103375)

    igt@gem_pwrite_snooped:
      shard-snb:          PASS -> INCOMPLETE (fdo#105411)

    igt@gem_workarounds@suspend-resume:
      shard-kbl:          PASS -> INCOMPLETE (fdo#103665) +1

    igt@kms_cursor_legacy@2x-nonblocking-modeset-vs-cursor-atomic:
      shard-glk:          PASS -> FAIL (fdo#106509, fdo#105454)

    igt@kms_cursor_legacy@cursor-vs-flip-atomic-transitions:
      shard-hsw:          PASS -> FAIL (fdo#103355)

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

    igt@kms_rotation_crc@sprite-rotation-180:
      shard-snb:          PASS -> FAIL (fdo#103925)

    
    ==== Possible fixes ====

    igt@drv_module_reload@basic-reload-inject:
      shard-glk:          DMESG-WARN -> PASS

    igt@gem_ppgtt@blt-vs-render-ctx0:
      shard-kbl:          INCOMPLETE (fdo#103665, fdo#106023) -> PASS

    igt@kms_available_modes_crc@available_mode_test_crc:
      shard-snb:          FAIL (fdo#106641) -> PASS

    igt@kms_flip@2x-plain-flip-ts-check-interruptible:
      shard-glk:          FAIL (fdo#100368) -> PASS +2

    igt@kms_flip_tiling@flip-to-x-tiled:
      shard-glk:          FAIL (fdo#107161, fdo#103822) -> PASS

    igt@perf@polling:
      shard-hsw:          FAIL (fdo#102252) -> PASS

fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
fdo#103355 https://bugs.freedesktop.org/show_bug.cgi?id=103355
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#103822 https://bugs.freedesktop.org/show_bug.cgi?id=103822
fdo#103925 https://bugs.freedesktop.org/show_bug.cgi?id=103925
fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
fdo#105454 https://bugs.freedesktop.org/show_bug.cgi?id=105454
fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
fdo#106509 https://bugs.freedesktop.org/show_bug.cgi?id=106509
fdo#106641 https://bugs.freedesktop.org/show_bug.cgi?id=106641
fdo#107161 https://bugs.freedesktop.org/show_bug.cgi?id=107161

== Participating hosts (5 -> 5) ==

No changes in participating hosts

== Build changes ==

* IGT: IGT_4545 -> IGTPW_1552
* Linux: CI_DRM_4463 -> CI_DRM_4466

CI_DRM_4463: 756ded1fe53d1449d239c6b34f97e03e478a8a38 @ git://anongit.freedesktop.org/gfx-ci/linux
CI_DRM_4466: 40ea4d696481930682c782e8dd7bd0cdbdfad574 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1552: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1552/
IGT_4545: c3035d8cb11459f186f712d9c7ebb6734fc99831 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

#3 lore raw
In reply to Radhakrishna Sripada
Quoted 42 lines · Radhakrishna Sripada

According to Display WA #1172, to truly bypass the color data on Gen 10 use ARGB8888 instead of XRGB8888 to pass compliance.

v2: Use ARGB8888 format only for video pattern fb, set per pixel alpha

    value to 0xff in fill_framebuffer.(Imre)
---
 tools/intel_dp_compliance.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
tools/intel_dp_compliance.c +6 -2
index c40548e79227..468416293ef2 100644
@@ -175,7 +175,7 @@ static int tio_fd;
 struct termios saved_tio;
 
 drmModeRes *resources;
-int drm_fd, modes;
+int drm_fd, modes, gen;
 uint64_t tiling = LOCAL_DRM_FORMAT_MOD_NONE;
 uint32_t depth = 24, stride, bpp;
 int specified_mode_num = -1, specified_disp_id = -1;
@@ -506,9 +506,13 @@ static int setup_video_pattern_framebuffer(struct connector *dp_conn)
 
 	video_width = dp_conn->test_pattern.hdisplay;
 	video_height = dp_conn->test_pattern.vdisplay;
+	/*
+	 * Display WA1172: Gen10 To pass the color data unaffected set either
+	 * per-pixel alpha or Plane alpha to 0xff. Use ARGB8888 and set alpha to 0xff.
+	 */
 	dp_conn->test_pattern.fb = igt_create_fb(drm_fd,
 						 video_width, video_height,
-						 DRM_FORMAT_XRGB8888,
+						 gen == 10 ? DRM_FORMAT_ARGB8888 : DRM_FORMAT_XRGB8888,
 						 LOCAL_DRM_FORMAT_MOD_NONE,
 						 &dp_conn->test_pattern.fb_pattern);
 	igt_assert(dp_conn->test_pattern.fb);

tools/intel_dp_compliance.c static int fill_framebuffer(struct connector *dp_conn) · line 565

Quoted 6 lines
tools/intel_dp_compliance.c +2 -1
@@ -557,7 +561,8 @@ static int fill_framebuffer(struct connector *dp_conn)
 			red_ptr[x] = pixel_val << 16;
 			green_ptr[x] = pixel_val << 8;
 			blue_ptr[x] = pixel_val << 0;
-			white_ptr[x] = red_ptr[x] | green_ptr[x] | blue_ptr[x];
+			white_ptr[x] = gen == 10 ? 0xff : (red_ptr[x] |
+				       green_ptr[x] | blue_ptr[x]);

Looks like each color needs its own alpha to be set, so something like:

alpha = gen == 10 ? 0xff : 0;
red_ptr[x] = (alpha << 24) | (pixel_val << 16); green_ptr[x] = (alpha << 24) | (pixel_val << 8); blue_ptr[x] = (alpha << 24) | (pixel_val << 0);

--Imre

Quoted 14 lines
tools/intel_dp_compliance.c +1 -0
 			if (++x >= video_width)
 				break;
 		}
@@ -1036,6 +1041,7 @@ int main(int argc, char **argv)
 	set_termio_mode();
 
 	drm_fd = drm_open_driver(DRIVER_ANY);
+	gen = intel_gen(intel_get_drm_devid(drm_fd));
 
 	kmstest_set_vt_graphics_mode();
 	setup_debugfs_files();
Signature · 1 line
2.9.3

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