summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2008-06-06 13:26:03 -0700
committerKeith Packard <keithp@keithp.com>2008-06-06 13:26:03 -0700
commit6cd0ef06a6c2bdcede166d9a2d0434e58e4a01f2 (patch)
tree97bbac92f2fde075f4c3bce4b438c6346d8e744f
parent9f46c6935d154743162c6239903a4a9e443907bc (diff)
[intel] remove settable use_mi_batchbuffer_start
The driver can know what hardware requires MI_BATCH_BUFFER vs MI_BATCH_BUFFER_START; there's no reason to let user mode configure this.
-rw-r--r--linux-core/i915_gem.c17
-rw-r--r--shared-core/i915_dma.c22
-rw-r--r--shared-core/i915_drv.h1
3 files changed, 16 insertions, 24 deletions
diff --git a/linux-core/i915_gem.c b/linux-core/i915_gem.c
index abc929e9..d60a98f8 100644
--- a/linux-core/i915_gem.c
+++ b/linux-core/i915_gem.c
@@ -1315,7 +1315,14 @@ i915_dispatch_gem_execbuffer(struct drm_device *dev,
return ret;
}
- if (dev_priv->use_mi_batchbuffer_start) {
+ if (IS_I830(dev) || IS_845G(dev)) {
+ BEGIN_LP_RING(4);
+ OUT_RING(MI_BATCH_BUFFER);
+ OUT_RING(exec_start | MI_BATCH_NON_SECURE);
+ OUT_RING(exec_start + exec_len - 4);
+ OUT_RING(0);
+ ADVANCE_LP_RING();
+ } else {
BEGIN_LP_RING(2);
if (IS_I965G(dev)) {
OUT_RING(MI_BATCH_BUFFER_START |
@@ -1328,14 +1335,6 @@ i915_dispatch_gem_execbuffer(struct drm_device *dev,
OUT_RING(exec_start | MI_BATCH_NON_SECURE);
}
ADVANCE_LP_RING();
-
- } else {
- BEGIN_LP_RING(4);
- OUT_RING(MI_BATCH_BUFFER);
- OUT_RING(exec_start | MI_BATCH_NON_SECURE);
- OUT_RING(exec_start + exec_len - 4);
- OUT_RING(0);
- ADVANCE_LP_RING();
}
}
diff --git a/shared-core/i915_dma.c b/shared-core/i915_dma.c
index f6465bf6..e5c6d0c4 100644
--- a/shared-core/i915_dma.c
+++ b/shared-core/i915_dma.c
@@ -285,9 +285,6 @@ static int i915_initialize(struct drm_device * dev,
/* We are using separate values as placeholders for mechanisms for
* private backbuffer/depthbuffer usage.
*/
- dev_priv->use_mi_batchbuffer_start = 0;
- if (IS_I965G(dev)) /* 965 doesn't support older method */
- dev_priv->use_mi_batchbuffer_start = 1;
/* Allow hardware batchbuffers unless told otherwise.
*/
@@ -639,7 +636,14 @@ int i915_dispatch_batchbuffer(struct drm_device * dev,
return ret;
}
- if (dev_priv->use_mi_batchbuffer_start) {
+ if (IS_I830(dev) || IS_845G(dev)) {
+ BEGIN_LP_RING(4);
+ OUT_RING(MI_BATCH_BUFFER);
+ OUT_RING(batch->start | MI_BATCH_NON_SECURE);
+ OUT_RING(batch->start + batch->used - 4);
+ OUT_RING(0);
+ ADVANCE_LP_RING();
+ } else {
BEGIN_LP_RING(2);
if (IS_I965G(dev)) {
OUT_RING(MI_BATCH_BUFFER_START | (2 << 6) | MI_BATCH_NON_SECURE_I965);
@@ -649,14 +653,6 @@ int i915_dispatch_batchbuffer(struct drm_device * dev,
OUT_RING(batch->start | MI_BATCH_NON_SECURE);
}
ADVANCE_LP_RING();
-
- } else {
- BEGIN_LP_RING(4);
- OUT_RING(MI_BATCH_BUFFER);
- OUT_RING(batch->start | MI_BATCH_NON_SECURE);
- OUT_RING(batch->start + batch->used - 4);
- OUT_RING(0);
- ADVANCE_LP_RING();
}
}
@@ -930,8 +926,6 @@ static int i915_setparam(struct drm_device *dev, void *data,
switch (param->param) {
case I915_SETPARAM_USE_MI_BATCHBUFFER_START:
- if (!IS_I965G(dev))
- dev_priv->use_mi_batchbuffer_start = param->value;
break;
case I915_SETPARAM_TEX_LRU_LOG_GRANULARITY:
dev_priv->tex_lru_log_granularity = param->value;
diff --git a/shared-core/i915_drv.h b/shared-core/i915_drv.h
index 55af6552..8acef0ca 100644
--- a/shared-core/i915_drv.h
+++ b/shared-core/i915_drv.h
@@ -117,7 +117,6 @@ typedef struct drm_i915_private {
drm_local_map_t hws_map;
unsigned int cpp;
- int use_mi_batchbuffer_start;
wait_queue_head_t irq_queue;
atomic_t irq_received;