ARM: dts: msm: add topologies for panels supported with sdm845 target

This change enumerates and lists the display topologies supported by
the panels for sdm845 target. It also cleans up the panel dtsi to
move the common DSC nodes information to the parent node.

Change-Id: I3c58b84f122adba381b59a20e04bc6db2692ec62
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
diff --git a/arch/arm64/boot/dts/qcom/dsi-panel-nt35597-truly-dsc-wqxga-cmd.dtsi b/arch/arm64/boot/dts/qcom/dsi-panel-nt35597-truly-dsc-wqxga-cmd.dtsi
index c6dfc8d..c52c18b 100644
--- a/arch/arm64/boot/dts/qcom/dsi-panel-nt35597-truly-dsc-wqxga-cmd.dtsi
+++ b/arch/arm64/boot/dts/qcom/dsi-panel-nt35597-truly-dsc-wqxga-cmd.dtsi
@@ -221,41 +221,12 @@
 		qcom,mdss-dsi-te-using-te-pin;
 
 		qcom,compression-mode = "dsc";
-		qcom,config-select = <&dsi_nt35597_truly_dsc_cmd_config0>;
+		qcom,mdss-dsc-slice-height = <16>;
+		qcom,mdss-dsc-slice-width = <720>;
+		qcom,mdss-dsc-slice-per-pkt = <2>;
+		qcom,mdss-dsc-bit-per-component = <8>;
+		qcom,mdss-dsc-bit-per-pixel = <8>;
+		qcom,mdss-dsc-block-prediction-enable;
 
-		dsi_nt35597_truly_dsc_cmd_config0: config0 {
-			qcom,mdss-dsc-encoders = <1>;
-			qcom,mdss-dsc-slice-height = <16>;
-			qcom,mdss-dsc-slice-width = <720>;
-			qcom,mdss-dsc-slice-per-pkt = <2>;
-
-			qcom,mdss-dsc-bit-per-component = <8>;
-			qcom,mdss-dsc-bit-per-pixel = <8>;
-			qcom,mdss-dsc-block-prediction-enable;
-		};
-
-		dsi_nt35597_truly_dsc_cmd_config1: config1 {
-			qcom,lm-split = <720 720>;
-			qcom,mdss-dsc-encoders = <1>; /* 3D Mux */
-			qcom,mdss-dsc-slice-height = <16>;
-			qcom,mdss-dsc-slice-width = <720>;
-			qcom,mdss-dsc-slice-per-pkt = <2>;
-
-			qcom,mdss-dsc-bit-per-component = <8>;
-			qcom,mdss-dsc-bit-per-pixel = <8>;
-			qcom,mdss-dsc-block-prediction-enable;
-		};
-
-		dsi_nt35597_truly_dsc_cmd_config2: config2 {
-			qcom,lm-split = <720 720>;
-			qcom,mdss-dsc-encoders = <2>; /* DSC Merge */
-			qcom,mdss-dsc-slice-height = <16>;
-			qcom,mdss-dsc-slice-width = <720>;
-			qcom,mdss-dsc-slice-per-pkt = <2>;
-
-			qcom,mdss-dsc-bit-per-component = <8>;
-			qcom,mdss-dsc-bit-per-pixel = <8>;
-			qcom,mdss-dsc-block-prediction-enable;
-		};
 	};
 };
diff --git a/arch/arm64/boot/dts/qcom/dsi-panel-nt35597-truly-dsc-wqxga-video.dtsi b/arch/arm64/boot/dts/qcom/dsi-panel-nt35597-truly-dsc-wqxga-video.dtsi
index 334120a..fe9129c 100644
--- a/arch/arm64/boot/dts/qcom/dsi-panel-nt35597-truly-dsc-wqxga-video.dtsi
+++ b/arch/arm64/boot/dts/qcom/dsi-panel-nt35597-truly-dsc-wqxga-video.dtsi
@@ -208,41 +208,11 @@
 		qcom,mdss-pan-physical-height-dimension = <131>;
 
 		qcom,compression-mode = "dsc";
