diff mbox series

[RFC,03/28] drm/i915: Make I85X platform support optional

Message ID 20210414115028.168504-4-tvrtko.ursulin@linux.intel.com (mailing list archive)
State New
Headers show
Series Old platform/gen kconfig options series | expand

Commit Message

Tvrtko Ursulin April 14, 2021, 11:50 a.m. UTC
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 drivers/gpu/drm/i915/Kconfig.platforms | 7 +++++++
 drivers/gpu/drm/i915/i915_drv.h        | 2 +-
 drivers/gpu/drm/i915/i915_pci.c        | 4 ++++
 3 files changed, 12 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/Kconfig.platforms b/drivers/gpu/drm/i915/Kconfig.platforms
index cf06ed3b0727..ab5ad0eaf4e7 100644
--- a/drivers/gpu/drm/i915/Kconfig.platforms
+++ b/drivers/gpu/drm/i915/Kconfig.platforms
@@ -11,3 +11,10 @@  config DRM_I915_PLATFORM_INTEL_I845G
 	depends on DRM_I915
 	help
 	  Include support for Intel i845G platform.
+
+config DRM_I915_PLATFORM_INTEL_I85X
+	bool "Intel i85X platform support"
+	default y
+	depends on DRM_I915
+	help
+	  Include support for Intel i85X platforms.
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 59231e500f78..585e6d61a2bd 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -2580,7 +2580,7 @@  intel_info(const struct drm_i915_private *dev_priv)
 
 #define IS_I830(dev_priv)	IS_OPT_PLATFORM(dev_priv, INTEL_I830)
 #define IS_I845G(dev_priv)	IS_OPT_PLATFORM(dev_priv, INTEL_I845G)
-#define IS_I85X(dev_priv)	IS_PLATFORM(dev_priv, INTEL_I85X)
+#define IS_I85X(dev_priv)	IS_OPT_PLATFORM(dev_priv, INTEL_I85X)
 #define IS_I865G(dev_priv)	IS_PLATFORM(dev_priv, INTEL_I865G)
 #define IS_I915G(dev_priv)	IS_PLATFORM(dev_priv, INTEL_I915G)
 #define IS_I915GM(dev_priv)	IS_PLATFORM(dev_priv, INTEL_I915GM)
diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
index d98c35d2ff9d..47aeaf817b8c 100644
--- a/drivers/gpu/drm/i915/i915_pci.c
+++ b/drivers/gpu/drm/i915/i915_pci.c
@@ -90,6 +90,7 @@  static const struct intel_device_info intel_i845g_info = {
 };
 #endif
 
+#ifdef CONFIG_DRM_I915_PLATFORM_INTEL_I85X
 static const struct intel_device_info intel_i85x_info = {
 	GEN2_FEATURES,
 	.platform = INTEL_I85X, .is_mobile = 1,
@@ -97,6 +98,7 @@  static const struct intel_device_info intel_i85x_info = {
 	.cursor_needs_physical = 1,
 	.has_fbc = 1,
 };
+#endif
 
 static const struct intel_device_info intel_i865g_info = {
 	GEN2_FEATURES,
@@ -609,7 +611,9 @@  static const struct pci_device_id pciidlist[] = {
 #ifdef CONFIG_DRM_I915_PLATFORM_INTEL_I845G
 	INTEL_I845G_IDS(&intel_i845g_info),
 #endif
+#ifdef CONFIG_DRM_I915_PLATFORM_INTEL_I85X
 	INTEL_I85X_IDS(&intel_i85x_info),
+#endif
 	INTEL_I865G_IDS(&intel_i865g_info),
 	INTEL_I915G_IDS(&intel_i915g_info),
 	INTEL_I915GM_IDS(&intel_i915gm_info),