[intel-GEM] Clean up GEM ioctl naming.

Rename 'validate_entry' to 'exec_object', then clean up some field names in
structures (renaming buffer_offset to just offset, for example).
main
Keith Packard 2008-05-10 21:04:18 -07:00
parent 1e26ca44c9
commit a37ac493da
2 changed files with 10 additions and 11 deletions

View File

@ -525,7 +525,7 @@ i915_gem_dev_set_domain(struct drm_device *dev)
static int static int
i915_gem_reloc_and_validate_object(struct drm_gem_object *obj, i915_gem_reloc_and_validate_object(struct drm_gem_object *obj,
struct drm_file *file_priv, struct drm_file *file_priv,
struct drm_i915_gem_validate_entry *entry) struct drm_i915_gem_exec_object *entry)
{ {
struct drm_device *dev = obj->dev; struct drm_device *dev = obj->dev;
drm_i915_private_t *dev_priv = dev->dev_private; drm_i915_private_t *dev_priv = dev->dev_private;
@ -543,7 +543,7 @@ i915_gem_reloc_and_validate_object(struct drm_gem_object *obj,
return -ENOMEM; return -ENOMEM;
} }
entry->buffer_offset = obj_priv->gtt_offset; entry->offset = obj_priv->gtt_offset;
if (obj_priv->pin_count == 0) { if (obj_priv->pin_count == 0) {
/* Move our buffer to the head of the LRU. */ /* Move our buffer to the head of the LRU. */
@ -768,7 +768,7 @@ i915_gem_execbuffer(struct drm_device *dev, void *data,
struct drm_file *file_priv) struct drm_file *file_priv)
{ {
struct drm_i915_gem_execbuffer *args = data; struct drm_i915_gem_execbuffer *args = data;
struct drm_i915_gem_validate_entry *validate_list; struct drm_i915_gem_exec_object *validate_list;
struct drm_gem_object **object_list; struct drm_gem_object **object_list;
struct drm_gem_object *batch_obj; struct drm_gem_object *batch_obj;
int ret, i; int ret, i;
@ -808,11 +808,10 @@ i915_gem_execbuffer(struct drm_device *dev, void *data,
/* Look up object handles and perform the relocations */ /* Look up object handles and perform the relocations */
for (i = 0; i < args->buffer_count; i++) { for (i = 0; i < args->buffer_count; i++) {
object_list[i] = drm_gem_object_lookup(dev, file_priv, object_list[i] = drm_gem_object_lookup(dev, file_priv,
validate_list[i]. validate_list[i].handle);
buffer_handle);
if (object_list[i] == NULL) { if (object_list[i] == NULL) {
DRM_ERROR("Invalid object handle %d at index %d\n", DRM_ERROR("Invalid object handle %d at index %d\n",
validate_list[i].buffer_handle, i); validate_list[i].handle, i);
ret = -EINVAL; ret = -EINVAL;
goto err; goto err;
} }
@ -856,7 +855,7 @@ i915_gem_execbuffer(struct drm_device *dev, void *data,
/* Flush/invalidate caches and chipset buffer */ /* Flush/invalidate caches and chipset buffer */
i915_gem_dev_set_domain(dev); i915_gem_dev_set_domain(dev);
exec_offset = validate_list[args->buffer_count - 1].buffer_offset; exec_offset = validate_list[args->buffer_count - 1].offset;
#if WATCH_EXEC #if WATCH_EXEC
i915_gem_dump_object(object_list[args->buffer_count - 1], i915_gem_dump_object(object_list[args->buffer_count - 1],

View File

@ -474,12 +474,12 @@ struct drm_i915_gem_relocation_entry {
#define DRM_GEM_DOMAIN_I915_INSTRUCTION 0x00000010 /* Instruction cache, used by shader programs */ #define DRM_GEM_DOMAIN_I915_INSTRUCTION 0x00000010 /* Instruction cache, used by shader programs */
#define DRM_GEM_DOMAIN_I915_VERTEX 0x00000020 /* Vertex address cache */ #define DRM_GEM_DOMAIN_I915_VERTEX 0x00000020 /* Vertex address cache */
struct drm_i915_gem_validate_entry { struct drm_i915_gem_exec_object {
/** /**
* User's handle for a buffer to be bound into the GTT for this * User's handle for a buffer to be bound into the GTT for this
* operation. * operation.
*/ */
uint32_t buffer_handle; uint32_t handle;
/** List of relocations to be performed on this buffer */ /** List of relocations to be performed on this buffer */
uint32_t relocation_count; uint32_t relocation_count;
@ -489,10 +489,10 @@ struct drm_i915_gem_validate_entry {
uint64_t alignment; uint64_t alignment;
/** /**
* Returned value of the updated offset of the buffer, for future * Returned value of the updated offset of the object, for future
* presumed_offset writes. * presumed_offset writes.
*/ */
uint64_t buffer_offset; uint64_t offset;
}; };
struct drm_i915_gem_execbuffer { struct drm_i915_gem_execbuffer {