drm/nouveau: hang drm client of a master
TTM memory allocations will be hanging off the DRM's client, but the locking needed to do so gets really tricky with all the other use of the DRM's object tree. To solve this, we make the normal DRM client a child of a new master, where the memory allocations will be done from instead. This also solves a potential race with client creation. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
@@ -97,6 +97,8 @@ struct nouveau_cli {
|
||||
struct list_head objects;
|
||||
struct list_head notifys;
|
||||
char name[32];
|
||||
|
||||
struct mutex lock;
|
||||
};
|
||||
|
||||
static inline struct nouveau_cli *
|
||||
@@ -109,6 +111,7 @@ nouveau_cli(struct drm_file *fpriv)
|
||||
#include <nvif/device.h>
|
||||
|
||||
struct nouveau_drm {
|
||||
struct nouveau_cli master;
|
||||
struct nouveau_cli client;
|
||||
struct drm_device *dev;
|
||||
|
||||
|
Reference in New Issue
Block a user