From 37e680a15ff6375ff02773161f817e90a38c51f7 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 7 Jun 2012 15:38:42 +0100 Subject: drm/i915: Introduce drm_i915_gem_object_ops In order to specialise functions depending upon the type of object, we can attach vfuncs to each object via a new ->ops pointer. For instance, this will be used in future patches to only bind pages from a dma-buf for the duration that the object is used by the GPU - and so prevent them from pinning those pages for the entire of the object. v2: Bonus comments. Signed-off-by: Chris Wilson Reviewed-by: Ben Widawsky Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/i915_gem_dmabuf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/drm/i915/i915_gem_dmabuf.c') diff --git a/drivers/gpu/drm/i915/i915_gem_dmabuf.c b/drivers/gpu/drm/i915/i915_gem_dmabuf.c index 43c95307f99e..e4f114198e4d 100644 --- a/drivers/gpu/drm/i915/i915_gem_dmabuf.c +++ b/drivers/gpu/drm/i915/i915_gem_dmabuf.c @@ -41,7 +41,7 @@ static struct sg_table *i915_gem_map_dma_buf(struct dma_buf_attachment *attachme if (ret) return ERR_PTR(ret); - ret = i915_gem_object_get_pages_gtt(obj); + ret = i915_gem_object_get_pages(obj); if (ret) { sg = ERR_PTR(ret); goto out; @@ -89,7 +89,7 @@ static void *i915_gem_dmabuf_vmap(struct dma_buf *dma_buf) goto out_unlock; } - ret = i915_gem_object_get_pages_gtt(obj); + ret = i915_gem_object_get_pages(obj); if (ret) { mutex_unlock(&dev->struct_mutex); return ERR_PTR(ret); -- cgit v1.2.1