diff --git a/src/i830_batchbuffer.h b/src/i830_batchbuffer.h index 4903b8c..86a62b3 100644 --- a/src/i830_batchbuffer.h +++ b/src/i830_batchbuffer.h @@ -30,7 +30,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifndef _INTEL_BATCHBUFFER_H #define _INTEL_BATCHBUFFER_H -#define BATCH_RESERVED 16 +#define BATCH_RESERVED4k 4096 +#define BATCH_RESERVED16 16 void intel_batch_init(ScrnInfoPtr pScrn); void intel_batch_teardown(ScrnInfoPtr pScrn); @@ -40,7 +41,10 @@ void intel_batch_wait_last(ScrnInfoPtr pScrn); static inline int intel_batch_space(I830Ptr pI830) { - return (pI830->batch_bo->size - BATCH_RESERVED) - (pI830->batch_used); + if (IS_I865G(pI830)) + return (pI830->batch_bo->size - BATCH_RESERVED16) - (pI830->batch_used); + else + return (pI830->batch_bo->size - BATCH_RESERVED4k) - (pI830->batch_used); } static inline void