aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2012-12-17 10:21:27 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-12-17 11:27:02 -0500
commitb45305fce5bb1abec263fcff9d81ebecd6306ede (patch)
tree5f8c074f2ceeb153bed7a0f28d631aec31b5eefc /include/uapi
parent6547fbdbfff62c99e4f7b4f985ff8b3454f33b0f (diff)
drm/i915: Implement workaround for broken CS tlb on i830/845
Now that Chris Wilson demonstrated that the key for stability on early gen 2 is to simple _never_ exchange the physical backing storage of batch buffers I've tried a stab at a kernel solution. Doesn't look too nefarious imho, now that I don't try to be too clever for my own good any more. v2: After discussing the various techniques, we've decided to always blit batches on the suspect devices, but allow userspace to opt out of the kernel workaround assume full responsibility for providing coherent batches. The principal reason is that avoiding the blit does improve performance in a few key microbenchmarks and also in cairo-trace replays. Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> [danvet: - Drop the hunk which uses HAS_BROKEN_CS_TLB to implement the ring wrap w/a. Suggested by Chris Wilson. - Also add the ACTHD check from Chris Wilson for the error state dumping, so that we still catch batches when userspace opts out of the w/a.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/drm/i915_drm.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
index b746a3cf5fa9..c4d2e9c74002 100644
--- a/include/uapi/drm/i915_drm.h
+++ b/include/uapi/drm/i915_drm.h
@@ -307,6 +307,7 @@ typedef struct drm_i915_irq_wait {
307#define I915_PARAM_HAS_PRIME_VMAP_FLUSH 21 307#define I915_PARAM_HAS_PRIME_VMAP_FLUSH 21
308#define I915_PARAM_RSVD_FOR_FUTURE_USE 22 308#define I915_PARAM_RSVD_FOR_FUTURE_USE 22
309#define I915_PARAM_HAS_SECURE_BATCHES 23 309#define I915_PARAM_HAS_SECURE_BATCHES 23
310#define I915_PARAM_HAS_PINNED_BATCHES 24
310 311
311typedef struct drm_i915_getparam { 312typedef struct drm_i915_getparam {
312 int param; 313 int param;
@@ -677,6 +678,15 @@ struct drm_i915_gem_execbuffer2 {
677 */ 678 */
678#define I915_EXEC_SECURE (1<<9) 679#define I915_EXEC_SECURE (1<<9)
679 680
681/** Inform the kernel that the batch is and will always be pinned. This
682 * negates the requirement for a workaround to be performed to avoid
683 * an incoherent CS (such as can be found on 830/845). If this flag is
684 * not passed, the kernel will endeavour to make sure the batch is
685 * coherent with the CS before execution. If this flag is passed,
686 * userspace assumes the responsibility for ensuring the same.
687 */
688#define I915_EXEC_IS_PINNED (1<<10)
689
680#define I915_EXEC_CONTEXT_ID_MASK (0xffffffff) 690#define I915_EXEC_CONTEXT_ID_MASK (0xffffffff)
681#define i915_execbuffer2_set_context_id(eb2, context) \ 691#define i915_execbuffer2_set_context_id(eb2, context) \
682 (eb2).rsvd1 = context & I915_EXEC_CONTEXT_ID_MASK 692 (eb2).rsvd1 = context & I915_EXEC_CONTEXT_ID_MASK