diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2014-08-09 18:10:22 (GMT) |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2014-08-09 19:13:13 (GMT) |
commit | 967e7bde8739fe3b215f7537e8f1f39c044902af (patch) | |
tree | 5d96683b3b139da0b681ae038a8cd5f25ca32ef8 /drivers/gpu/drm/nouveau/nouveau_drm.h | |
parent | db2bec187dd68e79d512112df1f6e7a849e7f0ce (diff) | |
download | linux-967e7bde8739fe3b215f7537e8f1f39c044902af.tar.xz |
drm/nouveau: initial pass at moving to struct nvif_device
This is an attempt at isolating some of the changes necessary to port
to NVIF in a separate commit.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_drm.h')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_drm.h | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.h b/drivers/gpu/drm/nouveau/nouveau_drm.h index e4f0196..07e9c73 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.h +++ b/drivers/gpu/drm/nouveau/nouveau_drm.h @@ -77,9 +77,21 @@ nouveau_cli(struct drm_file *fpriv) return fpriv ? fpriv->driver_priv : NULL; } +#include <nvif/object.h> +#undef nvif_object +#undef nvif_rd08 +#undef nvif_rd16 +#undef nvif_rd32 +#undef nvif_wr08 +#undef nvif_wr16 +#undef nvif_wr32 +#undef nvif_mask +#undef nvkm_object +#undef nvif_exec + #define nvif_object(a) ({ \ - struct nouveau_object *_object = (a); \ - _object; \ + struct nvif_object *_object = (a)->object; \ + (struct nouveau_object *)_object; \ }) #define nvif_rd08(a,b) nv_ro08(nvif_object(a), (b)) #define nvif_rd16(a,b) nv_ro16(nvif_object(a), (b)) @@ -88,10 +100,10 @@ nouveau_cli(struct drm_file *fpriv) #define nvif_wr16(a,b,c) nv_wo16(nvif_object(a), (b), (c)) #define nvif_wr32(a,b,c) nv_wo32(nvif_object(a), (b), (c)) #define nvif_mask(a,b,c,d) nv_mo32(nvif_object(a), (b), (c), (d)) - -/*XXX*/ -#include <core/object.h> #define nvkm_object(a) nvif_object(a) +#define nvif_exec(a,b,c,d) nv_exec(nvkm_object(a), (b), (c), (d)) + +#include <nvif/device.h> extern int nouveau_runtime_pm; @@ -99,7 +111,7 @@ struct nouveau_drm { struct nouveau_cli client; struct drm_device *dev; - struct nouveau_object *device; + struct nvif_device device; struct list_head clients; struct { |