[Intel-gfx] [PATCH 2/2] drm/i915: Don't compile the MIPI DSI code on HSW/BDW

Damien Lespiau damien.lespiau at intel.com
Fri Jul 11 19:34:14 CEST 2014


We don't need MIPI DSI support on those platforms, so only select
DRM_I915_MIPI when compiling the driver with multi-plaform support.

Signed-off-by: Damien Lespiau <damien.lespiau at intel.com>
---
 drivers/gpu/drm/i915/Kconfig     | 4 ++++
 drivers/gpu/drm/i915/Makefile    | 8 ++++----
 drivers/gpu/drm/i915/intel_drv.h | 4 ++++
 3 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig
index b92a999..52ec05c 100644
--- a/drivers/gpu/drm/i915/Kconfig
+++ b/drivers/gpu/drm/i915/Kconfig
@@ -37,6 +37,9 @@ config DRM_I915
 config DRM_I915_DVO
 	bool
 
+config DRM_I915_MIPI
+	bool
+
 choice
 	prompt "Platform support"
 	default DRM_I915_PLATFORM_ALL
@@ -50,6 +53,7 @@ choice
 config DRM_I915_PLATFORM_ALL
 	bool "Multi-platform"
 	select DRM_I915_DVO
+	select DRM_I915_MIPI
 
 config DRM_I915_PLATFORM_HASWELL
 	bool "Haswell"
diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
index 346c3c1..22f6a64 100644
--- a/drivers/gpu/drm/i915/Makefile
+++ b/drivers/gpu/drm/i915/Makefile
@@ -58,13 +58,13 @@ i915-$(CONFIG_DRM_I915_DVO) += dvo_ch7017.o \
 			       dvo_tfp410.o \
 			       intel_dvo.o \
 			       intel_sdvo.o
+i915-$(CONFIG_DRM_I915_MIPI) += intel_dsi_cmd.o \
+				intel_dsi.o \
+				intel_dsi_pll.o \
+				intel_dsi_panel_vbt.o
 i915-y += intel_crt.o \
 	  intel_ddi.o \
 	  intel_dp.o \
-	  intel_dsi_cmd.o \
-	  intel_dsi.o \
-	  intel_dsi_pll.o \
-	  intel_dsi_panel_vbt.o \
 	  intel_hdmi.o \
 	  intel_i2c.o \
 	  intel_lvds.o \
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index dd38095..e3f8d6e 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -867,7 +867,11 @@ void intel_edp_psr_exit(struct drm_device *dev);
 void intel_edp_psr_init(struct drm_device *dev);
 
 /* intel_dsi.c */
+#ifdef CONFIG_DRM_I915_MIPI
 void intel_dsi_init(struct drm_device *dev);
+#else
+static inline void intel_dsi_init(struct drm_device *dev) {}
+#endif
 
 
 /* intel_dvo.c */
-- 
1.8.3.1




More information about the Intel-gfx mailing list