drm/nvc0/fb: take lock in nvc0_ram_put()
authorRoy Spliet <r.spliet@student.tudelft.nl>
Fri, 19 Jul 2013 21:59:12 +0000 (23:59 +0200)
committerBen Skeggs <bskeggs@redhat.com>
Tue, 30 Jul 2013 03:04:07 +0000 (13:04 +1000)
commitdedaa8f0e6967edb9127a6643d0259e794196ed2
tree31c7ac3757eb7fcce99b103ad843fc88f57e5c87
parentbfcd92a0ae2996a34b1fd020b3e0951946ae6903
drm/nvc0/fb: take lock in nvc0_ram_put()

Kernel panic caused by list corruption in ltcg seems to indicate a
concurrency issue.

Take mutex of pfb like nv50_ram_put() to eliminate concurrency.

V2: Separate critical section into separate function, avoid taking the
    lock twice on NVC0

Signed-off-by: Roy Spliet <r.spliet@student.tudelft.nl>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/core/subdev/fb/priv.h
drivers/gpu/drm/nouveau/core/subdev/fb/ramnv50.c
drivers/gpu/drm/nouveau/core/subdev/fb/ramnvc0.c