drm/i915: Introduce drm_i915_gem_object_ops
commit37e680a15ff6375ff02773161f817e90a38c51f7
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 7 Jun 2012 14:38:42 +0000 (7 15:38 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 20 Sep 2012 12:22:55 +0000 (20 14:22 +0200)
treed1b6fae7751c04ce051016019b4d4ebd0ee0d48c
parent8c0bd3c02d52eff11396e81b4d217ee668e03528
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>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem_dmabuf.c