[PATCH 2/2] drm/ttm: don't write to bo-reserved without holding glob-lru_lock

2010-03-01 Thread Maarten Maathuis
- The headerfile says you can't write to it without holding the lock. Signed-off-by: Maarten Maathuis madman2...@gmail.com --- drivers/gpu/drm/ttm/ttm_bo.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c

Re: [PATCH 2/2] drm/ttm: don't write to bo-reserved without holding glob-lru_lock

2010-03-01 Thread Jerome Glisse
On Mon, Mar 01, 2010 at 07:34:40PM +0100, Maarten Maathuis wrote: - The headerfile says you can't write to it without holding the lock. Signed-off-by: Maarten Maathuis madman2...@gmail.com NAK, from my POV as we always use atomic_* on reserved it's useless to protect it with spinlock.

Re: [PATCH 2/2] drm/ttm: don't write to bo-reserved without holding glob-lru_lock

2010-03-01 Thread Thomas Hellstrom
Maarten Maathuis wrote: - The headerfile says you can't write to it without holding the lock. NAK. The header-file is incorrect. It should say that the lru_lock needs to be held only when we transition from 0 to 1. That guarantees that if the lru lock is held, and we read 0, we can safely