* [Intel-gfx] [PATCH] drm/i915/dp: prevent potential div-by-zero
@ 2023-04-18 14:04 Nikita Zhandarovich
2023-04-21 19:24 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Nikita Zhandarovich @ 2023-04-18 14:04 UTC (permalink / raw)
To: Jani Nikula
Cc: Nikita Zhandarovich, intel-gfx, Jason A. Donenfeld, dri-devel,
linux-kernel, Manasi Navare, Daniel Vetter, Rodrigo Vivi,
David Airlie, lvc-project
drm_dp_dsc_sink_max_slice_count() may return 0 if something goes
wrong on the part of the DSC sink and its DPCD register. This null
value may be later used as a divisor in intel_dsc_compute_params(),
which will lead to an error.
In the unlikely event that this issue occurs, fix it by testing the
return value of drm_dp_dsc_sink_max_slice_count() against zero.
Found by Linux Verification Center (linuxtesting.org) with static
analysis tool SVACE.
Fixes: a4a157777c80 ("drm/i915/dp: Compute DSC pipe config in atomic check")
Signed-off-by: Nikita Zhandarovich <n.zhandarovich@fintech.ru>
---
drivers/gpu/drm/i915/display/intel_dp.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 62cbab7402e9..c1825f8f885c 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -1533,6 +1533,11 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,
pipe_config->dsc.slice_count =
drm_dp_dsc_sink_max_slice_count(intel_dp->dsc_dpcd,
true);
+ if (!pipe_config->dsc.slice_count) {
+ drm_dbg_kms(&dev_priv->drm, "Unsupported Slice Count %d\n",
+ pipe_config->dsc.slice_count);
+ return -EINVAL;
+ }
} else {
u16 dsc_max_output_bpp = 0;
u8 dsc_dp_slice_count;
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/dp: prevent potential div-by-zero
2023-04-18 14:04 [Intel-gfx] [PATCH] drm/i915/dp: prevent potential div-by-zero Nikita Zhandarovich
@ 2023-04-21 19:24 ` Patchwork
2023-04-22 5:23 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2023-05-05 14:29 ` [Intel-gfx] [PATCH] " Rodrigo Vivi
2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2023-04-21 19:24 UTC (permalink / raw)
To: Nikita Zhandarovich; +Cc: intel-gfx
[-- Attachment #1: Type: text/plain, Size: 4503 bytes --]
== Series Details ==
Series: drm/i915/dp: prevent potential div-by-zero
URL : https://patchwork.freedesktop.org/series/116821/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_13043 -> Patchwork_116821v1
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116821v1/index.html
Participating hosts (36 -> 36)
------------------------------
Additional (1): bat-mtlp-8
Missing (1): fi-snb-2520m
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_116821v1:
### IGT changes ###
#### Suppressed ####
The following results come from untrusted machines, tests, or statuses.
They do not affect the overall result.
* igt@gem_exec_suspend@basic-s3@smem:
- {bat-mtlp-8}: NOTRUN -> [SKIP][1]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116821v1/bat-mtlp-8/igt@gem_exec_suspend@basic-s3@smem.html
Known issues
------------
Here are the changes found in Patchwork_116821v1 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@kms_chamelium_hpd@common-hpd-after-suspend:
- bat-rpls-1: NOTRUN -> [SKIP][2] ([i915#7828])
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116821v1/bat-rpls-1/igt@kms_chamelium_hpd@common-hpd-after-suspend.html
* igt@kms_pipe_crc_basic@suspend-read-crc:
- bat-rpls-1: NOTRUN -> [SKIP][3] ([i915#1845])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116821v1/bat-rpls-1/igt@kms_pipe_crc_basic@suspend-read-crc.html
#### Possible fixes ####
* igt@gem_exec_suspend@basic-s3@smem:
- bat-rpls-1: [ABORT][4] ([i915#6687] / [i915#7978]) -> [PASS][5]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13043/bat-rpls-1/igt@gem_exec_suspend@basic-s3@smem.html
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116821v1/bat-rpls-1/igt@gem_exec_suspend@basic-s3@smem.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#3595]: https://gitlab.freedesktop.org/drm/intel/issues/3595
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
[i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
[i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
[i915#4213]: https://gitlab.freedesktop.org/drm/intel/issues/4213
[i915#4579]: https://gitlab.freedesktop.org/drm/intel/issues/4579
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#5190]: https://gitlab.freedesktop.org/drm/intel/issues/5190
[i915#5274]: https://gitlab.freedesktop.org/drm/intel/issues/5274
[i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
[i915#6645]: https://gitlab.freedesktop.org/drm/intel/issues/6645
[i915#6687]: https://gitlab.freedesktop.org/drm/intel/issues/6687
[i915#7456]: https://gitlab.freedesktop.org/drm/intel/issues/7456
[i915#7699]: https://gitlab.freedesktop.org/drm/intel/issues/7699
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
[i915#7978]: https://gitlab.freedesktop.org/drm/intel/issues/7978
[i915#8346]: https://gitlab.freedesktop.org/drm/intel/issues/8346
[i915#8368]: https://gitlab.freedesktop.org/drm/intel/issues/8368
[i915#8369]: https://gitlab.freedesktop.org/drm/intel/issues/8369
[i915#8379]: https://gitlab.freedesktop.org/drm/intel/issues/8379
[i915#8382]: https://gitlab.freedesktop.org/drm/intel/issues/8382
Build changes
-------------
* Linux: CI_DRM_13043 -> Patchwork_116821v1
CI-20190529: 20190529
CI_DRM_13043: 2fa9c266135355c9993507d7c27cc6722956bfec @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7264: 2f0a07378e58e5c7d7b589b39ace7e3a2317f6b2 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_116821v1: 2fa9c266135355c9993507d7c27cc6722956bfec @ git://anongit.freedesktop.org/gfx-ci/linux
### Linux commits
1d01202741d7 drm/i915/dp: prevent potential div-by-zero
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116821v1/index.html
[-- Attachment #2: Type: text/html, Size: 3775 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/dp: prevent potential div-by-zero
2023-04-18 14:04 [Intel-gfx] [PATCH] drm/i915/dp: prevent potential div-by-zero Nikita Zhandarovich
2023-04-21 19:24 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
@ 2023-04-22 5:23 ` Patchwork
2023-05-05 14:29 ` [Intel-gfx] [PATCH] " Rodrigo Vivi
2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2023-04-22 5:23 UTC (permalink / raw)
To: Nikita Zhandarovich; +Cc: intel-gfx
[-- Attachment #1: Type: text/plain, Size: 14215 bytes --]
== Series Details ==
Series: drm/i915/dp: prevent potential div-by-zero
URL : https://patchwork.freedesktop.org/series/116821/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_13043_full -> Patchwork_116821v1_full
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_116821v1_full absolutely need to be
verified manually.
If you think the reported changes have nothing to do with the changes
introduced in Patchwork_116821v1_full, please notify your bug team to allow them
to document this new failure mode, which will reduce false positives in CI.
Participating hosts (7 -> 7)
------------------------------
No changes in participating hosts
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_116821v1_full:
### IGT changes ###
#### Possible regressions ####
* igt@gem_ppgtt@blt-vs-render-ctxn:
- shard-snb: [PASS][1] -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13043/shard-snb1/igt@gem_ppgtt@blt-vs-render-ctxn.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116821v1/shard-snb1/igt@gem_ppgtt@blt-vs-render-ctxn.html
Known issues
------------
Here are the changes found in Patchwork_116821v1_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_fair@basic-none-share@rcs0:
- shard-glk: NOTRUN -> [FAIL][3] ([i915#2842])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116821v1/shard-glk1/igt@gem_exec_fair@basic-none-share@rcs0.html
* igt@gem_lmem_swapping@parallel-random-verify-ccs:
- shard-glk: NOTRUN -> [SKIP][4] ([fdo#109271] / [i915#4613]) +1 similar issue
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116821v1/shard-glk1/igt@gem_lmem_swapping@parallel-random-verify-ccs.html
* igt@kms_ccs@pipe-a-random-ccs-data-y_tiled_gen12_mc_ccs:
- shard-glk: NOTRUN -> [SKIP][5] ([fdo#109271] / [i915#3886]) +1 similar issue
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116821v1/shard-glk1/igt@kms_ccs@pipe-a-random-ccs-data-y_tiled_gen12_mc_ccs.html
* igt@kms_flip@flip-vs-expired-vblank-interruptible@a-dp1:
- shard-apl: [PASS][6] -> [FAIL][7] ([i915#79])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13043/shard-apl7/igt@kms_flip@flip-vs-expired-vblank-interruptible@a-dp1.html
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116821v1/shard-apl3/igt@kms_flip@flip-vs-expired-vblank-interruptible@a-dp1.html
* igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-shrfb-draw-render:
- shard-apl: NOTRUN -> [SKIP][8] ([fdo#109271]) +3 similar issues
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116821v1/shard-apl7/igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-shrfb-draw-render.html
* igt@kms_frontbuffer_tracking@psr-rgb101010-draw-blt:
- shard-glk: NOTRUN -> [SKIP][9] ([fdo#109271]) +42 similar issues
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116821v1/shard-glk1/igt@kms_frontbuffer_tracking@psr-rgb101010-draw-blt.html
* igt@kms_plane_scaling@planes-downscale-factor-0-25-upscale-0-25@pipe-a-hdmi-a-1:
- shard-snb: NOTRUN -> [SKIP][10] ([fdo#109271]) +21 similar issues
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116821v1/shard-snb1/igt@kms_plane_scaling@planes-downscale-factor-0-25-upscale-0-25@pipe-a-hdmi-a-1.html
* igt@kms_psr2_sf@primary-plane-update-sf-dmg-area:
- shard-glk: NOTRUN -> [SKIP][11] ([fdo#109271] / [i915#658])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116821v1/shard-glk1/igt@kms_psr2_sf@primary-plane-update-sf-dmg-area.html
#### Possible fixes ####
* igt@gem_exec_endless@dispatch@vecs0:
- {shard-tglu}: [TIMEOUT][12] ([i915#3778]) -> [PASS][13]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13043/shard-tglu-10/igt@gem_exec_endless@dispatch@vecs0.html
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116821v1/shard-tglu-9/igt@gem_exec_endless@dispatch@vecs0.html
* igt@gem_exec_fair@basic-none@vcs0:
- {shard-rkl}: [FAIL][14] ([i915#2842]) -> [PASS][15]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13043/shard-rkl-1/igt@gem_exec_fair@basic-none@vcs0.html
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116821v1/shard-rkl-7/igt@gem_exec_fair@basic-none@vcs0.html
* igt@gem_exec_schedule@smoketest@rcs0:
- shard-glk: [DMESG-WARN][16] ([i915#118]) -> [PASS][17]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13043/shard-glk4/igt@gem_exec_schedule@smoketest@rcs0.html
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116821v1/shard-glk2/igt@gem_exec_schedule@smoketest@rcs0.html
* igt@gen9_exec_parse@allowed-all:
- shard-apl: [ABORT][18] ([i915#5566]) -> [PASS][19]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13043/shard-apl7/igt@gen9_exec_parse@allowed-all.html
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116821v1/shard-apl7/igt@gen9_exec_parse@allowed-all.html
* igt@i915_pm_rpm@dpms-non-lpsp:
- {shard-rkl}: [SKIP][20] ([i915#1397]) -> [PASS][21] +4 similar issues
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13043/shard-rkl-7/igt@i915_pm_rpm@dpms-non-lpsp.html
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116821v1/shard-rkl-4/igt@i915_pm_rpm@dpms-non-lpsp.html
* igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic:
- shard-glk: [FAIL][22] ([i915#72]) -> [PASS][23]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13043/shard-glk4/igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic.html
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116821v1/shard-glk2/igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic.html
* igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions:
- shard-glk: [FAIL][24] ([i915#2346]) -> [PASS][25]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13043/shard-glk9/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116821v1/shard-glk9/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html
- shard-apl: [FAIL][26] ([i915#2346]) -> [PASS][27]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13043/shard-apl1/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116821v1/shard-apl4/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html
* igt@kms_cursor_legacy@single-move@pipe-b:
- {shard-rkl}: [INCOMPLETE][28] ([i915#8011]) -> [PASS][29] +1 similar issue
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13043/shard-rkl-7/igt@kms_cursor_legacy@single-move@pipe-b.html
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116821v1/shard-rkl-4/igt@kms_cursor_legacy@single-move@pipe-b.html
* igt@perf@stress-open-close@0-rcs0:
- shard-glk: [ABORT][30] ([i915#5213]) -> [PASS][31]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13043/shard-glk1/igt@perf@stress-open-close@0-rcs0.html
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116821v1/shard-glk1/igt@perf@stress-open-close@0-rcs0.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
[fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
[fdo#109283]: https://bugs.freedesktop.org/show_bug.cgi?id=109283
[fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
[fdo#109291]: https://bugs.freedesktop.org/show_bug.cgi?id=109291
[fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
[fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
[fdo#109506]: https://bugs.freedesktop.org/show_bug.cgi?id=109506
[fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
[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#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[fdo#112283]: https://bugs.freedesktop.org/show_bug.cgi?id=112283
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#118]: https://gitlab.freedesktop.org/drm/intel/issues/118
[i915#1397]: https://gitlab.freedesktop.org/drm/intel/issues/1397
[i915#1839]: https://gitlab.freedesktop.org/drm/intel/issues/1839
[i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
[i915#2527]: https://gitlab.freedesktop.org/drm/intel/issues/2527
[i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575
[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#280]: https://gitlab.freedesktop.org/drm/intel/issues/280
[i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
[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#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
[i915#3359]: https://gitlab.freedesktop.org/drm/intel/issues/3359
[i915#3458]: https://gitlab.freedesktop.org/drm/intel/issues/3458
[i915#3469]: https://gitlab.freedesktop.org/drm/intel/issues/3469
[i915#3539]: https://gitlab.freedesktop.org/drm/intel/issues/3539
[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#3689]: https://gitlab.freedesktop.org/drm/intel/issues/3689
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#3742]: https://gitlab.freedesktop.org/drm/intel/issues/3742
[i915#3778]: https://gitlab.freedesktop.org/drm/intel/issues/3778
[i915#3840]: https://gitlab.freedesktop.org/drm/intel/issues/3840
[i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
[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#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
[i915#4213]: https://gitlab.freedesktop.org/drm/intel/issues/4213
[i915#4270]: https://gitlab.freedesktop.org/drm/intel/issues/4270
[i915#4349]: https://gitlab.freedesktop.org/drm/intel/issues/4349
[i915#4538]: https://gitlab.freedesktop.org/drm/intel/issues/4538
[i915#4565]: https://gitlab.freedesktop.org/drm/intel/issues/4565
[i915#4579]: https://gitlab.freedesktop.org/drm/intel/issues/4579
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4812]: https://gitlab.freedesktop.org/drm/intel/issues/4812
[i915#4833]: https://gitlab.freedesktop.org/drm/intel/issues/4833
[i915#4852]: https://gitlab.freedesktop.org/drm/intel/issues/4852
[i915#4860]: https://gitlab.freedesktop.org/drm/intel/issues/4860
[i915#4880]: https://gitlab.freedesktop.org/drm/intel/issues/4880
[i915#4958]: https://gitlab.freedesktop.org/drm/intel/issues/4958
[i915#5176]: https://gitlab.freedesktop.org/drm/intel/issues/5176
[i915#5213]: https://gitlab.freedesktop.org/drm/intel/issues/5213
[i915#5235]: https://gitlab.freedesktop.org/drm/intel/issues/5235
[i915#5286]: https://gitlab.freedesktop.org/drm/intel/issues/5286
[i915#5325]: https://gitlab.freedesktop.org/drm/intel/issues/5325
[i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
[i915#5563]: https://gitlab.freedesktop.org/drm/intel/issues/5563
[i915#5566]: https://gitlab.freedesktop.org/drm/intel/issues/5566
[i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095
[i915#6268]: https://gitlab.freedesktop.org/drm/intel/issues/6268
[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#6946]: https://gitlab.freedesktop.org/drm/intel/issues/6946
[i915#7116]: https://gitlab.freedesktop.org/drm/intel/issues/7116
[i915#72]: https://gitlab.freedesktop.org/drm/intel/issues/72
[i915#7561]: https://gitlab.freedesktop.org/drm/intel/issues/7561
[i915#7697]: https://gitlab.freedesktop.org/drm/intel/issues/7697
[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#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
[i915#8011]: https://gitlab.freedesktop.org/drm/intel/issues/8011
[i915#8381]: https://gitlab.freedesktop.org/drm/intel/issues/8381
Build changes
-------------
* Linux: CI_DRM_13043 -> Patchwork_116821v1
CI-20190529: 20190529
CI_DRM_13043: 2fa9c266135355c9993507d7c27cc6722956bfec @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7264: 2f0a07378e58e5c7d7b589b39ace7e3a2317f6b2 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_116821v1: 2fa9c266135355c9993507d7c27cc6722956bfec @ 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_116821v1/index.html
[-- Attachment #2: Type: text/html, Size: 10670 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915/dp: prevent potential div-by-zero
2023-04-18 14:04 [Intel-gfx] [PATCH] drm/i915/dp: prevent potential div-by-zero Nikita Zhandarovich
2023-04-21 19:24 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2023-04-22 5:23 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
@ 2023-05-05 14:29 ` Rodrigo Vivi
2 siblings, 0 replies; 4+ messages in thread
From: Rodrigo Vivi @ 2023-05-05 14:29 UTC (permalink / raw)
To: Nikita Zhandarovich
Cc: lvc-project, intel-gfx, Jason A. Donenfeld, linux-kernel,
Manasi Navare, dri-devel, Daniel Vetter, Rodrigo Vivi,
David Airlie
On Tue, Apr 18, 2023 at 07:04:30AM -0700, Nikita Zhandarovich wrote:
> drm_dp_dsc_sink_max_slice_count() may return 0 if something goes
> wrong on the part of the DSC sink and its DPCD register. This null
> value may be later used as a divisor in intel_dsc_compute_params(),
> which will lead to an error.
> In the unlikely event that this issue occurs, fix it by testing the
> return value of drm_dp_dsc_sink_max_slice_count() against zero.
>
> Found by Linux Verification Center (linuxtesting.org) with static
> analysis tool SVACE.
>
> Fixes: a4a157777c80 ("drm/i915/dp: Compute DSC pipe config in atomic check")
> Signed-off-by: Nikita Zhandarovich <n.zhandarovich@fintech.ru>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
and pushed.
Thanks for the patch and sorry for the delay.
> ---
> drivers/gpu/drm/i915/display/intel_dp.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 62cbab7402e9..c1825f8f885c 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -1533,6 +1533,11 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,
> pipe_config->dsc.slice_count =
> drm_dp_dsc_sink_max_slice_count(intel_dp->dsc_dpcd,
> true);
> + if (!pipe_config->dsc.slice_count) {
> + drm_dbg_kms(&dev_priv->drm, "Unsupported Slice Count %d\n",
> + pipe_config->dsc.slice_count);
> + return -EINVAL;
> + }
> } else {
> u16 dsc_max_output_bpp = 0;
> u8 dsc_dp_slice_count;
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-05-05 14:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-18 14:04 [Intel-gfx] [PATCH] drm/i915/dp: prevent potential div-by-zero Nikita Zhandarovich
2023-04-21 19:24 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2023-04-22 5:23 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2023-05-05 14:29 ` [Intel-gfx] [PATCH] " Rodrigo Vivi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox