aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_drm.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2013-07-08 00:15:51 -0400
committerBen Skeggs <bskeggs@redhat.com>2013-07-09 20:47:12 -0400
commit060810d7abaabcab282e062c595871d661561400 (patch)
treed27009af2a9255c10eeccf3f72246515dca11b38 /drivers/gpu/drm/nouveau/nouveau_drm.c
parent06d5a24f08831e167fae42a64ef2083a89f8e617 (diff)
drm/nouveau: fix locking issues in page flipping paths
b580c9e2b7ba5030a795aa2fb73b796523d65a78 introduced additional problems while trying to solve issues that became apparent while porting to the new reservation stuff. The major problem was that the the previously mentioned patch took the client mutex earlier than previously, but the pinning of new_bo can can potentially cause a buffer move, which would result in attempting to acquire the same mutex again. This commit attempts to fix that "fix". Thanks to Maarten for the tips on keeping lockdep happy and cooking :) Reported-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Acked-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_drm.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_drm.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index 218a4b522fe5..4eca52b8d573 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -284,8 +284,6 @@ static int nouveau_drm_probe(struct pci_dev *pdev,
284 return 0; 284 return 0;
285} 285}
286 286
287static struct lock_class_key drm_client_lock_class_key;
288
289static int 287static int
290nouveau_drm_load(struct drm_device *dev, unsigned long flags) 288nouveau_drm_load(struct drm_device *dev, unsigned long flags)
291{ 289{
@@ -297,7 +295,6 @@ nouveau_drm_load(struct drm_device *dev, unsigned long flags)
297 ret = nouveau_cli_create(pdev, "DRM", sizeof(*drm), (void**)&drm); 295 ret = nouveau_cli_create(pdev, "DRM", sizeof(*drm), (void**)&drm);
298 if (ret) 296 if (ret)
299 return ret; 297 return ret;
300 lockdep_set_class(&drm->client.mutex, &drm_client_lock_class_key);
301 298
302 dev->dev_private = drm; 299 dev->dev_private = drm;
303 drm->dev = dev; 300 drm->dev = dev;