#include "i915_drv.h"
#include "intel_gt.h"
+#include "intel_gt_pm.h"
void intel_gt_init_early(struct intel_gt *gt, struct drm_i915_private *i915)
{
INIT_LIST_HEAD(>->closed_vma);
spin_lock_init(>->closed_lock);
+
+ intel_gt_pm_init_early(gt);
}
intel_wakeref_put(&i915->runtime_pm, &i915->gt.wakeref, intel_gt_park);
}
-void intel_gt_pm_init(struct drm_i915_private *i915)
+void intel_gt_pm_init_early(struct intel_gt *gt)
{
- intel_wakeref_init(&i915->gt.wakeref);
- BLOCKING_INIT_NOTIFIER_HEAD(&i915->gt.pm_notifications);
+ intel_wakeref_init(>->wakeref);
+ BLOCKING_INIT_NOTIFIER_HEAD(>->pm_notifications);
}
static bool reset_engines(struct drm_i915_private *i915)
#include <linux/types.h>
struct drm_i915_private;
+struct intel_gt;
enum {
INTEL_GT_UNPARK,
void intel_gt_pm_get(struct drm_i915_private *i915);
void intel_gt_pm_put(struct drm_i915_private *i915);
-void intel_gt_pm_init(struct drm_i915_private *i915);
+void intel_gt_pm_init_early(struct intel_gt *gt);
void intel_gt_sanitize(struct drm_i915_private *i915, bool force);
void intel_gt_resume(struct drm_i915_private *i915);
{
int err;
- intel_gt_pm_init(dev_priv);
-
i915_gem_init__mm(dev_priv);
i915_gem_init__pm(dev_priv);
mock_uncore_init(&i915->uncore);
i915_gem_init__mm(i915);
intel_gt_init_early(&i915->gt, i915);
- intel_gt_pm_init(i915);
atomic_inc(&i915->gt.wakeref.count); /* disable; no hw support */
init_waitqueue_head(&i915->gpu_error.wait_queue);