drm_legacy.h 2.2 KB

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