summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 760c01a)
raw | patch | inline | side by side (parent: 760c01a)
author | Chris Wilson <chris@chris-wilson.co.uk> | |
Sun, 19 Dec 2010 13:01:15 +0000 (13:01 +0000) | ||
committer | Chris Wilson <chris@chris-wilson.co.uk> | |
Sun, 19 Dec 2010 13:01:15 +0000 (13:01 +0000) |
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h
index 19da2c044007a57ed9c17bcb6ee1ecfb77597e56..98e15978721fe30101063d84890232c1827d2def 100644 (file)
--- a/include/drm/i915_drm.h
+++ b/include/drm/i915_drm.h
#define I915_PARAM_HAS_BSD 10
#define I915_PARAM_HAS_BLT 11
#define I915_PARAM_HAS_RELAXED_FENCING 12
+#define I915_PARAM_HAS_COHERENT_RINGS 13
+#define I915_PARAM_HAS_EXEC_CONSTANTS 14
typedef struct drm_i915_getparam {
int param;
#define I915_EXEC_RENDER (1<<0)
#define I915_EXEC_BSD (2<<0)
#define I915_EXEC_BLT (3<<0)
+
+/* Used for switching the constants addressing mode on gen4+ RENDER ring.
+ * Gen6+ only supports relative addressing to dynamic state (default) and
+ * absolute addressing.
+ *
+ * These flags are ignored for the BSD and BLT rings.
+ */
+#define I915_EXEC_CONSTANTS_MASK (3<<6)
+#define I915_EXEC_CONSTANTS_REL_GENERAL (0<<6) /* default */
+#define I915_EXEC_CONSTANTS_ABSOLUTE (1<<6)
+#define I915_EXEC_CONSTANTS_REL_SURFACE (2<<6) /* gen4/5 only */
__u64 flags;
__u64 rsvd1;
__u64 rsvd2;
diff --git a/intel/intel_bufmgr.c b/intel/intel_bufmgr.c
index f93a87078c8062b5f1f37fbb6ea1e162eeb3d36a..b7c5c09172ac12870461121c199f6304d7f122c4 100644 (file)
--- a/intel/intel_bufmgr.c
+++ b/intel/intel_bufmgr.c
int
drm_intel_bo_mrb_exec(drm_intel_bo *bo, int used,
drm_clip_rect_t *cliprects, int num_cliprects, int DR4,
- int ring_flag)
+ unsigned int rings)
{
if (bo->bufmgr->bo_mrb_exec)
return bo->bufmgr->bo_mrb_exec(bo, used,
cliprects, num_cliprects, DR4,
- ring_flag);
+ rings);
return -ENODEV;
}
diff --git a/intel/intel_bufmgr.h b/intel/intel_bufmgr.h
index e1b4c4546dd694f767c2c5ffc5f151fcf0b6f816..daa18b4cda8897f9e0a698151fc3319cb4ac918b 100644 (file)
--- a/intel/intel_bufmgr.h
+++ b/intel/intel_bufmgr.h
struct drm_clip_rect *cliprects, int num_cliprects, int DR4);
int drm_intel_bo_mrb_exec(drm_intel_bo *bo, int used,
struct drm_clip_rect *cliprects, int num_cliprects, int DR4,
- int ring_flag);
+ unsigned int flags);
int drm_intel_bufmgr_check_aperture_space(drm_intel_bo ** bo_array, int count);
int drm_intel_bo_emit_reloc(drm_intel_bo *bo, uint32_t offset,
index c5bb5885c5960cc48e740c172dc8899ab1a3d5f6..72c8731f722ab61bddc805bcfcc15f283630f630 100644 (file)
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
static int
drm_intel_gem_bo_mrb_exec2(drm_intel_bo *bo, int used,
drm_clip_rect_t *cliprects, int num_cliprects, int DR4,
- int ring_flag)
+ unsigned int flags)
{
drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *)bo->bufmgr;
struct drm_i915_gem_execbuffer2 execbuf;
int ret, i;
- switch (ring_flag) {
+ switch (flags & 0x7) {
default:
return -EINVAL;
case I915_EXEC_BLT:
execbuf.num_cliprects = num_cliprects;
execbuf.DR1 = 0;
execbuf.DR4 = DR4;
- execbuf.flags = ring_flag;
+ execbuf.flags = flags;
execbuf.rsvd1 = 0;
execbuf.rsvd2 = 0;
index 87e91e7f7aef61b2a013bd20f274b9a0057c6003..0b625200abc7368ed9adfdacc9d2149de9bcc7aa 100644 (file)
* ring buffer
*/
int (*bo_mrb_exec) (drm_intel_bo *bo, int used,
- drm_clip_rect_t *cliprects, int num_cliprects,
- int DR4, int ring_flag);
+ drm_clip_rect_t *cliprects, int num_cliprects,
+ int DR4, unsigned flags);
/**
* Pin a buffer to the aperture and fix the offset until unpinned