drm/nouveau: require reservations for nouveau_fence_sync and nouveau_bo_fence
[deliverable/linux.git] / drivers / gpu / drm / drm_legacy.h
CommitLineData
e7b96070
DH
1#ifndef __DRM_LEGACY_H__
2#define __DRM_LEGACY_H__
3
4/*
5 * Copyright (c) 2014 David Herrmann <dh.herrmann@gmail.com>
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the "Software"),
9 * to deal in the Software without restriction, including without limitation
10 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 * and/or sell copies of the Software, and to permit persons to whom the
12 * Software is furnished to do so, subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be included in
15 * all copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
21 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
22 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23 * OTHER DEALINGS IN THE SOFTWARE.
24 */
25
26struct drm_device;
27struct drm_file;
28
29/*
30 * Generic DRM Contexts
31 */
32
33#define DRM_KERNEL_CONTEXT 0
34#define DRM_RESERVED_CONTEXTS 1
35
36int drm_legacy_ctxbitmap_init(struct drm_device *dev);
37void drm_legacy_ctxbitmap_cleanup(struct drm_device *dev);
38void drm_legacy_ctxbitmap_free(struct drm_device *dev, int ctx_handle);
39void drm_legacy_ctxbitmap_flush(struct drm_device *dev, struct drm_file *file);
40
41int drm_legacy_resctx(struct drm_device *d, void *v, struct drm_file *f);
42int drm_legacy_addctx(struct drm_device *d, void *v, struct drm_file *f);
43int drm_legacy_getctx(struct drm_device *d, void *v, struct drm_file *f);
44int drm_legacy_switchctx(struct drm_device *d, void *v, struct drm_file *f);
45int drm_legacy_newctx(struct drm_device *d, void *v, struct drm_file *f);
46int drm_legacy_rmctx(struct drm_device *d, void *v, struct drm_file *f);
47
48int drm_legacy_setsareactx(struct drm_device *d, void *v, struct drm_file *f);
49int drm_legacy_getsareactx(struct drm_device *d, void *v, struct drm_file *f);
50
51#endif /* __DRM_LEGACY_H__ */
This page took 0.036074 seconds and 5 git commands to generate.