[PATCH v2 03/13] drm/msm/edp: Create separate Makefile/Kconfig

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The msm Makefile and Kconfig are getting conjusted. Move EDP related
stuff into separate Kconfig and Makefile.

Signed-off-by: Archit Taneja <architt@xxxxxxxxxxxxxx>
---
 drivers/gpu/drm/msm/Kconfig      |  1 +
 drivers/gpu/drm/msm/Makefile     |  7 +------
 drivers/gpu/drm/msm/edp/Kconfig  |  7 +++++++
 drivers/gpu/drm/msm/edp/Makefile |  3 +++
 drivers/gpu/drm/msm/msm_drv.h    | 17 +++++++++++++++++
 5 files changed, 29 insertions(+), 6 deletions(-)
 create mode 100644 drivers/gpu/drm/msm/edp/Kconfig
 create mode 100644 drivers/gpu/drm/msm/edp/Makefile

diff --git a/drivers/gpu/drm/msm/Kconfig b/drivers/gpu/drm/msm/Kconfig
index 1c702f7..051145f 100644
--- a/drivers/gpu/drm/msm/Kconfig
+++ b/drivers/gpu/drm/msm/Kconfig
@@ -26,3 +26,4 @@ config DRM_MSM_REGISTER_LOGGING
 
 source "drivers/gpu/drm/msm/dsi/Kconfig"
 source "drivers/gpu/drm/msm/hdmi/Kconfig"
+source "drivers/gpu/drm/msm/edp/Kconfig"
diff --git a/drivers/gpu/drm/msm/Makefile b/drivers/gpu/drm/msm/Makefile
index 66b7ec4..9386cfe 100644
--- a/drivers/gpu/drm/msm/Makefile
+++ b/drivers/gpu/drm/msm/Makefile
@@ -5,12 +5,6 @@ msm-y := \
 	adreno/adreno_gpu.o \
 	adreno/a3xx_gpu.o \
 	adreno/a4xx_gpu.o \
-	edp/edp.o \
-	edp/edp_aux.o \
-	edp/edp_bridge.o \
-	edp/edp_connector.o \
-	edp/edp_ctrl.o \
-	edp/edp_phy.o \
 	mdp/mdp_format.o \
 	mdp/mdp_kms.o \
 	mdp/mdp4/mdp4_crtc.o \
@@ -48,5 +42,6 @@ msm-$(CONFIG_COMMON_CLK) += mdp/mdp4/mdp4_lvds_pll.o
 
 obj-$(CONFIG_DRM_MSM_DSI) += dsi/
 obj-$(CONFIG_DRM_MSM_HDMI) += hdmi/
+obj-$(CONFIG_DRM_MSM_EDP) += edp/
 
 obj-$(CONFIG_DRM_MSM)	+= msm.o
diff --git a/drivers/gpu/drm/msm/edp/Kconfig b/drivers/gpu/drm/msm/edp/Kconfig
new file mode 100644
index 0000000..576d8c2f
--- /dev/null
+++ b/drivers/gpu/drm/msm/edp/Kconfig
@@ -0,0 +1,7 @@
+config DRM_MSM_EDP
+	bool "Enable EDP support in MSM DRM driver"
+	depends on DRM_MSM
+	default y
+	help
+	  Choose this option if you have a need for Embedded Display
+	  Port encoder support.
diff --git a/drivers/gpu/drm/msm/edp/Makefile b/drivers/gpu/drm/msm/edp/Makefile
new file mode 100644
index 0000000..e623d59
--- /dev/null
+++ b/drivers/gpu/drm/msm/edp/Makefile
@@ -0,0 +1,3 @@
+ccflags-y := -Iinclude/drm -Idrivers/gpu/drm/msm
+
+obj-y := edp.o edp_aux.o edp_bridge.o edp_connector.o edp_ctrl.o edp_phy.o
diff --git a/drivers/gpu/drm/msm/msm_drv.h b/drivers/gpu/drm/msm/msm_drv.h
index ba13ab6..67b5b1b 100644
--- a/drivers/gpu/drm/msm/msm_drv.h
+++ b/drivers/gpu/drm/msm/msm_drv.h
@@ -264,10 +264,27 @@ static inline void __exit hdmi_unregister(void)
 #endif
 
 struct msm_edp;
+#ifdef CONFIG_DRM_MSM_EDP
 void __init msm_edp_register(void);
 void __exit msm_edp_unregister(void);
 int msm_edp_modeset_init(struct msm_edp *edp, struct drm_device *dev,
 		struct drm_encoder *encoder);
+#else
+static inline void __init msm_edp_register(void)
+{
+}
+
+static inline void __exit msm_edp_unregister(void)
+{
+}
+
+static inline int msm_edp_modeset_init(struct msm_edp *edp,
+				       struct drm_device *dev,
+				       struct drm_encoder *encoder)
+{
+	return -EINVAL;
+}
+#endif
 
 struct msm_dsi;
 enum msm_dsi_encoder_id {
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation

--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux