[PATCH v3 3/4] drm/ttm: convert to unified vma offset manager

2013-07-22 Thread Thomas Hellstrom
On 07/22/2013 12:55 PM, David Herrmann wrote: > Sorry, I forgot to CC correctly. > > On Mon, Jul 22, 2013 at 12:53 PM, David Herrmann > wrote: >> Hi >> >> On Fri, Jul 19, 2013 at 11:13 AM, Thomas Hellstrom >> wrote: >>> On 07/18/2013 10:54 PM, David Herrmann wrote: Hi On Thu, Jul

[PATCH v3 3/4] drm/ttm: convert to unified vma offset manager

2013-07-22 Thread David Herrmann
Sorry, I forgot to CC correctly. On Mon, Jul 22, 2013 at 12:53 PM, David Herrmann wrote: > Hi > > On Fri, Jul 19, 2013 at 11:13 AM, Thomas Hellstrom > wrote: >> On 07/18/2013 10:54 PM, David Herrmann wrote: >>> >>> Hi >>> >>> On Thu, Jul 18, 2013 at 1:24 PM, Thomas Hellstrom >>> wrote: >> >> >

Re: [PATCH v3 3/4] drm/ttm: convert to unified vma offset manager

2013-07-22 Thread Thomas Hellstrom
On 07/22/2013 12:55 PM, David Herrmann wrote: Sorry, I forgot to CC correctly. On Mon, Jul 22, 2013 at 12:53 PM, David Herrmann wrote: Hi On Fri, Jul 19, 2013 at 11:13 AM, Thomas Hellstrom wrote: On 07/18/2013 10:54 PM, David Herrmann wrote: Hi On Thu, Jul 18, 2013 at 1:24 PM, Thomas Hell

Re: [PATCH v3 3/4] drm/ttm: convert to unified vma offset manager

2013-07-22 Thread David Herrmann
Sorry, I forgot to CC correctly. On Mon, Jul 22, 2013 at 12:53 PM, David Herrmann wrote: > Hi > > On Fri, Jul 19, 2013 at 11:13 AM, Thomas Hellstrom > wrote: >> On 07/18/2013 10:54 PM, David Herrmann wrote: >>> >>> Hi >>> >>> On Thu, Jul 18, 2013 at 1:24 PM, Thomas Hellstrom >>> wrote: >> >> >>

[PATCH v3 3/4] drm/ttm: convert to unified vma offset manager

2013-07-19 Thread Thomas Hellstrom
On 07/18/2013 10:54 PM, David Herrmann wrote: > Hi > > On Thu, Jul 18, 2013 at 1:24 PM, Thomas Hellstrom > wrote: ... >> >> I think that if there are good reasons to keep locking internal, I'm fine >> with that, (And also, of course, with >> Daniel's proposal). Currently the add / remove / look

[PATCH v3 3/4] drm/ttm: convert to unified vma offset manager

2013-07-19 Thread Maarten Lankhorst
Op 18-07-13 22:54, David Herrmann schreef: > Hi > > On Thu, Jul 18, 2013 at 1:24 PM, Thomas Hellstrom > wrote: >> On 07/18/2013 01:07 PM, David Herrmann wrote: >>> Hi >>> >>> On Thu, Jul 18, 2013 at 10:53 AM, Thomas Hellstrom >>> wrote: A quick look, but not a full review: Looks m

Re: [PATCH v3 3/4] drm/ttm: convert to unified vma offset manager

2013-07-19 Thread Thomas Hellstrom
On 07/18/2013 10:54 PM, David Herrmann wrote: Hi On Thu, Jul 18, 2013 at 1:24 PM, Thomas Hellstrom wrote: ... I think that if there are good reasons to keep locking internal, I'm fine with that, (And also, of course, with Daniel's proposal). Currently the add / remove / lookup paths are mo

Re: [PATCH v3 3/4] drm/ttm: convert to unified vma offset manager

2013-07-19 Thread Maarten Lankhorst
Op 18-07-13 22:54, David Herrmann schreef: > Hi > > On Thu, Jul 18, 2013 at 1:24 PM, Thomas Hellstrom > wrote: >> On 07/18/2013 01:07 PM, David Herrmann wrote: >>> Hi >>> >>> On Thu, Jul 18, 2013 at 10:53 AM, Thomas Hellstrom >>> wrote: A quick look, but not a full review: Looks m

[PATCH v3 3/4] drm/ttm: convert to unified vma offset manager

2013-07-18 Thread David Herrmann
Hi On Thu, Jul 18, 2013 at 1:24 PM, Thomas Hellstrom wrote: > On 07/18/2013 01:07 PM, David Herrmann wrote: >> >> Hi >> >> On Thu, Jul 18, 2013 at 10:53 AM, Thomas Hellstrom >> wrote: >>> >>> A quick look, but not a full review: >>> >>> Looks mostly good, but it looks like the TTM vm lock isn't

[PATCH v3 3/4] drm/ttm: convert to unified vma offset manager

2013-07-18 Thread Jerome Glisse
On Thu, Jul 18, 2013 at 4:54 PM, David Herrmann wrote: > Hi > > On Thu, Jul 18, 2013 at 1:24 PM, Thomas Hellstrom > wrote: >> On 07/18/2013 01:07 PM, David Herrmann wrote: >>> >>> Hi >>> >>> On Thu, Jul 18, 2013 at 10:53 AM, Thomas Hellstrom >>> wrote: A quick look, but not a full re

