summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/dc/dml
diff options
context:
space:
mode:
authorHarry Wentland <harry.wentland@amd.com>2017-10-16 22:10:54 -0400
committerAlex Deucher <alexander.deucher@amd.com>2017-10-21 16:44:56 -0400
commite168df36a807dff8e5cc78c1daeb9dec89e4118c (patch)
treea87dd9a6cab27bc55b08b0fa66a54d2c4b95ec8b /drivers/gpu/drm/amd/display/dc/dml
parent78109d230b797077d58600694ca427b9830eb600 (diff)
Revert "amdgpu/dc: drop dml_util_is_420"
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>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/dml')
-rw-r--r--drivers/gpu/drm/amd/display/dc/dml/dml_common_defs.c33
-rw-r--r--drivers/gpu/drm/amd/display/dc/dml/dml_common_defs.h1
2 files changed, 34 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dml/dml_common_defs.c b/drivers/gpu/drm/amd/display/dc/dml/dml_common_defs.c
index 7c0eb52b91b8..c242b8d41b8a 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/dml_common_defs.c
+++ b/drivers/gpu/drm/amd/display/dc/dml/dml_common_defs.c
@@ -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;
+}
diff --git a/drivers/gpu/drm/amd/display/dc/dml/dml_common_defs.h b/drivers/gpu/drm/amd/display/dc/dml/dml_common_defs.h
index a2da3da5ef8f..c621f8321b03 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/dml_common_defs.h
+++ b/drivers/gpu/drm/amd/display/dc/dml/dml_common_defs.h
@@ -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);