[PATCH 3/8] drm/i915: Extend rpm in intel_guc_global_policies_update

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

 



From: Tilak Tangudu <tilak.tangudu@xxxxxxxxx>

intel_guc_is_ready need to be guarded with rpm
helpers as it needs guc interaction.

Signed-off-by: Tilak Tangudu <tilak.tangudu@xxxxxxxxx>
---
 drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c
index ba7541f3ca61..1d3b3559420d 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c
@@ -195,11 +195,14 @@ int intel_guc_global_policies_update(struct intel_guc *guc)
 
 	guc_policies_init(guc);
 
-	if (!intel_guc_is_ready(guc))
+	wakeref = intel_runtime_pm_get(&gt->i915->runtime_pm);
+	if (!intel_guc_is_ready(guc)) {
+		intel_runtime_pm_put(&gt->i915->runtime_pm, wakeref);
 		return 0;
+	}
 
-	with_intel_runtime_pm(&gt->i915->runtime_pm, wakeref)
-		ret = guc_action_policies_update(guc, scheduler_policies);
+	ret = guc_action_policies_update(guc, scheduler_policies);
+	intel_runtime_pm_put(&gt->i915->runtime_pm, wakeref);
 
 	return ret;
 }
-- 
2.25.1




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

  Powered by Linux