drm/i915: Extract GT render power state management
i915_irq.c is large. One reason for this is that has a large chunk of the GT render power management stashed away in it. Extract that logic out of i915_irq.c and intel_pm.c and put it under one roof. Based on a patch by Chris Wilson. Signed-off-by: Andi Shyti <andi.shyti@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/msgid/20191024211642.7688-1-chris@chris-wilson.co.uk
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
#include "gem/i915_gem_context.h"
|
||||
#include "gt/intel_context.h"
|
||||
#include "gt/intel_ring.h"
|
||||
#include "gt/intel_rps.h"
|
||||
|
||||
#include "i915_active.h"
|
||||
#include "i915_drv.h"
|
||||
@@ -258,8 +259,8 @@ bool i915_request_retire(struct i915_request *rq)
|
||||
if (test_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT, &rq->fence.flags))
|
||||
i915_request_cancel_breadcrumb(rq);
|
||||
if (i915_request_has_waitboost(rq)) {
|
||||
GEM_BUG_ON(!atomic_read(&rq->i915->gt_pm.rps.num_waiters));
|
||||
atomic_dec(&rq->i915->gt_pm.rps.num_waiters);
|
||||
GEM_BUG_ON(!atomic_read(&rq->engine->gt->rps.num_waiters));
|
||||
atomic_dec(&rq->engine->gt->rps.num_waiters);
|
||||
}
|
||||
if (!test_bit(I915_FENCE_FLAG_ACTIVE, &rq->fence.flags)) {
|
||||
set_bit(I915_FENCE_FLAG_ACTIVE, &rq->fence.flags);
|
||||
@@ -1467,7 +1468,7 @@ long i915_request_wait(struct i915_request *rq,
|
||||
*/
|
||||
if (flags & I915_WAIT_PRIORITY) {
|
||||
if (!i915_request_started(rq) && INTEL_GEN(rq->i915) >= 6)
|
||||
gen6_rps_boost(rq);
|
||||
intel_rps_boost(rq);
|
||||
i915_schedule_bump_priority(rq, I915_PRIORITY_WAIT);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user