-		qcom,config-select = <&dsi_nt35597_truly_dsc_video_config0>;
-
-		dsi_nt35597_truly_dsc_video_config0: config0 {
-			qcom,mdss-dsc-encoders = <1>;
-			qcom,mdss-dsc-slice-height = <16>;
-			qcom,mdss-dsc-slice-width = <720>;
-			qcom,mdss-dsc-slice-per-pkt = <2>;
-
-			qcom,mdss-dsc-bit-per-component = <8>;
-			qcom,mdss-dsc-bit-per-pixel = <8>;
-			qcom,mdss-dsc-block-prediction-enable;
-		};
-
-		dsi_nt35597_truly_dsc_video_config1: config1 {
-			qcom,lm-split = <720 720>;
-			qcom,mdss-dsc-encoders = <1>; /* 3D Mux */
-			qcom,mdss-dsc-slice-height = <16>;
-			qcom,mdss-dsc-slice-width = <720>;
-			qcom,mdss-dsc-slice-per-pkt = <2>;
-
-			qcom,mdss-dsc-bit-per-component = <8>;
-			qcom,mdss-dsc-bit-per-pixel = <8>;
-			qcom,mdss-dsc-block-prediction-enable;
-		};
-
-		dsi_nt35597_truly_dsc_video_config2: config2 {
-			qcom,lm-split = <720 720>;
-			qcom,mdss-dsc-encoders = <2>; /* DSC Merge */
-			qcom,mdss-dsc-slice-height = <16>;
-			qcom,mdss-dsc-slice-width = <720>;
-			qcom,mdss-dsc-slice-per-pkt = <2>;
-
-			qcom,mdss-dsc-bit-per-component = <8>;
-			qcom,mdss-dsc-bit-per-pixel = <8>;
-			qcom,mdss-dsc-block-prediction-enable;
-		};
+		qcom,mdss-dsc-slice-height = <16>;
+		qcom,mdss-dsc-slice-width = <720>;
+		qcom,mdss-dsc-slice-per-pkt = <2>;
+		qcom,mdss-dsc-bit-per-component = <8>;
+		qcom,mdss-dsc-bit-per-pixel = <8>;
+		qcom,mdss-dsc-block-prediction-enable;
 	};
 };
diff --git a/arch/arm64/boot/dts/qcom/dsi-panel-sharp-dsc-4k-cmd.dtsi b/arch/arm64/boot/dts/qcom/dsi-panel-sharp-dsc-4k-cmd.dtsi
index 25c949c..061f1d9 100644
--- a/arch/arm64/boot/dts/qcom/dsi-panel-sharp-dsc-4k-cmd.dtsi
+++ b/arch/arm64/boot/dts/qcom/dsi-panel-sharp-dsc-4k-cmd.dtsi
@@ -77,17 +77,11 @@
 				 05 01 00 00 78 00 02 10 00];
 
 		qcom,compression-mode = "dsc";
-		qcom,config-select = <&dsi_sharp_dsc_cmd_config0>;
-
-		dsi_sharp_dsc_cmd_config0: config0 {
-			qcom,mdss-dsc-encoders = <1>;
-			qcom,mdss-dsc-slice-height = <32>;
-			qcom,mdss-dsc-slice-width = <1080>;
-			qcom,mdss-dsc-slice-per-pkt = <1>;
-
-			qcom,mdss-dsc-bit-per-component = <8>;
-			qcom,mdss-dsc-bit-per-pixel = <8>;
-			qcom,mdss-dsc-block-prediction-enable;
-		};
+		qcom,mdss-dsc-slice-height = <32>;
+		qcom,mdss-dsc-slice-width = <1080>;
+		qcom,mdss-dsc-slice-per-pkt = <1>;
+		qcom,mdss-dsc-bit-per-component = <8>;
+		qcom,mdss-dsc-bit-per-pixel = <8>;
+		qcom,mdss-dsc-block-prediction-enable;
 	};
 };
diff --git a/arch/arm64/boot/dts/qcom/dsi-panel-sharp-dsc-4k-video.dtsi b/arch/arm64/boot/dts/qcom/dsi-panel-sharp-dsc-4k-video.dtsi
index cc093d6..e43da55 100644
--- a/arch/arm64/boot/dts/qcom/dsi-panel-sharp-dsc-4k-video.dtsi
+++ b/arch/arm64/boot/dts/qcom/dsi-panel-sharp-dsc-4k-video.dtsi
@@ -70,17 +70,11 @@
 				 05 01 00 00 78 00 02 10 00];
 
 		qcom,compression-mode = "dsc";
