summaryrefslogtreecommitdiff
path: root/linux-core/i915_buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux-core/i915_buffer.c')
-rw-r--r--linux-core/i915_buffer.c43
1 files changed, 21 insertions, 22 deletions
diff --git a/linux-core/i915_buffer.c b/linux-core/i915_buffer.c
index f9a8c50d..84bd47fc 100644
--- a/linux-core/i915_buffer.c
+++ b/linux-core/i915_buffer.c
@@ -33,14 +33,13 @@
#include "i915_drm.h"
#include "i915_drv.h"
-drm_ttm_backend_t *i915_create_ttm_backend_entry(drm_device_t * dev)
+struct drm_ttm_backend *i915_create_ttm_backend_entry(struct drm_device * dev)
{
return drm_agp_init_ttm(dev);
}
-int i915_fence_types(drm_buffer_object_t *bo, uint32_t * class, uint32_t * type)
+int i915_fence_types(struct drm_buffer_object *bo, uint32_t * type)
{
- *class = 0;
if (bo->mem.flags & (DRM_BO_FLAG_READ | DRM_BO_FLAG_WRITE))
*type = 3;
else
@@ -48,7 +47,7 @@ int i915_fence_types(drm_buffer_object_t *bo, uint32_t * class, uint32_t * type)
return 0;
}
-int i915_invalidate_caches(drm_device_t * dev, uint32_t flags)
+int i915_invalidate_caches(struct drm_device * dev, uint64_t flags)
{
/*
* FIXME: Only emit once per batchbuffer submission.
@@ -67,7 +66,7 @@ int i915_invalidate_caches(drm_device_t * dev, uint32_t flags)
#define PRIV1_ORDER 8
#define PRIV1_SIZE ((1 << PRIV1_ORDER) * PAGE_SIZE)
-int i915_init_priv1(drm_device_t * dev)
+int i915_init_priv1(struct drm_device * dev)
{
drm_i915_private_t *dev_priv = dev->dev_private;
int ret;
@@ -81,7 +80,7 @@ int i915_init_priv1(drm_device_t * dev)
if (!dev_priv->priv1_addr) {
DRM_ERROR("Failed to get %lu bytes of physically "
"contiguous memory for PRIV1 type\n", PRIV1_SIZE);
- return DRM_ERR(ENOMEM);
+ return -ENOMEM;
} else
DRM_INFO("PRIV1 virtual 0x%lx physical 0x%lx\n",
dev_priv->priv1_addr,
@@ -103,8 +102,8 @@ int i915_init_priv1(drm_device_t * dev)
return 0;
}
-int i915_init_mem_type(drm_device_t * dev, uint32_t type,
- drm_mem_type_manager_t * man)
+int i915_init_mem_type(struct drm_device * dev, uint32_t type,
+ struct drm_mem_type_manager * man)
{
drm_i915_private_t *dev_priv = dev->dev_private;
@@ -144,7 +143,7 @@ int i915_init_mem_type(drm_device_t * dev, uint32_t type,
case DRM_BO_MEM_PRIV1:
if (!dev_priv) {
DRM_ERROR("called without initialization\n");
- return DRM_ERR(EINVAL);
+ return -EINVAL;
}
man->io_offset = 0;
man->io_size = (1 << dev_priv->priv1_order) << PAGE_SHIFT;
@@ -161,7 +160,7 @@ int i915_init_mem_type(drm_device_t * dev, uint32_t type,
return 0;
}
-uint32_t i915_evict_mask(drm_buffer_object_t *bo)
+uint32_t i915_evict_mask(struct drm_buffer_object *bo)
{
switch (bo->mem.mem_type) {
case DRM_BO_MEM_PRIV1:
@@ -173,7 +172,7 @@ uint32_t i915_evict_mask(drm_buffer_object_t *bo)
}
}
-static void i915_emit_copy_blit(drm_device_t * dev,
+static void i915_emit_copy_blit(struct drm_device * dev,
uint32_t src_offset,
uint32_t dst_offset,
uint32_t pages, int direction)
@@ -207,14 +206,14 @@ static void i915_emit_copy_blit(drm_device_t * dev,
return;
}
-static int i915_move_blit(drm_buffer_object_t * bo,
- int evict, int no_wait, drm_bo_mem_reg_t * new_mem)
+static int i915_move_blit(struct drm_buffer_object * bo,
+ int evict, int no_wait, struct drm_bo_mem_reg * new_mem)
{
- drm_bo_mem_reg_t *old_mem = &bo->mem;
+ struct drm_bo_mem_reg *old_mem = &bo->mem;
int dir = 0;
if (new_mem->mem_type == DRM_BO_MEM_PRIV1)
- return DRM_ERR(EINVAL);
+ return -EINVAL;
if ((old_mem->mem_type == new_mem->mem_type) &&
(new_mem->mm_node->start <
@@ -240,11 +239,11 @@ static int i915_move_blit(drm_buffer_object_t * bo,
* then blit and subsequently move out again.
*/
-static int i915_move_flip(drm_buffer_object_t * bo,
- int evict, int no_wait, drm_bo_mem_reg_t * new_mem)
+static int i915_move_flip(struct drm_buffer_object * bo,
+ int evict, int no_wait, struct drm_bo_mem_reg * new_mem)
{
- drm_device_t *dev = bo->dev;
- drm_bo_mem_reg_t tmp_mem;
+ struct drm_device *dev = bo->dev;
+ struct drm_bo_mem_reg tmp_mem;
int ret;
tmp_mem = *new_mem;
@@ -276,10 +275,10 @@ out_cleanup:
return ret;
}
-int i915_move(drm_buffer_object_t * bo,
- int evict, int no_wait, drm_bo_mem_reg_t * new_mem)
+int i915_move(struct drm_buffer_object * bo,
+ int evict, int no_wait, struct drm_bo_mem_reg * new_mem)
{
- drm_bo_mem_reg_t *old_mem = &bo->mem;
+ struct drm_bo_mem_reg *old_mem = &bo->mem;
if (old_mem->mem_type == DRM_BO_MEM_LOCAL || old_mem->mem_type ==
DRM_BO_MEM_PRIV1) {