aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2011-06-03 02:18:26 -0400
committerBen Skeggs <bskeggs@redhat.com>2011-06-23 01:59:02 -0400
commit639212d01157266d9ee0b904fbc9f4a556e1c711 (patch)
tree85dfb1e0bb5aa09b5512470764f8da8da08feb53 /drivers
parentf6d4e62145b597c6249c1dc9c1c3ecd66ba165f0 (diff)
drm/nouveau/gem: implement stub hooks for GEM object open/close
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_drv.c2
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_drv.h3
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_gem.c20
3 files changed, 25 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.c b/drivers/gpu/drm/nouveau/nouveau_drv.c
index 76cd287c7cec..4e481c39f5a4 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drv.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drv.c
@@ -426,6 +426,8 @@ static struct drm_driver driver = {
426 426
427 .gem_init_object = nouveau_gem_object_new, 427 .gem_init_object = nouveau_gem_object_new,
428 .gem_free_object = nouveau_gem_object_del, 428 .gem_free_object = nouveau_gem_object_del,
429 .gem_open_object = nouveau_gem_object_open,
430 .gem_close_object = nouveau_gem_object_close,
429 431
430 .name = DRIVER_NAME, 432 .name = DRIVER_NAME,
431 .desc = DRIVER_DESC, 433 .desc = DRIVER_DESC,
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h
index 21cb385842b5..e8357c969adb 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drv.h
+++ b/drivers/gpu/drm/nouveau/nouveau_drv.h
@@ -1329,6 +1329,9 @@ extern int nouveau_gem_new(struct drm_device *, int size, int align,
1329 uint32_t tile_flags, struct nouveau_bo **); 1329 uint32_t tile_flags, struct nouveau_bo **);
1330extern int nouveau_gem_object_new(struct drm_gem_object *); 1330extern int nouveau_gem_object_new(struct drm_gem_object *);
1331extern void nouveau_gem_object_del(struct drm_gem_object *); 1331extern void nouveau_gem_object_del(struct drm_gem_object *);
1332extern int nouveau_gem_object_open(struct drm_gem_object *, struct drm_file *);
1333extern void nouveau_gem_object_close(struct drm_gem_object *,
1334 struct drm_file *);
1332extern int nouveau_gem_ioctl_new(struct drm_device *, void *, 1335extern int nouveau_gem_ioctl_new(struct drm_device *, void *,
1333 struct drm_file *); 1336 struct drm_file *);
1334extern int nouveau_gem_ioctl_pushbuf(struct drm_device *, void *, 1337extern int nouveau_gem_ioctl_pushbuf(struct drm_device *, void *,
diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c
index b4218d719770..da3c8bbd9d8f 100644
--- a/drivers/gpu/drm/nouveau/nouveau_gem.c
+++ b/drivers/gpu/drm/nouveau/nouveau_gem.c
@@ -60,6 +60,26 @@ nouveau_gem_object_del(struct drm_gem_object *gem)
60} 60}
61 61
62int 62int
63nouveau_gem_object_open(struct drm_gem_object *gem, struct drm_file *file_priv)
64{
65 struct nouveau_fpriv *fpriv = nouveau_fpriv(file_priv);
66
67 if (!fpriv->vm)
68 return 0;
69
70 return 0;
71}
72
73void
74nouveau_gem_object_close(struct drm_gem_object *gem, struct drm_file *file_priv)
75{
76 struct nouveau_fpriv *fpriv = nouveau_fpriv(file_priv);
77
78 if (!fpriv->vm)
79 return;
80}
81
82int
63nouveau_gem_new(struct drm_device *dev, int size, int align, uint32_t domain, 83nouveau_gem_new(struct drm_device *dev, int size, int align, uint32_t domain,
64 uint32_t tile_mode, uint32_t tile_flags, 84 uint32_t tile_mode, uint32_t tile_flags,
65 struct nouveau_bo **pnvbo) 85 struct nouveau_bo **pnvbo)