[Intel-gfx] [PATCH v2 1/5] drm/i915: Track pinned vma in intel_plane_state
Chris Wilson
chris at chris-wilson.co.uk
Thu Jan 19 11:13:54 UTC 2017
On Thu, Jan 19, 2017 at 11:45:24AM +0200, Joonas Lahtinen wrote:
> On ma, 2017-01-16 at 15:21 +0000, Chris Wilson wrote:
> > With atomic plane states we are able to track an allocation right from
> > preparation, during use and through to the final free after being
> > swapped out for a new plane. We can couple the VMA we pin for the
> > framebuffer (and its rotation) to this lifetime and avoid all the clumsy
> > lookups in between.
> >
> > v2: Remove residual vma on plane cleanup (Chris)
> > v3: Add a description for the vma destruction in
> > intel_plane_destroy_state (Maarten)
> >
> > References: https://bugs.freedesktop.org/show_bug.cgi?id=98829
> > Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> > Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
>
> Regards, Joonas
>
> <SNIP>
>
> > intel_cleanup_plane_fb(struct drm_plane *plane,
> > struct drm_plane_state *old_state)
> > {
>
> <SNIP>
>
> > - if (old_obj && (plane->type != DRM_PLANE_TYPE_CURSOR ||
> > - !INTEL_INFO(dev_priv)->cursor_needs_physical))
> > - intel_unpin_fb_obj(old_state->fb, old_state->rotation);
> > + /* Should only called after a successful intel_prepare_plane_fb()! */
>
> Should only be...
>
> > + vma = fetch_and_zero(&to_intel_plane_state(old_state)->vma);
> > + if (vma)
> > + intel_unpin_fb_vma(vma);
> > }
>
> Apart from that, it's good as far as the GEM changes go, so;
>
> Acked-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
Ta,
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list