diff options
Diffstat (limited to 'drivers')
-rwxr-xr-x | drivers/gpu/drm/starfive/Kconfig | 8 | ||||
-rwxr-xr-x | drivers/gpu/drm/starfive/starfive_drm_encoder.c | 18 |
2 files changed, 25 insertions, 1 deletions
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++; } |