gfx.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * This file is subject to the terms and conditions of the GNU General Public
  3. * License. See the file "COPYING" in the main directory of this archive
  4. * for more details.
  5. *
  6. * This is the user-visible SGI GFX interface.
  7. *
  8. * This must be used verbatim into the GNU libc. It does not include
  9. * any kernel-only bits on it.
  10. *
  11. * miguel@nuclecu.unam.mx
  12. */
  13. #ifndef _ASM_GFX_H
  14. #define _ASM_GFX_H
  15. /* The iocls, yes, they do not make sense, but such is life */
  16. #define GFX_BASE 100
  17. #define GFX_GETNUM_BOARDS (GFX_BASE + 1)
  18. #define GFX_GETBOARD_INFO (GFX_BASE + 2)
  19. #define GFX_ATTACH_BOARD (GFX_BASE + 3)
  20. #define GFX_DETACH_BOARD (GFX_BASE + 4)
  21. #define GFX_IS_MANAGED (GFX_BASE + 5)
  22. #define GFX_MAPALL (GFX_BASE + 10)
  23. #define GFX_LABEL (GFX_BASE + 11)
  24. #define GFX_INFO_NAME_SIZE 16
  25. #define GFX_INFO_LABEL_SIZE 16
  26. struct gfx_info {
  27. char name [GFX_INFO_NAME_SIZE]; /* board name */
  28. char label [GFX_INFO_LABEL_SIZE]; /* label name */
  29. unsigned short int xpmax, ypmax; /* screen resolution */
  30. unsigned int lenght; /* size of a complete gfx_info for this board */
  31. };
  32. struct gfx_getboardinfo_args {
  33. unsigned int board; /* board number. starting from zero */
  34. void *buf; /* pointer to gfx_info */
  35. unsigned int len; /* buffer size of buf */
  36. };
  37. struct gfx_attach_board_args {
  38. unsigned int board; /* board number, starting from zero */
  39. void *vaddr; /* address where the board registers should be mapped */
  40. };
  41. #ifdef __KERNEL__
  42. /* umap.c */
  43. extern void remove_mapping (struct vm_area_struct *vma, struct task_struct *, unsigned long, unsigned long);
  44. extern void *vmalloc_uncached (unsigned long size);
  45. extern int vmap_page_range (struct vm_area_struct *vma, unsigned long from, unsigned long size, unsigned long vaddr);
  46. #endif
  47. #endif /* _ASM_GFX_H */