summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xarch/riscv/boot/dts/starfive/jh7100-common.dtsi2
-rwxr-xr-xdrivers/gpu/drm/starfive/Kconfig8
-rwxr-xr-xdrivers/gpu/drm/starfive/starfive_drm_encoder.c18
3 files changed, 26 insertions, 2 deletions
diff --git a/arch/riscv/boot/dts/starfive/jh7100-common.dtsi b/arch/riscv/boot/dts/starfive/jh7100-common.dtsi
index 3e4a1bcfa44b..ef2190c08688 100755
--- a/arch/riscv/boot/dts/starfive/jh7100-common.dtsi
+++ b/arch/riscv/boot/dts/starfive/jh7100-common.dtsi
@@ -721,7 +721,7 @@
remote-endpoint = <&dsi_out_port>;
encoder-type = <6>; //2-TMDS, 3-LVDS, 6-DSI, 8-DPI
reg = <1>;
- status = "disabled";
+ status = "okay";
};
};
diff --git a/drivers/gpu/drm/starfive/Kconfig b/drivers/gpu/drm/starfive/Kconfig
index 3003874cee5b..930b25aa58ad 100755
--- a/drivers/gpu/drm/starfive/Kconfig
+++ b/drivers/gpu/drm/starfive/Kconfig
@@ -12,3 +12,11 @@ config DRM_STARFIVE
The module will be called starfive-drm
This driver provides kernel mode setting and
buffer management to userspace.
+
+config DRM_STARFIVE_MIPI_DSI
+ bool "Starfive MIPI DSI Select"
+ help
+ This selects support for starfive SoC specific extensions
+ for the Synopsys DesignWare MIPI driver. If you want to
+ enable MIPI DSI on VIC7100 based SoC, you should
+ select this option. \ No newline at end of file
diff --git a/drivers/gpu/drm/starfive/starfive_drm_encoder.c b/drivers/gpu/drm/starfive/starfive_drm_encoder.c
index 02aa859ecf0c..2fb197976035 100755
--- a/drivers/gpu/drm/starfive/starfive_drm_encoder.c
+++ b/drivers/gpu/drm/starfive/starfive_drm_encoder.c
@@ -52,6 +52,9 @@ static int starfive_encoder_of_parse_ports(struct device *dev,
num_port++;
}
+ //use CONFIG_DRM_STARFIVE_MIPI_DSI change only support one encoder
+ num_port = 1;
+
encoder_data = kzalloc(num_port * sizeof(*encoder_data), GFP_KERNEL);
*data = encoder_data;
@@ -61,7 +64,20 @@ static int starfive_encoder_of_parse_ports(struct device *dev,
continue;
of_property_read_u32(node, "encoder-type", &encoder_data->encoder_type);
- of_property_read_u32(node, "reg", &encoder_data->endpoint_reg);
+ if (encoder_data->encoder_type == 2) {
+#ifndef CONFIG_DRM_STARFIVE_MIPI_DSI
+ of_property_read_u32(node, "reg", &encoder_data->endpoint_reg);
+#else
+ continue;
+#endif
+ } else {
+#ifdef CONFIG_DRM_STARFIVE_MIPI_DSI
+ of_property_read_u32(node, "reg", &encoder_data->endpoint_reg);
+#else
+ continue;
+#endif
+ }
+
encoder_data++;
}