]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915: Eliminate superfluous i915_ggtt_view_normal
authorChris Wilson <chris@chris-wilson.co.uk>
Sat, 14 Jan 2017 00:28:27 +0000 (00:28 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Sat, 14 Jan 2017 16:18:36 +0000 (16:18 +0000)
Since commit 058d88c4330f ("drm/i915: Track pinned VMA"), there is only
one user of i915_ggtt_view_normal rodate. Just treat NULL as no special
view in pin_to_display() like everywhere else.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170114002827.31315-7-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem_gtt.c
drivers/gpu/drm/i915/i915_gem_gtt.h
drivers/gpu/drm/i915/intel_overlay.c

index d8622fd23f5d94291dca20efd1f19266023dbb67..d4c59b53532e8eb2f40ade9e8a97d48ed7247aa7 100644 (file)
@@ -3436,7 +3436,7 @@ i915_gem_object_pin_to_display_plane(struct drm_i915_gem_object *obj,
         * try to preserve the existing ABI).
         */
        vma = ERR_PTR(-ENOSPC);
-       if (view->type == I915_GGTT_VIEW_NORMAL)
+       if (!view || view->type == I915_GGTT_VIEW_NORMAL)
                vma = i915_gem_object_ggtt_pin(obj, view, 0, alignment,
                                               PIN_MAPPABLE | PIN_NONBLOCK);
        if (IS_ERR(vma)) {
index 169d10d81334047768959265676bd6b64dc6e548..4c88745b60783bc196d8b49dc1a4bd1a73527220 100644 (file)
 static int
 i915_get_ggtt_vma_pages(struct i915_vma *vma);
 
-const struct i915_ggtt_view i915_ggtt_view_normal = {
-       .type = I915_GGTT_VIEW_NORMAL,
-};
-
 static void gen6_ggtt_invalidate(struct drm_i915_private *dev_priv)
 {
        /* Note that as an uncached mmio write, this should flush the
index f673544e570eda65741e31964abd1aa43178e876..3c5ef5358cef7f943cd2acf8e14c35e8c8d1fb3e 100644 (file)
@@ -196,8 +196,6 @@ struct i915_ggtt_view {
        };
 };
 
-extern const struct i915_ggtt_view i915_ggtt_view_normal;
-
 enum i915_cache_level;
 
 struct i915_vma;
index 4473a611c664b5511d9de55a2e4f05c665a69e6c..0608fad7f593e18849ccf3d64c1ce60dc786dfdc 100644 (file)
@@ -811,8 +811,7 @@ static int intel_overlay_do_put_image(struct intel_overlay *overlay,
        if (ret != 0)
                return ret;
 
-       vma = i915_gem_object_pin_to_display_plane(new_bo, 0,
-                                                  &i915_ggtt_view_normal);
+       vma = i915_gem_object_pin_to_display_plane(new_bo, 0, NULL);
        if (IS_ERR(vma))
                return PTR_ERR(vma);