drm/i915: convert some gem structures to per-ring V2
[firefly-linux-kernel-4.4.55.git] / drivers / gpu / drm / i915 / i915_dma.c
index 2541428b2fe587b3fe40c19ce03d67c418d3c5cd..f485880300ce89b0542db18106b9944d5bfda143 100644 (file)
@@ -82,7 +82,8 @@ static void i915_free_hws(struct drm_device *dev)
                dev_priv->status_page_dmah = NULL;
        }
 
-       if (dev_priv->status_gfx_addr) {
+       if (dev_priv->render_ring.status_page.gfx_addr) {
+               dev_priv->render_ring.status_page.gfx_addr = 0;
                dev_priv->status_gfx_addr = 0;
                drm_core_ioremapfree(&dev_priv->hws_map, dev);
        }
@@ -835,9 +836,9 @@ static int i915_set_status_page(struct drm_device *dev, void *data,
        I915_WRITE(HWS_PGA, ring->status_page.gfx_addr);
 
        DRM_DEBUG_DRIVER("load hws HWS_PGA with gfx mem 0x%x\n",
-                               dev_priv->status_gfx_addr);
+                       dev_priv->status_gfx_addr);
        DRM_DEBUG_DRIVER("load hws at %p\n",
-                               dev_priv->hw_status_page);
+                       dev_priv->hw_status_page);
        return 0;
 }
 
@@ -1510,7 +1511,6 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
        resource_size_t base, size;
        int ret = 0, mmio_bar;
        uint32_t agp_size, prealloc_size, prealloc_start;
-
        /* i915 has 4 more counters */
        dev->counters += 4;
        dev->types[6] = _DRM_STAT_IRQ;