Re: [PATCH 34/55] drm/i915: Count how many VMA are bound for an object

Joonas Lahtinen
2016-07-26T07:44:05Z

On ma, 2016-07-25 at 18:32 +0100, Chris Wilson wrote:
> @@ -3692,6 +3692,9 @@ i915_gem_object_pin_to_display_plane(struct drm_i915_gem_object *obj,
>       old_read_domains,
>       old_write_domain);
>
> + /* Increment the pages_pin_count to guard against the shrinker */
> + obj->pages_pin_count++;
> +

This is new unrelated code/fix?

>   return 0;
>
>  err_unpin_display:
> @@ -3708,6 +3711,7 @@ i915_gem_object_unpin_from_display_plane(struct drm_i915_gem_object *obj,
>
>   i915_gem_object_ggtt_unpin_view(obj, view);
>
> + obj->pages_pin_count--;

Ditto.

Above code two changes explained or moved to separate patch, then;

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

Regards, Joonas

>   obj->pin_display--;
>  }
>
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation