41 if (obj->map_list.map)
50 struct drm_file *
file)
68 struct drm_gem_object *obj;
70 if (!(dev->driver->driver_features & DRIVER_GEM))
84 if (!obj->map_list.map) {
92 drm_gem_object_unreference(obj);
109 static int psb_gem_create(
struct drm_file *
file,
122 dev_err(dev->dev,
"no memory for %lld byte GEM object\n", size);
129 dev_err(dev->dev,
"GEM init failed for %lld\n", size);
137 dev_err(dev->dev,
"GEM handle failed for %p, %lld\n",
144 drm_gem_object_unreference(&r->
gem);
164 return psb_gem_create(file, dev, args->
size, &args->
handle);
203 struct drm_gem_object *obj;
213 dev_priv = dev->dev_private;
226 dev_err(dev->dev,
"gma500: pin failed: %d\n", ret);
234 page_offset = ((
unsigned long) vmf->virtual_address - vma->
vm_start)
242 ret =
vm_insert_pfn(vma, (
unsigned long)vmf->virtual_address, pfn);
250 return VM_FAULT_NOPAGE;
254 return VM_FAULT_SIGBUS;
258 static int psb_gem_create_stolen(
struct drm_file *file,
struct drm_device *dev,
259 int size,
u32 *handle)
277 struct drm_file *file)
282 ret = psb_gem_create_stolen(file, dev, args->
size,
289 return psb_gem_create(file, dev, args->
size, &args->
handle);
293 struct drm_file *file)
296 return dev->driver->dumb_map_offset(file, dev,