drm: Add fixed-point helper to get rounded integer values
authorMaíra Canal <mcanal@igalia.com>
Fri, 12 May 2023 10:40:44 +0000 (07:40 -0300)
committerMaíra Canal <mairacanal@riseup.net>
Mon, 15 May 2023 13:58:10 +0000 (10:58 -0300)
commit8b25320887d7feac98875546ea0f521628b745bb
tree4a1e72888735fdbb59b886610b81636b16fe9410
parent812562b8d881ce6d33fed8052b3a10b718430fb5
drm: Add fixed-point helper to get rounded integer values

Create a new fixed-point helper to allow us to return the rounded value
of our fixed point value.

[v2]:
    * Create the function drm_fixp2int_round() (Melissa Wen).
[v3]:
    * Use drm_fixp2int() instead of shifting manually (Arthur Grillo).

Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Arthur Grillo <arthurgrillo@riseup.net>
Signed-off-by: Maíra Canal <mairacanal@riseup.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20230512104044.65034-1-mcanal@igalia.com
include/drm/drm_fixed.h