mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-14 06:24:53 +08:00
drm/i915: Eliminate superfluous i915_ggtt_view_normal
Since commit 058d88c433
("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
This commit is contained in:
parent
7b92c047ba
commit
47a8e3f6ae
@ -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)) {
|
||||
|
@ -103,10 +103,6 @@
|
||||
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
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user