summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/i915
diff options
context:
space:
mode:
authorJakob Bornecrantz <[email protected]>2010-03-25 19:19:00 +0100
committerJakob Bornecrantz <[email protected]>2010-03-26 00:38:17 +0100
commitbc88c95990f871a206a8fe93e7541f1f41841f7e (patch)
treefe394e2b3dedc3ab6de5c2f108bf0c5c78983872 /src/gallium/winsys/i915
parent80672e84cf79ab12b7a4ff56567184d1c39baef3 (diff)
i915g: Rename winsys prefix to i915_ from intel_
Since the winsys isn't shared with i965 and never will be
Diffstat (limited to 'src/gallium/winsys/i915')
-rw-r--r--src/gallium/winsys/i915/drm/Makefile10
-rw-r--r--src/gallium/winsys/i915/drm/SConscript18
-rw-r--r--src/gallium/winsys/i915/drm/i915_drm_api.c (renamed from src/gallium/winsys/i915/drm/intel_drm_api.c)28
-rw-r--r--src/gallium/winsys/i915/drm/i915_drm_batchbuffer.c (renamed from src/gallium/winsys/i915/drm/intel_drm_batchbuffer.c)78
-rw-r--r--src/gallium/winsys/i915/drm/i915_drm_buffer.c (renamed from src/gallium/winsys/i915/drm/intel_drm_buffer.c)98
-rw-r--r--src/gallium/winsys/i915/drm/i915_drm_fence.c (renamed from src/gallium/winsys/i915/drm/intel_drm_fence.c)30
-rw-r--r--src/gallium/winsys/i915/drm/i915_drm_winsys.h77
-rw-r--r--src/gallium/winsys/i915/drm/intel_drm_winsys.h77
8 files changed, 208 insertions, 208 deletions
diff --git a/src/gallium/winsys/i915/drm/Makefile b/src/gallium/winsys/i915/drm/Makefile
index 4aac3309aa7..a67b9e8a528 100644
--- a/src/gallium/winsys/i915/drm/Makefile
+++ b/src/gallium/winsys/i915/drm/Makefile
@@ -1,13 +1,13 @@
TOP = ../../../../..
include $(TOP)/configs/current
-LIBNAME = inteldrm
+LIBNAME = i915drm
C_SOURCES = \
- intel_drm_batchbuffer.c \
- intel_drm_buffer.c \
- intel_drm_fence.c \
- intel_drm_api.c
+ i915_drm_batchbuffer.c \
+ i915_drm_buffer.c \
+ i915_drm_fence.c \
+ i915_drm_api.c
LIBRARY_INCLUDES = $(shell pkg-config libdrm --cflags-only-I)
diff --git a/src/gallium/winsys/i915/drm/SConscript b/src/gallium/winsys/i915/drm/SConscript
index b47b8add837..ba29ac72fe7 100644
--- a/src/gallium/winsys/i915/drm/SConscript
+++ b/src/gallium/winsys/i915/drm/SConscript
@@ -2,16 +2,16 @@ Import('*')
env = env.Clone()
-inteldrm_sources = [
- 'intel_drm_api.c',
- 'intel_drm_batchbuffer.c',
- 'intel_drm_buffer.c',
- 'intel_drm_fence.c',
+i915drm_sources = [
+ 'i915_drm_api.c',
+ 'i915_drm_batchbuffer.c',
+ 'i915_drm_buffer.c',
+ 'i915_drm_fence.c',
]
-inteldrm = env.ConvenienceLibrary(
- target ='inteldrm',
- source = inteldrm_sources,
+i915drm = env.ConvenienceLibrary(
+ target ='i915drm',
+ source = i915drm_sources,
)
-Export('inteldrm')
+Export('i915drm')
diff --git a/src/gallium/winsys/i915/drm/intel_drm_api.c b/src/gallium/winsys/i915/drm/i915_drm_api.c
index e3b980a832b..6bb0aec1a67 100644
--- a/src/gallium/winsys/i915/drm/intel_drm_api.c
+++ b/src/gallium/winsys/i915/drm/i915_drm_api.c
@@ -2,7 +2,7 @@
#include "state_tracker/drm_api.h"
-#include "intel_drm_winsys.h"
+#include "i915_drm_winsys.h"
#include "util/u_memory.h"
#include "i915/i915_context.h"
@@ -16,7 +16,7 @@
static void
-intel_drm_get_device_id(unsigned int *device_id)
+i915_drm_get_device_id(unsigned int *device_id)
{
char path[512];
FILE *file;
@@ -39,9 +39,9 @@ intel_drm_get_device_id(unsigned int *device_id)
}
static void
-intel_drm_winsys_destroy(struct intel_winsys *iws)
+i915_drm_winsys_destroy(struct i915_winsys *iws)
{
- struct intel_drm_winsys *idws = intel_drm_winsys(iws);
+ struct i915_drm_winsys *idws = i915_drm_winsys(iws);
drm_intel_bufmgr_destroy(idws->pools.gem);
@@ -49,10 +49,10 @@ intel_drm_winsys_destroy(struct intel_winsys *iws)
}
static struct pipe_screen *
-intel_drm_create_screen(struct drm_api *api, int drmFD,
- struct drm_create_screen_arg *arg)
+i915_drm_create_screen(struct drm_api *api, int drmFD,
+ struct drm_create_screen_arg *arg)
{
- struct intel_drm_winsys *idws;
+ struct i915_drm_winsys *idws;
unsigned int deviceID;
if (arg != NULL) {
@@ -64,21 +64,21 @@ intel_drm_create_screen(struct drm_api *api, int drmFD,
}
}
- idws = CALLOC_STRUCT(intel_drm_winsys);
+ idws = CALLOC_STRUCT(i915_drm_winsys);
if (!idws)
return NULL;
- intel_drm_get_device_id(&deviceID);
+ i915_drm_get_device_id(&deviceID);
- intel_drm_winsys_init_batchbuffer_functions(idws);
- intel_drm_winsys_init_buffer_functions(idws);
- intel_drm_winsys_init_fence_functions(idws);
+ i915_drm_winsys_init_batchbuffer_functions(idws);
+ i915_drm_winsys_init_buffer_functions(idws);
+ i915_drm_winsys_init_fence_functions(idws);
idws->fd = drmFD;
idws->id = deviceID;
idws->max_batch_size = 16 * 4096;
- idws->base.destroy = intel_drm_winsys_destroy;
+ 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);
@@ -98,7 +98,7 @@ struct drm_api intel_drm_api =
{
.name = "i915",
.driver_name = "i915",
- .create_screen = intel_drm_create_screen,
+ .create_screen = i915_drm_create_screen,
.destroy = destroy,
};
diff --git a/src/gallium/winsys/i915/drm/intel_drm_batchbuffer.c b/src/gallium/winsys/i915/drm/i915_drm_batchbuffer.c
index 5b4dafc8e41..102f59dc541 100644
--- a/src/gallium/winsys/i915/drm/intel_drm_batchbuffer.c
+++ b/src/gallium/winsys/i915/drm/i915_drm_batchbuffer.c
@@ -1,5 +1,5 @@
-#include "intel_drm_winsys.h"
+#include "i915_drm_winsys.h"
#include "util/u_memory.h"
#include "i915_drm.h"
@@ -17,25 +17,25 @@
#undef INTEL_MAP_GTT
#define INTEL_ALWAYS_FLUSH
-struct intel_drm_batchbuffer
+struct i915_drm_batchbuffer
{
- struct intel_batchbuffer base;
+ struct i915_winsys_batchbuffer base;
size_t actual_size;
drm_intel_bo *bo;
};
-static INLINE struct intel_drm_batchbuffer *
-intel_drm_batchbuffer(struct intel_batchbuffer *batch)
+static INLINE struct i915_drm_batchbuffer *
+i915_drm_batchbuffer(struct i915_winsys_batchbuffer *batch)
{
- return (struct intel_drm_batchbuffer *)batch;
+ return (struct i915_drm_batchbuffer *)batch;
}
static void
-intel_drm_batchbuffer_reset(struct intel_drm_batchbuffer *batch)
+i915_drm_batchbuffer_reset(struct i915_drm_batchbuffer *batch)
{
- struct intel_drm_winsys *idws = intel_drm_winsys(batch->base.iws);
+ struct i915_drm_winsys *idws = i915_drm_winsys(batch->base.iws);
int ret;
if (batch->bo)
@@ -63,11 +63,11 @@ intel_drm_batchbuffer_reset(struct intel_drm_batchbuffer *batch)
batch->base.relocs = 0;
}
-static struct intel_batchbuffer *
-intel_drm_batchbuffer_create(struct intel_winsys *iws)
+static struct i915_winsys_batchbuffer *
+i915_drm_batchbuffer_create(struct i915_winsys *iws)
{
- struct intel_drm_winsys *idws = intel_drm_winsys(iws);
- struct intel_drm_batchbuffer *batch = CALLOC_STRUCT(intel_drm_batchbuffer);
+ struct i915_drm_winsys *idws = i915_drm_winsys(iws);
+ struct i915_drm_batchbuffer *batch = CALLOC_STRUCT(i915_drm_batchbuffer);
batch->actual_size = idws->max_batch_size;
@@ -84,18 +84,18 @@ intel_drm_batchbuffer_create(struct intel_winsys *iws)
batch->base.iws = iws;
- intel_drm_batchbuffer_reset(batch);
+ i915_drm_batchbuffer_reset(batch);
return &batch->base;
}
static int
-intel_drm_batchbuffer_reloc(struct intel_batchbuffer *ibatch,
- struct intel_buffer *buffer,
- enum intel_buffer_usage usage,
+i915_drm_batchbuffer_reloc(struct i915_winsys_batchbuffer *ibatch,
+ struct i915_winsys_buffer *buffer,
+ enum i915_winsys_buffer_usage usage,
unsigned pre_add)
{
- struct intel_drm_batchbuffer *batch = intel_drm_batchbuffer(ibatch);
+ struct i915_drm_batchbuffer *batch = i915_drm_batchbuffer(ibatch);
unsigned write_domain = 0;
unsigned read_domain = 0;
unsigned offset;
@@ -103,23 +103,23 @@ intel_drm_batchbuffer_reloc(struct intel_batchbuffer *ibatch,
assert(batch->base.relocs < batch->base.max_relocs);
- if (usage == INTEL_USAGE_SAMPLER) {
+ if (usage == I915_USAGE_SAMPLER) {
write_domain = 0;
read_domain = I915_GEM_DOMAIN_SAMPLER;
- } else if (usage == INTEL_USAGE_RENDER) {
+ } else if (usage == I915_USAGE_RENDER) {
write_domain = I915_GEM_DOMAIN_RENDER;
read_domain = I915_GEM_DOMAIN_RENDER;
- } else if (usage == INTEL_USAGE_2D_TARGET) {
+ } else if (usage == I915_USAGE_2D_TARGET) {
write_domain = I915_GEM_DOMAIN_RENDER;
read_domain = I915_GEM_DOMAIN_RENDER;
- } else if (usage == INTEL_USAGE_2D_SOURCE) {
+ } else if (usage == I915_USAGE_2D_SOURCE) {
write_domain = 0;
read_domain = I915_GEM_DOMAIN_RENDER;
- } else if (usage == INTEL_USAGE_VERTEX) {
+ } else if (usage == I915_USAGE_VERTEX) {
write_domain = 0;
read_domain = I915_GEM_DOMAIN_VERTEX;
@@ -145,15 +145,15 @@ intel_drm_batchbuffer_reloc(struct intel_batchbuffer *ibatch,
}
static void
-intel_drm_batchbuffer_flush(struct intel_batchbuffer *ibatch,
+i915_drm_batchbuffer_flush(struct i915_winsys_batchbuffer *ibatch,
struct pipe_fence_handle **fence)
{
- struct intel_drm_batchbuffer *batch = intel_drm_batchbuffer(ibatch);
+ struct i915_drm_batchbuffer *batch = i915_drm_batchbuffer(ibatch);
unsigned used = 0;
int ret = 0;
int i;
- assert(intel_batchbuffer_space(ibatch) >= 0);
+ assert(i915_winsys_batchbuffer_space(ibatch) >= 0);
used = batch->base.ptr - batch->base.map;
assert((used & 3) == 0);
@@ -161,16 +161,16 @@ intel_drm_batchbuffer_flush(struct intel_batchbuffer *ibatch,
#ifdef INTEL_ALWAYS_FLUSH
/* MI_FLUSH | FLUSH_MAP_CACHE */
- intel_batchbuffer_dword(ibatch, (0x4<<23)|(1<<0));
+ i915_winsys_batchbuffer_dword(ibatch, (0x4<<23)|(1<<0));
used += 4;
#endif
if ((used & 4) == 0) {
/* MI_NOOP */
- intel_batchbuffer_dword(ibatch, 0);
+ i915_winsys_batchbuffer_dword(ibatch, 0);
}
/* MI_BATCH_BUFFER_END */
- intel_batchbuffer_dword(ibatch, (0xA<<23));
+ i915_winsys_batchbuffer_dword(ibatch, (0xA<<23));
used = batch->base.ptr - batch->base.map;
assert((used & 4) == 0);
@@ -189,7 +189,7 @@ intel_drm_batchbuffer_flush(struct intel_batchbuffer *ibatch,
ret = drm_intel_bo_exec(batch->bo, used, NULL, 0, 0);
assert(ret == 0);
- if (intel_drm_winsys(ibatch->iws)->dump_cmd) {
+ if (i915_drm_winsys(ibatch->iws)->dump_cmd) {
unsigned *ptr;
drm_intel_bo_map(batch->bo, FALSE);
ptr = (unsigned*)batch->bo->virtual;
@@ -212,19 +212,19 @@ intel_drm_batchbuffer_flush(struct intel_batchbuffer *ibatch,
#ifdef INTEL_RUN_SYNC
/* we run synced to GPU so just pass null */
- (*fence) = intel_drm_fence_create(NULL);
+ (*fence) = i915_drm_fence_create(NULL);
#else
- (*fence) = intel_drm_fence_create(batch->bo);
+ (*fence) = i915_drm_fence_create(batch->bo);
#endif
}
- intel_drm_batchbuffer_reset(batch);
+ i915_drm_batchbuffer_reset(batch);
}
static void
-intel_drm_batchbuffer_destroy(struct intel_batchbuffer *ibatch)
+i915_drm_batchbuffer_destroy(struct i915_winsys_batchbuffer *ibatch)
{
- struct intel_drm_batchbuffer *batch = intel_drm_batchbuffer(ibatch);
+ struct i915_drm_batchbuffer *batch = i915_drm_batchbuffer(ibatch);
if (batch->bo)
drm_intel_bo_unreference(batch->bo);
@@ -235,10 +235,10 @@ intel_drm_batchbuffer_destroy(struct intel_batchbuffer *ibatch)
FREE(batch);
}
-void intel_drm_winsys_init_batchbuffer_functions(struct intel_drm_winsys *idws)
+void i915_drm_winsys_init_batchbuffer_functions(struct i915_drm_winsys *idws)
{
- idws->base.batchbuffer_create = intel_drm_batchbuffer_create;
- idws->base.batchbuffer_reloc = intel_drm_batchbuffer_reloc;
- idws->base.batchbuffer_flush = intel_drm_batchbuffer_flush;
- idws->base.batchbuffer_destroy = intel_drm_batchbuffer_destroy;
+ idws->base.batchbuffer_create = i915_drm_batchbuffer_create;
+ idws->base.batchbuffer_reloc = i915_drm_batchbuffer_reloc;
+ idws->base.batchbuffer_flush = i915_drm_batchbuffer_flush;
+ idws->base.batchbuffer_destroy = i915_drm_batchbuffer_destroy;
}
diff --git a/src/gallium/winsys/i915/drm/intel_drm_buffer.c b/src/gallium/winsys/i915/drm/i915_drm_buffer.c
index cb4f92a3b17..3bd85026b21 100644
--- a/src/gallium/winsys/i915/drm/intel_drm_buffer.c
+++ b/src/gallium/winsys/i915/drm/i915_drm_buffer.c
@@ -1,17 +1,17 @@
#include "state_tracker/drm_api.h"
-#include "intel_drm_winsys.h"
+#include "i915_drm_winsys.h"
#include "util/u_memory.h"
#include "i915_drm.h"
-static struct intel_buffer *
-intel_drm_buffer_create(struct intel_winsys *iws,
+static struct i915_winsys_buffer *
+i915_drm_buffer_create(struct i915_winsys *iws,
unsigned size, unsigned alignment,
- enum intel_buffer_type type)
+ enum i915_winsys_buffer_type type)
{
- struct intel_drm_buffer *buf = CALLOC_STRUCT(intel_drm_buffer);
- struct intel_drm_winsys *idws = intel_drm_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;
@@ -23,14 +23,14 @@ intel_drm_buffer_create(struct intel_winsys *iws,
buf->flink = 0;
buf->map_gtt = FALSE;
- if (type == INTEL_NEW_TEXTURE) {
+ if (type == I915_NEW_TEXTURE) {
name = "gallium3d_texture";
pool = idws->pools.gem;
- } else if (type == INTEL_NEW_VERTEX) {
+ } else if (type == I915_NEW_VERTEX) {
name = "gallium3d_vertex";
pool = idws->pools.gem;
buf->map_gtt = TRUE;
- } else if (type == INTEL_NEW_SCANOUT) {
+ } else if (type == I915_NEW_SCANOUT) {
name = "gallium3d_scanout";
pool = idws->pools.gem;
buf->map_gtt = TRUE;
@@ -45,7 +45,7 @@ intel_drm_buffer_create(struct intel_winsys *iws,
if (!buf->bo)
goto err;
- return (struct intel_buffer *)buf;
+ return (struct i915_winsys_buffer *)buf;
err:
assert(0);
@@ -53,13 +53,13 @@ err:
return NULL;
}
-static struct intel_buffer *
-intel_drm_buffer_from_handle(struct intel_winsys *iws,
+static struct i915_winsys_buffer *
+i915_drm_buffer_from_handle(struct i915_winsys *iws,
struct winsys_handle *whandle,
unsigned *stride)
{
- struct intel_drm_winsys *idws = intel_drm_winsys(iws);
- struct intel_drm_buffer *buf = CALLOC_STRUCT(intel_drm_buffer);
+ struct i915_drm_winsys *idws = i915_drm_winsys(iws);
+ struct i915_drm_buffer *buf = CALLOC_STRUCT(i915_drm_buffer);
uint32_t tile = 0, swizzle = 0;
if (!buf)
@@ -74,12 +74,12 @@ intel_drm_buffer_from_handle(struct intel_winsys *iws,
goto err;
drm_intel_bo_get_tiling(buf->bo, &tile, &swizzle);
- if (tile != INTEL_TILE_NONE)
+ if (tile != I915_TILE_NONE)
buf->map_gtt = TRUE;
*stride = whandle->stride;
- return (struct intel_buffer *)buf;
+ return (struct i915_winsys_buffer *)buf;
err:
FREE(buf);
@@ -87,12 +87,12 @@ err:
}
static boolean
-intel_drm_buffer_get_handle(struct intel_winsys *iws,
- struct intel_buffer *buffer,
+i915_drm_buffer_get_handle(struct i915_winsys *iws,
+ struct i915_winsys_buffer *buffer,
struct winsys_handle *whandle,
unsigned stride)
{
- struct intel_drm_buffer *buf = intel_drm_buffer(buffer);
+ struct i915_drm_buffer *buf = i915_drm_buffer(buffer);
if (whandle->type == DRM_API_HANDLE_TYPE_SHARED) {
if (!buf->flinked) {
@@ -114,17 +114,17 @@ intel_drm_buffer_get_handle(struct intel_winsys *iws,
}
static int
-intel_drm_buffer_set_fence_reg(struct intel_winsys *iws,
- struct intel_buffer *buffer,
+i915_drm_buffer_set_fence_reg(struct i915_winsys *iws,
+ struct i915_winsys_buffer *buffer,
unsigned stride,
- enum intel_buffer_tile tile)
+ enum i915_winsys_buffer_tile tile)
{
- struct intel_drm_buffer *buf = intel_drm_buffer(buffer);
- assert(I915_TILING_NONE == INTEL_TILE_NONE);
- assert(I915_TILING_X == INTEL_TILE_X);
- assert(I915_TILING_Y == INTEL_TILE_Y);
+ struct i915_drm_buffer *buf = i915_drm_buffer(buffer);
+ assert(I915_TILING_NONE == I915_TILE_NONE);
+ assert(I915_TILING_X == I915_TILE_X);
+ assert(I915_TILING_Y == I915_TILE_Y);
- if (tile != INTEL_TILE_NONE) {
+ if (tile != I915_TILE_NONE) {
assert(buf->map_count == 0);
buf->map_gtt = TRUE;
}
@@ -133,11 +133,11 @@ intel_drm_buffer_set_fence_reg(struct intel_winsys *iws,
}
static void *
-intel_drm_buffer_map(struct intel_winsys *iws,
- struct intel_buffer *buffer,
+i915_drm_buffer_map(struct i915_winsys *iws,
+ struct i915_winsys_buffer *buffer,
boolean write)
{
- struct intel_drm_buffer *buf = intel_drm_buffer(buffer);
+ struct i915_drm_buffer *buf = i915_drm_buffer(buffer);
drm_intel_bo *bo = intel_bo(buffer);
int ret = 0;
@@ -163,10 +163,10 @@ out:
}
static void
-intel_drm_buffer_unmap(struct intel_winsys *iws,
- struct intel_buffer *buffer)
+i915_drm_buffer_unmap(struct i915_winsys *iws,
+ struct i915_winsys_buffer *buffer)
{
- struct intel_drm_buffer *buf = intel_drm_buffer(buffer);
+ struct i915_drm_buffer *buf = i915_drm_buffer(buffer);
if (--buf->map_count)
return;
@@ -178,40 +178,40 @@ intel_drm_buffer_unmap(struct intel_winsys *iws,
}
static int
-intel_drm_buffer_write(struct intel_winsys *iws,
- struct intel_buffer *buffer,
+i915_drm_buffer_write(struct i915_winsys *iws,
+ struct i915_winsys_buffer *buffer,
size_t offset,
size_t size,
const void *data)
{
- struct intel_drm_buffer *buf = intel_drm_buffer(buffer);
+ struct i915_drm_buffer *buf = i915_drm_buffer(buffer);
return drm_intel_bo_subdata(buf->bo, offset, size, (void*)data);
}
static void
-intel_drm_buffer_destroy(struct intel_winsys *iws,
- struct intel_buffer *buffer)
+i915_drm_buffer_destroy(struct i915_winsys *iws,
+ struct i915_winsys_buffer *buffer)
{
drm_intel_bo_unreference(intel_bo(buffer));
#ifdef DEBUG
- intel_drm_buffer(buffer)->magic = 0;
- intel_drm_buffer(buffer)->bo = NULL;
+ i915_drm_buffer(buffer)->magic = 0;
+ i915_drm_buffer(buffer)->bo = NULL;
#endif
FREE(buffer);
}
void
-intel_drm_winsys_init_buffer_functions(struct intel_drm_winsys *idws)
+i915_drm_winsys_init_buffer_functions(struct i915_drm_winsys *idws)
{
- idws->base.buffer_create = intel_drm_buffer_create;
- idws->base.buffer_from_handle = intel_drm_buffer_from_handle;
- idws->base.buffer_get_handle = intel_drm_buffer_get_handle;
- idws->base.buffer_set_fence_reg = intel_drm_buffer_set_fence_reg;
- idws->base.buffer_map = intel_drm_buffer_map;
- idws->base.buffer_unmap = intel_drm_buffer_unmap;
- idws->base.buffer_write = intel_drm_buffer_write;
- idws->base.buffer_destroy = intel_drm_buffer_destroy;
+ idws->base.buffer_create = i915_drm_buffer_create;
+ idws->base.buffer_from_handle = i915_drm_buffer_from_handle;
+ idws->base.buffer_get_handle = i915_drm_buffer_get_handle;
+ idws->base.buffer_set_fence_reg = i915_drm_buffer_set_fence_reg;
+ idws->base.buffer_map = i915_drm_buffer_map;
+ idws->base.buffer_unmap = i915_drm_buffer_unmap;
+ idws->base.buffer_write = i915_drm_buffer_write;
+ idws->base.buffer_destroy = i915_drm_buffer_destroy;
}
diff --git a/src/gallium/winsys/i915/drm/intel_drm_fence.c b/src/gallium/winsys/i915/drm/i915_drm_fence.c
index 102faedfeae..30ebf4835ea 100644
--- a/src/gallium/winsys/i915/drm/intel_drm_fence.c
+++ b/src/gallium/winsys/i915/drm/i915_drm_fence.c
@@ -1,5 +1,5 @@
-#include "intel_drm_winsys.h"
+#include "i915_drm_winsys.h"
#include "util/u_memory.h"
#include "util/u_atomic.h"
#include "util/u_inlines.h"
@@ -10,7 +10,7 @@
* They work by keeping the batchbuffer around and checking if that has
* been idled. If bo is NULL fence has expired.
*/
-struct intel_drm_fence
+struct i915_drm_fence
{
struct pipe_reference reference;
drm_intel_bo *bo;
@@ -18,9 +18,9 @@ struct intel_drm_fence
struct pipe_fence_handle *
-intel_drm_fence_create(drm_intel_bo *bo)
+i915_drm_fence_create(drm_intel_bo *bo)
{
- struct intel_drm_fence *fence = CALLOC_STRUCT(intel_drm_fence);
+ struct i915_drm_fence *fence = CALLOC_STRUCT(i915_drm_fence);
pipe_reference_init(&fence->reference, 1);
/* bo is null if fence already expired */
@@ -33,14 +33,14 @@ intel_drm_fence_create(drm_intel_bo *bo)
}
static void
-intel_drm_fence_reference(struct intel_winsys *iws,
+i915_drm_fence_reference(struct i915_winsys *iws,
struct pipe_fence_handle **ptr,
struct pipe_fence_handle *fence)
{
- struct intel_drm_fence *old = (struct intel_drm_fence *)*ptr;
- struct intel_drm_fence *f = (struct intel_drm_fence *)fence;
+ struct i915_drm_fence *old = (struct i915_drm_fence *)*ptr;
+ struct i915_drm_fence *f = (struct i915_drm_fence *)fence;
- if (pipe_reference(&((struct intel_drm_fence *)(*ptr))->reference, &f->reference)) {
+ if (pipe_reference(&((struct i915_drm_fence *)(*ptr))->reference, &f->reference)) {
if (old->bo)
drm_intel_bo_unreference(old->bo);
FREE(old);
@@ -49,7 +49,7 @@ intel_drm_fence_reference(struct intel_winsys *iws,
}
static int
-intel_drm_fence_signalled(struct intel_winsys *iws,
+i915_drm_fence_signalled(struct i915_winsys *iws,
struct pipe_fence_handle *fence)
{
assert(0);
@@ -58,10 +58,10 @@ intel_drm_fence_signalled(struct intel_winsys *iws,
}
static int
-intel_drm_fence_finish(struct intel_winsys *iws,
+i915_drm_fence_finish(struct i915_winsys *iws,
struct pipe_fence_handle *fence)
{
- struct intel_drm_fence *f = (struct intel_drm_fence *)fence;
+ struct i915_drm_fence *f = (struct i915_drm_fence *)fence;
/* fence already expired */
if (!f->bo)
@@ -75,9 +75,9 @@ intel_drm_fence_finish(struct intel_winsys *iws,
}
void
-intel_drm_winsys_init_fence_functions(struct intel_drm_winsys *idws)
+i915_drm_winsys_init_fence_functions(struct i915_drm_winsys *idws)
{
- idws->base.fence_reference = intel_drm_fence_reference;
- idws->base.fence_signalled = intel_drm_fence_signalled;
- idws->base.fence_finish = intel_drm_fence_finish;
+ idws->base.fence_reference = i915_drm_fence_reference;
+ idws->base.fence_signalled = i915_drm_fence_signalled;
+ idws->base.fence_finish = i915_drm_fence_finish;
}
diff --git a/src/gallium/winsys/i915/drm/i915_drm_winsys.h b/src/gallium/winsys/i915/drm/i915_drm_winsys.h
new file mode 100644
index 00000000000..217c4a7eafb
--- /dev/null
+++ b/src/gallium/winsys/i915/drm/i915_drm_winsys.h
@@ -0,0 +1,77 @@
+
+#ifndef INTEL_DRM_WINSYS_H
+#define INTEL_DRM_WINSYS_H
+
+#include "i915/i915_batchbuffer.h"
+
+#include "drm.h"
+#include "intel_bufmgr.h"
+
+
+/*
+ * Winsys
+ */
+
+
+struct i915_drm_winsys
+{
+ struct i915_winsys base;
+
+ boolean dump_cmd;
+
+ int fd; /**< Drm file discriptor */
+
+ unsigned id;
+
+ size_t max_batch_size;
+
+ struct {
+ drm_intel_bufmgr *gem;
+ } pools;
+};
+
+static INLINE struct i915_drm_winsys *
+i915_drm_winsys(struct i915_winsys *iws)
+{
+ return (struct i915_drm_winsys *)iws;
+}
+
+struct i915_drm_winsys * i915_drm_winsys_create(int fd, unsigned pci_id);
+struct pipe_fence_handle * i915_drm_fence_create(drm_intel_bo *bo);
+
+void i915_drm_winsys_init_batchbuffer_functions(struct i915_drm_winsys *idws);
+void i915_drm_winsys_init_buffer_functions(struct i915_drm_winsys *idws);
+void i915_drm_winsys_init_fence_functions(struct i915_drm_winsys *idws);
+
+
+/*
+ * Buffer
+ */
+
+
+struct i915_drm_buffer {
+ unsigned magic;
+
+ drm_intel_bo *bo;
+
+ void *ptr;
+ unsigned map_count;
+ boolean map_gtt;
+
+ boolean flinked;
+ unsigned flink;
+};
+
+static INLINE struct i915_drm_buffer *
+i915_drm_buffer(struct i915_winsys_buffer *buffer)
+{
+ return (struct i915_drm_buffer *)buffer;
+}
+
+static INLINE drm_intel_bo *
+intel_bo(struct i915_winsys_buffer *buffer)
+{
+ return i915_drm_buffer(buffer)->bo;
+}
+
+#endif
diff --git a/src/gallium/winsys/i915/drm/intel_drm_winsys.h b/src/gallium/winsys/i915/drm/intel_drm_winsys.h
deleted file mode 100644
index 9786ee93650..00000000000
--- a/src/gallium/winsys/i915/drm/intel_drm_winsys.h
+++ /dev/null
@@ -1,77 +0,0 @@
-
-#ifndef INTEL_DRM_WINSYS_H
-#define INTEL_DRM_WINSYS_H
-
-#include "i915/intel_batchbuffer.h"
-
-#include "drm.h"
-#include "intel_bufmgr.h"
-
-
-/*
- * Winsys
- */
-
-
-struct intel_drm_winsys
-{
- struct intel_winsys base;
-
- boolean dump_cmd;
-
- int fd; /**< Drm file discriptor */
-
- unsigned id;
-
- size_t max_batch_size;
-
- struct {
- drm_intel_bufmgr *gem;
- } pools;
-};
-
-static INLINE struct intel_drm_winsys *
-intel_drm_winsys(struct intel_winsys *iws)
-{
- return (struct intel_drm_winsys *)iws;
-}
-
-struct intel_drm_winsys * intel_drm_winsys_create(int fd, unsigned pci_id);
-struct pipe_fence_handle * intel_drm_fence_create(drm_intel_bo *bo);
-
-void intel_drm_winsys_init_batchbuffer_functions(struct intel_drm_winsys *idws);
-void intel_drm_winsys_init_buffer_functions(struct intel_drm_winsys *idws);
-void intel_drm_winsys_init_fence_functions(struct intel_drm_winsys *idws);
-
-
-/*
- * Buffer
- */
-
-
-struct intel_drm_buffer {
- unsigned magic;
-
- drm_intel_bo *bo;
-
- void *ptr;
- unsigned map_count;
- boolean map_gtt;
-
- boolean flinked;
- unsigned flink;
-};
-
-static INLINE struct intel_drm_buffer *
-intel_drm_buffer(struct intel_buffer *buffer)
-{
- return (struct intel_drm_buffer *)buffer;
-}
-
-static INLINE drm_intel_bo *
-intel_bo(struct intel_buffer *buffer)
-{
- return intel_drm_buffer(buffer)->bo;
-}
-
-#endif