Skip to content

Commit

Permalink
drm/i915: Pull the GEM powermangement coupling into its own file
Browse files Browse the repository at this point in the history
Split out the powermanagement portion (GT wakeref, suspend/resume) of
GEM from i915_gem.c into its own file.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190424200717.1686-2-chris@chris-wilson.co.uk
  • Loading branch information
Chris Wilson committed Apr 24, 2019
1 parent d91e657 commit 23c3c3d
Show file tree
Hide file tree
Showing 10 changed files with 418 additions and 376 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/i915/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ i915-y += \
i915_gem_internal.o \
i915_gem.o \
i915_gem_object.o \
i915_gem_pm.o \
i915_gem_render_state.o \
i915_gem_shrinker.o \
i915_gem_stolen.o \
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/i915/Makefile.header-test
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
header_test := \
i915_active_types.h \
i915_gem_context_types.h \
i915_gem_pm.h \
i915_priolist_types.h \
i915_scheduler_types.h \
i915_timeline_types.h \
Expand Down
4 changes: 2 additions & 2 deletions drivers/gpu/drm/i915/i915_debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -3942,8 +3942,8 @@ i915_drop_caches_set(void *data, u64 val)
if (val & DROP_IDLE) {
do {
if (READ_ONCE(i915->gt.active_requests))
flush_delayed_work(&i915->gt.retire_work);
drain_delayed_work(&i915->gt.idle_work);
flush_delayed_work(&i915->gem.retire_work);
drain_delayed_work(&i915->gem.idle_work);
} while (READ_ONCE(i915->gt.awake));
}

Expand Down
12 changes: 7 additions & 5 deletions drivers/gpu/drm/i915/i915_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -2020,6 +2020,12 @@ struct drm_i915_private {
*/
intel_wakeref_t awake;

ktime_t last_init_time;

struct i915_vma *scratch;
} gt;

struct {
/**
* We leave the user IRQ off as much as possible,
* but this means that requests will finish and never
Expand All @@ -2037,11 +2043,7 @@ struct drm_i915_private {
* off the idle_work.
*/
struct delayed_work idle_work;

ktime_t last_init_time;

struct i915_vma *scratch;
} gt;
} gem;

/* For i945gm vblank irq vs. C3 workaround */
struct {
Expand Down
Loading

0 comments on commit 23c3c3d

Please sign in to comment.