gem.c (cf9ce948f47640797bd19980e1d99c6d17d0bdc3) gem.c (89c8233f82d9c8af5b20e72e4a185a38a7d3c50b)
1/*
2 * psb GEM interface
3 *
4 * Copyright (c) 2011, Intel Corporation.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2, as published by the Free Software Foundation.

--- 247 unchanged lines hidden (view full) ---

256}
257
258static int psb_gem_create_stolen(struct drm_file *file, struct drm_device *dev,
259 int size, u32 *handle)
260{
261 struct gtt_range *gtt = psb_gtt_alloc_range(dev, size, "gem", 1);
262 if (gtt == NULL)
263 return -ENOMEM;
1/*
2 * psb GEM interface
3 *
4 * Copyright (c) 2011, Intel Corporation.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2, as published by the Free Software Foundation.

--- 247 unchanged lines hidden (view full) ---

256}
257
258static int psb_gem_create_stolen(struct drm_file *file, struct drm_device *dev,
259 int size, u32 *handle)
260{
261 struct gtt_range *gtt = psb_gtt_alloc_range(dev, size, "gem", 1);
262 if (gtt == NULL)
263 return -ENOMEM;
264 if (drm_gem_private_object_init(dev, &gtt->gem, size) != 0)
265 goto free_gtt;
264
265 drm_gem_private_object_init(dev, &gtt->gem, size);
266 if (drm_gem_handle_create(file, &gtt->gem, handle) == 0)
267 return 0;
266 if (drm_gem_handle_create(file, &gtt->gem, handle) == 0)
267 return 0;
268free_gtt:
268
269 drm_gem_object_release(&gtt->gem);
269 psb_gtt_free_range(dev, gtt);
270 return -ENOMEM;
271}
272
273/*
274 * GEM interfaces for our specific client
275 */
276int psb_gem_create_ioctl(struct drm_device *dev, void *data,

--- 23 unchanged lines hidden ---
270 psb_gtt_free_range(dev, gtt);
271 return -ENOMEM;
272}
273
274/*
275 * GEM interfaces for our specific client
276 */
277int psb_gem_create_ioctl(struct drm_device *dev, void *data,

--- 23 unchanged lines hidden ---