Skip to content
Commit 7ca7fcef authored by james qian wang (Arm Technology China)'s avatar james qian wang (Arm Technology China)
Browse files

drm: Add a new helper drm_color_ctm_s31_32_to_qm_n()



Add a new helper function drm_color_ctm_s31_32_to_qm_n() for driver to
convert S31.32 sign-magnitude to Qm.n 2's complement that supported by
hardware.

V4: Address Mihai, Daniel and Ilia's review comments.
V5: Includes the sign bit in the value of m (Qm.n).
V6: Allows m = 0 according to Mihail's comments.
V7: Address Mihail's comments.
V8: Use type 'u32' to replace 'uint32_t'
V9: Rebase.

Signed-off-by: default avatarjames qian wang (Arm Technology China) <james.qian.wang@arm.com>
Reviewed-by: default avatarMihail Atanassov <mihail.atanassov@arm.com>
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20191112110927.20931-2-james.qian.wang@arm.com
parent 47734835
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment