diff options
Diffstat (limited to 'drivers/gpu/drm/i915/intel_ringbuffer.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_ringbuffer.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index 428ed62dc5de..61e00bf9e87f 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c | |||
@@ -657,9 +657,9 @@ int intel_init_pipe_control(struct intel_engine_cs *engine, int size) | |||
657 | 657 | ||
658 | WARN_ON(engine->scratch.obj); | 658 | WARN_ON(engine->scratch.obj); |
659 | 659 | ||
660 | obj = i915_gem_object_create_stolen(engine->i915->dev, size); | 660 | obj = i915_gem_object_create_stolen(&engine->i915->drm, size); |
661 | if (!obj) | 661 | if (!obj) |
662 | obj = i915_gem_object_create(engine->i915->dev, size); | 662 | obj = i915_gem_object_create(&engine->i915->drm, size); |
663 | if (IS_ERR(obj)) { | 663 | if (IS_ERR(obj)) { |
664 | DRM_ERROR("Failed to allocate scratch page\n"); | 664 | DRM_ERROR("Failed to allocate scratch page\n"); |
665 | ret = PTR_ERR(obj); | 665 | ret = PTR_ERR(obj); |
@@ -1888,7 +1888,7 @@ static void cleanup_phys_status_page(struct intel_engine_cs *engine) | |||
1888 | if (!dev_priv->status_page_dmah) | 1888 | if (!dev_priv->status_page_dmah) |
1889 | return; | 1889 | return; |
1890 | 1890 | ||
1891 | drm_pci_free(dev_priv->dev, dev_priv->status_page_dmah); | 1891 | drm_pci_free(&dev_priv->drm, dev_priv->status_page_dmah); |
1892 | engine->status_page.page_addr = NULL; | 1892 | engine->status_page.page_addr = NULL; |
1893 | } | 1893 | } |
1894 | 1894 | ||
@@ -1914,7 +1914,7 @@ static int init_status_page(struct intel_engine_cs *engine) | |||
1914 | unsigned flags; | 1914 | unsigned flags; |
1915 | int ret; | 1915 | int ret; |
1916 | 1916 | ||
1917 | obj = i915_gem_object_create(engine->i915->dev, 4096); | 1917 | obj = i915_gem_object_create(&engine->i915->drm, 4096); |
1918 | if (IS_ERR(obj)) { | 1918 | if (IS_ERR(obj)) { |
1919 | DRM_ERROR("Failed to allocate status page\n"); | 1919 | DRM_ERROR("Failed to allocate status page\n"); |
1920 | return PTR_ERR(obj); | 1920 | return PTR_ERR(obj); |
@@ -1963,7 +1963,7 @@ static int init_phys_status_page(struct intel_engine_cs *engine) | |||
1963 | 1963 | ||
1964 | if (!dev_priv->status_page_dmah) { | 1964 | if (!dev_priv->status_page_dmah) { |
1965 | dev_priv->status_page_dmah = | 1965 | dev_priv->status_page_dmah = |
1966 | drm_pci_alloc(dev_priv->dev, PAGE_SIZE, PAGE_SIZE); | 1966 | drm_pci_alloc(&dev_priv->drm, PAGE_SIZE, PAGE_SIZE); |
1967 | if (!dev_priv->status_page_dmah) | 1967 | if (!dev_priv->status_page_dmah) |
1968 | return -ENOMEM; | 1968 | return -ENOMEM; |
1969 | } | 1969 | } |
@@ -2096,7 +2096,7 @@ intel_engine_create_ringbuffer(struct intel_engine_cs *engine, int size) | |||
2096 | ring->last_retired_head = -1; | 2096 | ring->last_retired_head = -1; |
2097 | intel_ring_update_space(ring); | 2097 | intel_ring_update_space(ring); |
2098 | 2098 | ||
2099 | ret = intel_alloc_ringbuffer_obj(engine->i915->dev, ring); | 2099 | ret = intel_alloc_ringbuffer_obj(&engine->i915->drm, ring); |
2100 | if (ret) { | 2100 | if (ret) { |
2101 | DRM_DEBUG_DRIVER("Failed to allocate ringbuffer %s: %d\n", | 2101 | DRM_DEBUG_DRIVER("Failed to allocate ringbuffer %s: %d\n", |
2102 | engine->name, ret); | 2102 | engine->name, ret); |
@@ -2122,7 +2122,7 @@ static int intel_ring_context_pin(struct i915_gem_context *ctx, | |||
2122 | struct intel_context *ce = &ctx->engine[engine->id]; | 2122 | struct intel_context *ce = &ctx->engine[engine->id]; |
2123 | int ret; | 2123 | int ret; |
2124 | 2124 | ||
2125 | lockdep_assert_held(&ctx->i915->dev->struct_mutex); | 2125 | lockdep_assert_held(&ctx->i915->drm.struct_mutex); |
2126 | 2126 | ||
2127 | if (ce->pin_count++) | 2127 | if (ce->pin_count++) |
2128 | return 0; | 2128 | return 0; |
@@ -2156,7 +2156,7 @@ static void intel_ring_context_unpin(struct i915_gem_context *ctx, | |||
2156 | { | 2156 | { |
2157 | struct intel_context *ce = &ctx->engine[engine->id]; | 2157 | struct intel_context *ce = &ctx->engine[engine->id]; |
2158 | 2158 | ||
2159 | lockdep_assert_held(&ctx->i915->dev->struct_mutex); | 2159 | lockdep_assert_held(&ctx->i915->drm.struct_mutex); |
2160 | 2160 | ||
2161 | if (--ce->pin_count) | 2161 | if (--ce->pin_count) |
2162 | return; | 2162 | return; |
@@ -2696,7 +2696,7 @@ static void intel_ring_init_semaphores(struct drm_i915_private *dev_priv, | |||
2696 | return; | 2696 | return; |
2697 | 2697 | ||
2698 | if (INTEL_GEN(dev_priv) >= 8 && !dev_priv->semaphore_obj) { | 2698 | if (INTEL_GEN(dev_priv) >= 8 && !dev_priv->semaphore_obj) { |
2699 | obj = i915_gem_object_create(dev_priv->dev, 4096); | 2699 | obj = i915_gem_object_create(&dev_priv->drm, 4096); |
2700 | if (IS_ERR(obj)) { | 2700 | if (IS_ERR(obj)) { |
2701 | DRM_ERROR("Failed to allocate semaphore bo. Disabling semaphores\n"); | 2701 | DRM_ERROR("Failed to allocate semaphore bo. Disabling semaphores\n"); |
2702 | i915.semaphores = 0; | 2702 | i915.semaphores = 0; |