-		qcom,config-select = <&dsi_sharp_dsc_video_config0>;
-
-		dsi_sharp_dsc_video_config0: config0 {
-			qcom,mdss-dsc-encoders = <1>;
-			qcom,mdss-dsc-slice-height = <32>;
-			qcom,mdss-dsc-slice-width = <1080>;
-			qcom,mdss-dsc-slice-per-pkt = <1>;
-
-			qcom,mdss-dsc-bit-per-component = <8>;
-			qcom,mdss-dsc-bit-per-pixel = <8>;
-			qcom,mdss-dsc-block-prediction-enable;
-		};
+		qcom,mdss-dsc-slice-height = <32>;
+		qcom,mdss-dsc-slice-width = <1080>;
+		qcom,mdss-dsc-slice-per-pkt = <1>;
+		qcom,mdss-dsc-bit-per-component = <8>;
+		qcom,mdss-dsc-bit-per-pixel = <8>;
+		qcom,mdss-dsc-block-prediction-enable;
 	};
 };
diff --git a/arch/arm64/boot/dts/qcom/sdm845-sde-display.dtsi b/arch/arm64/boot/dts/qcom/sdm845-sde-display.dtsi
index efd8f45..ac3352e 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-sde-display.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-sde-display.dtsi
@@ -306,40 +306,63 @@
 	qcom,mdss-dsi-panel-phy-timings = [00 1c 07 07 23 21 07 07 05 03 04 00];
 	qcom,mdss-dsi-t-clk-post = <0x0D>;
 	qcom,mdss-dsi-t-clk-pre = <0x2D>;
+	qcom,display-topology = <2 0 2>,
+				<1 0 2>;
+	qcom,default-topology-index = <0>;
 };
 
 &dsi_dual_nt35597_truly_cmd {
 	qcom,mdss-dsi-panel-phy-timings = [00 1c 07 07 23 21 07 07 05 03 04 00];
 	qcom,mdss-dsi-t-clk-post = <0x0D>;
 	qcom,mdss-dsi-t-clk-pre = <0x2D>;
+	qcom,display-topology = <2 0 2>,
+				<1 0 2>;
+	qcom,default-topology-index = <0>;
 };
 
 &dsi_nt35597_truly_dsc_cmd {
 	qcom,mdss-dsi-panel-phy-timings = [00 15 05 05 20 1f 05 05 03 03 04 00];
 	qcom,mdss-dsi-t-clk-post = <0x0b>;
 	qcom,mdss-dsi-t-clk-pre = <0x23>;
+	qcom,display-topology = <2 2 2>;
+	qcom,default-topology-index = <0>;
 };
 
 &dsi_nt35597_truly_dsc_video {
 	qcom,mdss-dsi-panel-phy-timings = [00 15 05 05 20 1f 05 05 03 03 04 00];
 	qcom,mdss-dsi-t-clk-post = <0x0b>;
 	qcom,mdss-dsi-t-clk-pre = <0x23>;
+	qcom,display-topology = <2 2 2>;
+	qcom,default-topology-index = <0>;
 };
 
 &dsi_sharp_4k_dsc_video {
 	qcom,mdss-dsi-panel-phy-timings = [00 18 06 06 21 20 06 06 04 03 04 00];
 	qcom,mdss-dsi-t-clk-post = <0x0c>;
 	qcom,mdss-dsi-t-clk-pre = <0x27>;
+	qcom,display-topology = <2 2 2>;
+	qcom,default-topology-index = <0>;
 };
 
 &dsi_sharp_4k_dsc_cmd {
 	qcom,mdss-dsi-panel-phy-timings = [00 18 06 06 21 20 06 06 04 03 04 00];
 	qcom,mdss-dsi-t-clk-post = <0x0c>;
 	qcom,mdss-dsi-t-clk-pre = <0x27>;
+	qcom,display-topology = <2 2 2>;
+	qcom,default-topology-index = <0>;
 };
 
 &dsi_dual_sharp_1080_120hz_cmd {
 	qcom,mdss-dsi-panel-phy-timings = [00 24 09 09 26 24 09 09 06 03 04 00];
 	qcom,mdss-dsi-t-clk-post = <0x0f>;
 	qcom,mdss-dsi-t-clk-pre = <0x36>;
+	qcom,display-topology = <2 0 2>,
+				<1 0 2>;
+	qcom,default-topology-index = <0>;
+};
+
+&dsi_sharp_1080_cmd {
+	qcom,display-topology = <2 0 2>,
+				<1 0 2>;
+	qcom,default-topology-index = <0>;
 };