Re: [PATCH v3 3/4] drm/ttm: convert to unified vma offset manager

2013-07-18 Thread Jerome Glisse
On Thu, Jul 18, 2013 at 4:54 PM, David Herrmann wrote: > Hi > > On Thu, Jul 18, 2013 at 1:24 PM, Thomas Hellstrom > wrote: >> On 07/18/2013 01:07 PM, David Herrmann wrote: >>> >>> Hi >>> >>> On Thu, Jul 18, 2013 at 10:53 AM, Thomas Hellstrom >>> wrote: A quick look, but not a full rev

Re: [PATCH v3 3/4] drm/ttm: convert to unified vma offset manager

2013-07-18 Thread David Herrmann
Hi On Thu, Jul 18, 2013 at 1:24 PM, Thomas Hellstrom wrote: > On 07/18/2013 01:07 PM, David Herrmann wrote: >> >> Hi >> >> On Thu, Jul 18, 2013 at 10:53 AM, Thomas Hellstrom >> wrote: >>> >>> A quick look, but not a full review: >>> >>> Looks mostly good, but it looks like the TTM vm lock isn't

[PATCH v3 3/4] drm/ttm: convert to unified vma offset manager

2013-07-18 Thread Thomas Hellstrom
On 07/18/2013 01:07 PM, David Herrmann wrote: > Hi > > On Thu, Jul 18, 2013 at 10:53 AM, Thomas Hellstrom > wrote: >> A quick look, but not a full review: >> >> Looks mostly good, but it looks like the TTM vm lock isn't needed at all >> anymore (provided the vma offset manager is properly protecte

[PATCH v3 3/4] drm/ttm: convert to unified vma offset manager

2013-07-18 Thread David Herrmann
Hi On Thu, Jul 18, 2013 at 10:53 AM, Thomas Hellstrom wrote: > A quick look, but not a full review: > > Looks mostly good, but it looks like the TTM vm lock isn't needed at all > anymore (provided the vma offset manager is properly protected), since > kref_get_unless_zero() is used when a referen

[PATCH v3 3/4] drm/ttm: convert to unified vma offset manager

2013-07-18 Thread Daniel Vetter
On Thu, Jul 18, 2013 at 10:53 AM, Thomas Hellstrom wrote: > A quick look, but not a full review: > > Looks mostly good, but it looks like the TTM vm lock isn't needed at all > anymore (provided the vma offset manager is properly protected), since > kref_get_unless_zero() is used when a reference a

[PATCH v3 3/4] drm/ttm: convert to unified vma offset manager

2013-07-18 Thread Thomas Hellstrom
A quick look, but not a full review: Looks mostly good, but it looks like the TTM vm lock isn't needed at all anymore (provided the vma offset manager is properly protected), since kref_get_unless_zero() is used when a reference after lookup is taken. (please see the kref_get_unless_zero documen

Re: [PATCH v3 3/4] drm/ttm: convert to unified vma offset manager

2013-07-18 Thread Thomas Hellstrom
On 07/18/2013 01:07 PM, David Herrmann wrote: Hi On Thu, Jul 18, 2013 at 10:53 AM, Thomas Hellstrom wrote: A quick look, but not a full review: Looks mostly good, but it looks like the TTM vm lock isn't needed at all anymore (provided the vma offset manager is properly protected), since kref_

Re: [PATCH v3 3/4] drm/ttm: convert to unified vma offset manager

2013-07-18 Thread David Herrmann
Hi On Thu, Jul 18, 2013 at 10:53 AM, Thomas Hellstrom wrote: > A quick look, but not a full review: > > Looks mostly good, but it looks like the TTM vm lock isn't needed at all > anymore (provided the vma offset manager is properly protected), since > kref_get_unless_zero() is used when a referen

Re: [PATCH v3 3/4] drm/ttm: convert to unified vma offset manager

2013-07-18 Thread Daniel Vetter
On Thu, Jul 18, 2013 at 10:53 AM, Thomas Hellstrom wrote: > A quick look, but not a full review: > > Looks mostly good, but it looks like the TTM vm lock isn't needed at all > anymore (provided the vma offset manager is properly protected), since > kref_get_unless_zero() is used when a reference a

Re: [PATCH v3 3/4] drm/ttm: convert to unified vma offset manager

2013-07-18 Thread Thomas Hellstrom
A quick look, but not a full review: Looks mostly good, but it looks like the TTM vm lock isn't needed at all anymore (provided the vma offset manager is properly protected), since kref_get_unless_zero() is used when a reference after lookup is taken. (please see the kref_get_unless_zero docume

[PATCH v3 3/4] drm/ttm: convert to unified vma offset manager

2013-07-17 Thread David Herrmann
Use the new vma-manager infrastructure. This doesn't change any implementation details as the vma-offset-manager is nearly copied 1-to-1 from TTM. Even though the vma-manager uses its own locks, we still need bo->vm_lock to prevent bos from being destroyed before we can get a reference during look

[PATCH v3 3/4] drm/ttm: convert to unified vma offset manager

2013-07-17 Thread David Herrmann
Use the new vma-manager infrastructure. This doesn't change any implementation details as the vma-offset-manager is nearly copied 1-to-1 from TTM. Even though the vma-manager uses its own locks, we still need bo->vm_lock to prevent bos from being destroyed before we can get a reference during look