Skip to contentSkip to conversation

drm/i915/display/selftest: Add pcode selftest

PATCH In review Swati Sharma 3 participants 5 messages Feb 7, 2023 – Feb 14, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915/display/selftest: Add pcode selftest

From: Mohammed Khajapasha <[email protected]>

Include pcode selftest for display to validate QGV points read. Failure of this selftest indicates a bad firmware rather than regular display issue.

---
 drivers/gpu/drm/i915/Makefile                 |  3 +-
 drivers/gpu/drm/i915/display/intel_bw.c       |  4 ++
 .../drm/i915/display/selftests/selftest_bw.c  | 54 +++++++++++++++++++
 .../i915/display/selftests/selftest_display.c | 18 +++++++
 .../i915/display/selftests/selftest_display.h |  6 +++
 .../drm/i915/selftests/i915_live_selftests.h  |  1 +
 6 files changed, 85 insertions(+), 1 deletion(-)
 create mode 100644 drivers/gpu/drm/i915/display/selftests/selftest_bw.c
 create mode 100644 drivers/gpu/drm/i915/display/selftests/selftest_display.c
 create mode 100644 drivers/gpu/drm/i915/display/selftests/selftest_display.h
drivers/gpu/drm/i915/Makefile +2 -1
index 918470a04591..aa7d34b3f71c 100644
@@ -350,7 +350,8 @@ i915-$(CONFIG_DRM_I915_SELFTEST) += \
 	selftests/igt_mmap.o \
 	selftests/igt_reset.o \
 	selftests/igt_spinner.o \
-	selftests/librapl.o
+	selftests/librapl.o \
+	display/selftests/selftest_display.o
 
 # virtual gpu code
 i915-y += i915_vgpu.o
drivers/gpu/drm/i915/display/intel_bw.c +4 -0
index 202321ffbe2a..b0bfe04f2835 100644
@@ -1211,3 +1211,7 @@ int intel_bw_init(struct drm_i915_private *dev_priv)
 
 	return 0;
 }
+
+#if IS_ENABLED(CONFIG_DRM_I915_SELFTEST)
+#include "selftests/selftest_bw.c"
+#endif
drivers/gpu/drm/i915/display/selftests/selftest_bw.c new file +54 -0

54 lines not on this page · raw message

drivers/gpu/drm/i915/display/selftests/selftest_display.c new file +18 -0
new file mode 100644
index 000000000000..1663c69f9ddc
@@ -0,0 +1,18 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2020 Intel Corporation
+ */
+
+#include "i915_drv.h"
+#include "i915_selftest.h"
+
+#include "selftest_display.h"
+
+int intel_display_live_selftests(struct drm_i915_private *i915)
+{
+	static const struct i915_subtest tests[] = {
+		SUBTEST(intel_pcode_read_qgv_points_test),
+	};
+
+	return i915_subtests(tests, i915);
+}
drivers/gpu/drm/i915/display/selftests/selftest_display.h new file +6 -0
new file mode 100644
index 000000000000..c8d80d5945bb
@@ -0,0 +1,6 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2020 Intel Corporation
+ */
+
+int intel_pcode_read_qgv_points_test(void *arg);
drivers/gpu/drm/i915/selftests/i915_live_selftests.h +1 -0
index 5aee6c9a8295..8f980483cca8 100644
@@ -42,6 +42,7 @@ selftest(gem_contexts, i915_gem_context_live_selftests)
 selftest(client, i915_gem_client_blt_live_selftests)
 selftest(gem_migrate, i915_gem_migrate_live_selftests)
 selftest(reset, intel_reset_live_selftests)
+selftest(display, intel_display_live_selftests)
 selftest(memory_region, intel_memory_region_live_selftests)
 selftest(hangcheck, intel_hangcheck_live_selftests)
 selftest(execlists, intel_execlists_live_selftests)
Signature · 1 line
2.25.1
#1 lore raw

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/display/selftest: Add pcode selftest

== Series Details ==

== Series Details ==

Series: drm/i915/display/selftest: Add pcode selftest
URL : https://patchwork.freedesktop.org/series/113745/
State : warning

== Summary ==

Error: dim checkpatch failed
d149647441a7 drm/i915/display/selftest: Add pcode selftest
Traceback (most recent call last):
File "scripts/spdxcheck.py", line 6, in <module>
from ply import lex, yacc
ModuleNotFoundError: No module named 'ply'
Traceback (most recent call last):
File "scripts/spdxcheck.py", line 6, in <module>
from ply import lex, yacc
ModuleNotFoundError: No module named 'ply'
-:42: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #42:
new file mode 100644

-:131: WARNING:SPDX_LICENSE_TAG: Improper SPDX comment style for 'drivers/gpu/drm/i915/display/selftests/selftest_display.h', please use '/*' instead #131: FILE: drivers/gpu/drm/i915/display/selftests/selftest_display.h:1:
+// SPDX-License-Identifier: MIT

-:131: WARNING:SPDX_LICENSE_TAG: Missing or malformed SPDX-License-Identifier tag in line 1 #131: FILE: drivers/gpu/drm/i915/display/selftests/selftest_display.h:1:
+// SPDX-License-Identifier: MIT

total: 0 errors, 3 warnings, 0 checks, 101 lines checked

#2 lore raw

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/display/selftest: Add pcode selftest

In reply to Swati Sharma
== Series Details ==

== Series Details ==

Series: drm/i915/display/selftest: Add pcode selftest
URL : https://patchwork.freedesktop.org/series/113745/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12709 -> Patchwork_113745v1
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113745v1/index.html

Participating hosts (39 -> 36)
------------------------------

Missing (3): fi-kbl-soraka bat-atsm-1 fi-snb-2520m

New tests
---------

New tests have been introduced between CI_DRM_12709 and Patchwork_113745v1:

### New IGT tests (1) ###

* igt@i915_selftest@live@display:
- Statuses : 35 pass(s)
- Exec time: [0.0] s

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

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

### IGT changes ###

#### Possible fixes ####

