artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9cb0f46
)
drm/amd/display: fix a divided-by-zero error
author
jsg
<jsg@openbsd.org>
Fri, 12 May 2023 11:00:22 +0000
(11:00 +0000)
committer
jsg
<jsg@openbsd.org>
Fri, 12 May 2023 11:00:22 +0000
(11:00 +0000)
From Alex Hung
e43cf7abece2efaebe0a757909d258212d01c404
in linux-6.1.y/6.1.28
0b5dfe12755f87ec014bb4cc1930485026167430
in mainline linux
sys/dev/pci/drm/amd/display/modules/power/power_helpers.c
patch
|
blob
|
history
diff --git
a/sys/dev/pci/drm/amd/display/modules/power/power_helpers.c
b/sys/dev/pci/drm/amd/display/modules/power/power_helpers.c
index
01fc6a3
..
9edd393
100644
(file)
--- a/
sys/dev/pci/drm/amd/display/modules/power/power_helpers.c
+++ b/
sys/dev/pci/drm/amd/display/modules/power/power_helpers.c
@@
-924,6
+924,10
@@
bool psr_su_set_y_granularity(struct dc *dc, struct dc_link *link,
pic_height = stream->timing.v_addressable +
stream->timing.v_border_top + stream->timing.v_border_bottom;
+
+ if (stream->timing.dsc_cfg.num_slices_v == 0)
+ return false;
+
slice_height = pic_height / stream->timing.dsc_cfg.num_slices_v;
if (slice_height) {