Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 349696
b: refs/heads/master
c: 5f97ab9
h: refs/heads/master
v: v3
  • Loading branch information
Marcin Slusarz authored and Ben Skeggs committed Feb 9, 2013
1 parent 613abe4 commit c527b67
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 526810adb93554e17bdb83023a01cfa8758960b2
refs/heads/master: 5f97ab913cf0fbc378ea8ffc3ee66f4890d11c55
2 changes: 1 addition & 1 deletion trunk/drivers/gpu/drm/nouveau/core/core/subdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ nouveau_subdev_create_(struct nouveau_object *parent,
if (ret)
return ret;

mutex_init(&subdev->mutex);
__mutex_init(&subdev->mutex, subname, &oclass->lock_class_key);
subdev->name = subname;

if (parent) {
Expand Down
7 changes: 5 additions & 2 deletions trunk/drivers/gpu/drm/nouveau/core/include/core/object.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,13 @@ int nouveau_object_fini(struct nouveau_object *, bool suspend);

extern struct nouveau_ofuncs nouveau_object_ofuncs;

/* Don't allocate dynamically, because lockdep needs lock_class_keys to be in
* ".data". */
struct nouveau_oclass {
u32 handle;
struct nouveau_ofuncs *ofuncs;
struct nouveau_omthds *omthds;
struct nouveau_ofuncs * const ofuncs;
struct nouveau_omthds * const omthds;
struct lock_class_key lock_class_key;
};

#define nv_oclass(o) nv_object(o)->oclass
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/gpu/drm/nouveau/nouveau_drm.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,8 @@ nouveau_drm_probe(struct pci_dev *pdev, const struct pci_device_id *pent)
return 0;
}

static struct lock_class_key drm_client_lock_class_key;

static int
nouveau_drm_load(struct drm_device *dev, unsigned long flags)
{
Expand All @@ -256,6 +258,7 @@ nouveau_drm_load(struct drm_device *dev, unsigned long flags)
ret = nouveau_cli_create(pdev, "DRM", sizeof(*drm), (void**)&drm);
if (ret)
return ret;
lockdep_set_class(&drm->client.mutex, &drm_client_lock_class_key);

dev->dev_private = drm;
drm->dev = dev;
Expand Down

0 comments on commit c527b67

Please sign in to comment.