diff options
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_compat.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_compat.c | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_compat.c b/drivers/gpu/drm/nouveau/nouveau_compat.c index 0403f2b94fa..3db23496dff 100644 --- a/drivers/gpu/drm/nouveau/nouveau_compat.c +++ b/drivers/gpu/drm/nouveau/nouveau_compat.c @@ -1,4 +1,5 @@ #include "nouveau_drm.h" +#include "nouveau_chan.h" #include "nouveau_compat.h" #include <subdev/bios.h> @@ -14,8 +15,6 @@ #include <subdev/bar.h> #include <subdev/vm.h> -void *nouveau_newpriv(struct drm_device *); - int nvdrm_gart_init(struct drm_device *dev, u64 *base, u64 *size) { @@ -583,3 +582,28 @@ nvvm_lpg_shift(struct nouveau_vm *vm) { return vm->vmm->lpg_shift; } + +u64 nvgpuobj_addr(struct nouveau_object *object) +{ + return nv_gpuobj(object)->addr; +} + +struct drm_device * +nouveau_drv(void *ptr) +{ + struct nouveau_drm *drm = ptr; + return drm->dev; +} + +struct nouveau_channel * +nvdrm_channel(struct drm_device *dev) +{ + struct nouveau_drm *drm = nouveau_newpriv(dev); + return drm->channel; +} + +struct mutex * +nvchan_mutex(struct nouveau_channel *chan) +{ + return &chan->cli->mutex; +} |