videovar.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* $OpenBSD: videovar.h,v 1.7 2010/07/14 21:24:33 jakemsr Exp $ */
  2. /*
  3. * Copyright (c) 2008 Robert Nagy <robert@openbsd.org>
  4. * Copyright (c) 2008 Marcus Glocker <mglocker@openbsd.org>
  5. *
  6. * Permission to use, copy, modify, and distribute this software for any
  7. * purpose with or without fee is hereby granted, provided that the above
  8. * copyright notice and this permission notice appear in all copies.
  9. *
  10. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  11. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  12. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  13. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  14. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  15. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  16. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  17. */
  18. #ifndef _SYS_DEV_VIDEOVAR_H
  19. #define _SYS_DEV_VIDEOVAR_H
  20. struct video_softc {
  21. struct device dev;
  22. void *hw_hdl; /* hardware driver handle */
  23. struct device *sc_dev; /* hardware device struct */
  24. struct video_hw_if *hw_if; /* hardware interface */
  25. char sc_dying; /* device detached */
  26. #define VIDEO_OPEN 0x01
  27. char sc_open;
  28. int sc_fsize;
  29. uint8_t *sc_fbuffer;
  30. int sc_vidmode; /* access mode */
  31. #define VIDMODE_NONE 0
  32. #define VIDMODE_MMAP 1
  33. #define VIDMODE_READ 2
  34. int sc_frames_ready;
  35. struct selinfo sc_rsel; /* read selector */
  36. };
  37. #endif /* _SYS_DEV_VIDEOVAR_H */