]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
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)
committerRoxana Nicolescu <roxana.nicolescu@canonical.com>
Mon, 2 Oct 2023 15:19:40 +0000 (17:19 +0200)
commit6e67240603add3936f849d7de444301e2cad4a69
tree5f39f554c3076e2a5f408f67347a26546c172891
parent4942d7f37e5c6aad0929958de9e3a9c15cb83e67
drm: Add fixed-point helper to get rounded integer values

BugLink: https://bugs.launchpad.net/bugs/2034469
[ Upstream commit 8b25320887d7feac98875546ea0f521628b745bb ]

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
Stable-dep-of: ab87f558dcfb ("drm/vkms: Fix RGB565 pixel conversion")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
include/drm/drm_fixed.h