|
@@ -47,36 +47,6 @@ int psb_gem_get_aperture(struct drm_device *dev, void *data,
|
|
|
return -EINVAL;
|
|
|
}
|
|
|
|
|
|
-/**
|
|
|
- * psb_gem_dumb_map_gtt - buffer mapping for dumb interface
|
|
|
- * @file: our drm client file
|
|
|
- * @dev: drm device
|
|
|
- * @handle: GEM handle to the object (from dumb_create)
|
|
|
- *
|
|
|
- * Do the necessary setup to allow the mapping of the frame buffer
|
|
|
- * into user memory. We don't have to do much here at the moment.
|
|
|
- */
|
|
|
-int psb_gem_dumb_map_gtt(struct drm_file *file, struct drm_device *dev,
|
|
|
- uint32_t handle, uint64_t *offset)
|
|
|
-{
|
|
|
- int ret = 0;
|
|
|
- struct drm_gem_object *obj;
|
|
|
-
|
|
|
- /* GEM does all our handle to object mapping */
|
|
|
- obj = drm_gem_object_lookup(file, handle);
|
|
|
- if (obj == NULL)
|
|
|
- return -ENOENT;
|
|
|
-
|
|
|
- /* Make it mmapable */
|
|
|
- ret = drm_gem_create_mmap_offset(obj);
|
|
|
- if (ret)
|
|
|
- goto out;
|
|
|
- *offset = drm_vma_node_offset_addr(&obj->vma_node);
|
|
|
-out:
|
|
|
- drm_gem_object_unreference_unlocked(obj);
|
|
|
- return ret;
|
|
|
-}
|
|
|
-
|
|
|
/**
|
|
|
* psb_gem_create - create a mappable object
|
|
|
* @file: the DRM file of the client
|