[Intel-gfx] [PATCH 4/6] drm/i915: Track pinned vma in intel_plane_state

Chris Wilson chris at chris-wilson.co.uk
Sun Aug 21 14:29:07 UTC 2016


On Sun, Aug 21, 2016 at 02:15:34PM +0100, Chris Wilson wrote:
>  intel_cleanup_plane_fb(struct drm_plane *plane,
>  		       struct drm_plane_state *old_state)
>  {
> -	struct drm_device *dev = plane->dev;
> -	struct intel_plane_state *old_intel_state;
> -	struct drm_i915_gem_object *old_obj = intel_fb_obj(old_state->fb);
> -	struct drm_i915_gem_object *obj = intel_fb_obj(plane->state->fb);
> -
> -	old_intel_state = to_intel_plane_state(old_state);
> -
> -	if (!obj && !old_obj)
> -		return;
> -
> -	if (old_obj && (plane->type != DRM_PLANE_TYPE_CURSOR ||
> -	    !INTEL_INFO(dev)->cursor_needs_physical))
> -		intel_unpin_fb_obj(old_state->fb, old_state->rotation);
> +	/* Only called after a successful intel_prepare_plane_fb() */

Not true. Disabled state have NULL vma. Last minute changes...

> +	intel_unpin_fb_vma(to_intel_plane_state(old_state)->vma);
>  }

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list