[PATCH 02/11] drm/i915: Avoid rpm helpers in intel_guc_slpc_set_media_ratio_mode

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

 



Removed rpm helpers from intel_guc_slpc_set_media_ratio_mode
and added rpm helpers at below high level functions.
-media_freq_factor_store
-intel_guc_slpc_enable via intel_gt_init_hw (already rpm wakeref is hold)

Signed-off-by: Tilak Tangudu <tilak.tangudu@xxxxxxxxx>
---
 drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c | 2 ++
 drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c | 8 +++-----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c b/drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c
index ae8a8f725f01..b8f151044780 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c
+++ b/drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c
@@ -648,6 +648,7 @@ static ssize_t media_freq_factor_store(struct device *dev,
 {
 	struct intel_gt *gt = intel_gt_sysfs_get_drvdata(dev, attr->attr.name);
 	struct intel_guc_slpc *slpc = &gt->uc.guc.slpc;
+	intel_wakeref_t wakeref;
 	u32 factor, mode;
 	int err;
 
@@ -663,6 +664,7 @@ static ssize_t media_freq_factor_store(struct device *dev,
 	if (mode > SLPC_MEDIA_RATIO_MODE_FIXED_ONE_TO_TWO)
 		return -EINVAL;
 
+	with_intel_runtime_pm(gt->uncore->rpm, wakeref)
 	err = intel_guc_slpc_set_media_ratio_mode(slpc, mode);
 	if (!err) {
 		slpc->media_ratio_mode = mode;
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c
index 2df31af70d63..9a8440378dc2 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c
@@ -510,16 +510,14 @@ int intel_guc_slpc_get_min_freq(struct intel_guc_slpc *slpc, u32 *val)
 int intel_guc_slpc_set_media_ratio_mode(struct intel_guc_slpc *slpc, u32 val)
 {
 	struct drm_i915_private *i915 = slpc_to_i915(slpc);
-	intel_wakeref_t wakeref;
 	int ret = 0;
 
 	if (!HAS_MEDIA_RATIO_MODE(i915))
 		return -ENODEV;
 
-	with_intel_runtime_pm(&i915->runtime_pm, wakeref)
-		ret = slpc_set_param(slpc,
-				     SLPC_PARAM_MEDIA_FF_RATIO_MODE,
-				     val);
+	ret = slpc_set_param(slpc,
+			     SLPC_PARAM_MEDIA_FF_RATIO_MODE,
+			     val);
 	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