mirror of
https://github.com/torvalds/linux.git
synced 2026-11-28 17:32:32 +00:00
While working on the CTM implementation of VKMS I had to ascertain myself of a few assumptions. One of those is whether drm_fixed.h treats its numbers using signed-magnitude or twos-complement. It is twos-complement. In order to make someone else's day easier I am adding the drm_test_int2fixp test that validates the above assumption. I am also adding a test for the new sm2fixp function that converts from a signed-magnitude fixed point to the twos-complement fixed point. Reviewed-by: Louis Chauvet <[email protected]> Signed-off-by: Alex Hung <[email protected]> Signed-off-by: Harry Wentland <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Signed-off-by: Simon Ser <[email protected]> Link: https://patch.msgid.link/[email protected]