Lines Matching +full:software +full:- +full:driver
2 * Copyright (c) 2006-2008 Intel Corporation
7 * Permission to use, copy, modify, distribute, and sell this software and its
12 * publicity pertaining to distribution of the software without specific,
14 * about the suitability of this software for any purpose. It is provided "as
17 * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
23 * OF THIS SOFTWARE.
38 * to driver-specific ioctls. Furthermore actually creating a buffer object even
39 * for GEM-based drivers is done through a driver-specific ioctl - GEM only has
41 * issue for full-fledged graphics stacks that include device-specific userspace
42 * components (in libdrm for instance), this limit makes DRM-based early boot
57 * a hardware-specific ioctl to allocate suitable buffer objects.
66 if (!dev->driver->dumb_create) in drm_mode_create_dumb()
67 return -ENOSYS; in drm_mode_create_dumb()
68 if (!args->width || !args->height || !args->bpp) in drm_mode_create_dumb()
69 return -EINVAL; in drm_mode_create_dumb()
72 if (args->bpp > U32_MAX - 8) in drm_mode_create_dumb()
73 return -EINVAL; in drm_mode_create_dumb()
74 cpp = DIV_ROUND_UP(args->bpp, 8); in drm_mode_create_dumb()
75 if (cpp > U32_MAX / args->width) in drm_mode_create_dumb()
76 return -EINVAL; in drm_mode_create_dumb()
77 stride = cpp * args->width; in drm_mode_create_dumb()
78 if (args->height > U32_MAX / stride) in drm_mode_create_dumb()
79 return -EINVAL; in drm_mode_create_dumb()
81 /* test for wrap-around */ in drm_mode_create_dumb()
82 size = args->height * stride; in drm_mode_create_dumb()
84 return -EINVAL; in drm_mode_create_dumb()
92 args->handle = 0; in drm_mode_create_dumb()
93 args->pitch = 0; in drm_mode_create_dumb()
94 args->size = 0; in drm_mode_create_dumb()
96 return dev->driver->dumb_create(file_priv, dev, args); in drm_mode_create_dumb()
106 * drm_mode_mmap_dumb_ioctl - create an mmap offset for a dumb backing storage buffer
124 if (!dev->driver->dumb_create) in drm_mode_mmap_dumb_ioctl()
125 return -ENOSYS; in drm_mode_mmap_dumb_ioctl()
127 if (dev->driver->dumb_map_offset) in drm_mode_mmap_dumb_ioctl()
128 return dev->driver->dumb_map_offset(file_priv, dev, in drm_mode_mmap_dumb_ioctl()
129 args->handle, in drm_mode_mmap_dumb_ioctl()
130 &args->offset); in drm_mode_mmap_dumb_ioctl()
132 return drm_gem_dumb_map_offset(file_priv, dev, args->handle, in drm_mode_mmap_dumb_ioctl()
133 &args->offset); in drm_mode_mmap_dumb_ioctl()
139 if (!dev->driver->dumb_create) in drm_mode_destroy_dumb()
140 return -ENOSYS; in drm_mode_destroy_dumb()
150 return drm_mode_destroy_dumb(dev, args->handle, file_priv); in drm_mode_destroy_dumb_ioctl()