i965_drv_video: fix BSD batch buffer size. 24/624/1
authorXiang, Haihao <haihao.xiang@intel.com>
Mon, 5 Jul 2010 02:06:03 +0000 (10:06 +0800)
committerXiang, Haihao <haihao.xiang@intel.com>
Wed, 7 Jul 2010 06:54:41 +0000 (14:54 +0800)
Some stress cases need a large BSD batch buffer.

i965_drv_video/intel_batchbuffer.c

index 02f66d3..abe548e 100644 (file)
@@ -37,6 +37,7 @@ static void
 intel_batchbuffer_reset(struct intel_batchbuffer *batch)
 {
     struct intel_driver_data *intel = batch->intel; 
+    int batch_size = batch->flag == I915_EXEC_RENDER ? BATCH_SIZE : (BATCH_SIZE * 8);
 
     assert(batch->flag == I915_EXEC_RENDER ||
            batch->flag == I915_EXEC_BSD);
@@ -44,12 +45,13 @@ intel_batchbuffer_reset(struct intel_batchbuffer *batch)
     dri_bo_unreference(batch->buffer);
     batch->buffer = dri_bo_alloc(intel->bufmgr, 
                                  batch->flag == I915_EXEC_RENDER ? "render batch buffer" : "bsd batch buffer", 
-                                 BATCH_SIZE, 0x1000);
+                                 batch_size,
+                                 0x1000);
     assert(batch->buffer);
     dri_bo_map(batch->buffer, 1);
     assert(batch->buffer->virtual);
     batch->map = batch->buffer->virtual;
-    batch->size = BATCH_SIZE;
+    batch->size = batch_size;
     batch->ptr = batch->map;
     batch->atomic = 0;
 }