diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2011-06-03 02:18:26 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2011-06-23 01:59:02 -0400 |
commit | 639212d01157266d9ee0b904fbc9f4a556e1c711 (patch) | |
tree | 85dfb1e0bb5aa09b5512470764f8da8da08feb53 /drivers | |
parent | f6d4e62145b597c6249c1dc9c1c3ecd66ba165f0 (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.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_drv.h | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_gem.c | 20 |
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 **); |
1330 | extern int nouveau_gem_object_new(struct drm_gem_object *); | 1330 | extern int nouveau_gem_object_new(struct drm_gem_object *); |
1331 | extern void nouveau_gem_object_del(struct drm_gem_object *); | 1331 | extern void nouveau_gem_object_del(struct drm_gem_object *); |
1332 | extern int nouveau_gem_object_open(struct drm_gem_object *, struct drm_file *); | ||
1333 | extern void nouveau_gem_object_close(struct drm_gem_object *, | ||
1334 | struct drm_file *); | ||
1332 | extern int nouveau_gem_ioctl_new(struct drm_device *, void *, | 1335 | extern int nouveau_gem_ioctl_new(struct drm_device *, void *, |
1333 | struct drm_file *); | 1336 | struct drm_file *); |
1334 | extern int nouveau_gem_ioctl_pushbuf(struct drm_device *, void *, | 1337 | extern 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 | ||
62 | int | 62 | int |
63 | nouveau_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 | |||
73 | void | ||
74 | nouveau_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 | |||
82 | int | ||
63 | nouveau_gem_new(struct drm_device *dev, int size, int align, uint32_t domain, | 83 | nouveau_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) |