[2/4] drm/i915: hacks for hooks

Submitted by Andi Shyti on Aug. 16, 2019, 2:39 p.m.

Details

Message ID 20190816143913.12179-2-andi.shyti@intel.com
State New
Headers show
Series "Series without cover letter" ( rev: 1 ) in Intel GFX - Try Bot

Not browsing as part of any series.

Commit Message

Andi Shyti Aug. 16, 2019, 2:39 p.m.
make it working... somehow!

DON'T FORGET:
To be squashed with the previous

Signed-off-by: Andi Shyti <andi.shyti@intel.com>
---
 drivers/gpu/drm/i915/gt/intel_gt.c    | 11 +++++------
 drivers/gpu/drm/i915/gt/intel_gt_pm.c |  7 +------
 2 files changed, 6 insertions(+), 12 deletions(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/i915/gt/intel_gt.c b/drivers/gpu/drm/i915/gt/intel_gt.c
index a3f96812e006..7a25dee605fd 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt.c
+++ b/drivers/gpu/drm/i915/gt/intel_gt.c
@@ -7,6 +7,7 @@ 
 #include "intel_gt.h"
 #include "intel_gt_pm.h"
 #include "intel_uncore.h"
+#include "intel_pm.h"
 
 void intel_gt_init_early(struct intel_gt *gt, struct drm_i915_private *i915)
 {
@@ -227,7 +228,9 @@  void intel_gt_chipset_flush(struct intel_gt *gt)
 
 void intel_gt_driver_register(struct intel_gt *gt)
 {
-	intel_rps_driver_register(&gt->rps);
+	if (IS_GEN(gt->i915, 5))
+		intel_gpu_ips_init(gt->i915);
+
 }
 
 static int intel_gt_init_scratch(struct intel_gt *gt, unsigned int size)
@@ -277,9 +280,6 @@  int intel_gt_init(struct intel_gt *gt)
 	if (err)
 		return err;
 
-	intel_rc6_init(&gt->rc6);
-	intel_rps_init(&gt->rps);
-
 	return 0;
 }
 
@@ -291,7 +291,7 @@  void intel_gt_driver_remove(struct intel_gt *gt)
 
 void intel_gt_driver_unregister(struct intel_gt *gt)
 {
-	intel_rps_driver_unregister(&gt->rps);
+	intel_gpu_ips_teardown();
 }
 
 void intel_gt_driver_release(struct intel_gt *gt)
@@ -299,7 +299,6 @@  void intel_gt_driver_release(struct intel_gt *gt)
 	/* Paranoia: make sure we have disabled everything before we exit. */
 	intel_gt_pm_disable(gt);
 
-	intel_rc6_fini(&gt->rc6);
 	intel_gt_fini_scratch(gt);
 }
 
diff --git a/drivers/gpu/drm/i915/gt/intel_gt_pm.c b/drivers/gpu/drm/i915/gt/intel_gt_pm.c
index 8ad37affe466..7012610027ff 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt_pm.c
+++ b/drivers/gpu/drm/i915/gt/intel_gt_pm.c
@@ -141,8 +141,6 @@  void intel_gt_pm_enable(struct intel_gt *gt)
 		return;
 
 	intel_gt_pm_get(gt);
-	intel_rps_enable(&gt->rps);
-	intel_llc_enable(&gt->llc);
 
 	for_each_engine(engine, gt->i915, id) {
 		intel_engine_pm_get(engine);
@@ -150,7 +148,6 @@  void intel_gt_pm_enable(struct intel_gt *gt)
 		intel_engine_pm_put(engine);
 	}
 
-	intel_rc6_enable(&gt->rc6);
 	intel_gt_pm_put(gt);
 }
 
@@ -159,9 +156,7 @@  void intel_gt_pm_disable(struct intel_gt *gt)
 	if (is_mock_device(gt))
 		return;
 
-	intel_rc6_disable(&gt->rc6);
-	intel_llc_disable(&gt->llc);
-	intel_rps_disable(&gt->rps);
+	intel_sanitize_gt_powersave(gt->i915);
 }
 
 int intel_gt_resume(struct intel_gt *gt)