Merge "sdm: Add DCI-P3 CSC support"
diff --git a/libdrmutils/drm_interface.h b/libdrmutils/drm_interface.h
index 81f921d..a987365 100644
--- a/libdrmutils/drm_interface.h
+++ b/libdrmutils/drm_interface.h
@@ -1068,6 +1068,7 @@
   kCscYuv2Rgb2020L,
   kCscYuv2Rgb2020FR,
   kCscYuv2RgbDolbyVisionP5,
+  kCscYuv2RgbDCIP3FR,
   kCscTypeMax,
 };
 
diff --git a/sde-drm/drm_plane.cpp b/sde-drm/drm_plane.cpp
index 8d5c0a5..a41f096 100644
--- a/sde-drm/drm_plane.cpp
+++ b/sde-drm/drm_plane.cpp
@@ -179,7 +179,18 @@
     { 0x0, 0x0, 0x0,},
     { 0x0, 0x3ff, 0x0, 0x3ff, 0x0, 0x3ff,},
     { 0x0, 0x3ff, 0x0, 0x3ff, 0x0, 0x3ff,},
-  }
+  },
+  [kCscYuv2RgbDCIP3FR] = {
+    {
+      0x100000000, 0x0, 0x194800000,
+      0x100000000, 0x7fd2800000, 0x7f8a800000,
+      0x100000000, 0x1dc800000, 0x0,
+    },
+    { 0x0, 0xfe00, 0xfe00,},
+    { 0x0, 0x0, 0x0, },
+    { 0x0, 0x3ff, 0x0, 0x3ff, 0x0, 0x3ff,},
+    { 0x0, 0x3ff, 0x0, 0x3ff, 0x0, 0x3ff,},
+  },
 };
 
 static struct drm_msm_fp16_csc csc_fp16_convert[kFP16CscTypeMax] = {
diff --git a/sdm/libs/dal/hw_device_drm.cpp b/sdm/libs/dal/hw_device_drm.cpp
index 088150d..79749b8 100644
--- a/sdm/libs/dal/hw_device_drm.cpp
+++ b/sdm/libs/dal/hw_device_drm.cpp
@@ -2040,6 +2040,10 @@
       *type = ((input_buffer.color_metadata.range == Range_Full) ?
                 DRMCscType::kCscYuv2Rgb2020FR : DRMCscType::kCscYuv2Rgb2020L);
       break;
+    case ColorPrimaries_DCIP3:
+      *type = ((input_buffer.color_metadata.range == Range_Full) ?
+                DRMCscType::kCscYuv2RgbDCIP3FR : DRMCscType::kCscTypeMax);
+      break;
     default:
       break;
   }