Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
drm: sun4i: fix potential overflow when calculating DSI dotclock rate
When calculating DSI dotclock rate, the clock rate is first multiplied by 1000 (to convert kHz to Hz), then bit per pixel value, and finally divided by (lanes * 4). Putting the two multiplication at first makes it risky to overflow when the panel expected clock rate is >= 90MHz, which is possible at least on 1080p panel. Move the *1000 multiplication to the end to prevent overflow. Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
- Loading branch information