[PATCH] drm/i915/lmem: Check against i915_selftest only under CONFIG_SELFTEST

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

 



The i195_selftest module parameters only exist when
CONFIG_DRM_I915_SELFTEST is set.

Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
Cc: Matthew Auld <matthew.auld@xxxxxxxxx>
---
 drivers/gpu/drm/i915/i915_drv.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 480e2054f628..3340485c12e3 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -1487,6 +1487,7 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	 * Check if we support fake LMEM -- for now we only unleash this for
 	 * the live selftests(test-and-exit).
 	 */
+#if IS_ENABLED(CONFIG_DRM_I915_SELFTEST)
 	if (IS_ENABLED(CONFIG_DRM_I915_UNSTABLE_FAKE_LMEM)) {
 		if (INTEL_GEN(dev_priv) >= 9 && i915_selftest.live < 0 &&
 		    i915_modparams.fake_lmem_start) {
@@ -1497,6 +1498,7 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 			GEM_BUG_ON(!IS_DGFX(dev_priv));
 		}
 	}
+#endif
 
 	ret = pci_enable_device(pdev);
 	if (ret)
-- 
2.24.0.rc2

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux