drm/amd/display: Moved swizzle parameter translation to dc.
authorYongqiang Sun <yongqiang.sun@amd.com>
Mon, 12 Dec 2016 19:20:45 +0000 (14:20 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 26 Sep 2017 21:05:05 +0000 (17:05 -0400)
Signed-off-by: Yongqiang Sun <yongqiang.sun@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/basics/conversion.c
drivers/gpu/drm/amd/display/dc/basics/conversion.h
drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c

index ebe14e17cc2e97016ea692bf5b4bb74e16d0248d..5682fea2080d57bc9d5c4140f6ecf731fe8133ae 100644 (file)
@@ -221,3 +221,12 @@ void calculate_adjustments_y_only(
                adjustments->brightness);
 }
 
+unsigned int log_2(unsigned int num)
+{
+       unsigned int result = 0;
+
+       while ((num >>= 1) != 0)
+               result++;
+
+       return result;
+}
index 18cbe41e80ffa498c3c74e7c4375921ed5a5a929..b7fe431a7952fdcc389bcc660288db6559b1f9f9 100644 (file)
@@ -48,4 +48,6 @@ void calculate_adjustments_y_only(
        const struct dc_csc_adjustments *adjustments,
        struct fixed31_32 *matrix);
 
+unsigned int log_2(unsigned int num);
+
 #endif
index fd8a49afbec6bef7204f1767cefb8f4b523a826e..e9005e0048e6b3e0d0728d0913efb578bbf1b1d0 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "mem_input.h"
 #include "reg_helper.h"
+#include "basics/conversion.h"
 
 #define CTX \
        mi->ctx
@@ -129,16 +130,6 @@ static bool is_vert_scan(enum dc_rotation_angle rotation)
        }
 }
 
-static unsigned int log_2(unsigned int num)
-{
-       unsigned int result = 0;
-
-       while ((num >>= 1) != 0)
-               result++;
-
-       return result;
-}
-
 void dce_mem_input_program_pte_vm(struct mem_input *mi,
                enum surface_pixel_format format,
                union dc_tiling_info *tiling_info,