summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_gem_gtt.h
diff options
context:
space:
mode:
authorDaniel Vetter2014-08-06 15:04:47 +0200
committerDaniel Vetter2014-08-13 14:23:28 +0200
commit4d884705dababd7d0f3f12796bc7b45e84962596 (patch)
tree2b13ac2864569818f1e5db0d56354d7f53e172b6 /drivers/gpu/drm/i915/i915_gem_gtt.h
parentdrm/i915: Some cleanups for the ppgtt lifetime handling (diff)
downloadkernel-qcow2-linux-4d884705dababd7d0f3f12796bc7b45e84962596.tar.gz
kernel-qcow2-linux-4d884705dababd7d0f3f12796bc7b45e84962596.tar.xz
kernel-qcow2-linux-4d884705dababd7d0f3f12796bc7b45e84962596.zip
drm/i915: Track file_priv, not ctx in the ppgtt structure
Hardware contexts reference a ppgtt, not the other way round. And the only user of this (in debugfs) actually only cares about which file the ppgtt is associated with. So give it what it wants. While at it give the ppgtt create function a proper name&place. Reviewed-by: Michel Thierry <michel.thierry@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_gtt.h')
-rw-r--r--drivers/gpu/drm/i915/i915_gem_gtt.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.h b/drivers/gpu/drm/i915/i915_gem_gtt.h
index c6beb528f955..90ff45246b62 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.h
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.h
@@ -34,6 +34,8 @@
#ifndef __I915_GEM_GTT_H__
#define __I915_GEM_GTT_H__
+struct drm_i915_file_private;
+
typedef uint32_t gen6_gtt_pte_t;
typedef uint64_t gen8_gtt_pte_t;
typedef gen8_gtt_pte_t gen8_ppgtt_pde_t;
@@ -258,7 +260,7 @@ struct i915_hw_ppgtt {
dma_addr_t *gen8_pt_dma_addr[4];
};
- struct intel_context *ctx;
+ struct drm_i915_file_private *file_priv;
int (*enable)(struct i915_hw_ppgtt *ppgtt);
int (*switch_mm)(struct i915_hw_ppgtt *ppgtt,
@@ -275,6 +277,8 @@ void i915_gem_setup_global_gtt(struct drm_device *dev, unsigned long start,
int i915_ppgtt_init(struct drm_device *dev, struct i915_hw_ppgtt *ppgtt);
void i915_ppgtt_release(struct kref *kref);
+struct i915_hw_ppgtt *i915_ppgtt_create(struct drm_device *dev,
+ struct drm_i915_file_private *fpriv);
static inline void i915_ppgtt_get(struct i915_hw_ppgtt *ppgtt)
{
if (ppgtt)