diff options
author | Tvrtko Ursulin <tvrtko.ursulin@intel.com> | 2016-12-01 17:16:37 +0300 |
---|---|---|
committer | Tvrtko Ursulin <tvrtko.ursulin@intel.com> | 2016-12-01 21:01:08 +0300 |
commit | 12d79d78287cdc5323b4a589a2ca2ec16c5063fc (patch) | |
tree | 31bdb695fba1823f2f2d1b225986cb8b8c4824ef /drivers/gpu/drm/i915/i915_gem_context.c | |
parent | 187685cb909881822f4eeaa5acdf80e25d7d1489 (diff) | |
download | linux-12d79d78287cdc5323b4a589a2ca2ec16c5063fc.tar.xz |
drm/i915: Make GEM object create and create from data take dev_priv
Makes all GEM object constructors consistent.
v2: Fix compilation in GVT code.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> (v1)
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_context.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem_context.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c index a6add0c14045..5241b51dd986 100644 --- a/drivers/gpu/drm/i915/i915_gem_context.c +++ b/drivers/gpu/drm/i915/i915_gem_context.c @@ -169,12 +169,13 @@ void i915_gem_context_free(struct kref *ctx_ref) static struct drm_i915_gem_object * alloc_context_obj(struct drm_device *dev, u64 size) { + struct drm_i915_private *dev_priv = to_i915(dev); struct drm_i915_gem_object *obj; int ret; lockdep_assert_held(&dev->struct_mutex); - obj = i915_gem_object_create(dev, size); + obj = i915_gem_object_create(dev_priv, size); if (IS_ERR(obj)) return obj; @@ -193,7 +194,7 @@ alloc_context_obj(struct drm_device *dev, u64 size) * This is only applicable for Ivy Bridge devices since * later platforms don't have L3 control bits in the PTE. */ - if (IS_IVYBRIDGE(to_i915(dev))) { + if (IS_IVYBRIDGE(dev_priv)) { ret = i915_gem_object_set_cache_level(obj, I915_CACHE_L3_LLC); /* Failure shouldn't ever happen this early */ if (WARN_ON(ret)) { |