Commit e75c091b authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau: store nouveau_drm in nouveau_cli, as opposed to drm_device

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent b6838c14
...@@ -187,7 +187,7 @@ nouveau_bo_new(struct nouveau_cli *cli, u64 size, int align, ...@@ -187,7 +187,7 @@ nouveau_bo_new(struct nouveau_cli *cli, u64 size, int align,
struct sg_table *sg, struct reservation_object *robj, struct sg_table *sg, struct reservation_object *robj,
struct nouveau_bo **pnvbo) struct nouveau_bo **pnvbo)
{ {
struct nouveau_drm *drm = nouveau_drm(cli->dev); struct nouveau_drm *drm = cli->drm;
struct nouveau_bo *nvbo; struct nouveau_bo *nvbo;
size_t acc_size; size_t acc_size;
int ret; int ret;
......
...@@ -128,7 +128,7 @@ nouveau_cli_init(struct nouveau_drm *drm, const char *sname, ...@@ -128,7 +128,7 @@ nouveau_cli_init(struct nouveau_drm *drm, const char *sname,
int ret; int ret;
snprintf(cli->name, sizeof(cli->name), "%s", sname); snprintf(cli->name, sizeof(cli->name), "%s", sname);
cli->dev = drm->dev; cli->drm = drm;
mutex_init(&cli->mutex); mutex_init(&cli->mutex);
usif_client_init(cli); usif_client_init(cli);
......
...@@ -86,7 +86,7 @@ enum nouveau_drm_handle { ...@@ -86,7 +86,7 @@ enum nouveau_drm_handle {
struct nouveau_cli { struct nouveau_cli {
struct nvif_client base; struct nvif_client base;
struct drm_device *dev; struct nouveau_drm *drm;
struct mutex mutex; struct mutex mutex;
struct nvif_device device; struct nvif_device device;
...@@ -204,7 +204,7 @@ void nouveau_drm_device_remove(struct drm_device *dev); ...@@ -204,7 +204,7 @@ void nouveau_drm_device_remove(struct drm_device *dev);
#define NV_PRINTK(l,c,f,a...) do { \ #define NV_PRINTK(l,c,f,a...) do { \
struct nouveau_cli *_cli = (c); \ struct nouveau_cli *_cli = (c); \
dev_##l(_cli->dev->dev, "%s: "f, _cli->name, ##a); \ dev_##l(_cli->drm->dev->dev, "%s: "f, _cli->name, ##a); \
} while(0) } while(0)
#define NV_FATAL(drm,f,a...) NV_PRINTK(crit, &(drm)->client, f, ##a) #define NV_FATAL(drm,f,a...) NV_PRINTK(crit, &(drm)->client, f, ##a)
#define NV_ERROR(drm,f,a...) NV_PRINTK(err, &(drm)->client, f, ##a) #define NV_ERROR(drm,f,a...) NV_PRINTK(err, &(drm)->client, f, ##a)
......
...@@ -179,7 +179,7 @@ nouveau_gem_new(struct nouveau_cli *cli, u64 size, int align, uint32_t domain, ...@@ -179,7 +179,7 @@ nouveau_gem_new(struct nouveau_cli *cli, u64 size, int align, uint32_t domain,
uint32_t tile_mode, uint32_t tile_flags, uint32_t tile_mode, uint32_t tile_flags,
struct nouveau_bo **pnvbo) struct nouveau_bo **pnvbo)
{ {
struct nouveau_drm *drm = nouveau_drm(cli->dev); struct nouveau_drm *drm = cli->drm;
struct nouveau_bo *nvbo; struct nouveau_bo *nvbo;
u32 flags = 0; u32 flags = 0;
int ret; int ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment