Commit a2b4dead authored by Chris Wilson's avatar Chris Wilson

drm/i915: Move global activity tracking from GEM to GT

As our global unpark/park keep track of the number of active users, we
can simply move the accounting from the GEM layer to the base GT layer.
It was placed originally inside GEM to benefit from the 100ms extra
delay on idleness, but that has been eliminated and now there is no
substantive difference between the layers. In moving it, we move another
piece of the puzzle out from underneath struct_mutex.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191004134015.13204-13-chris@chris-wilson.co.uk
parent 66101975
...@@ -10,14 +10,6 @@ ...@@ -10,14 +10,6 @@
#include "gt/intel_gt_requests.h" #include "gt/intel_gt_requests.h"
#include "i915_drv.h" #include "i915_drv.h"
#include "i915_globals.h"
static void i915_gem_park(struct drm_i915_private *i915)
{
i915_vma_parked(i915);
i915_globals_park();
}
static int pm_notifier(struct notifier_block *nb, static int pm_notifier(struct notifier_block *nb,
unsigned long action, unsigned long action,
...@@ -28,11 +20,10 @@ static int pm_notifier(struct notifier_block *nb, ...@@ -28,11 +20,10 @@ static int pm_notifier(struct notifier_block *nb,
switch (action) { switch (action) {
case INTEL_GT_UNPARK: case INTEL_GT_UNPARK:
i915_globals_unpark();
break; break;
case INTEL_GT_PARK: case INTEL_GT_PARK:
i915_gem_park(i915); i915_vma_parked(i915);
break; break;
} }
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
*/ */
#include "i915_drv.h" #include "i915_drv.h"
#include "i915_globals.h"
#include "i915_params.h" #include "i915_params.h"
#include "intel_context.h" #include "intel_context.h"
#include "intel_engine_pm.h" #include "intel_engine_pm.h"
...@@ -27,6 +28,8 @@ static int __gt_unpark(struct intel_wakeref *wf) ...@@ -27,6 +28,8 @@ static int __gt_unpark(struct intel_wakeref *wf)
GEM_TRACE("\n"); GEM_TRACE("\n");
i915_globals_unpark();
/* /*
* It seems that the DMC likes to transition between the DC states a lot * It seems that the DMC likes to transition between the DC states a lot
* when there are no connected displays (no active power domains) during * when there are no connected displays (no active power domains) during
...@@ -78,6 +81,8 @@ static int __gt_park(struct intel_wakeref *wf) ...@@ -78,6 +81,8 @@ static int __gt_park(struct intel_wakeref *wf)
GEM_BUG_ON(!wakeref); GEM_BUG_ON(!wakeref);
intel_display_power_put(i915, POWER_DOMAIN_GT_IRQ, wakeref); intel_display_power_put(i915, POWER_DOMAIN_GT_IRQ, wakeref);
i915_globals_park();
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment