gma_drm.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /**************************************************************************
  2. * Copyright (c) 2007-2011, Intel Corporation.
  3. * All Rights Reserved.
  4. * Copyright (c) 2008, Tungsten Graphics Inc. Cedar Park, TX., USA.
  5. * All Rights Reserved.
  6. *
  7. * This program is free software; you can redistribute it and/or modify it
  8. * under the terms and conditions of the GNU General Public License,
  9. * version 2, as published by the Free Software Foundation.
  10. *
  11. * This program is distributed in the hope it will be useful, but WITHOUT
  12. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  14. * more details.
  15. *
  16. * You should have received a copy of the GNU General Public License along with
  17. * this program; if not, write to the Free Software Foundation, Inc.,
  18. * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
  19. *
  20. **************************************************************************/
  21. #ifndef _PSB_DRM_H_
  22. #define _PSB_DRM_H_
  23. /*
  24. * Manage the LUT for an output
  25. */
  26. struct drm_psb_dpst_lut_arg {
  27. uint8_t lut[256];
  28. int output_id;
  29. };
  30. /*
  31. * Validate modes
  32. */
  33. struct drm_psb_mode_operation_arg {
  34. u32 obj_id;
  35. u16 operation;
  36. struct drm_mode_modeinfo mode;
  37. u64 data;
  38. };
  39. /*
  40. * Query the stolen memory for smarter management of
  41. * memory by the server
  42. */
  43. struct drm_psb_stolen_memory_arg {
  44. u32 base;
  45. u32 size;
  46. };
  47. struct drm_psb_get_pipe_from_crtc_id_arg {
  48. /** ID of CRTC being requested **/
  49. u32 crtc_id;
  50. /** pipe of requested CRTC **/
  51. u32 pipe;
  52. };
  53. struct drm_psb_gem_create {
  54. __u64 size;
  55. __u32 handle;
  56. __u32 flags;
  57. #define GMA_GEM_CREATE_STOLEN 1 /* Stolen memory can be used */
  58. };
  59. struct drm_psb_gem_mmap {
  60. __u32 handle;
  61. __u32 pad;
  62. /**
  63. * Fake offset to use for subsequent mmap call
  64. *
  65. * This is a fixed-size type for 32/64 compatibility.
  66. */
  67. __u64 offset;
  68. };
  69. /* Controlling the kernel modesetting buffers */
  70. #define DRM_GMA_GEM_CREATE 0x00 /* Create a GEM object */
  71. #define DRM_GMA_GEM_MMAP 0x01 /* Map GEM memory */
  72. #define DRM_GMA_STOLEN_MEMORY 0x02 /* Report stolen memory */
  73. #define DRM_GMA_2D_OP 0x03 /* Will be merged later */
  74. #define DRM_GMA_GAMMA 0x04 /* Set gamma table */
  75. #define DRM_GMA_ADB 0x05 /* Get backlight */
  76. #define DRM_GMA_DPST_BL 0x06 /* Set backlight */
  77. #define DRM_GMA_MODE_OPERATION 0x07 /* Mode validation/DC set */
  78. #define PSB_MODE_OPERATION_MODE_VALID 0x01
  79. #define DRM_GMA_GET_PIPE_FROM_CRTC_ID 0x08 /* CRTC to physical pipe# */
  80. #endif