diff options
author | Jonathan Gray <jsg@jsg.id.au> | 2013-02-19 01:07:52 +1100 |
---|---|---|
committer | Jonathan Gray <jsg@jsg.id.au> | 2013-02-19 01:07:52 +1100 |
commit | c076f319f28ae3d508d0fe70f8196b7a8e42ac9d (patch) | |
tree | f7d3a936341d3b77b01183b8c0cd3a62eacc14ed /sys/dev | |
parent | adbe49acb97b9338687dd0198151b15a75d3a5df (diff) |
combine i915_gem_object_init and i915_gem_init_object
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/drm/i915_drv.h | 1 | ||||
-rw-r--r-- | sys/dev/pci/drm/i915_gem.c | 14 |
2 files changed, 4 insertions, 11 deletions
diff --git a/sys/dev/pci/drm/i915_drv.h b/sys/dev/pci/drm/i915_drv.h index 9365175c377..82ff1d18a96 100644 --- a/sys/dev/pci/drm/i915_drv.h +++ b/sys/dev/pci/drm/i915_drv.h @@ -1152,7 +1152,6 @@ int i915_gem_create(struct drm_file *, struct drm_device *, uint64_t, void init_ring_lists(struct intel_ring_buffer *); int i915_gem_fault(struct drm_obj *, struct uvm_faultinfo *, off_t, vaddr_t, vm_page_t *, int, int, vm_prot_t, int ); -void i915_gem_object_init(struct drm_i915_gem_object *); struct drm_i915_gem_object * i915_gem_alloc_object(struct drm_device *, size_t); int i915_gpu_idle(struct drm_device *); diff --git a/sys/dev/pci/drm/i915_gem.c b/sys/dev/pci/drm/i915_gem.c index 58ee361b92a..c7d750ea541 100644 --- a/sys/dev/pci/drm/i915_gem.c +++ b/sys/dev/pci/drm/i915_gem.c @@ -1980,14 +1980,6 @@ out: return (ret); } -void -i915_gem_object_init(struct drm_i915_gem_object *obj) -{ - INIT_LIST_HEAD(&obj->mm_list); - INIT_LIST_HEAD(&obj->ring_list); - INIT_LIST_HEAD(&obj->gpu_write_list); -} - struct drm_i915_gem_object * i915_gem_alloc_object(struct drm_device *dev, size_t size) { @@ -2000,8 +1992,6 @@ i915_gem_alloc_object(struct drm_device *dev, size_t size) obj_priv = to_intel_bo(obj); - i915_gem_object_init(obj_priv); - return (obj_priv); } @@ -2023,6 +2013,10 @@ i915_gem_init_object(struct drm_obj *obj) obj_priv->dma_flags = 0; obj_priv->fence_reg = I915_FENCE_REG_NONE; + INIT_LIST_HEAD(&obj_priv->mm_list); + INIT_LIST_HEAD(&obj_priv->ring_list); + INIT_LIST_HEAD(&obj_priv->gpu_write_list); + return 0; } |