drm/i915: Remove pm park/unpark notifications
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 21 Oct 2019 18:32:36 +0000 (19:32 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 21 Oct 2019 20:07:57 +0000 (21:07 +0100)
With the last user, i915_vma_parked(), retired, there are no more users
of the per-gt pm notifications and we can remove the unused
infrastructure.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191021183236.21790-2-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gem/i915_gem_pm.c
drivers/gpu/drm/i915/gem/i915_gem_pm.h
drivers/gpu/drm/i915/gt/intel_gt_pm.c
drivers/gpu/drm/i915/gt/intel_gt_pm.h
drivers/gpu/drm/i915/gt/intel_gt_types.h
drivers/gpu/drm/i915/i915_gem.c

index 2aa7e9be088fd431f708448c72f0992227a1a6fc..ee3279c76566a6b11f13de094b12ebc7dde6bfd7 100644 (file)
 
 #include "i915_drv.h"
 
-static int pm_notifier(struct notifier_block *nb,
-                      unsigned long action,
-                      void *data)
-{
-       struct drm_i915_private *i915 =
-               container_of(nb, typeof(*i915), gem.pm_notifier);
-
-       switch (action) {
-       case INTEL_GT_UNPARK:
-               break;
-
-       case INTEL_GT_PARK:
-               break;
-       }
-
-       return NOTIFY_OK;
-}
-
 static bool switch_to_kernel_context_sync(struct intel_gt *gt)
 {
        bool result = !intel_gt_is_wedged(gt);
@@ -206,10 +188,3 @@ err_wedged:
        }
        goto out_unlock;
 }
-
-void i915_gem_init__pm(struct drm_i915_private *i915)
-{
-       i915->gem.pm_notifier.notifier_call = pm_notifier;
-       blocking_notifier_chain_register(&i915->gt.pm_notifications,
-                                        &i915->gem.pm_notifier);
-}
index 6f7d5d11ac3b3695d76d30aa9844c960bd3e0c72..a017572778d5ae13dd03a7c26bd5b84905348d33 100644 (file)
@@ -12,8 +12,6 @@
 struct drm_i915_private;
 struct work_struct;
 
-void i915_gem_init__pm(struct drm_i915_private *i915);
-
 bool i915_gem_load_power_context(struct drm_i915_private *i915);
 void i915_gem_resume(struct drm_i915_private *i915);
 
index fde5112b6650e8e4238b18fdfedb4f22ac3f268a..427aded512f23eaea955da987da13b5260a9ff99 100644 (file)
 #include "intel_rc6.h"
 #include "intel_wakeref.h"
 
-static void pm_notify(struct intel_gt *gt, int state)
-{
-       blocking_notifier_call_chain(&gt->pm_notifications, state, gt->i915);
-}
-
 static int __gt_unpark(struct intel_wakeref *wf)
 {
        struct intel_gt *gt = container_of(wf, typeof(*gt), wakeref);
@@ -55,8 +50,6 @@ static int __gt_unpark(struct intel_wakeref *wf)
        intel_gt_queue_hangcheck(gt);
        intel_gt_unpark_requests(gt);
 
-       pm_notify(gt, INTEL_GT_UNPARK);
-
        return 0;
 }
 
@@ -68,7 +61,6 @@ static int __gt_park(struct intel_wakeref *wf)
 
        GEM_TRACE("\n");
 
-       pm_notify(gt, INTEL_GT_PARK);
        intel_gt_park_requests(gt);
 
        i915_vma_parked(gt);
@@ -96,8 +88,6 @@ static const struct intel_wakeref_ops wf_ops = {
 void intel_gt_pm_init_early(struct intel_gt *gt)
 {
        intel_wakeref_init(&gt->wakeref, gt->uncore->rpm, &wf_ops);
-
-       BLOCKING_INIT_NOTIFIER_HEAD(&gt->pm_notifications);
 }
 
 void intel_gt_pm_init(struct intel_gt *gt)
index 997770d3a968223e427c5e0c62a50966024aa3bd..0ed87da4bb68b7f8816dd65b53283a1f606efd0e 100644 (file)
 #include "intel_gt_types.h"
 #include "intel_wakeref.h"
 
-enum {
-       INTEL_GT_UNPARK,
-       INTEL_GT_PARK,
-};
-
 static inline bool intel_gt_pm_is_awake(const struct intel_gt *gt)
 {
        return intel_wakeref_is_active(&gt->wakeref);
index ae4aaf75ac78d4dcea40e15a09c3c5f867041f78..980973e66e7f9482c23c58c3b32b78376fdd9fba 100644 (file)
@@ -83,8 +83,6 @@ struct intel_gt {
        struct intel_llc llc;
        struct intel_rc6 rc6;
 
-       struct blocking_notifier_head pm_notifications;
-
        ktime_t last_init_time;
 
        struct i915_vma *scratch;
index dd0a3271b4e2a4bdaa6403a14de6d9f1311671aa..81eecbdf9685415fa328e99b28642bfe3d5ef539 100644 (file)
@@ -1432,7 +1432,6 @@ static void i915_gem_init__mm(struct drm_i915_private *i915)
 void i915_gem_init_early(struct drm_i915_private *dev_priv)
 {
        i915_gem_init__mm(dev_priv);
-       i915_gem_init__pm(dev_priv);
 
        spin_lock_init(&dev_priv->fb_tracking.lock);
 }