Re: [Intel-gfx] [PATCH] drm: Don't grab an fb reference for the idr

2014-08-08 Thread Daniel Vetter
On Fri, Aug 8, 2014 at 12:35 PM, David Herrmann wrote: > Ewww, this is ugly. You now make the unregistration dynamic and it's > no longer under driver control. The typical device-control flow > assumes there's an authority that controls at which point objects are > registered and unregistered. You

Re: [Intel-gfx] [PATCH] drm: Don't grab an fb reference for the idr

2014-08-08 Thread David Herrmann
Hi On Wed, Aug 6, 2014 at 9:10 AM, Daniel Vetter wrote: > The current refcounting scheme is that the fb lookup idr also holds a > reference. This works out nicely bacause thus far we've always > explicitly cleaned up idr entries for framebuffers: > - Userspace fbs get removed in the rmfb ioctl or

Re: [Intel-gfx] [PATCH] drm: Don't grab an fb reference for the idr

2014-08-06 Thread Daniel Vetter
On Wed, Aug 06, 2014 at 02:59:29PM -0400, Rob Clark wrote: > On Wed, Aug 6, 2014 at 10:07 AM, Daniel Vetter wrote: > > On Wed, Aug 06, 2014 at 09:12:42AM -0400, Rob Clark wrote: > >> On Wed, Aug 6, 2014 at 8:37 AM, Daniel Vetter wrote: > >> > On Wed, Aug 06, 2014 at 07:11:28AM -0400, Rob Clark wr

Re: [Intel-gfx] [PATCH] drm: Don't grab an fb reference for the idr

2014-08-06 Thread Rob Clark
On Wed, Aug 6, 2014 at 10:07 AM, Daniel Vetter wrote: > On Wed, Aug 06, 2014 at 09:12:42AM -0400, Rob Clark wrote: >> On Wed, Aug 6, 2014 at 8:37 AM, Daniel Vetter wrote: >> > On Wed, Aug 06, 2014 at 07:11:28AM -0400, Rob Clark wrote: >> >> On Wed, Aug 6, 2014 at 3:10 AM, Daniel Vetter >> >> wr

Re: [Intel-gfx] [PATCH] drm: Don't grab an fb reference for the idr

2014-08-06 Thread Daniel Vetter
On Wed, Aug 06, 2014 at 09:12:42AM -0400, Rob Clark wrote: > On Wed, Aug 6, 2014 at 8:37 AM, Daniel Vetter wrote: > > On Wed, Aug 06, 2014 at 07:11:28AM -0400, Rob Clark wrote: > >> On Wed, Aug 6, 2014 at 3:10 AM, Daniel Vetter > >> wrote: > >> > The current refcounting scheme is that the fb loo

Re: [Intel-gfx] [PATCH] drm: Don't grab an fb reference for the idr

2014-08-06 Thread Rob Clark
On Wed, Aug 6, 2014 at 8:37 AM, Daniel Vetter wrote: > On Wed, Aug 06, 2014 at 07:11:28AM -0400, Rob Clark wrote: >> On Wed, Aug 6, 2014 at 3:10 AM, Daniel Vetter wrote: >> > The current refcounting scheme is that the fb lookup idr also holds a >> > reference. This works out nicely bacause thus f

Re: [Intel-gfx] [PATCH] drm: Don't grab an fb reference for the idr

2014-08-06 Thread Daniel Vetter
On Wed, Aug 06, 2014 at 07:11:28AM -0400, Rob Clark wrote: > On Wed, Aug 6, 2014 at 3:10 AM, Daniel Vetter wrote: > > The current refcounting scheme is that the fb lookup idr also holds a > > reference. This works out nicely bacause thus far we've always > > explicitly cleaned up idr entries for f

Re: [Intel-gfx] [PATCH] drm: Don't grab an fb reference for the idr

2014-08-06 Thread Rob Clark
On Wed, Aug 6, 2014 at 3:10 AM, Daniel Vetter wrote: > The current refcounting scheme is that the fb lookup idr also holds a > reference. This works out nicely bacause thus far we've always > explicitly cleaned up idr entries for framebuffers: > - Userspace fbs get removed in the rmfb ioctl or whe

[Intel-gfx] [PATCH] drm: Don't grab an fb reference for the idr

2014-08-06 Thread Daniel Vetter
The current refcounting scheme is that the fb lookup idr also holds a reference. This works out nicely bacause thus far we've always explicitly cleaned up idr entries for framebuffers: - Userspace fbs get removed in the rmfb ioctl or when the drm file gets closed. - Kernel fbs (for fbdev emulatio