Skip to content

Commit 292a27b

Browse files
committed
drm/i915/lmem: Check against i915_selftest only under CONFIG_SELFTEST
The i915_selftest module parameters only exist when CONFIG_DRM_I915_SELFTEST is set. Signed-off-by: Chris Wilson <[email protected]> Cc: Matthew Auld <[email protected]> Reviewed-by: Matthew Auld <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 4a31741 commit 292a27b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/gpu/drm/i915/i915_drv.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1487,6 +1487,7 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
14871487
* Check if we support fake LMEM -- for now we only unleash this for
14881488
* the live selftests(test-and-exit).
14891489
*/
1490+
#if IS_ENABLED(CONFIG_DRM_I915_SELFTEST)
14901491
if (IS_ENABLED(CONFIG_DRM_I915_UNSTABLE_FAKE_LMEM)) {
14911492
if (INTEL_GEN(dev_priv) >= 9 && i915_selftest.live < 0 &&
14921493
i915_modparams.fake_lmem_start) {
@@ -1497,6 +1498,7 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
14971498
GEM_BUG_ON(!IS_DGFX(dev_priv));
14981499
}
14991500
}
1501+
#endif
15001502

15011503
ret = pci_enable_device(pdev);
15021504
if (ret)

0 commit comments

Comments
 (0)