Revert "amdgpu/dc: drop dml_util_is_420"
authorHarry Wentland <harry.wentland@amd.com>
Tue, 17 Oct 2017 02:10:54 +0000 (22:10 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Sat, 21 Oct 2017 20:44:56 +0000 (16:44 -0400)
This reverts commit e5bcf3d83e40cc7acc9d111519b7bacaf4a01070.

Unfortunately these clash with our DML update from the HW guys.
Will attempt to reroll them after.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dml/dml_common_defs.c
drivers/gpu/drm/amd/display/dc/dml/dml_common_defs.h

index 7c0eb52b91b87aa28e82c710c445fdd87216c1ac..c242b8d41b8a22e6ab6ad3eb0f492f3292c091e4 100644 (file)
@@ -59,3 +59,36 @@ unsigned int dml_round_to_multiple(
        else
                return (num - remainder);
 }
+
+bool dml_util_is_420(enum source_format_class sorce_format)
+{
+       bool val = false;
+
+       switch (sorce_format) {
+       case dm_444_16:
+               val = false;
+               break;
+       case dm_444_32:
+               val = false;
+               break;
+       case dm_444_64:
+               val = false;
+               break;
+       case dm_420_8:
+               val = true;
+               break;
+       case dm_420_10:
+               val = true;
+               break;
+       case dm_422_8:
+               val = false;
+               break;
+       case dm_422_10:
+               val = false;
+               break;
+       default:
+               BREAK_TO_DEBUGGER();
+       }
+
+       return val;
+}
index a2da3da5ef8f05eeae0a891f787a20aaa33f19d4..c621f8321b03a128e8a1a424dc7a6d2f268b36cf 100644 (file)
@@ -32,6 +32,7 @@
 
 #define DTRACE(str, ...) dm_logger_write(mode_lib->logger, LOG_DML, str, ##__VA_ARGS__);
 
+bool dml_util_is_420(enum source_format_class sorce_format);
 double dml_round(double a);
 unsigned int dml_round_to_multiple(
                        unsigned int num, unsigned int multiple, bool up);