Re: [RFC PATCH v4 02/42] drm: Add helper for conversion from signed-magnitude

2024-03-14 Thread Melissa Wen
On 02/26, Harry Wentland wrote: > CTM values are defined as signed-magnitude values. Add > a helper that converts from CTM signed-magnitude fixed > point value to the twos-complement value used by > drm_fixed. > > Signed-off-by: Harry Wentland > --- > include/drm/drm_fixed.h | 18 +++

Re: [RFC PATCH v4 01/42] drm: Don't treat 0 as -1 in drm_fixp2int_ceil

2024-03-14 Thread Melissa Wen
On 02/26, Harry Wentland wrote: > Unit testing this in VKMS shows that passing 0 into > this function returns -1, which is highly counter- > intuitive. Fix it by checking whether the input is > >= 0 instead of > 0. > > Fixes: 64566b5e767f9 ("drm: Add drm_fixp_from_fraction and drm_fixp2int_ceil")