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 <[email protected]>
> Signed-off-by: Maarten Lankhorst <[email protected]>
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 <[email protected]>
Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx