[PATCH 3/3] drm: Track framebuffer references at the point of assignment

2016-11-28 Thread Daniel Vetter
On Mon, Nov 28, 2016 at 02:44:15PM +, Chris Wilson wrote: > On Mon, Nov 28, 2016 at 03:15:12PM +0100, Daniel Vetter wrote: > > On Mon, Nov 28, 2016 at 08:46:11AM +, Chris Wilson wrote: > > > On Mon, Nov 28, 2016 at 08:48:34AM +0100, Daniel Vetter wrote: > > > > On Fri, Nov 25, 2016 at 03:32

[PATCH 3/3] drm: Track framebuffer references at the point of assignment

2016-11-28 Thread Daniel Vetter
On Mon, Nov 28, 2016 at 08:46:11AM +, Chris Wilson wrote: > On Mon, Nov 28, 2016 at 08:48:34AM +0100, Daniel Vetter wrote: > > On Fri, Nov 25, 2016 at 03:32:31PM +, Chris Wilson wrote: > > > --- a/drivers/gpu/drm/drm_atomic.c > > > +++ b/drivers/gpu/drm/drm_atomic.c > > > @@ -1253,7 +1253,7

[PATCH 3/3] drm: Track framebuffer references at the point of assignment

2016-11-28 Thread Chris Wilson
On Mon, Nov 28, 2016 at 03:15:12PM +0100, Daniel Vetter wrote: > On Mon, Nov 28, 2016 at 08:46:11AM +, Chris Wilson wrote: > > On Mon, Nov 28, 2016 at 08:48:34AM +0100, Daniel Vetter wrote: > > > On Fri, Nov 25, 2016 at 03:32:31PM +, Chris Wilson wrote: > > > > --- a/drivers/gpu/drm/drm_ato

[PATCH 3/3] drm: Track framebuffer references at the point of assignment

2016-11-28 Thread Daniel Vetter
On Fri, Nov 25, 2016 at 03:32:31PM +, Chris Wilson wrote: > We can simplify the code greatly if both legacy and atomic paths updated > the references as they assigned the framebuffer to the planes. Long > before framebuffer reference counting was added, the code had to keep > the old_fb around

[PATCH 3/3] drm: Track framebuffer references at the point of assignment

2016-11-28 Thread Chris Wilson
On Mon, Nov 28, 2016 at 08:48:34AM +0100, Daniel Vetter wrote: > On Fri, Nov 25, 2016 at 03:32:31PM +, Chris Wilson wrote: > > --- a/drivers/gpu/drm/drm_atomic.c > > +++ b/drivers/gpu/drm/drm_atomic.c > > @@ -1253,7 +1253,7 @@ drm_atomic_set_fb_for_plane(struct drm_plane_state > > *plane_state

[PATCH 3/3] drm: Track framebuffer references at the point of assignment

2016-11-25 Thread Chris Wilson
We can simplify the code greatly if both legacy and atomic paths updated the references as they assigned the framebuffer to the planes. Long before framebuffer reference counting was added, the code had to keep the old_fb around until after the operation was completed - but now we can simply leave