* igt@i915_pm_rpm@basic-rte:
- {bat-adlp-6}: [ABORT][1] ([i915#7977]) -> [PASS][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12709/bat-adlp-6/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113745v1/bat-adlp-6/igt@[email protected]

* igt@i915_pm_rpm@module-reload:
- {bat-adlm-1}: [FAIL][3] ([i915#7948]) -> [PASS][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12709/bat-adlm-1/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113745v1/bat-adlm-1/igt@[email protected]

* igt@i915_selftest@live@gt_pm:
- {bat-adln-1}: [DMESG-FAIL][5] ([i915#4258]) -> [PASS][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12709/bat-adln-1/igt@i915_selftest@live@gt_pm.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113745v1/bat-adln-1/igt@i915_selftest@live@gt_pm.html

* igt@i915_selftest@live@gt_timelines:
- {bat-adlm-1}: [DMESG-WARN][7] ([i915#2867]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12709/bat-adlm-1/igt@i915_selftest@live@gt_timelines.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113745v1/bat-adlm-1/igt@i915_selftest@live@gt_timelines.html

* igt@i915_selftest@live@hangcheck:
- {bat-dg2-11}: [ABORT][9] ([i915#7913]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12709/bat-dg2-11/igt@i915_selftest@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113745v1/bat-dg2-11/igt@i915_selftest@[email protected]

* igt@i915_suspend@basic-s2idle-without-i915:
- {bat-adlm-1}: [DMESG-WARN][11] -> [PASS][12] +6 similar issues
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12709/bat-adlm-1/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113745v1/bat-adlm-1/igt@[email protected]

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

[fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
[i915#2867]: https://gitlab.freedesktop.org/drm/intel/issues/2867
[i915#3291]: https://gitlab.freedesktop.org/drm/intel/issues/3291
[i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#4258]: https://gitlab.freedesktop.org/drm/intel/issues/4258
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
[i915#7699]: https://gitlab.freedesktop.org/drm/intel/issues/7699
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
[i915#7913]: https://gitlab.freedesktop.org/drm/intel/issues/7913
[i915#7948]: https://gitlab.freedesktop.org/drm/intel/issues/7948
[i915#7977]: https://gitlab.freedesktop.org/drm/intel/issues/7977

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

* Linux: CI_DRM_12709 -> Patchwork_113745v1

CI-20190529: 20190529
CI_DRM_12709: 7560422b3d150a860b471c139319a64f01f336cc @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7153: f47f859f13376958a2bd199423b1f0ff53dddbe0 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_113745v1: 7560422b3d150a860b471c139319a64f01f336cc @ git://anongit.freedesktop.org/gfx-ci/linux

### Linux commits

721c3b2c464e drm/i915/display/selftest: Add pcode selftest

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113745v1/index.html

#3 lore raw

[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/display/selftest: Add pcode selftest

In reply to Swati Sharma
== Series Details ==

== Series Details ==

Series: drm/i915/display/selftest: Add pcode selftest
URL : https://patchwork.freedesktop.org/series/113745/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12709_full -> Patchwork_113745v1_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113745v1/index.html

Participating hosts (10 -> 11)
------------------------------

Additional (1): shard-rkl0

New tests
---------

New tests have been introduced between CI_DRM_12709_full and Patchwork_113745v1_full:

### New IGT tests (1) ###

* igt@i915_selftest@live@display:
- Statuses : 4 pass(s)
- Exec time: [0.0] s

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_fair@basic-pace-share@rcs0:
- shard-glk: [PASS][1] -> [FAIL][2] ([i915#2842])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12709/shard-glk4/igt@gem_exec_fair@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113745v1/shard-glk9/igt@gem_exec_fair@[email protected]

* igt@kms_cursor_legacy@flip-vs-cursor@atomic-transitions-varying-size:
- shard-glk: [PASS][3] -> [FAIL][4] ([i915#2346])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12709/shard-glk8/igt@kms_cursor_legacy@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113745v1/shard-glk5/igt@kms_cursor_legacy@[email protected]

* igt@kms_dither@fb-8bpc-vs-panel-6bpc@pipe-a-hdmi-a-1:
- shard-glk: NOTRUN -> [SKIP][5] ([fdo#109271])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113745v1/shard-glk7/igt@kms_dither@[email protected]

#### Possible fixes ####

* igt@gem_exec_fair@basic-none@vcs0:
- shard-glk: [FAIL][6] ([i915#2842]) -> [PASS][7]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12709/shard-glk8/igt@gem_exec_fair@[email protected]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113745v1/shard-glk5/igt@gem_exec_fair@[email protected]

* igt@gem_exec_reloc@basic-write-read:
- {shard-rkl}: [SKIP][8] ([i915#3281]) -> [PASS][9] +6 similar issues
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12709/shard-rkl-2/igt@[email protected]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113745v1/shard-rkl-5/igt@[email protected]

* igt@gem_userptr_blits@forbidden-operations:
- {shard-rkl}: [SKIP][10] ([i915#3282]) -> [PASS][11] +4 similar issues
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12709/shard-rkl-2/igt@[email protected]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113745v1/shard-rkl-5/igt@[email protected]

* igt@gen9_exec_parse@shadow-peek:
- {shard-rkl}: [SKIP][12] ([i915#2527]) -> [PASS][13] +2 similar issues
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12709/shard-rkl-2/igt@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113745v1/shard-rkl-5/igt@[email protected]

* igt@i915_pm_dc@dc5-psr:
- {shard-rkl}: [SKIP][14] ([i915#658]) -> [PASS][15]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12709/shard-rkl-3/igt@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113745v1/shard-rkl-6/igt@[email protected]

* igt@i915_pm_dc@dc6-dpms:
- {shard-rkl}: [SKIP][16] ([i915#3361]) -> [PASS][17]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12709/shard-rkl-5/igt@[email protected]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113745v1/shard-rkl-1/igt@[email protected]

* igt@i915_pm_rpm@cursor-dpms:
- {shard-tglu}: [SKIP][18] ([i915#1849]) -> [PASS][19] +1 similar issue
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12709/shard-tglu-6/igt@[email protected]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113745v1/shard-tglu-1/igt@[email protected]

* igt@i915_pm_rpm@modeset-lpsp:
- {shard-tglu}: [SKIP][20] ([i915#1397]) -> [PASS][21]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12709/shard-tglu-6/igt@[email protected]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113745v1/shard-tglu-1/igt@[email protected]

* igt@i915_pm_rpm@pm-tiling:
- {shard-rkl}: [SKIP][22] ([fdo#109308]) -> [PASS][23]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12709/shard-rkl-5/igt@[email protected]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113745v1/shard-rkl-6/igt@[email protected]

* {igt@i915_power@sanity}:
- {shard-rkl}: [SKIP][24] ([i915#7984]) -> [PASS][25]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12709/shard-rkl-2/igt@[email protected]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113745v1/shard-rkl-5/igt@[email protected]

* igt@kms_big_fb@x-tiled-max-hw-stride-32bpp-rotate-180-hflip-async-flip:
- {shard-tglu}: [SKIP][26] ([i915#1845] / [i915#7651]) -> [PASS][27]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12709/shard-tglu-6/igt@kms_big_fb@x-tiled-max-hw-stride-32bpp-rotate-180-hflip-async-flip.html
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113745v1/shard-tglu-1/igt@kms_big_fb@x-tiled-max-hw-stride-32bpp-rotate-180-hflip-async-flip.html

* igt@kms_ccs@pipe-b-missing-ccs-buffer-y_tiled_gen12_rc_ccs_cc:
- {shard-rkl}: [SKIP][28] ([i915#1845] / [i915#4098]) -> [PASS][29] +29 similar issues
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12709/shard-rkl-3/igt@kms_ccs@pipe-b-missing-ccs-buffer-y_tiled_gen12_rc_ccs_cc.html
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113745v1/shard-rkl-6/igt@kms_ccs@pipe-b-missing-ccs-buffer-y_tiled_gen12_rc_ccs_cc.html

* igt@kms_dp_aux_dev:
- {shard-rkl}: [SKIP][30] ([i915#1257]) -> [PASS][31]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12709/shard-rkl-2/igt@kms_dp_aux_dev.html
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113745v1/shard-rkl-6/igt@kms_dp_aux_dev.html

* igt@kms_flip@2x-plain-flip-fb-recreate-interruptible@ab-hdmi-a1-hdmi-a2:
- shard-glk: [FAIL][32] ([i915#2122]) -> [PASS][33]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12709/shard-glk4/igt@kms_flip@[email protected]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113745v1/shard-glk5/igt@kms_flip@[email protected]

* igt@kms_frontbuffer_tracking@fbc-tiling-linear:
- {shard-rkl}: [SKIP][34] ([i915#1849] / [i915#4098]) -> [PASS][35] +20 similar issues
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12709/shard-rkl-5/igt@[email protected]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113745v1/shard-rkl-6/igt@[email protected]

* igt@kms_hdmi_inject@inject-audio:
- {shard-rkl}: [SKIP][36] ([i915#433]) -> [PASS][37]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12709/shard-rkl-2/igt@[email protected]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113745v1/shard-rkl-5/igt@[email protected]

* igt@kms_plane@pixel-format@pipe-b-planes:
- {shard-rkl}: [SKIP][38] ([i915#1849]) -> [PASS][39] +3 similar issues
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12709/shard-rkl-5/igt@kms_plane@[email protected]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113745v1/shard-rkl-6/igt@kms_plane@[email protected]

* igt@kms_psr@sprite_plane_onoff:
- {shard-rkl}: [SKIP][40] ([i915#1072]) -> [PASS][41] +2 similar issues
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12709/shard-rkl-5/igt@kms_psr@sprite_plane_onoff.html
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113745v1/shard-rkl-6/igt@kms_psr@sprite_plane_onoff.html

* igt@kms_universal_plane@cursor-fb-leak-pipe-a:
- {shard-rkl}: [SKIP][42] ([i915#1845] / [i915#4070] / [i915#4098]) -> [PASS][43]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12709/shard-rkl-2/igt@[email protected]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113745v1/shard-rkl-6/igt@[email protected]

* igt@kms_vblank@pipe-b-wait-forked-busy-hang:
- {shard-tglu}: [SKIP][44] ([i915#7651]) -> [PASS][45] +9 similar issues
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12709/shard-tglu-6/igt@[email protected]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113745v1/shard-tglu-1/igt@[email protected]

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

[fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
[fdo#109279]: https://bugs.freedesktop.org/show_bug.cgi?id=109279
[fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
[fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
[fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
[fdo#109302]: https://bugs.freedesktop.org/show_bug.cgi?id=109302
[fdo#109308]: https://bugs.freedesktop.org/show_bug.cgi?id=109308
[fdo#109309]: https://bugs.freedesktop.org/show_bug.cgi?id=109309
[fdo#109312]: https://bugs.freedesktop.org/show_bug.cgi?id=109312
[fdo#109313]: https://bugs.freedesktop.org/show_bug.cgi?id=109313
[fdo#109314]: https://bugs.freedesktop.org/show_bug.cgi?id=109314
[fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
[fdo#109506]: https://bugs.freedesktop.org/show_bug.cgi?id=109506
[fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
[fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
[fdo#110542]: https://bugs.freedesktop.org/show_bug.cgi?id=110542
[fdo#110723]: https://bugs.freedesktop.org/show_bug.cgi?id=110723
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[fdo#111614]: https://bugs.freedesktop.org/show_bug.cgi?id=111614
[fdo#111615]: https://bugs.freedesktop.org/show_bug.cgi?id=111615
[fdo#111644]: https://bugs.freedesktop.org/show_bug.cgi?id=111644
[fdo#111656]: https://bugs.freedesktop.org/show_bug.cgi?id=111656
[fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[fdo#112054]: https://bugs.freedesktop.org/show_bug.cgi?id=112054
[fdo#112283]: https://bugs.freedesktop.org/show_bug.cgi?id=112283
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#1257]: https://gitlab.freedesktop.org/drm/intel/issues/1257
[i915#132]: https://gitlab.freedesktop.org/drm/intel/issues/132
[i915#1397]: https://gitlab.freedesktop.org/drm/intel/issues/1397
[i915#1825]: https://gitlab.freedesktop.org/drm/intel/issues/1825
[i915#1839]: https://gitlab.freedesktop.org/drm/intel/issues/1839
[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849
[i915#1850]: https://gitlab.freedesktop.org/drm/intel/issues/1850
[i915#1902]: https://gitlab.freedesktop.org/drm/intel/issues/1902
[i915#2122]: https://gitlab.freedesktop.org/drm/intel/issues/2122
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
[i915#2433]: https://gitlab.freedesktop.org/drm/intel/issues/2433
[i915#2437]: https://gitlab.freedesktop.org/drm/intel/issues/2437
[i915#2527]: https://gitlab.freedesktop.org/drm/intel/issues/2527
[i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575
[i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
[i915#2587]: https://gitlab.freedesktop.org/drm/intel/issues/2587
[i915#2658]: https://gitlab.freedesktop.org/drm/intel/issues/2658
[i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672
[i915#2705]: https://gitlab.freedesktop.org/drm/intel/issues/2705
[i915#280]: https://gitlab.freedesktop.org/drm/intel/issues/280
[i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
[i915#2856]: https://gitlab.freedesktop.org/drm/intel/issues/2856
[i915#2920]: https://gitlab.freedesktop.org/drm/intel/issues/2920
[i915#3116]: https://gitlab.freedesktop.org/drm/intel/issues/3116
[i915#315]: https://gitlab.freedesktop.org/drm/intel/issues/315
[i915#3281]: https://gitlab.freedesktop.org/drm/intel/issues/3281
[i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
[i915#3297]: https://gitlab.freedesktop.org/drm/intel/issues/3297
[i915#3299]: https://gitlab.freedesktop.org/drm/intel/issues/3299
[i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
[i915#3318]: https://gitlab.freedesktop.org/drm/intel/issues/3318
[i915#3359]: https://gitlab.freedesktop.org/drm/intel/issues/3359
[i915#3361]: https://gitlab.freedesktop.org/drm/intel/issues/3361
[i915#3458]: https://gitlab.freedesktop.org/drm/intel/issues/3458
[i915#3469]: https://gitlab.freedesktop.org/drm/intel/issues/3469
[i915#3528]: https://gitlab.freedesktop.org/drm/intel/issues/3528
[i915#3539]: https://gitlab.freedesktop.org/drm/intel/issues/3539
[i915#3546]: https://gitlab.freedesktop.org/drm/intel/issues/3546
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
[i915#3638]: https://gitlab.freedesktop.org/drm/intel/issues/3638
[i915#3639]: https://gitlab.freedesktop.org/drm/intel/issues/3639
[i915#3689]: https://gitlab.freedesktop.org/drm/intel/issues/3689
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#3734]: https://gitlab.freedesktop.org/drm/intel/issues/3734
[i915#3742]: https://gitlab.freedesktop.org/drm/intel/issues/3742
[i915#3743]: https://gitlab.freedesktop.org/drm/intel/issues/3743
[i915#3840]: https://gitlab.freedesktop.org/drm/intel/issues/3840
[i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
[i915#3936]: https://gitlab.freedesktop.org/drm/intel/issues/3936
[i915#3952]: https://gitlab.freedesktop.org/drm/intel/issues/3952
[i915#3955]: https://gitlab.freedesktop.org/drm/intel/issues/3955
[i915#404]: https://gitlab.freedesktop.org/drm/intel/issues/404
[i915#4070]: https://gitlab.freedesktop.org/drm/intel/issues/4070
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4078]: https://gitlab.freedesktop.org/drm/intel/issues/4078
[i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
[i915#4098]: https://gitlab.freedesktop.org/drm/intel/issues/4098
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
[i915#4215]: https://gitlab.freedesktop.org/drm/intel/issues/4215
[i915#4270]: https://gitlab.freedesktop.org/drm/intel/issues/4270
[i915#433]: https://gitlab.freedesktop.org/drm/intel/issues/433
[i915#4349]: https://gitlab.freedesktop.org/drm/intel/issues/4349
[i915#4387]: https://gitlab.freedesktop.org/drm/intel/issues/4387
[i915#4391]: https://gitlab.freedesktop.org/drm/intel/issues/4391
[i915#4538]: https://gitlab.freedesktop.org/drm/intel/issues/4538
[i915#4565]: https://gitlab.freedesktop.org/drm/intel/issues/4565
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4833]: https://gitlab.freedesktop.org/drm/intel/issues/4833
[i915#4852]: https://gitlab.freedesktop.org/drm/intel/issues/4852
[i915#4859]: https://gitlab.freedesktop.org/drm/intel/issues/4859
[i915#4860]: https://gitlab.freedesktop.org/drm/intel/issues/4860
[i915#4881]: https://gitlab.freedesktop.org/drm/intel/issues/4881
[i915#5176]: https://gitlab.freedesktop.org/drm/intel/issues/5176
[i915#5235]: https://gitlab.freedesktop.org/drm/intel/issues/5235
[i915#5286]: https://gitlab.freedesktop.org/drm/intel/issues/5286
[i915#5288]: https://gitlab.freedesktop.org/drm/intel/issues/5288
[i915#5289]: https://gitlab.freedesktop.org/drm/intel/issues/5289
[i915#5325]: https://gitlab.freedesktop.org/drm/intel/issues/5325
[i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533
[i915#5439]: https://gitlab.freedesktop.org/drm/intel/issues/5439
[i915#5461]: https://gitlab.freedesktop.org/drm/intel/issues/5461
[i915#5563]: https://gitlab.freedesktop.org/drm/intel/issues/5563
[i915#5723]: https://gitlab.freedesktop.org/drm/intel/issues/5723
[i915#5784]: https://gitlab.freedesktop.org/drm/intel/issues/5784
[i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095
[i915#6227]: https://gitlab.freedesktop.org/drm/intel/issues/6227
[i915#6245]: https://gitlab.freedesktop.org/drm/intel/issues/6245
[i915#6248]: https://gitlab.freedesktop.org/drm/intel/issues/6248
[i915#6268]: https://gitlab.freedesktop.org/drm/intel/issues/6268
[i915#6335]: https://gitlab.freedesktop.org/drm/intel/issues/6335
[i915#6355]: https://gitlab.freedesktop.org/drm/intel/issues/6355
[i915#6412]: https://gitlab.freedesktop.org/drm/intel/issues/6412
[i915#6433]: https://gitlab.freedesktop.org/drm/intel/issues/6433
[i915#6497]: https://gitlab.freedesktop.org/drm/intel/issues/6497
[i915#6524]: https://gitlab.freedesktop.org/drm/intel/issues/6524
[i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
[i915#6590]: https://gitlab.freedesktop.org/drm/intel/issues/6590
[i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
[i915#6768]: https://gitlab.freedesktop.org/drm/intel/issues/6768
[i915#6944]: https://gitlab.freedesktop.org/drm/intel/issues/6944
[i915#6946]: https://gitlab.freedesktop.org/drm/intel/issues/6946
[i915#7037]: https://gitlab.freedesktop.org/drm/intel/issues/7037
[i915#7116]: https://gitlab.freedesktop.org/drm/intel/issues/7116
[i915#7118]: https://gitlab.freedesktop.org/drm/intel/issues/7118
[i915#7561]: https://gitlab.freedesktop.org/drm/intel/issues/7561
[i915#7582]: https://gitlab.freedesktop.org/drm/intel/issues/7582
[i915#7651]: https://gitlab.freedesktop.org/drm/intel/issues/7651
[i915#7697]: https://gitlab.freedesktop.org/drm/intel/issues/7697
[i915#7701]: https://gitlab.freedesktop.org/drm/intel/issues/7701
[i915#7707]: https://gitlab.freedesktop.org/drm/intel/issues/7707
[i915#7711]: https://gitlab.freedesktop.org/drm/intel/issues/7711
[i915#7742]: https://gitlab.freedesktop.org/drm/intel/issues/7742
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
[i915#7949]: https://gitlab.freedesktop.org/drm/intel/issues/7949
[i915#7957]: https://gitlab.freedesktop.org/drm/intel/issues/7957
[i915#7984]: https://gitlab.freedesktop.org/drm/intel/issues/7984

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

* Linux: CI_DRM_12709 -> Patchwork_113745v1

CI-20190529: 20190529
CI_DRM_12709: 7560422b3d150a860b471c139319a64f01f336cc @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7153: f47f859f13376958a2bd199423b1f0ff53dddbe0 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_113745v1: 7560422b3d150a860b471c139319a64f01f336cc @ git://anongit.freedesktop.org/gfx-ci/linux

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113745v1/index.html

maintainer
#4 lore raw
In reply to Swati Sharma
Quoted 27 lines · Swati Sharma

From: Mohammed Khajapasha <[email protected]>

Include pcode selftest for display to validate QGV points read. Failure of this selftest indicates a bad firmware rather than regular display issue.

---
 drivers/gpu/drm/i915/Makefile                 |  3 +-
 drivers/gpu/drm/i915/display/intel_bw.c       |  4 ++
 .../drm/i915/display/selftests/selftest_bw.c  | 54 +++++++++++++++++++
 .../i915/display/selftests/selftest_display.c | 18 +++++++
 .../i915/display/selftests/selftest_display.h |  6 +++
 .../drm/i915/selftests/i915_live_selftests.h  |  1 +
 6 files changed, 85 insertions(+), 1 deletion(-)
 create mode 100644 drivers/gpu/drm/i915/display/selftests/selftest_bw.c
 create mode 100644 drivers/gpu/drm/i915/display/selftests/selftest_display.c
 create mode 100644 drivers/gpu/drm/i915/display/selftests/selftest_display.h
drivers/gpu/drm/i915/Makefile +0 -0
index 918470a04591..aa7d34b3f71c 100644

drivers/gpu/drm/i915/Makefile i915-$(CONFIG_DRM_I915_SELFTEST) += \ · line 354

Quoted 6 lines
drivers/gpu/drm/i915/Makefile +2 -1
@@ -350,7 +350,8 @@ i915-$(CONFIG_DRM_I915_SELFTEST) += \
 	selftests/igt_mmap.o \
 	selftests/igt_reset.o \
 	selftests/igt_spinner.o \
-	selftests/librapl.o
+	selftests/librapl.o \
+	display/selftests/selftest_display.o

I think we'll want to start adding display selftests under a separate Kconfig, and in separate build lists. CONFIG_DRM_I915_DISPLAY_SELFTEST maybe.

Quoted 8 lines
drivers/gpu/drm/i915/Makefile +0 -0
 # virtual gpu code
 i915-y += i915_vgpu.o
drivers/gpu/drm/i915/display/intel_bw.c +0 -0
index 202321ffbe2a..b0bfe04f2835 100644

drivers/gpu/drm/i915/display/intel_bw.c int intel_bw_init(struct drm_i915_private *dev_priv) · line 1217

Quoted 7 lines
drivers/gpu/drm/i915/display/intel_bw.c +4 -0
@@ -1211,3 +1211,7 @@ int intel_bw_init(struct drm_i915_private *dev_priv)
 
 	return 0;
 }
+
+#if IS_ENABLED(CONFIG_DRM_I915_SELFTEST)
+#include "selftests/selftest_bw.c"
+#endif

Why here, why bw?

drivers/gpu/drm/i915/display/selftests/selftest_bw.c

Quoted 5 lines
drivers/gpu/drm/i915/display/selftests/selftest_bw.c new file +0 -0
new file mode 100644
index 000000000000..69d52201bd9b

bw?

drivers/gpu/drm/i915/display/selftests/selftest_bw.c line 3

Quoted 4 lines
drivers/gpu/drm/i915/display/selftests/selftest_bw.c new file +3 -0
@@ -0,0 +1,54 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2020 Intel Corporation

Year.

drivers/gpu/drm/i915/display/selftests/selftest_bw.c line 10

Quoted 7 lines
drivers/gpu/drm/i915/display/selftests/selftest_bw.c new file +7 -0
+ */
+
+#include "display/intel_bw.h"
+#include "i915_drv.h"
+#include "i915_selftest.h"
+#include "soc/intel_dram.h"
+#include "selftest_display.h"

Please keep these sorted.

Quoted 15 lines
drivers/gpu/drm/i915/display/selftests/selftest_bw.c new file +15 -0
+
+/**
+ * intel_pcode_read_qgv_points_read_test - Test QGV point reads from pcode
+ * @arg: i915 device instance
+ *
+ * Return 0 on success and error on fail and when dclk is zero
+ */
+int intel_pcode_read_qgv_points_test(void *arg)
+{
+	struct drm_i915_private *i915 = arg;
+	struct intel_qgv_info qi;
+	struct intel_qgv_point qp;
+	int i, ret;
+	bool fail = false;
+	intel_wakeref_t wakeref;

drivers/gpu/drm/i915/display/selftests/selftest_bw.c line 35

Quoted 10 lines
drivers/gpu/drm/i915/display/selftests/selftest_bw.c new file +10 -0
+
+	if (DISPLAY_VER(i915) < 11) {
+		drm_info(&i915->drm, "QGV doesn't support, skipping\n");
+		return 0;
+	}
+
+	with_intel_runtime_pm(i915->uncore.rpm, wakeref)
+		intel_dram_detect(i915);
+
+	qi.num_points = i915->dram_info.num_qgv_points;

Not entirely happy about sprinkling new dram_info access outside of intel_dram.c. I'd rather we moved in the other direction. So maybe the whole thing should be in intel_dram.

Which kind of makes this selftest not about display too, but rather the "soc" stuff.

Quoted 25 lines
drivers/gpu/drm/i915/display/selftests/selftest_bw.c new file +19 -0
+
+	for (i = 0; i < qi.num_points; i++) {
+		ret = intel_read_qgv_point_info(i915, &qp, i);
+		if (ret) {
+			drm_err(&i915->drm, "Pcode failed to read qgv point %d\n", i);
+			fail = true;
+		}
+
+		if (qp.dclk == 0) {
+			drm_err(&i915->drm, "DCLK set to 0 for qgv point %d\n", i);
+			fail = true;
+		}
+	}
+
+	if (fail)
+		return -EINVAL;
+
+	return 0;
+}
drivers/gpu/drm/i915/display/selftests/selftest_display.c new file +0 -0
new file mode 100644
index 000000000000..1663c69f9ddc

drivers/gpu/drm/i915/display/selftests/selftest_display.c line 3

Quoted 3 lines
drivers/gpu/drm/i915/display/selftests/selftest_display.c new file +3 -0
@@ -0,0 +1,18 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2020 Intel Corporation

Year.

drivers/gpu/drm/i915/display/selftests/selftest_display.c line 11

Quoted 8 lines
drivers/gpu/drm/i915/display/selftests/selftest_display.c new file +8 -0
+ */
+
+#include "i915_drv.h"
+#include "i915_selftest.h"
+
+#include "selftest_display.h"
+
+int intel_display_live_selftests(struct drm_i915_private *i915)

What's with the "live" here?

Quoted 13 lines
drivers/gpu/drm/i915/display/selftests/selftest_display.c new file +7 -0
+{
+	static const struct i915_subtest tests[] = {
+		SUBTEST(intel_pcode_read_qgv_points_test),
+	};
+
+	return i915_subtests(tests, i915);
+}
drivers/gpu/drm/i915/display/selftests/selftest_display.h new file +0 -0
new file mode 100644
index 000000000000..c8d80d5945bb

drivers/gpu/drm/i915/display/selftests/selftest_display.h line 3

Quoted 3 lines
drivers/gpu/drm/i915/display/selftests/selftest_display.h new file +3 -0
@@ -0,0 +1,6 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2020 Intel Corporation

Year.

drivers/gpu/drm/i915/selftests/i915_live_selftests.h

Quoted 7 lines
drivers/gpu/drm/i915/display/selftests/selftest_display.h new file +3 -0
+ */
+
+int intel_pcode_read_qgv_points_test(void *arg);
drivers/gpu/drm/i915/selftests/i915_live_selftests.h +0 -0
index 5aee6c9a8295..8f980483cca8 100644

We probably don't want display tests in this file either.

Quoted 8 lines
drivers/gpu/drm/i915/selftests/i915_live_selftests.h +1 -0
@@ -42,6 +42,7 @@ selftest(gem_contexts, i915_gem_context_live_selftests)
 selftest(client, i915_gem_client_blt_live_selftests)
 selftest(gem_migrate, i915_gem_migrate_live_selftests)
 selftest(reset, intel_reset_live_selftests)
+selftest(display, intel_display_live_selftests)
 selftest(memory_region, intel_memory_region_live_selftests)
 selftest(hangcheck, intel_hangcheck_live_selftests)
 selftest(execlists, intel_execlists_live_selftests)
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center