artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7e2e87f
)
drm/i915/dp: prevent potential div-by-zero
author
jsg
<jsg@openbsd.org>
Thu, 15 Jun 2023 02:41:45 +0000
(
02:41
+0000)
committer
jsg
<jsg@openbsd.org>
Thu, 15 Jun 2023 02:41:45 +0000
(
02:41
+0000)
From Nikita Zhandarovich
86d73b1f98a81f3ecfc19dfe6f8d50daf5707330
in linux-6.1.y/6.1.30
0ff80028e2702c7c3d78b69705dc47c1ccba8c39
in mainline linux
sys/dev/pci/drm/i915/display/intel_dp.c
patch
|
blob
|
history
diff --git
a/sys/dev/pci/drm/i915/display/intel_dp.c
b/sys/dev/pci/drm/i915/display/intel_dp.c
index
dd62aea
..
dd636c2
100644
(file)
--- a/
sys/dev/pci/drm/i915/display/intel_dp.c
+++ b/
sys/dev/pci/drm/i915/display/intel_dp.c
@@
-1512,6
+1512,11
@@
static 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;
u8 dsc_dp_slice_count;