diff options
author | Daniel Vetter <[email protected]> | 2010-11-19 23:38:23 +0100 |
---|---|---|
committer | Jakob Bornecrantz <[email protected]> | 2010-11-21 16:41:19 +0100 |
commit | c8fca58d9d5b3f25cb1ac2056ac2b437b79c04ee (patch) | |
tree | 12bf0c9adf14c129774c5a11d68218ec93726cf5 | |
parent | e18261885334522bcb2cce6e4a2ac7c509a7e3c0 (diff) |
i915g: kill idws->pool
The drm winsys only ever handles one gem memory manager. Rip out
the unnecessary complication.
Reviewed-by: Jakob Bornecrantz <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Signed-off-by: Jakob Bornecrantz <[email protected]>
-rw-r--r-- | src/gallium/winsys/i915/drm/i915_drm_batchbuffer.c | 2 | ||||
-rw-r--r-- | src/gallium/winsys/i915/drm/i915_drm_buffer.c | 9 | ||||
-rw-r--r-- | src/gallium/winsys/i915/drm/i915_drm_winsys.c | 6 | ||||
-rw-r--r-- | src/gallium/winsys/i915/drm/i915_drm_winsys.h | 4 |
4 files changed, 7 insertions, 14 deletions
diff --git a/src/gallium/winsys/i915/drm/i915_drm_batchbuffer.c b/src/gallium/winsys/i915/drm/i915_drm_batchbuffer.c index e50e7801c0a..c6daa52a379 100644 --- a/src/gallium/winsys/i915/drm/i915_drm_batchbuffer.c +++ b/src/gallium/winsys/i915/drm/i915_drm_batchbuffer.c @@ -41,7 +41,7 @@ i915_drm_batchbuffer_reset(struct i915_drm_batchbuffer *batch) if (batch->bo) drm_intel_bo_unreference(batch->bo); - batch->bo = drm_intel_bo_alloc(idws->pools.gem, + batch->bo = drm_intel_bo_alloc(idws->gem_manager, "gallium3d_batchbuffer", batch->actual_size, 4096); diff --git a/src/gallium/winsys/i915/drm/i915_drm_buffer.c b/src/gallium/winsys/i915/drm/i915_drm_buffer.c index b9fd436ed29..15ec4487457 100644 --- a/src/gallium/winsys/i915/drm/i915_drm_buffer.c +++ b/src/gallium/winsys/i915/drm/i915_drm_buffer.c @@ -12,7 +12,6 @@ i915_drm_buffer_create(struct i915_winsys *iws, { struct i915_drm_buffer *buf = CALLOC_STRUCT(i915_drm_buffer); struct i915_drm_winsys *idws = i915_drm_winsys(iws); - drm_intel_bufmgr *pool; char *name; if (!buf) @@ -24,20 +23,16 @@ i915_drm_buffer_create(struct i915_winsys *iws, if (type == I915_NEW_TEXTURE) { name = "gallium3d_texture"; - pool = idws->pools.gem; } else if (type == I915_NEW_VERTEX) { name = "gallium3d_vertex"; - pool = idws->pools.gem; } else if (type == I915_NEW_SCANOUT) { name = "gallium3d_scanout"; - pool = idws->pools.gem; } else { assert(0); name = "gallium3d_unknown"; - pool = idws->pools.gem; } - buf->bo = drm_intel_bo_alloc(pool, name, size, alignment); + buf->bo = drm_intel_bo_alloc(idws->gem_manager, name, size, alignment); if (!buf->bo) goto err; @@ -63,7 +58,7 @@ i915_drm_buffer_from_handle(struct i915_winsys *iws, return NULL; buf->magic = 0xDEAD1337; - buf->bo = drm_intel_bo_gem_create_from_name(idws->pools.gem, "gallium3d_from_handle", whandle->handle); + buf->bo = drm_intel_bo_gem_create_from_name(idws->gem_manager, "gallium3d_from_handle", whandle->handle); buf->flinked = TRUE; buf->flink = whandle->handle; diff --git a/src/gallium/winsys/i915/drm/i915_drm_winsys.c b/src/gallium/winsys/i915/drm/i915_drm_winsys.c index 179a84a704b..cc0b6a99577 100644 --- a/src/gallium/winsys/i915/drm/i915_drm_winsys.c +++ b/src/gallium/winsys/i915/drm/i915_drm_winsys.c @@ -40,7 +40,7 @@ i915_drm_winsys_destroy(struct i915_winsys *iws) { struct i915_drm_winsys *idws = i915_drm_winsys(iws); - drm_intel_bufmgr_destroy(idws->pools.gem); + drm_intel_bufmgr_destroy(idws->gem_manager); FREE(idws); } @@ -67,8 +67,8 @@ i915_drm_winsys_create(int drmFD) idws->base.destroy = i915_drm_winsys_destroy; - idws->pools.gem = drm_intel_bufmgr_gem_init(idws->fd, idws->max_batch_size); - drm_intel_bufmgr_gem_enable_reuse(idws->pools.gem); + idws->gem_manager = drm_intel_bufmgr_gem_init(idws->fd, idws->max_batch_size); + drm_intel_bufmgr_gem_enable_reuse(idws->gem_manager); idws->dump_cmd = debug_get_bool_option("I915_DUMP_CMD", FALSE); idws->send_cmd = !debug_get_bool_option("I915_NO_HW", FALSE); diff --git a/src/gallium/winsys/i915/drm/i915_drm_winsys.h b/src/gallium/winsys/i915/drm/i915_drm_winsys.h index 496c88de5a9..0d74d0270c7 100644 --- a/src/gallium/winsys/i915/drm/i915_drm_winsys.h +++ b/src/gallium/winsys/i915/drm/i915_drm_winsys.h @@ -24,9 +24,7 @@ struct i915_drm_winsys size_t max_batch_size; - struct { - drm_intel_bufmgr *gem; - } pools; + drm_intel_bufmgr *gem_manager; }; static INLINE struct i915_drm_winsys * |