diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-07-10 05:27:08 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-07-26 06:56:25 -0400 |
commit | e6994aeedcee4f71998d89d2c10c5baa419ebeac (patch) | |
tree | 8b298417e51e2fc2dd2e191b26d504f648ffd91b /include/drm/i915_drm.h | |
parent | 42d6ab4839799b2f246748ce663d6b023f02bb73 (diff) |
drm/i915: Export ability of changing cache levels to userspace
By selecting the cache level (essentially whether or not the CPU snoops
any updates to the bo, and on more recent machines whether it resides
inside the CPU's last-level-cache) a userspace driver is able to then
manage all of its memory within buffer objects, if it so desires. This
enables the userspace driver to accelerate uploads and more importantly
downloads from the GPU and to able to mix CPU and GPU rendering/activity
efficiently.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
[danvet: Added code comment about where we plan to stuff platform
specific cacheing control bits in the ioctl struct.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'include/drm/i915_drm.h')
-rw-r--r-- | include/drm/i915_drm.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h index 0f149fe32211..772b0d638912 100644 --- a/include/drm/i915_drm.h +++ b/include/drm/i915_drm.h | |||
@@ -716,10 +716,16 @@ struct drm_i915_gem_busy { | |||
716 | #define I915_CACHEING_CACHED 1 | 716 | #define I915_CACHEING_CACHED 1 |
717 | 717 | ||
718 | struct drm_i915_gem_cacheing { | 718 | struct drm_i915_gem_cacheing { |
719 | /** Handle of the buffer to set/get the cacheing level of */ | 719 | /** |
720 | * Handle of the buffer to set/get the cacheing level of. */ | ||
720 | __u32 handle; | 721 | __u32 handle; |
721 | 722 | ||
722 | /** Cacheing level to apply or return value */ | 723 | /** |
724 | * Cacheing level to apply or return value | ||
725 | * | ||
726 | * bits0-15 are for generic cacheing control (i.e. the above defined | ||
727 | * values). bits16-31 are reserved for platform-specific variations | ||
728 | * (e.g. l3$ caching on gen7). */ | ||
723 | __u32 cacheing; | 729 | __u32 cacheing; |
724 | }; | 730 | }; |
725 | 731 | ||