xf86-video-intel: 2 commits - src/sna/compiler.h src/sna/gen6_common.h src/sna/kgem.h
Chris Wilson
ickle at kemper.freedesktop.org
Sat Jan 17 14:43:09 PST 2015
src/sna/compiler.h | 2 ++
src/sna/gen6_common.h | 17 +++++++++--------
src/sna/kgem.h | 1 +
3 files changed, 12 insertions(+), 8 deletions(-)
New commits:
commit 77f9e30007561c9635e5bb21b0047c8ed4dcc005
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Sat Jan 17 22:42:41 2015 +0000
sna: Provide a few compiler hints
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/compiler.h b/src/sna/compiler.h
index ff41217..44d17db 100644
--- a/src/sna/compiler.h
+++ b/src/sna/compiler.h
@@ -39,6 +39,7 @@
#define pure __attribute__((pure))
#define tightly_packed __attribute__((__packed__))
#define flatten __attribute__((flatten))
+#define nonnull __attribute__((nonnull))
#define page_aligned __attribute__((aligned(4096)))
#else
#define likely(expr) (expr)
@@ -51,6 +52,7 @@
#define pure
#define tighly_packed
#define flatten
+#define nonnull
#define page_aligned
#endif
diff --git a/src/sna/gen6_common.h b/src/sna/gen6_common.h
index fa450b4..482c600 100644
--- a/src/sna/gen6_common.h
+++ b/src/sna/gen6_common.h
@@ -124,9 +124,8 @@ inline static bool force_blt_ring(struct sna *sna)
return false;
}
-inline static bool prefer_blt_ring(struct sna *sna,
- struct kgem_bo *bo,
- unsigned flags)
+nonnull inline static bool
+prefer_blt_ring(struct sna *sna, struct kgem_bo *bo, unsigned flags)
{
if (PREFER_RENDER)
return PREFER_RENDER < 0;
@@ -137,8 +136,8 @@ inline static bool prefer_blt_ring(struct sna *sna,
return can_switch_to_blt(sna, bo, flags);
}
-inline static bool prefer_render_ring(struct sna *sna,
- struct kgem_bo *bo)
+nonnull inline static bool
+prefer_render_ring(struct sna *sna, struct kgem_bo *bo)
{
if (sna->flags & SNA_POWERSAVE)
return false;
@@ -176,9 +175,8 @@ prefer_blt_composite(struct sna *sna, struct sna_composite_op *tmp)
prefer_blt_bo(sna, tmp->src.bo, false));
}
-static inline bool prefer_blt_fill(struct sna *sna,
- struct kgem_bo *bo,
- unsigned flags)
+nonnull static inline bool
+prefer_blt_fill(struct sna *sna, struct kgem_bo *bo, unsigned flags)
{
if (PREFER_RENDER)
return PREFER_RENDER < 0;
commit e351c36473e0a3d6724adc06f1e0b049d74a087d
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Sat Jan 17 22:31:48 2015 +0000
sna/gen6+: Prefer not to switch away from active RENDER pipeline
If we don't have a good reason to switch to BLT, don't jump engines
simply because the BLT is idle if our target bo is active on the RENDER
pipeline.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/gen6_common.h b/src/sna/gen6_common.h
index 8ce360e..fa450b4 100644
--- a/src/sna/gen6_common.h
+++ b/src/sna/gen6_common.h
@@ -61,6 +61,9 @@ inline static bool can_switch_to_blt(struct sna *sna,
if (sna->render_state.gt < 2)
return true;
+ if (bo && RQ_IS_RENDER(bo->rq))
+ return false;
+
return kgem_ring_is_idle(&sna->kgem, KGEM_BLT);
}
diff --git a/src/sna/kgem.h b/src/sna/kgem.h
index 2267bac..59cb724 100644
--- a/src/sna/kgem.h
+++ b/src/sna/kgem.h
@@ -42,6 +42,7 @@ struct kgem_bo {
#define RQ(rq) ((struct kgem_request *)((uintptr_t)(rq) & ~3))
#define RQ_RING(rq) ((uintptr_t)(rq) & 3)
#define RQ_IS_BLT(rq) (RQ_RING(rq) == KGEM_BLT)
+#define RQ_IS_RENDER(rq) (RQ_RING(rq) == KGEM_RENDER)
#define MAKE_REQUEST(rq, ring) ((struct kgem_request *)((uintptr_t)(rq) | (ring)))
struct drm_i915_gem_exec_object2 *exec;
More information about the xorg-commit
mailing list