drm/i915: Distribute switch variables for initialization
Subsystems (3)
PATCH v2 1/1 drm/i915: Distribute switch variables for initialization
Variables declared in a switch statement before any case statements cannot be automatically initialized with compiler instrumentation (as they are not part of any execution flow). With GCC's proposed automatic stack variable initialization feature, this triggers a warning (and they don't get initialized). Clang's automatic stack variable initialization (via CONFIG_INIT_STACK_ALL=y) doesn't throw a warning, but it also doesn't initialize such variables[1]. Note that these warnings (or silent skipping) happen before the dead-store elimination optimization phase, so even when the automatic initializations are later elided in favor of direct initializations, the warnings remain.
To avoid these problems, move such variables into the "case" where they're used or lift them up into the main function body.
drivers/gpu/drm/i915/display/intel_display.c: In function ‘check_digital_port_conflicts’:drivers/gpu/drm/i915/display/intel_display.c:12963:17: warning: statement will never be executed [-Wswitch-unreachable]
12963 | unsigned int port_mask;
| ^~~~~~~~~drivers/gpu/drm/i915/intel_pm.c: In function ‘vlv_get_fifo_size’:drivers/gpu/drm/i915/intel_pm.c:474:7: warning: statement will never be executed [-Wswitch-unreachable]
474 | u32 dsparb, dsparb2, dsparb3;
| ^~~~~~
drivers/gpu/drm/i915/intel_pm.c: In function ‘vlv_atomic_update_fifo’:
drivers/gpu/drm/i915/intel_pm.c:1997:7: warning: statement will never be executed [-Wswitch-unreachable]
1997 | u32 dsparb, dsparb2, dsparb3;
| ^~~~~~[1] https://bugs.llvm.org/show_bug.cgi?id=44916
---
v2: remove port_mask entirely (Ville Syrjälä)
v1: https://lore.kernel.org/lkml/[email protected]
--- drivers/gpu/drm/i915/display/intel_display.c | 7 ++----- drivers/gpu/drm/i915/intel_pm.c | 4 ++-- 2 files changed, 4 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/display/intel_display.c +2 -5
@@ -12960,7 +12960,6 @@ static bool check_digital_port_conflicts(struct intel_atomic_state *state)WARN_ON (!connector_state->crtc);switch (encoder->type) { -unsigned int port_mask;case INTEL_OUTPUT_DDI :if (WARN_ON (!HAS_DDI (to_i915 (dev))))break ;
@@ -12968,13 +12967,11 @@ static bool check_digital_port_conflicts(struct intel_atomic_state *state)case INTEL_OUTPUT_DP :case INTEL_OUTPUT_HDMI :case INTEL_OUTPUT_EDP : - port_mask =1 << encoder->port; -/* the same port mustn't appear more than once */ -if (used_ports & port_mask) +if (used_ports &BIT (encoder->port)) ret = false; - used_ports |= port_mask; + used_ports |=BIT (encoder->port);break ;case INTEL_OUTPUT_DP_MST : used_mst_ports |=
drivers/gpu/drm/i915/intel_pm.c +2 -2
@@ -469,9 +469,9 @@ static void vlv_get_fifo_size(struct intel_crtc_state *crtc_state)struct vlv_fifo_state *fifo_state = &crtc_state->wm.vlv.fifo_state;enum pipe pipe = crtc->pipe;int sprite0_start, sprite1_start; +u32 dsparb, dsparb2, dsparb3;switch (pipe) { -u32 dsparb, dsparb2, dsparb3;case PIPE_A : dsparb =I915_READ (DSPARB ); dsparb2 =I915_READ (DSPARB2 );
@@ -1969,6 +1969,7 @@ static void vlv_atomic_update_fifo(struct intel_atomic_state *state,const struct vlv_fifo_state *fifo_state = &crtc_state->wm.vlv.fifo_state;int sprite0_start, sprite1_start, fifo_size; +u32 dsparb, dsparb2, dsparb3;if (!crtc_state->fifo_changed)return ;
@@ -1994,7 +1995,6 @@ static void vlv_atomic_update_fifo(struct intel_atomic_state *state,spin_lock (&uncore->lock);switch (crtc->pipe) { -u32 dsparb, dsparb2, dsparb3;case PIPE_A : dsparb =intel_uncore_read_fw (uncore,DSPARB ); dsparb2 =intel_uncore_read_fw (uncore,DSPARB2 );
Signature · 9 lines
2.20.1 -- Kees Cook _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Distribute switch variables for initialization (rev2)
== Series Details ==
== Series Details ==
Series: drm/i915: Distribute switch variables for initialization (rev2)
URL : https://patchwork.freedesktop.org/series/73690/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_7977 -> Patchwork_16651
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/index.html
Known issues
------------
Here are the changes found in Patchwork_16651 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_suspend@basic-s4-devices:
- fi-tgl-y: [PASS][1] -> [FAIL][2] ([CI#94])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/fi-tgl-y/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/fi-tgl-y/igt@[email protected]
* igt@i915_selftest@live_gtt:
- fi-tgl-y: [PASS][3] -> [TIMEOUT][4] ([CI#94] / [fdo#112126] / [fdo#112271])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/fi-tgl-y/igt@i915_selftest@live_gtt.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/fi-tgl-y/igt@i915_selftest@live_gtt.html
* igt@prime_vgem@basic-gtt:
- fi-tgl-y: [PASS][5] -> [DMESG-WARN][6] ([CI#94] / [i915#402]) +2 similar issues
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/fi-tgl-y/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/fi-tgl-y/igt@[email protected]
#### Possible fixes ####
* igt@i915_getparams_basic@basic-subslice-total:
- fi-tgl-y: [DMESG-WARN][7] ([CI#94] / [i915#402]) -> [PASS][8] +1 similar issue
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/fi-tgl-y/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/fi-tgl-y/igt@[email protected]
* igt@i915_selftest@live_execlists:
- fi-tgl-y: [INCOMPLETE][9] ([CI#94] / [i915#647]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/fi-tgl-y/igt@i915_selftest@live_execlists.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/fi-tgl-y/igt@i915_selftest@live_execlists.html
* igt@i915_selftest@live_gem_contexts:
- fi-cml-s: [DMESG-FAIL][11] ([i915#877]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/fi-cml-s/igt@i915_selftest@live_gem_contexts.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/fi-cml-s/igt@i915_selftest@live_gem_contexts.html
* igt@i915_selftest@live_gtt:
- {fi-tgl-dsi}: [TIMEOUT][13] ([fdo#112126] / [fdo#112271]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/fi-tgl-dsi/igt@i915_selftest@live_gtt.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/fi-tgl-dsi/igt@i915_selftest@live_gtt.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[CI#94]: https://gitlab.freedesktop.org/gfx-ci/i915-infra/issues/94
[fdo#112126]: https://bugs.freedesktop.org/show_bug.cgi?id=112126
[fdo#112271]: https://bugs.freedesktop.org/show_bug.cgi?id=112271
[i915#1233]: https://gitlab.freedesktop.org/drm/intel/issues/1233
[i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402
[i915#647]: https://gitlab.freedesktop.org/drm/intel/issues/647
[i915#877]: https://gitlab.freedesktop.org/drm/intel/issues/877
Participating hosts (49 -> 42)
------------------------------
Additional (2): fi-hsw-peppy fi-cfl-8109u
Missing (9): fi-bdw-5557u fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-bsw-kefka fi-bdw-samus fi-byt-clapper fi-skl-6600u
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_7977 -> Patchwork_16651
CI-20190529: 20190529
CI_DRM_7977: 055793baa45ba27e36b40f1299cfaa19388b592d @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5453: cae9a5881ed2c5be2c2518a255740b612a927f9a @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_16651: 514832edec7b53f1e100f802ae193102c63f22c9 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
514832edec7b drm/i915: Distribute switch variables for initialization
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 54 lines · Kees Cook
Variables declared in a switch statement before any case statements cannot be automatically initialized with compiler instrumentation (as they are not part of any execution flow). With GCC's proposed automatic stack variable initialization feature, this triggers a warning (and they don't get initialized). Clang's automatic stack variable initialization (via
CONFIG_INIT_STACK_ALL=y) doesn't throw a warning, but it also doesn't initialize such variables[1]. Note that these warnings (or silent skipping) happen before the dead-store elimination optimization phase, so even when the automatic initializations are later elided in favor of direct initializations, the warnings remain.To avoid these problems, move such variables into the "case" where they're used or lift them up into the main function body.
drivers/gpu/drm/i915/display/intel_display.c: In function ‘check_digital_port_conflicts’:drivers/gpu/drm/i915/display/intel_display.c:12963:17: warning: statement will never be executed [-Wswitch-unreachable]12963 | unsigned int port_mask; | ^~~~~~~~~
drivers/gpu/drm/i915/intel_pm.c: In function ‘vlv_get_fifo_size’:drivers/gpu/drm/i915/intel_pm.c:474:7: warning: statement will never be executed [-Wswitch-unreachable]474 | u32 dsparb, dsparb2, dsparb3; | ^~~~~~ drivers/gpu/drm/i915/intel_pm.c: In function ‘vlv_atomic_update_fifo’: drivers/gpu/drm/i915/intel_pm.c:1997:7: warning: statement will never be executed [-Wswitch-unreachable] 1997 | u32 dsparb, dsparb2, dsparb3; | ^~~~~~[1] https://bugs.llvm.org/show_bug.cgi?id=44916
Signed-off-by Kees Cook <[email protected]>---
v2: removeport_maskentirely (Ville Syrjälä)
v1: https://lore.kernel.org/lkml/[email protected]--- drivers/gpu/drm/i915/display/intel_display.c | 7 ++----- drivers/gpu/drm/i915/intel_pm.c | 4 ++-- 2 files changed, 4 insertions(+), 7 deletions(-)drivers/gpu/drm/i915/display/intel_display.c +0
-1@@ -12960,7 +12960,6 @@ static bool check_digital_port_conflicts(struct intel_atomic_state *state)WARN_ON (!connector_state->crtc);switch (encoder->type) { -unsigned int port_mask;case INTEL_OUTPUT_DDI :if (WARN_ON (!HAS_DDI (to_i915 (dev))))break ;@@ -12968,13 +12967,11 @@ static bool check_digital_port_conflicts(struct intel_atomic_state *state)case INTEL_OUTPUT_DP :case INTEL_OUTPUT_HDMI :
drivers/gpu/drm/i915/display/intel_display.c static bool check_digital_port_conflicts(struct intel_atomic_state *state) · line 12974
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_display.c +2
-4case INTEL_OUTPUT_EDP : - port_mask =1 << encoder->port; -/* the same port mustn't appear more than once */ -if (used_ports & port_mask) +if (used_ports &BIT (encoder->port)) ret = false; - used_ports |= port_mask; + used_ports |=BIT (encoder->port);
Thanks. Looks good.
Quoted 44 lines
drivers/gpu/drm/i915/display/intel_display.c +0
-0break ;case INTEL_OUTPUT_DP_MST : used_mst_ports |=drivers/gpu/drm/i915/intel_pm.c +2
-2@@ -469,9 +469,9 @@ static void vlv_get_fifo_size(struct intel_crtc_state *crtc_state)struct vlv_fifo_state *fifo_state = &crtc_state->wm.vlv.fifo_state;enum pipe pipe = crtc->pipe;int sprite0_start, sprite1_start; +u32 dsparb, dsparb2, dsparb3;switch (pipe) { -u32 dsparb, dsparb2, dsparb3;case PIPE_A : dsparb =I915_READ (DSPARB ); dsparb2 =I915_READ (DSPARB2 );@@ -1969,6 +1969,7 @@ static void vlv_atomic_update_fifo(struct intel_atomic_state *state,const struct vlv_fifo_state *fifo_state = &crtc_state->wm.vlv.fifo_state;int sprite0_start, sprite1_start, fifo_size; +u32 dsparb, dsparb2, dsparb3;if (!crtc_state->fifo_changed)return ;@@ -1994,7 +1995,6 @@ static void vlv_atomic_update_fifo(struct intel_atomic_state *state,spin_lock (&uncore->lock);switch (crtc->pipe) { -u32 dsparb, dsparb2, dsparb3;case PIPE_A : dsparb =intel_uncore_read_fw (uncore,DSPARB ); dsparb2 =intel_uncore_read_fw (uncore,DSPARB2 );Signature · 9 lines
2.20.1 -- Kees Cook _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915: Distribute switch variables for initialization (rev2)
In reply to Kees Cook== Series Details ==
== Series Details ==
Series: drm/i915: Distribute switch variables for initialization (rev2)
URL : https://patchwork.freedesktop.org/series/73690/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_7977_full -> Patchwork_16651_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Known issues
------------
Here are the changes found in Patchwork_16651_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_caching@writes:
- shard-hsw: [PASS][1] -> [FAIL][2] ([i915#694])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/shard-hsw6/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/shard-hsw5/igt@[email protected]
* igt@gem_ctx_isolation@rcs0-s3:
- shard-kbl: [PASS][3] -> [DMESG-WARN][4] ([i915#180]) +6 similar issues
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/shard-kbl1/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/shard-kbl2/igt@[email protected]
* igt@gem_ctx_shared@exec-single-timeline-bsd:
- shard-iclb: [PASS][5] -> [SKIP][6] ([fdo#110841])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/shard-iclb7/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/shard-iclb1/igt@[email protected]
* igt@gem_exec_schedule@independent-bsd2:
- shard-iclb: [PASS][7] -> [SKIP][8] ([fdo#109276]) +12 similar issues
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/shard-iclb2/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/shard-iclb8/igt@[email protected]
* igt@gem_exec_schedule@reorder-wide-bsd:
- shard-iclb: [PASS][9] -> [SKIP][10] ([fdo#112146]) +4 similar issues
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/shard-iclb7/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/shard-iclb2/igt@[email protected]
* igt@gem_tiled_blits@normal:
- shard-hsw: [PASS][11] -> [FAIL][12] ([i915#818])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/shard-hsw5/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/shard-hsw1/igt@[email protected]
* igt@i915_pm_rpm@system-suspend-modeset:
- shard-skl: [PASS][13] -> [INCOMPLETE][14] ([i915#151] / [i915#69])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/shard-skl7/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/shard-skl7/igt@[email protected]
* igt@i915_suspend@debugfs-reader:
- shard-skl: [PASS][15] -> [INCOMPLETE][16] ([i915#69]) +1 similar issue
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/shard-skl3/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/shard-skl8/igt@[email protected]
* igt@kms_color@pipe-a-gamma:
- shard-skl: [PASS][17] -> [FAIL][18] ([i915#71])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/shard-skl6/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/shard-skl7/igt@[email protected]
* igt@kms_cursor_legacy@2x-long-flip-vs-cursor-legacy:
- shard-glk: [PASS][19] -> [FAIL][20] ([i915#72])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/shard-glk6/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/shard-glk5/igt@[email protected]
* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes:
- shard-apl: [PASS][21] -> [DMESG-WARN][22] ([i915#180]) +1 similar issue
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/shard-apl2/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/shard-apl6/igt@[email protected]
* igt@kms_plane_lowres@pipe-a-tiling-x:
- shard-glk: [PASS][23] -> [FAIL][24] ([i915#899])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/shard-glk1/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/shard-glk3/igt@[email protected]
* igt@kms_psr@psr2_sprite_mmap_gtt:
- shard-iclb: [PASS][25] -> [SKIP][26] ([fdo#109441]) +2 similar issues
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/shard-iclb2/igt@kms_psr@psr2_sprite_mmap_gtt.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/shard-iclb8/igt@kms_psr@psr2_sprite_mmap_gtt.html
* igt@perf_pmu@busy-accuracy-98-vcs1:
- shard-iclb: [PASS][27] -> [SKIP][28] ([fdo#112080]) +5 similar issues
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/shard-iclb4/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/shard-iclb7/igt@[email protected]
#### Possible fixes ####
* igt@gem_ctx_isolation@rcs0-reset:
- shard-skl: [DMESG-WARN][29] -> [PASS][30]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/shard-skl7/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/shard-skl9/igt@[email protected]
* igt@gem_ctx_isolation@rcs0-s3:
- shard-apl: [DMESG-WARN][31] ([i915#180]) -> [PASS][32] +1 similar issue
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/shard-apl2/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/shard-apl1/igt@[email protected]
* igt@gem_ctx_isolation@vcs1-none:
- shard-iclb: [SKIP][33] ([fdo#112080]) -> [PASS][34] +9 similar issues
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/shard-iclb7/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/shard-iclb1/igt@[email protected]
* {igt@gem_ctx_persistence@close-replace-race}:
- shard-skl: [INCOMPLETE][35] -> [PASS][36]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/shard-skl8/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/shard-skl1/igt@[email protected]
* igt@gem_exec_balancer@hang:
- shard-tglb: [FAIL][37] ([i915#1277]) -> [PASS][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/shard-tglb5/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/shard-tglb2/igt@[email protected]
* igt@gem_exec_balancer@smoke:
- shard-iclb: [SKIP][39] ([fdo#110854]) -> [PASS][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/shard-iclb7/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/shard-iclb2/igt@[email protected]
* {igt@gem_exec_schedule@implicit-write-read-bsd2}:
- shard-iclb: [SKIP][41] ([fdo#109276] / [i915#677]) -> [PASS][42]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/shard-iclb6/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/shard-iclb2/igt@[email protected]
* igt@gem_exec_schedule@pi-common-bsd:
- shard-iclb: [SKIP][43] ([i915#677]) -> [PASS][44] +1 similar issue
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/shard-iclb2/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/shard-iclb6/igt@[email protected]
* igt@gem_exec_schedule@preempt-other-chain-bsd:
- shard-iclb: [SKIP][45] ([fdo#112146]) -> [PASS][46] +2 similar issues
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/shard-iclb2/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/shard-iclb8/igt@[email protected]
* igt@gem_exec_schedule@preempt-queue-chain-bsd2:
- shard-iclb: [SKIP][47] ([fdo#109276]) -> [PASS][48] +6 similar issues
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/shard-iclb7/igt@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/shard-iclb2/igt@[email protected]
* igt@gem_tiled_blits@interruptible:
- shard-hsw: [FAIL][49] ([i915#694]) -> [PASS][50]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/shard-hsw6/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/shard-hsw5/igt@[email protected]
* igt@i915_pm_dc@dc6-psr:
- shard-iclb: [FAIL][51] ([i915#454]) -> [PASS][52]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/shard-iclb3/igt@[email protected]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/shard-iclb6/igt@[email protected]
* igt@i915_pm_rps@waitboost:
- shard-iclb: [FAIL][53] ([i915#413]) -> [PASS][54]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/shard-iclb1/igt@[email protected]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/shard-iclb3/igt@[email protected]
* igt@kms_flip@dpms-vs-vblank-race-interruptible:
- shard-glk: [FAIL][55] ([i915#407]) -> [PASS][56]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/shard-glk1/igt@[email protected]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/shard-glk3/igt@[email protected]
* igt@kms_flip@flip-vs-expired-vblank-interruptible:
- shard-skl: [FAIL][57] ([i915#79]) -> [PASS][58]
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/shard-skl2/igt@[email protected]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/shard-skl6/igt@[email protected]
* igt@kms_flip@flip-vs-suspend-interruptible:
- shard-skl: [INCOMPLETE][59] ([i915#221]) -> [PASS][60]
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/shard-skl7/igt@[email protected]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/shard-skl5/igt@[email protected]
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
- shard-kbl: [DMESG-WARN][61] ([i915#180]) -> [PASS][62] +3 similar issues
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/shard-kbl7/igt@[email protected]
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/shard-kbl4/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-b-constant-alpha-min:
- shard-skl: [FAIL][63] ([fdo#108145]) -> [PASS][64]
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/shard-skl9/igt@[email protected]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/shard-skl7/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
- shard-skl: [FAIL][65] ([fdo#108145] / [i915#265]) -> [PASS][66]
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/shard-skl5/igt@[email protected]
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/shard-skl9/igt@[email protected]
* igt@kms_psr@psr2_cursor_render:
- shard-iclb: [SKIP][67] ([fdo#109441]) -> [PASS][68]
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/shard-iclb6/igt@kms_psr@psr2_cursor_render.html
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/shard-iclb2/igt@kms_psr@psr2_cursor_render.html
* igt@kms_setmode@basic:
- shard-hsw: [FAIL][69] ([i915#31]) -> [PASS][70]
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/shard-hsw2/igt@[email protected]
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/shard-hsw7/igt@[email protected]
- shard-kbl: [FAIL][71] ([i915#31]) -> [PASS][72]
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/shard-kbl4/igt@[email protected]
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/shard-kbl7/igt@[email protected]
#### Warnings ####
* igt@gem_ctx_isolation@vcs1-nonpriv:
- shard-iclb: [FAIL][73] ([IGT#28]) -> [SKIP][74] ([fdo#112080])
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/shard-iclb1/igt@[email protected]
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/shard-iclb8/igt@[email protected]
* igt@gem_ctx_isolation@vcs1-nonpriv-switch:
- shard-iclb: [SKIP][75] ([fdo#112080]) -> [FAIL][76] ([IGT#28])
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/shard-iclb7/igt@[email protected]
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/shard-iclb2/igt@[email protected]
* igt@i915_pm_dc@dc6-psr:
- shard-tglb: [SKIP][77] ([i915#468]) -> [FAIL][78] ([i915#454])
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7977/shard-tglb2/igt@[email protected]
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/shard-tglb8/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[IGT#28]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/28
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#110841]: https://bugs.freedesktop.org/show_bug.cgi?id=110841
[fdo#110854]: https://bugs.freedesktop.org/show_bug.cgi?id=110854
[fdo#112080]: https://bugs.freedesktop.org/show_bug.cgi?id=112080
[fdo#112146]: https://bugs.freedesktop.org/show_bug.cgi?id=112146
[i915#1277]: https://gitlab.freedesktop.org/drm/intel/issues/1277
[i915#1291]: https://gitlab.freedesktop.org/drm/intel/issues/1291
[i915#151]: https://gitlab.freedesktop.org/drm/intel/issues/151
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#221]: https://gitlab.freedesktop.org/drm/intel/issues/221
[i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
[i915#31]: https://gitlab.freedesktop.org/drm/intel/issues/31
[i915#407]: https://gitlab.freedesktop.org/drm/intel/issues/407
[i915#413]: https://gitlab.freedesktop.org/drm/intel/issues/413
[i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
[i915#468]: https://gitlab.freedesktop.org/drm/intel/issues/468
[i915#677]: https://gitlab.freedesktop.org/drm/intel/issues/677
[i915#69]: https://gitlab.freedesktop.org/drm/intel/issues/69
[i915#694]: https://gitlab.freedesktop.org/drm/intel/issues/694
[i915#71]: https://gitlab.freedesktop.org/drm/intel/issues/71
[i915#72]: https://gitlab.freedesktop.org/drm/intel/issues/72
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
[i915#818]: https://gitlab.freedesktop.org/drm/intel/issues/818
[i915#899]: https://gitlab.freedesktop.org/drm/intel/issues/899
Participating hosts (10 -> 10)
------------------------------
No changes in participating hosts
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_7977 -> Patchwork_16651
CI-20190529: 20190529
CI_DRM_7977: 055793baa45ba27e36b40f1299cfaa19388b592d @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5453: cae9a5881ed2c5be2c2518a255740b612a927f9a @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_16651: 514832edec7b53f1e100f802ae193102c63f22c9 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16651/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula
maintainerQuoted 63 lines · Ville Syrjälä
Quoted 62 lines · Kees Cook
Variables declared in a switch statement before any case statements cannot be automatically initialized with compiler instrumentation (as they are not part of any execution flow). With GCC's proposed automatic stack variable initialization feature, this triggers a warning (and they don't get initialized). Clang's automatic stack variable initialization (via
CONFIG_INIT_STACK_ALL=y) doesn't throw a warning, but it also doesn't initialize such variables[1]. Note that these warnings (or silent skipping) happen before the dead-store elimination optimization phase, so even when the automatic initializations are later elided in favor of direct initializations, the warnings remain.To avoid these problems, move such variables into the "case" where they're used or lift them up into the main function body.
drivers/gpu/drm/i915/display/intel_display.c: In function ‘check_digital_port_conflicts’:drivers/gpu/drm/i915/display/intel_display.c:12963:17: warning: statement will never be executed [-Wswitch-unreachable]12963 | unsigned int port_mask; | ^~~~~~~~~
drivers/gpu/drm/i915/intel_pm.c: In function ‘vlv_get_fifo_size’:drivers/gpu/drm/i915/intel_pm.c:474:7: warning: statement will never be executed [-Wswitch-unreachable]474 | u32 dsparb, dsparb2, dsparb3; | ^~~~~~ drivers/gpu/drm/i915/intel_pm.c: In function ‘vlv_atomic_update_fifo’: drivers/gpu/drm/i915/intel_pm.c:1997:7: warning: statement will never be executed [-Wswitch-unreachable] 1997 | u32 dsparb, dsparb2, dsparb3; | ^~~~~~[1] https://bugs.llvm.org/show_bug.cgi?id=44916
Signed-off-by Kees Cook <[email protected]>---
v2: removeport_maskentirely (Ville Syrjälä)
v1: https://lore.kernel.org/lkml/[email protected]--- drivers/gpu/drm/i915/display/intel_display.c | 7 ++----- drivers/gpu/drm/i915/intel_pm.c | 4 ++-- 2 files changed, 4 insertions(+), 7 deletions(-)drivers/gpu/drm/i915/display/intel_display.c +1
-4@@ -12960,7 +12960,6 @@ static bool check_digital_port_conflicts(struct intel_atomic_state *state)WARN_ON (!connector_state->crtc);switch (encoder->type) { -unsigned int port_mask;case INTEL_OUTPUT_DDI :if (WARN_ON (!HAS_DDI (to_i915 (dev))))break ;@@ -12968,13 +12967,11 @@ static bool check_digital_port_conflicts(struct intel_atomic_state *state)case INTEL_OUTPUT_DP :case INTEL_OUTPUT_HDMI :case INTEL_OUTPUT_EDP : - port_mask =1 << encoder->port; -/* the same port mustn't appear more than once */ -if (used_ports & port_mask) +if (used_ports &BIT (encoder->port)) ret = false;
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_display.c static bool check_digital_port_conflicts(struct intel_atomic_state *state) · line 12974
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_display.c +1
-1- used_ports |= port_mask; + used_ports |=BIT (encoder->port);Thanks. Looks good.
Reviewed-by Ville Syrjälä <[email protected]>
Thanks for the patch and review, pushed to dinq.
BR,
Jani.
Quoted 45 lines
Quoted 45 lines
drivers/gpu/drm/i915/display/intel_display.c +0
-0break ;case INTEL_OUTPUT_DP_MST : used_mst_ports |=drivers/gpu/drm/i915/intel_pm.c +2
-2@@ -469,9 +469,9 @@ static void vlv_get_fifo_size(struct intel_crtc_state *crtc_state)struct vlv_fifo_state *fifo_state = &crtc_state->wm.vlv.fifo_state;enum pipe pipe = crtc->pipe;int sprite0_start, sprite1_start; +u32 dsparb, dsparb2, dsparb3;switch (pipe) { -u32 dsparb, dsparb2, dsparb3;case PIPE_A : dsparb =I915_READ (DSPARB ); dsparb2 =I915_READ (DSPARB2 );@@ -1969,6 +1969,7 @@ static void vlv_atomic_update_fifo(struct intel_atomic_state *state,const struct vlv_fifo_state *fifo_state = &crtc_state->wm.vlv.fifo_state;int sprite0_start, sprite1_start, fifo_size; +u32 dsparb, dsparb2, dsparb3;if (!crtc_state->fifo_changed)return ;@@ -1994,7 +1995,6 @@ static void vlv_atomic_update_fifo(struct intel_atomic_state *state,spin_lock (&uncore->lock);switch (crtc->pipe) { -u32 dsparb, dsparb2, dsparb3;case PIPE_A : dsparb =intel_uncore_read_fw (uncore,DSPARB ); dsparb2 =intel_uncore_read_fw (uncore,DSPARB2 );Signature · 9 lines
2.20.1 -- Kees Cook _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx