diff mbox series

[CI] drm/i915/display: Ensure that ret is always initialized in icl_combo_phy_verify_state

Message ID 20200828202830.7165-1-jose.souza@intel.com (mailing list archive)
State New, archived
Headers show
Series [CI] drm/i915/display: Ensure that ret is always initialized in icl_combo_phy_verify_state | expand

Commit Message

Souza, Jose Aug. 28, 2020, 8:28 p.m. UTC
From: Nathan Chancellor <natechancellor@gmail.com>

Clang warns:

drivers/gpu/drm/i915/display/intel_combo_phy.c:268:3: warning: variable
'ret' is uninitialized when used here [-Wuninitialized]
                ret &= check_phy_reg(dev_priv, phy, ICL_PORT_TX_DW8_LN0(phy),
                ^~~
drivers/gpu/drm/i915/display/intel_combo_phy.c:261:10: note: initialize
the variable 'ret' to silence this warning
        bool ret;
                ^
                 = 0
1 warning generated.

In practice, the bug this warning appears to be concerned with would not
actually matter because ret gets initialized to the return value of
cnl_verify_procmon_ref_values. However, that does appear to be a bug
since it means the first hunk of the patch this fixes won't actually do
anything (since the values of check_phy_reg won't factor into the final
ret value). Initialize ret to true then make all of the assignments a
bitwise AND with itself so that the function always does what it should
do.

Fixes: 239bef676d8e ("drm/i915/display: Implement new combo phy initialization step")
Link: https://github.com/ClangBuiltLinux/linux/issues/1094
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
---
 drivers/gpu/drm/i915/display/intel_combo_phy.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Souza, Jose Aug. 29, 2020, 1:02 a.m. UTC | #1
On Fri, 2020-08-28 at 22:41 +0000, Patchwork wrote:
> Patch Details
> Series:	drm/i915/display: Ensure that ret is always initialized in icl_combo_phy_verify_state (rev2)
> URL:	https://patchwork.freedesktop.org/series/79536/
> State:	failure
> Details:	https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18420/index.html
> CI Bug Log - changes from CI_DRM_8938_full -> Patchwork_18420_full
> Summary
> FAILURE
> 
> Serious unknown changes coming with Patchwork_18420_full absolutely need to be
> verified manually.
> 
> If you think the reported changes have nothing to do with the changes
> introduced in Patchwork_18420_full, please notify your bug team to allow them
> to document this new failure mode, which will reduce false positives in CI.
> 
> Possible new issues
> Here are the unknown changes that may have been introduced in Patchwork_18420_full:
> 
> IGT changes
> Possible regressions
> igt@i915_pm_rpm@i2c:
> 
> shard-tglb: PASS -> DMESG-WARN +97 similar issues

This issue was not caused by this patch but it was introduced by "drm/i915/display: Implement new combo phy initialization step", so pushing this patch that fix the not initialized variable and I have opened assigned to me a issue to fix the root cause.
https://gitlab.freedesktop.org/drm/intel/-/issues/2411
Lakshminarayana: do I need to do anything to tie this gitlab issue to the CI error?

Thanks for the patch Nathan.


> igt@runner@aborted:
> 
> shard-snb: NOTRUN -> FAIL
> Known issues
> Here are the changes found in Patchwork_18420_full that come from known issues:
> 
> IGT changes
> Issues hit
> igt@gem_ctx_persistence@legacy-engines-mixed-process@blt:
> 
> shard-skl: PASS -> FAIL (i915#2374)
> igt@gem_exec_reloc@basic-concurrent0:
> 
> shard-apl: PASS -> TIMEOUT (i915#1635 / i915#1958)
> igt@gem_exec_whisper@basic-contexts-all:
> 
> shard-glk: PASS -> TIMEOUT (i915#1958) +3 similar issues
> igt@gem_exec_whisper@basic-fds-priority-all:
> 
> shard-glk: PASS -> DMESG-WARN (i915#118 / i915#95)
> igt@gem_exec_whisper@basic-queues:
> 
> shard-kbl: PASS -> TIMEOUT (i915#1958) +2 similar issues
> igt@gem_sync@basic-store-all:
> 
> shard-apl: PASS -> FAIL (i915#1635 / i915#2356)
> igt@i915_selftest@mock@contexts:
> 
> shard-skl: PASS -> INCOMPLETE (i915#198 / i915#2278)
> igt@kms_color@pipe-c-ctm-0-25:
> 
> shard-skl: PASS -> DMESG-WARN (i915#1982) +6 similar issues
> igt@kms_cursor_crc@pipe-b-cursor-128x128-onscreen:
> 
> shard-kbl: PASS -> FAIL (i915#54)
> igt@kms_cursor_legacy@cursor-vs-flip-toggle:
> 
> shard-hsw: PASS -> FAIL (i915#2370)
> igt@kms_flip@flip-vs-expired-vblank@b-dp1:
> 
> shard-apl: PASS -> FAIL (i915#1635 / i915#79)
> igt@kms_flip@flip-vs-suspend-interruptible@c-edp1:
> 
> shard-skl: PASS -> INCOMPLETE (i915#198)
> igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-mmap-gtt:
> 
> shard-tglb: PASS -> DMESG-WARN (i915#1982) +2 similar issues
> igt@kms_plane@plane-panning-bottom-right-pipe-a-planes:
> 
> shard-glk: PASS -> FAIL (i915#1036)
> igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes:
> 
> shard-glk: PASS -> DMESG-WARN (i915#1982)
> igt@kms_plane_cursor@pipe-b-primary-size-64:
> 
> shard-apl: PASS -> DMESG-WARN (i915#1635 / i915#1982)
> igt@kms_psr@psr2_sprite_blt:
> 
> shard-iclb: PASS -> SKIP (fdo#109441) +1 similar issue
> igt@kms_vblank@pipe-a-ts-continuation-suspend:
> 
> shard-kbl: PASS -> DMESG-WARN (i915#180) +12 similar issues
> igt@perf@polling-small-buf:
> 
> shard-skl: PASS -> FAIL (i915#1722)
> Possible fixes
> igt@gem_ctx_persistence@legacy-engines-mixed-process@bsd:
> 
> shard-apl: FAIL (i915#1635 / i915#2374) -> PASS
> igt@gem_exec_gttfill@all:
> 
> shard-kbl: TIMEOUT (i915#1958) -> PASS
> igt@gem_exec_whisper@basic-forked:
> 
> shard-apl: TIMEOUT (i915#1635 / i915#1958) -> PASS +1 similar issue
> igt@gem_exec_whisper@basic-queues:
> 
> shard-tglb: TIMEOUT (i915#1958) -> PASS
> igt@gem_partial_pwrite_pread@reads-display:
> 
> shard-glk: FAIL (i915#2261) -> PASS +1 similar issue
> igt@gem_render_copy@yf-tiled-ccs-to-y-tiled:
> 
> shard-skl: DMESG-WARN (i915#1982) -> PASS +7 similar issues
> igt@i915_pm_dc@dc6-psr:
> 
> shard-skl: FAIL (i915#454) -> PASS
> igt@kms_big_fb@y-tiled-64bpp-rotate-180:
> 
> shard-glk: DMESG-FAIL (i915#118 / i915#95) -> PASS +1 similar issue
> igt@kms_cursor_legacy@2x-long-cursor-vs-flip-legacy:
> 
> shard-hsw: FAIL (i915#96) -> PASS
> igt@kms_flip@2x-flip-vs-expired-vblank@bc-vga1-hdmi-a1:
> 
> shard-hsw: FAIL (i915#2122) -> PASS
> igt@kms_flip@dpms-vs-vblank-race-interruptible@a-dp1:
> 
> shard-kbl: DMESG-WARN (i915#1982) -> PASS
> igt@kms_flip@flip-vs-expired-vblank@b-hdmi-a1:
> 
> shard-glk: FAIL (i915#2122) -> PASS
> igt@kms_flip@flip-vs-suspend-interruptible@a-dp1:
> 
> shard-kbl: DMESG-WARN (i915#180) -> PASS
> igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-pwrite:
> 
> shard-tglb: DMESG-WARN (i915#1982) -> PASS +2 similar issues
> igt@kms_hdr@bpc-switch-suspend:
> 
> shard-skl: FAIL (i915#1188) -> PASS
> igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
> 
> shard-kbl: INCOMPLETE (i915#155) -> PASS +1 similar issue
> igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min:
> 
> shard-skl: FAIL (fdo#108145 / i915#265) -> PASS +1 similar issue
> igt@kms_psr@psr2_primary_page_flip:
> 
> shard-iclb: SKIP (fdo#109441) -> PASS
> Warnings
> igt@kms_color@pipe-c-ctm-red-to-blue:
> 
> shard-snb: SKIP (fdo#109271) -> INCOMPLETE (i915#82)
> igt@kms_dp_dsc@basic-dsc-enable-edp:
> 
> shard-iclb: DMESG-WARN (i915#1226) -> SKIP (fdo#109349)
> Participating hosts (11 -> 10)
> Missing (1): pig-snb-2600 
> 
> Build changes
> Linux: CI_DRM_8938 -> Patchwork_18420
> CI-20190529: 20190529
> CI_DRM_8938: 24847b4c8a388892d2ad0a24f143abfd20cdec19 @ git://anongit.freedesktop.org/gfx-ci/linux
> IGT_5774: 2a5db9f60241383272aeec176e1b97b3f487209f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
> Patchwork_18420: a5e1e06edb8ebc9c20bd36a37a5f781f6a77459a @ git://anongit.freedesktop.org/gfx-ci/linux
> piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> 
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
>
Vudum, Lakshminarayana Aug. 29, 2020, 1:26 a.m. UTC | #2
@Souza, Jose Thanks for filing the bug. I have done all necessary changes in CI bug log. All good with the patch series now.

Lakshmi.
-----Original Message-----
From: Souza, Jose <jose.souza@intel.com> 
Sent: Friday, August 28, 2020 6:02 PM
To: natechancellor@gmail.com; intel-gfx@lists.freedesktop.org; Vudum, Lakshminarayana <lakshminarayana.vudum@intel.com>
Subject: Re: [Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/display: Ensure that ret is always initialized in icl_combo_phy_verify_state (rev2)

On Fri, 2020-08-28 at 22:41 +0000, Patchwork wrote:
> Patch Details
> Series:	drm/i915/display: Ensure that ret is always initialized in icl_combo_phy_verify_state (rev2)
> URL:	https://patchwork.freedesktop.org/series/79536/
> State:	failure
> Details:	https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18420/index.html
> CI Bug Log - changes from CI_DRM_8938_full -> Patchwork_18420_full 
> Summary FAILURE
> 
> Serious unknown changes coming with Patchwork_18420_full absolutely 
> need to be verified manually.
> 
> If you think the reported changes have nothing to do with the changes 
> introduced in Patchwork_18420_full, please notify your bug team to 
> allow them to document this new failure mode, which will reduce false positives in CI.
> 
> Possible new issues
> Here are the unknown changes that may have been introduced in Patchwork_18420_full:
> 
> IGT changes
> Possible regressions
> igt@i915_pm_rpm@i2c:
> 
> shard-tglb: PASS -> DMESG-WARN +97 similar issues

This issue was not caused by this patch but it was introduced by "drm/i915/display: Implement new combo phy initialization step", so pushing this patch that fix the not initialized variable and I have opened assigned to me a issue to fix the root cause.
https://gitlab.freedesktop.org/drm/intel/-/issues/2411
Lakshminarayana: do I need to do anything to tie this gitlab issue to the CI error?

Thanks for the patch Nathan.


> igt@runner@aborted:
> 
> shard-snb: NOTRUN -> FAIL
> Known issues
> Here are the changes found in Patchwork_18420_full that come from known issues:
> 
> IGT changes
> Issues hit
> igt@gem_ctx_persistence@legacy-engines-mixed-process@blt:
> 
> shard-skl: PASS -> FAIL (i915#2374)
> igt@gem_exec_reloc@basic-concurrent0:
> 
> shard-apl: PASS -> TIMEOUT (i915#1635 / i915#1958)
> igt@gem_exec_whisper@basic-contexts-all:
> 
> shard-glk: PASS -> TIMEOUT (i915#1958) +3 similar issues
> igt@gem_exec_whisper@basic-fds-priority-all:
> 
> shard-glk: PASS -> DMESG-WARN (i915#118 / i915#95)
> igt@gem_exec_whisper@basic-queues:
> 
> shard-kbl: PASS -> TIMEOUT (i915#1958) +2 similar issues
> igt@gem_sync@basic-store-all:
> 
> shard-apl: PASS -> FAIL (i915#1635 / i915#2356)
> igt@i915_selftest@mock@contexts:
> 
> shard-skl: PASS -> INCOMPLETE (i915#198 / i915#2278)
> igt@kms_color@pipe-c-ctm-0-25:
> 
> shard-skl: PASS -> DMESG-WARN (i915#1982) +6 similar issues
> igt@kms_cursor_crc@pipe-b-cursor-128x128-onscreen:
> 
> shard-kbl: PASS -> FAIL (i915#54)
> igt@kms_cursor_legacy@cursor-vs-flip-toggle:
> 
> shard-hsw: PASS -> FAIL (i915#2370)
> igt@kms_flip@flip-vs-expired-vblank@b-dp1:
> 
> shard-apl: PASS -> FAIL (i915#1635 / i915#79)
> igt@kms_flip@flip-vs-suspend-interruptible@c-edp1:
> 
> shard-skl: PASS -> INCOMPLETE (i915#198)
> igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-mmap-gtt:
> 
> shard-tglb: PASS -> DMESG-WARN (i915#1982) +2 similar issues
> igt@kms_plane@plane-panning-bottom-right-pipe-a-planes:
> 
> shard-glk: PASS -> FAIL (i915#1036)
> igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes:
> 
> shard-glk: PASS -> DMESG-WARN (i915#1982)
> igt@kms_plane_cursor@pipe-b-primary-size-64:
> 
> shard-apl: PASS -> DMESG-WARN (i915#1635 / i915#1982)
> igt@kms_psr@psr2_sprite_blt:
> 
> shard-iclb: PASS -> SKIP (fdo#109441) +1 similar issue
> igt@kms_vblank@pipe-a-ts-continuation-suspend:
> 
> shard-kbl: PASS -> DMESG-WARN (i915#180) +12 similar issues
> igt@perf@polling-small-buf:
> 
> shard-skl: PASS -> FAIL (i915#1722)
> Possible fixes
> igt@gem_ctx_persistence@legacy-engines-mixed-process@bsd:
> 
> shard-apl: FAIL (i915#1635 / i915#2374) -> PASS
> igt@gem_exec_gttfill@all:
> 
> shard-kbl: TIMEOUT (i915#1958) -> PASS
> igt@gem_exec_whisper@basic-forked:
> 
> shard-apl: TIMEOUT (i915#1635 / i915#1958) -> PASS +1 similar issue
> igt@gem_exec_whisper@basic-queues:
> 
> shard-tglb: TIMEOUT (i915#1958) -> PASS
> igt@gem_partial_pwrite_pread@reads-display:
> 
> shard-glk: FAIL (i915#2261) -> PASS +1 similar issue
> igt@gem_render_copy@yf-tiled-ccs-to-y-tiled:
> 
> shard-skl: DMESG-WARN (i915#1982) -> PASS +7 similar issues
> igt@i915_pm_dc@dc6-psr:
> 
> shard-skl: FAIL (i915#454) -> PASS
> igt@kms_big_fb@y-tiled-64bpp-rotate-180:
> 
> shard-glk: DMESG-FAIL (i915#118 / i915#95) -> PASS +1 similar issue
> igt@kms_cursor_legacy@2x-long-cursor-vs-flip-legacy:
> 
> shard-hsw: FAIL (i915#96) -> PASS
> igt@kms_flip@2x-flip-vs-expired-vblank@bc-vga1-hdmi-a1:
> 
> shard-hsw: FAIL (i915#2122) -> PASS
> igt@kms_flip@dpms-vs-vblank-race-interruptible@a-dp1:
> 
> shard-kbl: DMESG-WARN (i915#1982) -> PASS
> igt@kms_flip@flip-vs-expired-vblank@b-hdmi-a1:
> 
> shard-glk: FAIL (i915#2122) -> PASS
> igt@kms_flip@flip-vs-suspend-interruptible@a-dp1:
> 
> shard-kbl: DMESG-WARN (i915#180) -> PASS
> igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-pwrite:
> 
> shard-tglb: DMESG-WARN (i915#1982) -> PASS +2 similar issues
> igt@kms_hdr@bpc-switch-suspend:
> 
> shard-skl: FAIL (i915#1188) -> PASS
> igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
> 
> shard-kbl: INCOMPLETE (i915#155) -> PASS +1 similar issue
> igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min:
> 
> shard-skl: FAIL (fdo#108145 / i915#265) -> PASS +1 similar issue
> igt@kms_psr@psr2_primary_page_flip:
> 
> shard-iclb: SKIP (fdo#109441) -> PASS
> Warnings
> igt@kms_color@pipe-c-ctm-red-to-blue:
> 
> shard-snb: SKIP (fdo#109271) -> INCOMPLETE (i915#82)
> igt@kms_dp_dsc@basic-dsc-enable-edp:
> 
> shard-iclb: DMESG-WARN (i915#1226) -> SKIP (fdo#109349) Participating 
> hosts (11 -> 10) Missing (1): pig-snb-2600
> 
> Build changes
> Linux: CI_DRM_8938 -> Patchwork_18420
> CI-20190529: 20190529
> CI_DRM_8938: 24847b4c8a388892d2ad0a24f143abfd20cdec19 @ 
> git://anongit.freedesktop.org/gfx-ci/linux
> IGT_5774: 2a5db9f60241383272aeec176e1b97b3f487209f @ 
> git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
> Patchwork_18420: a5e1e06edb8ebc9c20bd36a37a5f781f6a77459a @ 
> git://anongit.freedesktop.org/gfx-ci/linux
> piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ 
> git://anongit.freedesktop.org/piglit
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> 
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_combo_phy.c b/drivers/gpu/drm/i915/display/intel_combo_phy.c
index eccaa79cb4a9..a4b8aa6d0a9e 100644
--- a/drivers/gpu/drm/i915/display/intel_combo_phy.c
+++ b/drivers/gpu/drm/i915/display/intel_combo_phy.c
@@ -258,7 +258,7 @@  static bool phy_is_master(struct drm_i915_private *dev_priv, enum phy phy)
 static bool icl_combo_phy_verify_state(struct drm_i915_private *dev_priv,
 				       enum phy phy)
 {
-	bool ret;
+	bool ret = true;
 	u32 expected_val = 0;
 
 	if (!icl_combo_phy_enabled(dev_priv, phy))
@@ -276,7 +276,7 @@  static bool icl_combo_phy_verify_state(struct drm_i915_private *dev_priv,
 				     DCC_MODE_SELECT_CONTINUOSLY);
 	}
 
-	ret = cnl_verify_procmon_ref_values(dev_priv, phy);
+	ret &= cnl_verify_procmon_ref_values(dev_priv, phy);
 
 	if (phy_is_master(dev_priv, phy)) {
 		ret &= check_phy_reg(dev_priv, phy, ICL_PORT_COMP_DW8(phy),