Commit 5fe8d1d
committed
drm/i915/dsi: Fix overflow issue in pclk parsing
Parsed divider p will overflow and is considered being valid in case
pll_ctl == 0.
Fix this by checking divider p before decreasing it. Also small improvement
is made by using fls() instead of custom loop.
v2: use fls() and check parsed divider
Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Link: https://lore.kernel.org/r/20250807042635.2491537-1-jouni.hogander@intel.com1 parent f9b5bf7 commit 5fe8d1d
1 file changed
+3
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
150 | 148 | | |
151 | 149 | | |
152 | 150 | | |
| |||
0 commit comments