diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-09-06 15:14:46 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-09-06 16:06:06 +0100 |
commit | 489a93e4cc2e14e25339693933dddf4946717f11 (patch) | |
tree | cf6721b8515be0cdec7790d497e2c8719eb05bd8 /src/sna/gen7_render.c | |
parent | f2ed1ac7b9807106405bbc2b18159a39c2d407d0 (diff) |
sna/gen6+: Switch to using the BLT more often when off AC
The BLT is more power-efficient for the operations it can handle, so use
it when possible (following the usual caveats) if we know we only have
battery power.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/gen7_render.c')
-rw-r--r-- | src/sna/gen7_render.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c index be7dda0f..c0d22df5 100644 --- a/src/sna/gen7_render.c +++ b/src/sna/gen7_render.c @@ -2168,7 +2168,10 @@ static inline bool untiled_tlb_miss(struct kgem_bo *bo) static int prefer_blt_bo(struct sna *sna, struct kgem_bo *bo) { - if (RQ_IS_BLT(bo->rq)) + if (bo->rq) + return RQ_IS_BLT(bo->rq); + + if (sna->flags & SNA_POWERSAVE) return true; return bo->tiling == I915_TILING_NONE || (bo->scanout && !sna->kgem.has_wt); @@ -2178,6 +2181,9 @@ inline static bool prefer_blt_ring(struct sna *sna, struct kgem_bo *bo, unsigned flags) { + if (sna->flags & SNA_POWERSAVE) + return true; + if (kgem_bo_is_render(bo)) return false; @@ -2187,6 +2193,9 @@ inline static bool prefer_blt_ring(struct sna *sna, inline static bool prefer_render_ring(struct sna *sna, struct kgem_bo *bo) { + if (sna->flags & SNA_POWERSAVE) + return false; + if (sna->render_state.gen7.info->gt < 2) return false; |