summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_gem_dmabuf.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-06-07 15:38:42 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-09-20 14:22:55 +0200
commit37e680a15ff6375ff02773161f817e90a38c51f7 (patch)
treed1b6fae7751c04ce051016019b4d4ebd0ee0d48c /drivers/gpu/drm/i915/i915_gem_dmabuf.c
parent8c0bd3c02d52eff11396e81b4d217ee668e03528 (diff)
downloadlinux-37e680a15ff6375ff02773161f817e90a38c51f7.tar.gz
linux-37e680a15ff6375ff02773161f817e90a38c51f7.tar.bz2
linux-37e680a15ff6375ff02773161f817e90a38c51f7.zip
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 <chris@chris-wilson.co.uk> Reviewed-by: Ben Widawsky <ben@bwidawsk.net> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_dmabuf.c')
-rw-r--r--drivers/gpu/drm/i915/i915_gem_dmabuf.c4
1 files changed, 2 insertions, 2 deletions
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);