Commit 01a9079
drm/msm/dsi: Remove useless math in DSC calculations
Multiplying a value by 2 and adding 1 to it always results in a value
that is uneven, and that 1 gets truncated immediately when performing
integer division by 2 again. There is no "rounding" possible here.
After that target_bpp_x16 is used to store a multiplication of
bits_per_pixel by 16 which is only ever read to immediately be divided
by 16 again, and is elided in much the same way.
Fixes: b908032 ("drm/msm/dsi: add support for dsc data")
Reviewed-by: Abhinav Kumar <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Signed-off-by: Marijn Suijten <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/508932/
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>1 parent 572e9fd commit 01a9079
1 file changed
+1
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1762 | 1762 | | |
1763 | 1763 | | |
1764 | 1764 | | |
1765 | | - | |
1766 | 1765 | | |
1767 | 1766 | | |
1768 | 1767 | | |
| |||
1842 | 1841 | | |
1843 | 1842 | | |
1844 | 1843 | | |
1845 | | - | |
1846 | | - | |
1847 | | - | |
1848 | | - | |
1849 | | - | |
1850 | | - | |
1851 | | - | |
1852 | | - | |
| 1844 | + | |
1853 | 1845 | | |
1854 | 1846 | | |
1855 | 1847 | | |
| |||
0 commit comments