diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-01-16 10:21:30 -0500 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-01-19 05:17:39 -0500 |
commit | a01cb37affb7ac698ed260c0e31d02af8df6b785 (patch) | |
tree | 7aedf9ed763ce01101b950897ee394b5ca7ebca7 /drivers/gpu/drm/i915/intel_ringbuffer.c | |
parent | 4ea9527cc03e73afc6a4ac5979d1ecde43b85cf3 (diff) |
drm/i915: Remove i915_vma_create from VMA API
With the introduce of i915_vma_instance() for obtaining the VMA
singleton for a (obj, vm, view) tuple, we can remove the
i915_vma_create() in favour of a single entry point. We do incur a
lookup onto an empty tree, but the i915_vma_create() were being called
infrequently and during initialisation, so the small overhead is
negligible.
v2: Drop the i915_ prefix from the now static vma_create() function
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170116152131.18089-4-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/intel_ringbuffer.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_ringbuffer.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index 49fa8006c6a2..69035e4f9b3b 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c | |||
@@ -1738,7 +1738,7 @@ static int init_status_page(struct intel_engine_cs *engine) | |||
1738 | if (ret) | 1738 | if (ret) |
1739 | goto err; | 1739 | goto err; |
1740 | 1740 | ||
1741 | vma = i915_vma_create(obj, &engine->i915->ggtt.base, NULL); | 1741 | vma = i915_vma_instance(obj, &engine->i915->ggtt.base, NULL); |
1742 | if (IS_ERR(vma)) { | 1742 | if (IS_ERR(vma)) { |
1743 | ret = PTR_ERR(vma); | 1743 | ret = PTR_ERR(vma); |
1744 | goto err; | 1744 | goto err; |
@@ -1872,7 +1872,7 @@ intel_ring_create_vma(struct drm_i915_private *dev_priv, int size) | |||
1872 | /* mark ring buffers as read-only from GPU side by default */ | 1872 | /* mark ring buffers as read-only from GPU side by default */ |
1873 | obj->gt_ro = 1; | 1873 | obj->gt_ro = 1; |
1874 | 1874 | ||
1875 | vma = i915_vma_create(obj, &dev_priv->ggtt.base, NULL); | 1875 | vma = i915_vma_instance(obj, &dev_priv->ggtt.base, NULL); |
1876 | if (IS_ERR(vma)) | 1876 | if (IS_ERR(vma)) |
1877 | goto err; | 1877 | goto err; |
1878 | 1878 | ||
@@ -2462,7 +2462,7 @@ static void intel_ring_init_semaphores(struct drm_i915_private *dev_priv, | |||
2462 | if (IS_ERR(obj)) | 2462 | if (IS_ERR(obj)) |
2463 | goto err; | 2463 | goto err; |
2464 | 2464 | ||
2465 | vma = i915_vma_create(obj, &dev_priv->ggtt.base, NULL); | 2465 | vma = i915_vma_instance(obj, &dev_priv->ggtt.base, NULL); |
2466 | if (IS_ERR(vma)) | 2466 | if (IS_ERR(vma)) |
2467 | goto err_obj; | 2467 | goto err_obj; |
2468 | 2468 | ||