drm/amd/display: Add function to create 4d19 fixed point
authorTyler DiBattista <tyler.dibattista@amd.com>
Mon, 11 Feb 2019 16:22:49 +0000 (11:22 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 19 Mar 2019 20:04:02 +0000 (15:04 -0500)
[Why]
Implemented for future use

Signed-off-by: Tyler DiBattista <tyler.dibattista@amd.com>
Reviewed-by: Eric Bernstein <Eric.Bernstein@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c
drivers/gpu/drm/amd/display/include/fixed31_32.h

index f28989860fd81cdc70643421350f167b41183d35..1e9a2d3520684c20923843d433a87a7aac50b6ea 100644 (file)
@@ -449,6 +449,11 @@ static inline unsigned int clamp_ux_dy(
                return min_clamp;
 }
 
+unsigned int dc_fixpt_u4d19(struct fixed31_32 arg)
+{
+       return ux_dy(arg.value, 4, 19);
+}
+
 unsigned int dc_fixpt_u3d19(struct fixed31_32 arg)
 {
        return ux_dy(arg.value, 3, 19);
index 52a73332befb9e4a27d1d2b4e1cdf4bbf480a21b..89ef9f6860e5b7eb2cc530da0aaf74804731e93f 100644 (file)
@@ -503,6 +503,8 @@ static inline int dc_fixpt_ceil(struct fixed31_32 arg)
  * fractional
  */
 
+unsigned int dc_fixpt_u4d19(struct fixed31_32 arg);
+
 unsigned int dc_fixpt_u3d19(struct fixed31_32 arg);
 
 unsigned int dc_fixpt_u2d19(struct fixed31_32 arg);