summaryrefslogtreecommitdiff
path: root/src/xvmc/intel_batchbuffer.c
diff options
context:
space:
mode:
authorZhenyu Wang <zhenyu.z.wang@intel.com>2007-11-15 11:18:38 +0800
committerZhenyu Wang <zhenyu.z.wang@intel.com>2007-11-15 11:18:38 +0800
commitbcd656c8dfe7309a5cf02ce1da8bc747ccd6e21c (patch)
tree9b2e3b114d58a961e59a92a6c46cbf8ecc8097fa /src/xvmc/intel_batchbuffer.c
parent0464af581b0fcfc4d1c7fec8160d812262086177 (diff)
xvmc: oops, should first map batch buffer before init
Diffstat (limited to 'src/xvmc/intel_batchbuffer.c')
-rw-r--r--src/xvmc/intel_batchbuffer.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/xvmc/intel_batchbuffer.c b/src/xvmc/intel_batchbuffer.c
index c96bd459..82a7bf2d 100644
--- a/src/xvmc/intel_batchbuffer.c
+++ b/src/xvmc/intel_batchbuffer.c
@@ -98,6 +98,14 @@ void intelDestroyBatchBuffer(void)
Bool intelInitBatchBuffer(void)
{
+ if (drmMap(xvmc_driver->fd,
+ xvmc_driver->batchbuffer.handle,
+ xvmc_driver->batchbuffer.size,
+ (drmAddress *)&xvmc_driver->batchbuffer.map) != 0) {
+ XVMC_ERR("fail to map batch buffer\n");
+ return False;
+ }
+
if (xvmc_driver->batchbuffer.map) {
xvmc_driver->alloc.size = xvmc_driver->batchbuffer.size;
xvmc_driver->alloc.offset = xvmc_driver->batchbuffer.offset;
@@ -110,14 +118,6 @@ Bool intelInitBatchBuffer(void)
xvmc_driver->alloc.active_buf = 0;
assert(xvmc_driver->alloc.ptr);
-
- if (drmMap(xvmc_driver->fd,
- xvmc_driver->batchbuffer.handle,
- xvmc_driver->batchbuffer.size,
- (drmAddress *)&xvmc_driver->batchbuffer.map) != 0) {
- XVMC_ERR("fail to map batch buffer\n");
- return False;
- }
}
void intelFiniBatchBuffer(void)