fbdev.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. /*
  2. (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org)
  3. (c) Copyright 2000-2004 Convergence (integrated media) GmbH
  4. All rights reserved.
  5. Written by Denis Oliver Kropp <dok@directfb.org>,
  6. Andreas Hundt <andi@fischlustig.de>,
  7. Sven Neumann <neo@directfb.org>,
  8. Ville Syrjälä <syrjala@sci.fi> and
  9. Claudio Ciccani <klan@users.sf.net>.
  10. This library is free software; you can redistribute it and/or
  11. modify it under the terms of the GNU Lesser General Public
  12. License as published by the Free Software Foundation; either
  13. version 2 of the License, or (at your option) any later version.
  14. This library is distributed in the hope that it will be useful,
  15. but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17. Lesser General Public License for more details.
  18. You should have received a copy of the GNU Lesser General Public
  19. License along with this library; if not, write to the
  20. Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  21. Boston, MA 02111-1307, USA.
  22. */
  23. #ifndef __CORE__FBDEV_H__
  24. #define __CORE__FBDEV_H__
  25. #include <asm/types.h> /* Needs to be included before dfb_types.h */
  26. #include <core/coretypes.h>
  27. #include <core/layers_internal.h>
  28. #include <core/system.h>
  29. #include <fusion/call.h>
  30. #include <fusion/reactor.h>
  31. #include "agp.h"
  32. #include "fb.h"
  33. #include "surfacemanager.h"
  34. #include "vt.h"
  35. #ifndef FBIO_WAITFORVSYNC
  36. #define FBIO_WAITFORVSYNC _IOW('F', 0x20, u_int32_t)
  37. #endif
  38. typedef struct {
  39. /* fbdev fixed screeninfo, contains infos about memory and type of card */
  40. struct fb_fix_screeninfo fix;
  41. VideoMode *modes; /* linked list of valid
  42. video modes */
  43. VideoMode current_mode; /* current video mode */
  44. struct fb_var_screeninfo current_var; /* fbdev variable screeninfo
  45. set by DirectFB */
  46. struct fb_var_screeninfo orig_var; /* fbdev variable screeninfo
  47. before DirectFB was started */
  48. void *orig_cmap_memory;
  49. void *temp_cmap_memory;
  50. void *current_cmap_memory;
  51. struct fb_cmap orig_cmap; /* original palette */
  52. struct fb_cmap current_cmap; /* our copy of the cmap */
  53. struct fb_cmap temp_cmap; /* scratch */
  54. FusionCall fbdev_ioctl; /* ioctl rpc */
  55. unsigned long page_mask; /* PAGE_SIZE - 1 */
  56. CoreSurfacePool *pool;
  57. struct {
  58. int bus;
  59. int dev;
  60. int func;
  61. } pci; /* PCI Bus ID of graphics device */
  62. struct {
  63. unsigned short vendor; /* Graphics device vendor id */
  64. unsigned short model; /* Graphics device model id */
  65. } device;
  66. AGPShared *agp;
  67. FusionSHMPoolShared *shmpool;
  68. FusionSHMPoolShared *shmpool_data;
  69. CoreLayerRegionConfig config;
  70. SurfaceManager *manager;
  71. } FBDevShared;
  72. typedef struct {
  73. FBDevShared *shared;
  74. CoreDFB *core;
  75. /* virtual framebuffer address */
  76. void *framebuffer_base;
  77. int fd; /* file descriptor for /dev/fb */
  78. VirtualTerminal *vt;
  79. AGPDevice *agp;
  80. } FBDev;
  81. #endif