[PATCH] drm: Simplify fb refcounting rules around ->update_plane

2014-04-23 Thread Daniel Vetter
The introduction of primary planes has apparently caused a bit of fb refcounting fun for people. That makes it a good time to clean up the arcane rules and slight differences between ->update_plane and ->set_config. The new rules are: - The core holds a reference for both the new and the old fb

[PATCH] drm: Simplify fb refcounting rules around ->update_plane

2014-04-23 Thread Matt Roper
On Wed, Apr 23, 2014 at 05:37:30PM +0200, Daniel Vetter wrote: > The introduction of primary planes has apparently caused a bit of fb > refcounting fun for people. That makes it a good time to clean up the > arcane rules and slight differences between ->update_plane and > ->set_config. The new

[PATCH] drm: Simplify fb refcounting rules around ->update_plane

2014-04-23 Thread Daniel Vetter
On Wed, Apr 23, 2014 at 8:36 AM, Daniel Vetter wrote: > Hm, that's indeed a bit fishy. Otoh I don't understand how this blows > up with existing userspace since we should only hit this if userspace > does an explicit disable call on the primary plane through the ioctl. > It's a bug for sure

[PATCH] drm: Simplify fb refcounting rules around ->update_plane

2014-04-23 Thread Daniel Vetter
On Wed, Apr 23, 2014 at 3:08 AM, Matt Roper wrote: > On Tue, Apr 22, 2014 at 04:19:45PM +0200, Daniel Vetter wrote: >> The introduction of primary planes has apparently caused a bit of fb >> refcounting fun for people. That makes it a good time to clean up the >> arcane rules and slight

[PATCH] drm: Simplify fb refcounting rules around ->update_plane

2014-04-22 Thread Matt Roper
On Tue, Apr 22, 2014 at 04:19:45PM +0200, Daniel Vetter wrote: > The introduction of primary planes has apparently caused a bit of fb > refcounting fun for people. That makes it a good time to clean up the > arcane rules and slight differences between ->update_plane and > ->set_config. The new

[PATCH] drm: Simplify fb refcounting rules around ->update_plane

2014-04-22 Thread Ville Syrjälä
On Tue, Apr 22, 2014 at 04:09:09PM +0200, Daniel Vetter wrote: > On Tue, Apr 22, 2014 at 01:06:22PM +0300, Ville Syrj?l? wrote: > > On Tue, Apr 22, 2014 at 11:07:13AM +0200, Daniel Vetter wrote: > > > The introduction of primary planes has apparently caused a bit of fb > > > refcounting fun for

[PATCH] drm: Simplify fb refcounting rules around ->update_plane

2014-04-22 Thread Daniel Vetter
On Tue, Apr 22, 2014 at 4:28 PM, Ville Syrj?l? wrote: >> Not sure what to do here really. > > Just s/drm_gem_object_unreference_unlocked/drm_gem_object_unreference/ > and grab struct_mutex by hand around both operations? I was kinda hoping for someone to go ahead and fix the entire fb tracking

[PATCH] drm: Simplify fb refcounting rules around ->update_plane

2014-04-22 Thread Daniel Vetter
The introduction of primary planes has apparently caused a bit of fb refcounting fun for people. That makes it a good time to clean up the arcane rules and slight differences between ->update_plane and ->set_config. The new rules are: - The core holds a reference for both the new and the old fb

[PATCH] drm: Simplify fb refcounting rules around ->update_plane

2014-04-22 Thread Daniel Vetter
On Tue, Apr 22, 2014 at 01:06:22PM +0300, Ville Syrj?l? wrote: > On Tue, Apr 22, 2014 at 11:07:13AM +0200, Daniel Vetter wrote: > > The introduction of primary planes has apparently caused a bit of fb > > refcounting fun for people. That makes it a good time to clean up the > > arcane rules and

[PATCH] drm: Simplify fb refcounting rules around ->update_plane

2014-04-22 Thread Ville Syrjälä
On Tue, Apr 22, 2014 at 11:07:13AM +0200, Daniel Vetter wrote: > The introduction of primary planes has apparently caused a bit of fb > refcounting fun for people. That makes it a good time to clean up the > arcane rules and slight differences between ->update_plane and > ->set_config. The new

[PATCH] drm: Simplify fb refcounting rules around ->update_plane

2014-04-22 Thread Thierry Reding
On Tue, Apr 22, 2014 at 11:07:13AM +0200, Daniel Vetter wrote: [...] > diff --git a/drivers/gpu/drm/drm_plane_helper.c > b/drivers/gpu/drm/drm_plane_helper.c > index e768d35ff22e..8db129c44fea 100644 > --- a/drivers/gpu/drm/drm_plane_helper.c > +++ b/drivers/gpu/drm/drm_plane_helper.c > @@

[PATCH] drm: Simplify fb refcounting rules around ->update_plane

2014-04-22 Thread Daniel Vetter
The introduction of primary planes has apparently caused a bit of fb refcounting fun for people. That makes it a good time to clean up the arcane rules and slight differences between ->update_plane and ->set_config. The new rules are: - The core holds a reference for both the new and the old fb