From: Tvrtko Ursulin <[email protected]>

We are peeking into PM internals so have to guard that with
IS_ENABLED(CONFIG_PM) to build where the former is disabled.

Signed-off-by: Tvrtko Ursulin <[email protected]>
Fixes: 1fe699e30113 ("drm/i915/pmu: Fix sleep under atomic in RC6 readout")
Reported-by: kbuild test robot <[email protected]>
Cc: Tvrtko Ursulin <[email protected]>
Cc: Chris Wilson <[email protected]>
Cc: Imre Deak <[email protected]>
Cc: Jani Nikula <[email protected]>
Cc: Joonas Lahtinen <[email protected]>
Cc: Rodrigo Vivi <[email protected]>
Cc: David Airlie <[email protected]>
---
 drivers/gpu/drm/i915/i915_pmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c
index bfc402d47609..a0f56925532e 100644
--- a/drivers/gpu/drm/i915/i915_pmu.c
+++ b/drivers/gpu/drm/i915/i915_pmu.c
@@ -451,7 +451,7 @@ static u64 get_rc6(struct drm_i915_private *i915, bool 
locked)
 
                if (!locked)
                        spin_unlock_irqrestore(&i915->pmu.lock, flags);
-       } else {
+       } else if (IS_ENABLED(CONFIG_PM)) {
                struct pci_dev *pdev = i915->drm.pdev;
                struct device *kdev = &pdev->dev;
                unsigned long flags2;
-- 
2.14.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to