NVCtrl.h 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787
  1. #ifndef __NVCTRL_H
  2. #define __NVCTRL_H
  3. /**************************************************************************/
  4. /*
  5. * Integer attributes; these are settable/gettable via
  6. * XNVCTRLSetAttribute() and XNVCTRLQueryAttribute, respectively.
  7. * Some attributes may only be read; some may require a display_mask
  8. * argument. This information is encoded in the "permission" comment
  9. * after each attribute #define, and can be queried at run time with
  10. * XNVCTRLQueryValidAttributeValues().
  11. *
  12. * Key to Integer Attribute "Permissions":
  13. *
  14. * R: The attribute is readable (in general, all attributes will be
  15. * readable)
  16. *
  17. * W: The attribute is writable (attributes may not be writable for
  18. * various reasons: they represent static system information, they
  19. * can only be changed by changing an XF86Config option, etc).
  20. *
  21. * D: The attribute requires the display mask argument. The
  22. * attributes NV_CTRL_CONNECTED_DISPLAYS and NV_CTRL_ENABLED_DISPLAYS
  23. * will be a bitmask of what display devices are connected and what
  24. * display devices are enabled for use in X, respectively. Each bit
  25. * in the bitmask represents a display device; it is these bits which
  26. * should be used as the display_mask when dealing with attributes
  27. * designated with "D" below. For attributes that do not require the
  28. * display mask, the argument is ignored.
  29. */
  30. /**************************************************************************/
  31. /*
  32. * NV_CTRL_FLATPANEL_SCALING - the current flatpanel scaling state;
  33. * possible values are:
  34. *
  35. * 0: default (the driver will use whatever state is current)
  36. * 1: native (the driver will use the panel's scaler, if possible)
  37. * 2: scaled (the driver will use the GPU's scaler, if possible)
  38. * 3: centered (the driver will center the image)
  39. * 4: aspect scaled (scale with the GPU's scaler, but keep the aspect
  40. * ratio correct)
  41. */
  42. #define NV_CTRL_FLATPANEL_SCALING 2 /* RWD */
  43. #define NV_CTRL_FLATPANEL_SCALING_DEFAULT 0
  44. #define NV_CTRL_FLATPANEL_SCALING_NATIVE 1
  45. #define NV_CTRL_FLATPANEL_SCALING_SCALED 2
  46. #define NV_CTRL_FLATPANEL_SCALING_CENTERED 3
  47. #define NV_CTRL_FLATPANEL_SCALING_ASPECT_SCALED 4
  48. /*
  49. * NV_CTRL_FLATPANEL_DITHERING - the current flatpanel dithering
  50. * state; possible values are:
  51. *
  52. * 0: default (the driver will decide when to dither)
  53. * 1: enabled (the driver will always dither when possible)
  54. * 2: disabled (the driver will never dither)
  55. */
  56. #define NV_CTRL_FLATPANEL_DITHERING 3 /* RWD */
  57. #define NV_CTRL_FLATPANEL_DITHERING_DEFAULT 0
  58. #define NV_CTRL_FLATPANEL_DITHERING_ENABLED 1
  59. #define NV_CTRL_FLATPANEL_DITHERING_DISABLED 2
  60. /*
  61. * NV_CTRL_DIGITAL_VIBRANCE - sets the digital vibrance level for the
  62. * specified display device.
  63. */
  64. #define NV_CTRL_DIGITAL_VIBRANCE 4 /* RWD */
  65. /*
  66. * NV_CTRL_BUS_TYPE - returns the Bus type through which the GPU
  67. * driving the specified X screen is connected to the computer.
  68. */
  69. #define NV_CTRL_BUS_TYPE 5 /* R-- */
  70. #define NV_CTRL_BUS_TYPE_AGP 0
  71. #define NV_CTRL_BUS_TYPE_PCI 1
  72. #define NV_CTRL_BUS_TYPE_PCI_EXPRESS 2
  73. /*
  74. * NV_CTRL_VIDEO_RAM - returns the amount of video ram on the GPU
  75. * driving the specified X screen.
  76. */
  77. #define NV_CTRL_VIDEO_RAM 6 /* R-- */
  78. /*
  79. * NV_CTRL_IRQ - returns the interrupt request line used by the GPU
  80. * driving the specified X screen.
  81. */
  82. #define NV_CTRL_IRQ 7 /* R-- */
  83. /*
  84. * NV_CTRL_OPERATING_SYSTEM - returns the operating system on which
  85. * the X server is running.
  86. */
  87. #define NV_CTRL_OPERATING_SYSTEM 8 /* R-- */
  88. #define NV_CTRL_OPERATING_SYSTEM_LINUX 0
  89. #define NV_CTRL_OPERATING_SYSTEM_FREEBSD 1
  90. /*
  91. * NV_CTRL_SYNC_TO_VBLANK - enables sync to vblank for OpenGL clients.
  92. * This setting is only applied to OpenGL clients that are started
  93. * after this setting is applied.
  94. */
  95. #define NV_CTRL_SYNC_TO_VBLANK 9 /* RW- */
  96. #define NV_CTRL_SYNC_TO_VBLANK_OFF 0
  97. #define NV_CTRL_SYNC_TO_VBLANK_ON 1
  98. /*
  99. * NV_CTRL_LOG_ANISO - enables anisotropic filtering for OpenGL
  100. * clients; on some NVIDIA hardware, this can only be enabled or
  101. * disabled; on other hardware different levels of anisotropic
  102. * filtering can be specified. This setting is only applied to OpenGL
  103. * clients that are started after this setting is applied.
  104. */
  105. #define NV_CTRL_LOG_ANISO 10 /* RW- */
  106. /*
  107. * NV_CTRL_FSAA_MODE - the FSAA setting for OpenGL clients; possible
  108. * FSAA modes:
  109. *
  110. * NV_CTRL_FSAA_MODE_2x "2x Bilinear Multisampling"
  111. * NV_CTRL_FSAA_MODE_2x_5t "2x Quincunx Multisampling"
  112. * NV_CTRL_FSAA_MODE_15x15 "1.5 x 1.5 Supersampling"
  113. * NV_CTRL_FSAA_MODE_2x2 "2 x 2 Supersampling"
  114. * NV_CTRL_FSAA_MODE_4x "4x Bilinear Multisampling"
  115. * NV_CTRL_FSAA_MODE_4x_9t "4x Gaussian Multisampling"
  116. * NV_CTRL_FSAA_MODE_8x "2x Bilinear Multisampling by 4x Supersampling"
  117. * NV_CTRL_FSAA_MODE_16x "4x Bilinear Multisampling by 4x Supersampling"
  118. *
  119. * This setting is only applied to OpenGL clients that are started
  120. * after this setting is applied.
  121. */
  122. #define NV_CTRL_FSAA_MODE 11 /* RW- */
  123. #define NV_CTRL_FSAA_MODE_NONE 0
  124. #define NV_CTRL_FSAA_MODE_2x 1
  125. #define NV_CTRL_FSAA_MODE_2x_5t 2
  126. #define NV_CTRL_FSAA_MODE_15x15 3
  127. #define NV_CTRL_FSAA_MODE_2x2 4
  128. #define NV_CTRL_FSAA_MODE_4x 5
  129. #define NV_CTRL_FSAA_MODE_4x_9t 6
  130. #define NV_CTRL_FSAA_MODE_8x 7
  131. #define NV_CTRL_FSAA_MODE_16x 8
  132. /*
  133. * NV_CTRL_TEXTURE_SHARPEN - enables texture sharpening for OpenGL
  134. * clients. This setting is only applied to OpenGL clients that are
  135. * started after this setting is applied.
  136. */
  137. #define NV_CTRL_TEXTURE_SHARPEN 12 /* RW- */
  138. #define NV_CTRL_TEXTURE_SHARPEN_OFF 0
  139. #define NV_CTRL_TEXTURE_SHARPEN_ON 1
  140. /*
  141. * NV_CTRL_UBB - returns whether UBB is enabled for the specified X
  142. * screen.
  143. */
  144. #define NV_CTRL_UBB 13 /* R-- */
  145. #define NV_CTRL_UBB_OFF 0
  146. #define NV_CTRL_UBB_ON 1
  147. /*
  148. * NV_CTRL_OVERLAY - returns whether the RGB overlay is enabled for
  149. * the specified X screen.
  150. */
  151. #define NV_CTRL_OVERLAY 14 /* R-- */
  152. #define NV_CTRL_OVERLAY_OFF 0
  153. #define NV_CTRL_OVERLAY_ON 1
  154. /*
  155. * NV_CTRL_STEREO - returns whether stereo (and what type) is enabled
  156. * for the specified X screen.
  157. */
  158. #define NV_CTRL_STEREO 16 /* R-- */
  159. #define NV_CTRL_STEREO_OFF 0
  160. #define NV_CTRL_STEREO_DDC 1
  161. #define NV_CTRL_STEREO_BLUELINE 2
  162. #define NV_CTRL_STEREO_DIN 3
  163. #define NV_CTRL_STEREO_TWINVIEW 4
  164. /*
  165. * NV_CTRL_EMULATE - controls OpenGL software emulation of future
  166. * NVIDIA GPUs.
  167. */
  168. #define NV_CTRL_EMULATE 17 /* RW- */
  169. #define NV_CTRL_EMULATE_NONE 0
  170. /*
  171. * NV_CTRL_TWINVIEW - returns whether TwinView is enabled for the
  172. * specified X screen.
  173. */
  174. #define NV_CTRL_TWINVIEW 18 /* R-- */
  175. #define NV_CTRL_TWINVIEW_NOT_ENABLED 0
  176. #define NV_CTRL_TWINVIEW_ENABLED 1
  177. /*
  178. * NV_CTRL_CONNECTED_DISPLAYS - returns a display mask indicating what
  179. * display devices are connected to the GPU driving the specified X
  180. * screen.
  181. */
  182. #define NV_CTRL_CONNECTED_DISPLAYS 19 /* R-- */
  183. /*
  184. * NV_CTRL_ENABLED_DISPLAYS - returns a display mask indicating what
  185. * display devices are enabled for use on the specified X screen.
  186. */
  187. #define NV_CTRL_ENABLED_DISPLAYS 20 /* R-- */
  188. /**************************************************************************/
  189. /*
  190. * Integer attributes specific to configuring FrameLock on boards that
  191. * support it.
  192. */
  193. /*
  194. * NV_CTRL_FRAMELOCK - returns whether this X screen supports
  195. * FrameLock. All of the other FrameLock attributes are only
  196. * applicable if NV_CTRL_FRAMELOCK is _SUPPORTED.
  197. */
  198. #define NV_CTRL_FRAMELOCK 21 /* R-- */
  199. #define NV_CTRL_FRAMELOCK_NOT_SUPPORTED 0
  200. #define NV_CTRL_FRAMELOCK_SUPPORTED 1
  201. /*
  202. * NV_CTRL_FRAMELOCK_MASTER - get/set whether this X screen is the
  203. * FrameLock master for the entire sync group. Note that only one
  204. * node in the sync group should be configured as the master.
  205. */
  206. #define NV_CTRL_FRAMELOCK_MASTER 22 /* RW- */
  207. #define NV_CTRL_FRAMELOCK_MASTER_FALSE 0
  208. #define NV_CTRL_FRAMELOCK_MASTER_TRUE 1
  209. /*
  210. * NV_CTRL_FRAMELOCK_POLARITY - sync either to the rising edge of the
  211. * framelock pulse, or both the rising and falling edges of the
  212. * framelock pulse.
  213. */
  214. #define NV_CTRL_FRAMELOCK_POLARITY 23 /* RW- */
  215. #define NV_CTRL_FRAMELOCK_POLARITY_RISING_EDGE 0x1
  216. #define NV_CTRL_FRAMELOCK_POLARITY_BOTH_EDGES 0x3
  217. /*
  218. * NV_CTRL_FRAMELOCK_SYNC_DELAY - delay between the framelock pulse
  219. * and the GPU sync. This is an 11 bit value which is multipled by
  220. * 7.81 to determine the sync delay in microseconds.
  221. */
  222. #define NV_CTRL_FRAMELOCK_SYNC_DELAY 24 /* RW- */
  223. #define NV_CTRL_FRAMELOCK_SYNC_DELAY_MAX 2047
  224. #define NV_CTRL_FRAMELOCK_SYNC_DELAY_FACTOR 7.81
  225. /*
  226. * NV_CTRL_FRAMELOCK_SYNC_INTERVAL - how many house sync pulses
  227. * between the FrameLock sync generation (0 == sync every house sync);
  228. * this only applies to the master when receiving house sync.
  229. */
  230. #define NV_CTRL_FRAMELOCK_SYNC_INTERVAL 25 /* RW- */
  231. /*
  232. * NV_CTRL_FRAMELOCK_PORT0_STATUS - status of the rj45 port0.
  233. */
  234. #define NV_CTRL_FRAMELOCK_PORT0_STATUS 26 /* R-- */
  235. #define NV_CTRL_FRAMELOCK_PORT0_STATUS_INPUT 0
  236. #define NV_CTRL_FRAMELOCK_PORT0_STATUS_OUTPUT 1
  237. /*
  238. * NV_CTRL_FRAMELOCK_PORT1_STATUS - status of the rj45 port1.
  239. */
  240. #define NV_CTRL_FRAMELOCK_PORT1_STATUS 27 /* R-- */
  241. #define NV_CTRL_FRAMELOCK_PORT1_STATUS_INPUT 0
  242. #define NV_CTRL_FRAMELOCK_PORT1_STATUS_OUTPUT 1
  243. /*
  244. * NV_CTRL_FRAMELOCK_HOUSE_STATUS - status of the house input (the BNC
  245. * connector).
  246. */
  247. #define NV_CTRL_FRAMELOCK_HOUSE_STATUS 28 /* R-- */
  248. #define NV_CTRL_FRAMELOCK_HOUSE_STATUS_NOT_DETECTED 0
  249. #define NV_CTRL_FRAMELOCK_HOUSE_STATUS_DETECTED 1
  250. /*
  251. * NV_CTRL_FRAMELOCK_SYNC - enable/disable the syncing of the
  252. * specified display devices to the FrameLock pulse.
  253. */
  254. #define NV_CTRL_FRAMELOCK_SYNC 29 /* RWD */
  255. #define NV_CTRL_FRAMELOCK_SYNC_DISABLE 0
  256. #define NV_CTRL_FRAMELOCK_SYNC_ENABLE 1
  257. /*
  258. * NV_CTRL_FRAMELOCK_SYNC_READY - reports whether a slave FrameLock
  259. * board is receiving sync (regardless of whether or not any display
  260. * devices are using the sync).
  261. */
  262. #define NV_CTRL_FRAMELOCK_SYNC_READY 30 /* R-- */
  263. #define NV_CTRL_FRAMELOCK_SYNC_READY_FALSE 0
  264. #define NV_CTRL_FRAMELOCK_SYNC_READY_TRUE 1
  265. /*
  266. * NV_CTRL_FRAMELOCK_STEREO_SYNC - this indicates that the GPU stereo
  267. * signal is in sync with the framelock stereo signal.
  268. */
  269. #define NV_CTRL_FRAMELOCK_STEREO_SYNC 31 /* R-- */
  270. #define NV_CTRL_FRAMELOCK_STEREO_SYNC_FALSE 0
  271. #define NV_CTRL_FRAMELOCK_STEREO_SYNC_TRUE 1
  272. /*
  273. * NV_CTRL_FRAMELOCK_TEST_SIGNAL - to test the connections in the sync
  274. * group, tell the master to enable a test signal, then query port[01]
  275. * status and sync_ready on all slaves. When done, tell the master to
  276. * disable the test signal. Test signal should only be manipulated
  277. * while NV_CTRL_FRAMELOCK_SYNC is enabled.
  278. *
  279. * The TEST_SIGNAL is also used to reset the Universal Frame Count (as
  280. * returned by the glXQueryFrameCountNV() function in the
  281. * GLX_NV_swap_group extension). Note: for best accuracy of the
  282. * Universal Frame Count, it is recommended to toggle the TEST_SIGNAL
  283. * on and off after enabling FrameLock.
  284. */
  285. #define NV_CTRL_FRAMELOCK_TEST_SIGNAL 32 /* RW- */
  286. #define NV_CTRL_FRAMELOCK_TEST_SIGNAL_DISABLE 0
  287. #define NV_CTRL_FRAMELOCK_TEST_SIGNAL_ENABLE 1
  288. /*
  289. * NV_CTRL_FRAMELOCK_ETHERNET_DETECTED - The FrameLock boards are
  290. * cabled together using regular cat5 cable, connecting to rj45 ports
  291. * on the backplane of the card. There is some concern that users may
  292. * think these are ethernet ports and connect them to a
  293. * router/hub/etc. The hardware can detect this and will shut off to
  294. * prevent damage (either to itself or to the router).
  295. * NV_CTRL_FRAMELOCK_ETHERNET_DETECTED may be called to find out if
  296. * ethernet is connected to one of the rj45 ports. An appropriate
  297. * error message should then be displayed. The _PORT0 and PORT1
  298. * values may be or'ed together.
  299. */
  300. #define NV_CTRL_FRAMELOCK_ETHERNET_DETECTED 33 /* R-- */
  301. #define NV_CTRL_FRAMELOCK_ETHERNET_DETECTED_NONE 0
  302. #define NV_CTRL_FRAMELOCK_ETHERNET_DETECTED_PORT0 0x1
  303. #define NV_CTRL_FRAMELOCK_ETHERNET_DETECTED_PORT1 0x2
  304. /*
  305. * NV_CTRL_FRAMELOCK_VIDEO_MODE - get/set the video mode of the house
  306. * input.
  307. */
  308. #define NV_CTRL_FRAMELOCK_VIDEO_MODE 34 /* RW- */
  309. #define NV_CTRL_FRAMELOCK_VIDEO_MODE_NONE 0
  310. #define NV_CTRL_FRAMELOCK_VIDEO_MODE_TTL 1
  311. #define NV_CTRL_FRAMELOCK_VIDEO_MODE_NTSCPALSECAM 2
  312. #define NV_CTRL_FRAMELOCK_VIDEO_MODE_HDTV 3
  313. /*
  314. * During FRAMELOCK bring-up, the above values were redefined to
  315. * these:
  316. */
  317. #define NV_CTRL_FRAMELOCK_VIDEO_MODE_COMPOSITE_AUTO 0
  318. #define NV_CTRL_FRAMELOCK_VIDEO_MODE_TTL 1
  319. #define NV_CTRL_FRAMELOCK_VIDEO_MODE_COMPOSITE_BI_LEVEL 2
  320. #define NV_CTRL_FRAMELOCK_VIDEO_MODE_COMPOSITE_TRI_LEVEL 3
  321. /*
  322. * NV_CTRL_FRAMELOCK_SYNC_RATE - this is the refresh rate that the
  323. * framelock board is sending to the GPU, in milliHz.
  324. */
  325. #define NV_CTRL_FRAMELOCK_SYNC_RATE 35 /* R-- */
  326. /**************************************************************************/
  327. /*
  328. * NV_CTRL_FORCE_GENERIC_CPU - inhibit the use of CPU specific
  329. * features such as MMX, SSE, or 3DNOW! for OpenGL clients; this
  330. * option may result in performance loss, but may be useful in
  331. * conjunction with software such as the Valgrind memory debugger.
  332. * This setting is only applied to OpenGL clients that are started
  333. * after this setting is applied.
  334. */
  335. #define NV_CTRL_FORCE_GENERIC_CPU 37 /* RW- */
  336. #define NV_CTRL_FORCE_GENERIC_CPU_DISABLE 0
  337. #define NV_CTRL_FORCE_GENERIC_CPU_ENABLE 1
  338. /*
  339. * NV_CTRL_OPENGL_AA_LINE_GAMMA - for OpenGL clients, allow
  340. * Gamma-corrected antialiased lines to consider variances in the
  341. * color display capabilities of output devices when rendering smooth
  342. * lines. Only available on recent Quadro GPUs. This setting is only
  343. * applied to OpenGL clients that are started after this setting is
  344. * applied.
  345. */
  346. #define NV_CTRL_OPENGL_AA_LINE_GAMMA 38 /* RW- */
  347. #define NV_CTRL_OPENGL_AA_LINE_GAMMA_DISABLE 0
  348. #define NV_CTRL_OPENGL_AA_LINE_GAMMA_ENABLE 1
  349. /*
  350. * NV_CTRL_FRAMELOCK_TIMING - this is TRUE when the framelock board is
  351. * receiving timing input.
  352. */
  353. #define NV_CTRL_FRAMELOCK_TIMING 39 /* RW- */
  354. #define NV_CTRL_FRAMELOCK_TIMING_FALSE 0
  355. #define NV_CTRL_FRAMELOCK_TIMING_TRUE 1
  356. /*
  357. * NV_CTRL_FLIPPING_ALLOWED - when TRUE, OpenGL will swap by flipping
  358. * when possible; when FALSE, OpenGL will alway swap by blitting. XXX
  359. * can this be enabled dynamically?
  360. */
  361. #define NV_CTRL_FLIPPING_ALLOWED 40 /* RW- */
  362. #define NV_CTRL_FLIPPING_ALLOWED_FALSE 0
  363. #define NV_CTRL_FLIPPING_ALLOWED_TRUE 1
  364. /*
  365. * NV_CTRL_ARCHITECTURE - returns the architecture on which the X server is
  366. * running.
  367. */
  368. #define NV_CTRL_ARCHITECTURE 41 /* R-- */
  369. #define NV_CTRL_ARCHITECTURE_X86 0
  370. #define NV_CTRL_ARCHITECTURE_X86_64 1
  371. #define NV_CTRL_ARCHITECTURE_IA64 2
  372. /*
  373. * NV_CTRL_TEXTURE_CLAMPING - texture clamping mode in OpenGL. By
  374. * default, NVIDIA's OpenGL implementation uses CLAMP_TO_EDGE, which
  375. * is not strictly conformant, but some applications rely on the
  376. * non-conformant behavior, and not all GPUs support conformant
  377. * texture clamping in hardware. _SPEC forces OpenGL texture clamping
  378. * to be conformant, but may introduce slower performance on older
  379. * GPUS, or incorrect texture clamping in certain applications.
  380. */
  381. #define NV_CTRL_TEXTURE_CLAMPING 42 /* RW- */
  382. #define NV_CTRL_TEXTURE_CLAMPING_EDGE 0
  383. #define NV_CTRL_TEXTURE_CLAMPING_SPEC 1
  384. #define NV_CTRL_CURSOR_SHADOW 43 /* RW- */
  385. #define NV_CTRL_CURSOR_SHADOW_DISABLE 0
  386. #define NV_CTRL_CURSOR_SHADOW_ENABLE 1
  387. #define NV_CTRL_CURSOR_SHADOW_ALPHA 44 /* RW- */
  388. #define NV_CTRL_CURSOR_SHADOW_RED 45 /* RW- */
  389. #define NV_CTRL_CURSOR_SHADOW_GREEN 46 /* RW- */
  390. #define NV_CTRL_CURSOR_SHADOW_BLUE 47 /* RW- */
  391. #define NV_CTRL_CURSOR_SHADOW_X_OFFSET 48 /* RW- */
  392. #define NV_CTRL_CURSOR_SHADOW_Y_OFFSET 49 /* RW- */
  393. /*
  394. * When Application Control for FSAA is enabled, then what the
  395. * application requests is used, and NV_CTRL_FSAA_MODE is ignored. If
  396. * this is disabled, then any application setting is overridden with
  397. * NV_CTRL_FSAA_MODE
  398. */
  399. #define NV_CTRL_FSAA_APPLICATION_CONTROLLED 50 /* RW- */
  400. #define NV_CTRL_FSAA_APPLICATION_CONTROLLED_ENABLED 1
  401. #define NV_CTRL_FSAA_APPLICATION_CONTROLLED_DISABLED 0
  402. /*
  403. * When Application Control for LogAniso is enabled, then what the
  404. * application requests is used, and NV_CTRL_LOG_ANISO is ignored. If
  405. * this is disabled, then any application setting is overridden with
  406. * NV_CTRL_LOG_ANISO
  407. */
  408. #define NV_CTRL_LOG_ANISO_APPLICATION_CONTROLLED 51 /* RW- */
  409. #define NV_CTRL_LOG_ANISO_APPLICATION_CONTROLLED_ENABLED 1
  410. #define NV_CTRL_LOG_ANISO_APPLICATION_CONTROLLED_DISABLED 0
  411. /*
  412. * IMAGE_SHARPENING adjusts the sharpness of the display's image
  413. * quality by amplifying high frequency content. Valid values will
  414. * normally be in the range [0,32). Only available on GeForceFX or
  415. * newer.
  416. */
  417. #define NV_CTRL_IMAGE_SHARPENING 52 /* RWD */
  418. /*
  419. * NV_CTRL_TV_OVERSCAN adjusts the amount of overscan on the specified
  420. * display device.
  421. */
  422. #define NV_CTRL_TV_OVERSCAN 53 /* RWD */
  423. /*
  424. * NV_CTRL_TV_FLICKER_FILTER adjusts the amount of flicker filter on
  425. * the specified display device.
  426. */
  427. #define NV_CTRL_TV_FLICKER_FILTER 54 /* RWD */
  428. /*
  429. * NV_CTRL_TV_BRIGHTNESS adjusts the amount of brightness on the
  430. * specified display device.
  431. */
  432. #define NV_CTRL_TV_BRIGHTNESS 55 /* RWD */
  433. /*
  434. * NV_CTRL_TV_HUE adjusts the amount of hue on the specified display
  435. * device.
  436. */
  437. #define NV_CTRL_TV_HUE 56 /* RWD */
  438. /*
  439. * NV_CTRL_TV_CONTRAST adjusts the amount of contrast on the specified
  440. * display device.
  441. */
  442. #define NV_CTRL_TV_CONTRAST 57 /* RWD */
  443. /*
  444. * NV_CTRL_TV_SATURATION adjusts the amount of saturation on the
  445. * specified display device.
  446. */
  447. #define NV_CTRL_TV_SATURATION 58 /* RWD */
  448. /*
  449. * NV_CTRL_TV_RESET_SETTINGS - this write-only attribute can be used
  450. * to request that all TV Settings be reset to their default values;
  451. * typical usage would be that this attribute be sent, and then all
  452. * the TV attributes be queried to retrieve their new values.
  453. */
  454. #define NV_CTRL_TV_RESET_SETTINGS 59 /* -WD */
  455. /*
  456. * NV_CTRL_GPU_CORE_TEMPERATURE reports the current core temperature
  457. * of the GPU driving the X screen.
  458. */
  459. #define NV_CTRL_GPU_CORE_TEMPERATURE 60 /* R-- */
  460. /*
  461. * NV_CTRL_GPU_CORE_THRESHOLD reports the current GPU core slowdown
  462. * threshold temperature, NV_CTRL_GPU_DEFAULT_CORE_THRESHOLD and
  463. * NV_CTRL_GPU_MAX_CORE_THRESHOLD report the default and MAX core
  464. * slowdown threshold temperatures.
  465. *
  466. * NV_CTRL_GPU_CORE_THRESHOLD reflects the temperature at which the
  467. * GPU is throttled to prevent overheating.
  468. */
  469. #define NV_CTRL_GPU_CORE_THRESHOLD 61 /* R-- */
  470. #define NV_CTRL_GPU_DEFAULT_CORE_THRESHOLD 62 /* R-- */
  471. #define NV_CTRL_GPU_MAX_CORE_THRESHOLD 63 /* R-- */
  472. /*
  473. * NV_CTRL_AMBIENT_TEMPERATURE reports the current temperature in the
  474. * immediate neighbourhood of the GPU driving the X screen.
  475. */
  476. #define NV_CTRL_AMBIENT_TEMPERATURE 64 /* R-- */
  477. /*
  478. * NV_CTRL_PBUFFER_SCANOUT_SUPPORTED - returns whether this X screen
  479. * supports scanout of FP pbuffers;
  480. *
  481. * if this screen does not support PBUFFER_SCANOUT, then all other
  482. * PBUFFER_SCANOUT attributes are unavailable.
  483. */
  484. #define NV_CTRL_PBUFFER_SCANOUT_SUPPORTED 65 /* R-- */
  485. #define NV_CTRL_PBUFFER_SCANOUT_FALSE 0
  486. #define NV_CTRL_PBUFFER_SCANOUT_TRUE 1
  487. /*
  488. * NV_CTRL_PBUFFER_SCANOUT_XID indicates the XID of the pbuffer used for
  489. * scanout.
  490. */
  491. #define NV_CTRL_PBUFFER_SCANOUT_XID 66 /* RW- */
  492. #define NV_CTRL_LAST_ATTRIBUTE NV_CTRL_PBUFFER_SCANOUT_XID
  493. /**************************************************************************/
  494. /*
  495. * String Attributes:
  496. */
  497. /*
  498. * NV_CTRL_STRING_PRODUCT_NAME - the GPU product name on which the
  499. * specified X screen is running.
  500. */
  501. #define NV_CTRL_STRING_PRODUCT_NAME 0 /* R-- */
  502. /*
  503. * NV_CTRL_STRING_VBIOS_VERSION - the video bios version on the GPU on
  504. * which the specified X screen is running.
  505. */
  506. #define NV_CTRL_STRING_VBIOS_VERSION 1 /* R-- */
  507. /*
  508. * NV_CTRL_STRING_NVIDIA_DRIVER_VERSION - string representation of the
  509. * NVIDIA driver version number for the NVIDIA X driver in use.
  510. */
  511. #define NV_CTRL_STRING_NVIDIA_DRIVER_VERSION 3 /* R-- */
  512. /*
  513. * NV_CTRL_STRING_DISPLAY_DEVICE_NAME - name of the display device
  514. * specified in the display_mask argument.
  515. */
  516. #define NV_CTRL_STRING_DISPLAY_DEVICE_NAME 4 /* R-D */
  517. /*
  518. * NV_CTRL_STRING_TV_ENCODER_NAME - name of the TV encoder used by the
  519. * specified display device; only valid if the display device is a TV.
  520. */
  521. #define NV_CTRL_STRING_TV_ENCODER_NAME 5 /* R-D */
  522. #define NV_CTRL_STRING_LAST_ATTRIBUTE NV_CTRL_STRING_TV_ENCODER_NAME
  523. /**************************************************************************/
  524. /*
  525. * CTRLAttributeValidValuesRec -
  526. *
  527. * structure and related defines used by
  528. * XNVCTRLQueryValidAttributeValues() to describe the valid values of
  529. * a particular attribute. The type field will be one of:
  530. *
  531. * ATTRIBUTE_TYPE_INTEGER : the attribute is an integer value; there
  532. * is no fixed range of valid values.
  533. *
  534. * ATTRIBUTE_TYPE_BITMASK : the attribute is an integer value,
  535. * interpretted as a bitmask.
  536. *
  537. * ATTRIBUTE_TYPE_BOOL : the attribute is a boolean, valid values are
  538. * either 1 (on/true) or 0 (off/false).
  539. *
  540. * ATTRIBUTE_TYPE_RANGE : the attribute can have any integer value
  541. * between NVCTRLAttributeValidValues.u.range.min and
  542. * NVCTRLAttributeValidValues.u.range.max (inclusive).
  543. *
  544. * ATTRIBUTE_TYPE_INT_BITS : the attribute can only have certain
  545. * integer values, indicated by which bits in
  546. * NVCTRLAttributeValidValues.u.bits.ints are on (for example: if bit
  547. * 0 is on, then 0 is a valid value; if bit 5 is on, then 5 is a valid
  548. * value, etc). This is useful for attributes like NV_CTRL_FSAA_MODE,
  549. * which can only have certain values, depending on GPU.
  550. *
  551. *
  552. * The permissions field of NVCTRLAttributeValidValuesRec is a bitmask
  553. * that may contain:
  554. *
  555. * ATTRIBUTE_TYPE_READ
  556. * ATTRIBUTE_TYPE_WRITE
  557. * ATTRIBUTE_TYPE_DISPLAY
  558. *
  559. * See 'Key to Integer Attribute "Permissions"' at the top of this
  560. * file for a description of what these three permission bits mean.
  561. */
  562. #define ATTRIBUTE_TYPE_UNKNOWN 0
  563. #define ATTRIBUTE_TYPE_INTEGER 1
  564. #define ATTRIBUTE_TYPE_BITMASK 2
  565. #define ATTRIBUTE_TYPE_BOOL 3
  566. #define ATTRIBUTE_TYPE_RANGE 4
  567. #define ATTRIBUTE_TYPE_INT_BITS 5
  568. #define ATTRIBUTE_TYPE_READ 0x1
  569. #define ATTRIBUTE_TYPE_WRITE 0x2
  570. #define ATTRIBUTE_TYPE_DISPLAY 0x4
  571. typedef struct _NVCTRLAttributeValidValues {
  572. int type;
  573. union {
  574. struct {
  575. int min;
  576. int max;
  577. } range;
  578. struct {
  579. unsigned int ints;
  580. } bits;
  581. } u;
  582. unsigned int permissions;
  583. } NVCTRLAttributeValidValuesRec;
  584. #define ATTRIBUTE_CHANGED_EVENT 0
  585. #endif /* __NVCTRL_H */