~ubuntu-branches/ubuntu/quantal/nvidia-settings/quantal-security

« back to all changes in this revision

Viewing changes to src/libXNVCtrl/NVCtrl.h

  • Committer: Bazaar Package Importer
  • Author(s): Alberto Milone
  • Date: 2010-06-27 18:59:46 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20100627185946-zpgnp08qs5do500z
Tags: 256.35-0ubuntu1
* New upstream release:
  - Fixed a bug that caused nvidia-settings to crash when rendering
    its thermal gauge widget if the range of valid values for the
    thermal sensor was empty.
  - Improved Thermal Settings reporting in nvidia-settings to
    accurately reflect hardware configurations with multiple thermal
    sensors.
* debian/docs:
  - Remove Makefile.inc.

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
 * Here are the supported target types:
40
40
 */
41
41
 
42
 
#define NV_CTRL_TARGET_TYPE_X_SCREEN   0
43
 
#define NV_CTRL_TARGET_TYPE_GPU        1
44
 
#define NV_CTRL_TARGET_TYPE_FRAMELOCK  2
45
 
#define NV_CTRL_TARGET_TYPE_VCSC       3 /* Visual Computing System */
46
 
#define NV_CTRL_TARGET_TYPE_GVI        4
47
 
#define NV_CTRL_TARGET_TYPE_COOLER     5 /* e.g., fan */
 
42
#define NV_CTRL_TARGET_TYPE_X_SCREEN       0
 
43
#define NV_CTRL_TARGET_TYPE_GPU            1
 
44
#define NV_CTRL_TARGET_TYPE_FRAMELOCK      2
 
45
#define NV_CTRL_TARGET_TYPE_VCSC           3 /* Visual Computing System */
 
46
#define NV_CTRL_TARGET_TYPE_GVI            4
 
47
#define NV_CTRL_TARGET_TYPE_COOLER         5 /* e.g., fan */
 
48
#define NV_CTRL_TARGET_TYPE_THERMAL_SENSOR 6
48
49
 
49
50
/**************************************************************************/
50
51
 
99
100
 * C: The attribute may be queried using an NV_CTRL_TARGET_TYPE_COOLER target
100
101
 *    type via XNVCTRLQueryTargetAttribute().
101
102
 * 
 
103
 * S: The attribute may be queried using an NV_CTRL_TARGET_TYPE_THERMAL_SENSOR
 
104
 *    target type via XNVCTRLQueryTargetAttribute().
 
105
 * 
102
106
 * NOTE: Unless mentioned otherwise, all attributes may be queried using
103
107
 *       an NV_CTRL_TARGET_TYPE_X_SCREEN target type via 
104
108
 *       XNVCTRLQueryTargetAttribute().
320
324
#define NV_CTRL_STEREO_BLUELINE                                 2
321
325
#define NV_CTRL_STEREO_DIN                                      3
322
326
#define NV_CTRL_STEREO_TWINVIEW                                 4
323
 
 
 
327
#define NV_CTRL_STEREO_VERTICAL_INTERLACED                      5
 
328
#define NV_CTRL_STEREO_COLOR_INTERLACED                         6
 
329
#define NV_CTRL_STEREO_HORIZONTAL_INTERLACED                    7
 
330
#define NV_CTRL_STEREO_CHECKERBOARD_PATTERN                     8
 
331
#define NV_CTRL_STEREO_INVERSE_CHECKERBOARD_PATTERN             9
 
332
#define NV_CTRL_STEREO_3D_VISION                                10
324
333
 
325
334
/*
326
335
 * NV_CTRL_EMULATE - controls OpenGL software emulation of future
995
1004
 * of the 32-63 VIDEO_FORMATS are valid, and query the ValidValues of
996
1005
 * NV_CTRL_GVIO_REQUESTED_VIDEO_FORMAT3 to check which of the 64-95
997
1006
 * VIDEO_FORMATS are valid.
 
1007
 *
 
1008
 * Note: Setting this attribute on a GVI device may also result in the
 
1009
 *       following NV-CONTROL attributes being reset on that device (to
 
1010
 *       ensure the configuration remains valid):
 
1011
 *           NV_CTRL_GVI_REQUESTED_STREAM_BITS_PER_COMPONENT
 
1012
 *           NV_CTRL_GVI_REQUESTED_STREAM_COMPONENT_SAMPLING
998
1013
 */
999
1014
 
1000
1015
#define NV_CTRL_GVIO_REQUESTED_VIDEO_FORMAT                     70  /* RW--I */
1763
1778
 * NV_CTRL_INITIAL_PIXMAP_PLACEMENT - Controls where X pixmaps are initially
1764
1779
 * created.
1765
1780
 *
1766
 
 * NV_CTRL_INITIAL_PIXMAP_PLACEMENT_FORCE_SYSMEM causes to pixmaps to stay in
1767
 
 * system memory.
 
1781
 * NV_CTRL_INITIAL_PIXMAP_PLACEMENT_FORCE_SYSMEM causes pixmaps to stay in
 
1782
 * system memory. These pixmaps can't be accelerated by the NVIDIA driver; this
 
1783
 * will cause blank windows if used with an OpenGL compositing manager.
1768
1784
 * NV_CTRL_INITIAL_PIXMAP_PLACEMENT_SYSMEM creates pixmaps in system memory
1769
1785
 * initially, but allows them to migrate to video memory.
1770
1786
 * NV_CTRL_INITIAL_PIXMAP_PLACEMENT_VIDMEM creates pixmaps in video memory
2301
2317
#define NV_CTRL_VCSC_HIGH_PERF_MODE_DISABLE                       0
2302
2318
#define NV_CTRL_VCSC_HIGH_PERF_MODE_ENABLE                        1
2303
2319
 
2304
 
 
2305
 
/*
2306
 
 * NV_CTRL_OPENGL_AA_LINE_GAMMA_VALUE - the gamma value used by
2307
 
 * OpenGL when NV_CTRL_OPENGL_AA_LINE_GAMMA is enabled
2308
 
 */
2309
 
 
2310
 
#define NV_CTRL_OPENGL_AA_LINE_GAMMA_VALUE                      281 /* RW-X */
2311
 
 
2312
2320
/*
2313
2321
 * NV_CTRL_DISPLAYPORT_LINK_RATE - returns the negotiated lane bandwidth of the
2314
2322
 * DisplayPort main link.
2492
2500
 * NV_CTRL_GVI_REQUESTED_STREAM_BITS_PER_COMPONENT - Specify the number of
2493
2501
 * bits per component (BPC) of data for the captured stream.
2494
2502
 * The stream number should be specified in the "display_mask" parameter.
 
2503
 *
 
2504
 * Note: Setting this attribute may also result in the following
 
2505
 *       NV-CONTROL attributes being reset on the GVI device (to ensure
 
2506
 *       the configuration remains valid):
 
2507
 *           NV_CTRL_GVI_REQUESTED_STREAM_COMPONENT_SAMPLING
2495
2508
 */
2496
2509
 
2497
2510
#define NV_CTRL_GVI_REQUESTED_STREAM_BITS_PER_COMPONENT         310 /* RW-I */
2526
2539
/*
2527
2540
 * NV_CTRL_GVI_CHROMA_EXPAND - Enable or disable 4:2:2 -> 4:4:4 chroma
2528
2541
 * expansion for the captured stream.  This value is ignored when a
2529
 
 * COMPONENT_SAMPLING format is selected that does not use chroma subsampling.
 
2542
 * COMPONENT_SAMPLING format is selected that does not use chroma subsampling,
 
2543
 * or if a BITS_PER_COMPONENT value is selected that is not supported.
2530
2544
 * The stream number should be specified in the "display_mask" parameter.
2531
2545
 */
2532
2546
 
2806
2820
 */
2807
2821
#define NV_CTRL_GVI_BOUND_GPU                                   342 /* R--I */
2808
2822
 
2809
 
 
2810
2823
/*
2811
2824
 * NV_CTRL_GVIO_REQUESTED_VIDEO_FORMAT3 - this attribute is only
2812
2825
 * intended to be used to query the ValidValues for
2816
2829
 
2817
2830
#define NV_CTRL_GVIO_REQUESTED_VIDEO_FORMAT3                    343 /* ---GI */
2818
2831
 
2819
 
 
2820
2832
/*
2821
2833
 * NV_CTRL_ACCELERATE_TRAPEZOIDS - Toggles RENDER Trapezoid acceleration
2822
2834
 */
2825
2837
#define NV_CTRL_ACCELERATE_TRAPEZOIDS_DISABLE                   0
2826
2838
#define NV_CTRL_ACCELERATE_TRAPEZOIDS_ENABLE                    1
2827
2839
 
2828
 
 
2829
2840
/*
2830
2841
 * NV_CTRL_GPU_CORES - Returns number of GPU cores supported by the graphics
2831
2842
 * pipeline.
2833
2844
 
2834
2845
#define NV_CTRL_GPU_CORES                                       345 /* R--G */
2835
2846
 
2836
 
 
2837
2847
/* 
2838
2848
 * NV_CTRL_GPU_MEMORY_BUS_WIDTH - Returns memory bus bandwidth on the associated
2839
2849
 * subdevice.
2841
2851
 
2842
2852
#define NV_CTRL_GPU_MEMORY_BUS_WIDTH                            346 /* R--G */
2843
2853
 
2844
 
 
2845
2854
/*
2846
2855
 * NV_CTRL_GVI_TEST_MODE - This attribute controls the GVI test mode.  When
2847
2856
 * enabled, the GVI device will generate fake data as quickly as possible.  All
2855
2864
#define NV_CTRL_GVI_TEST_MODE_ENABLE                              1
2856
2865
 
2857
2866
 
2858
 
#define NV_CTRL_LAST_ATTRIBUTE NV_CTRL_GVI_TEST_MODE
 
2867
/*
 
2868
 * NV_CTRL_GPU_SCALING_DEFAULT_TARGET - Returns the default scaling target
 
2869
 * for the specified display device.
 
2870
 *
 
2871
 * NV_CTRL_GPU_SCALING_DEFAULT_METHOD - Returns the default scaling method
 
2872
 * for the specified display device.
 
2873
 *
 
2874
 * The values returned by these attributes are one of the target or method
 
2875
 * values defined for the attribute NV_CTRL_GPU_SCALING.
 
2876
 */
 
2877
#define NV_CTRL_GPU_SCALING_DEFAULT_TARGET                      350 /* R-DG */
 
2878
#define NV_CTRL_GPU_SCALING_DEFAULT_METHOD                      351 /* R-DG */
 
2879
 
 
2880
 
 
2881
/* 
 
2882
 * NV_CTRL_THERMAL_SENSOR_READING - Returns the thermal sensor's current
 
2883
 * reading.
 
2884
 */
 
2885
#define NV_CTRL_THERMAL_SENSOR_READING                          355 /* R--S */
 
2886
 
 
2887
/* 
 
2888
 * NV_CTRL_THERMAL_SENSOR_PROVIDER - Returns the hardware device that
 
2889
 * provides the thermal sensor.
 
2890
 */
 
2891
#define NV_CTRL_THERMAL_SENSOR_PROVIDER                         356 /* R--S */
 
2892
#define NV_CTRL_THERMAL_SENSOR_PROVIDER_NONE                      0
 
2893
#define NV_CTRL_THERMAL_SENSOR_PROVIDER_GPU_INTERNAL              1
 
2894
#define NV_CTRL_THERMAL_SENSOR_PROVIDER_ADM1032                   2
 
2895
#define NV_CTRL_THERMAL_SENSOR_PROVIDER_ADT7461                   3
 
2896
#define NV_CTRL_THERMAL_SENSOR_PROVIDER_MAX6649                   4
 
2897
#define NV_CTRL_THERMAL_SENSOR_PROVIDER_MAX1617                   5
 
2898
#define NV_CTRL_THERMAL_SENSOR_PROVIDER_LM99                      6
 
2899
#define NV_CTRL_THERMAL_SENSOR_PROVIDER_LM89                      7
 
2900
#define NV_CTRL_THERMAL_SENSOR_PROVIDER_LM64                      8
 
2901
#define NV_CTRL_THERMAL_SENSOR_PROVIDER_G781                      9
 
2902
#define NV_CTRL_THERMAL_SENSOR_PROVIDER_ADT7473                  10
 
2903
#define NV_CTRL_THERMAL_SENSOR_PROVIDER_SBMAX6649                11
 
2904
#define NV_CTRL_THERMAL_SENSOR_PROVIDER_VBIOSEVT                 12
 
2905
#define NV_CTRL_THERMAL_SENSOR_PROVIDER_OS                       13
 
2906
#define NV_CTRL_THERMAL_SENSOR_PROVIDER_UNKNOWN          0xFFFFFFFF
 
2907
 
 
2908
/* 
 
2909
 * NV_CTRL_THERMAL_SENSOR_TARGET - Returns what hardware component
 
2910
 * the thermal sensor is measuring.
 
2911
 */
 
2912
#define NV_CTRL_THERMAL_SENSOR_TARGET                           357 /* R--S */
 
2913
#define NV_CTRL_THERMAL_SENSOR_TARGET_NONE                        0
 
2914
#define NV_CTRL_THERMAL_SENSOR_TARGET_GPU                         1
 
2915
#define NV_CTRL_THERMAL_SENSOR_TARGET_MEMORY                      2
 
2916
#define NV_CTRL_THERMAL_SENSOR_TARGET_POWER_SUPPLY                4
 
2917
#define NV_CTRL_THERMAL_SENSOR_TARGET_BOARD                       8
 
2918
#define NV_CTRL_THERMAL_SENSOR_TARGET_UNKNOWN            0xFFFFFFFF
 
2919
 
 
2920
#define NV_CTRL_LAST_ATTRIBUTE NV_CTRL_THERMAL_SENSOR_TARGET
2859
2921
 
2860
2922
/**************************************************************************/
2861
2923
 
3626
3688
 
3627
3689
#define NV_CTRL_BINARY_DATA_GPUS_USED_BY_LOGICAL_XSCREEN     11   /* R--- */
3628
3690
 
 
3691
/*
 
3692
 * NV_CTRL_BINARY_DATA_THERMAL_SENSORS_USED_BY_GPU - Returns the sensors that
 
3693
 * are attached to the given GPU.
 
3694
 *
 
3695
 * The format of the returned data is:
 
3696
 *
 
3697
 *     4       CARD32 number of SENSOR
 
3698
 *     4 * n   CARD32 SENSOR indices
 
3699
 *
 
3700
 * This attribute can only be queried through XNVCTRLQueryTargetBinaryData()
 
3701
 * using a NV_CTRL_TARGET_TYPE_GPU target.  This attribute cannot be
 
3702
 * queried using a NV_CTRL_TARGET_TYPE_X_SCREEN
 
3703
 */
 
3704
 
 
3705
#define NV_CTRL_BINARY_DATA_THERMAL_SENSORS_USED_BY_GPU      12  /* R--G */
 
3706
 
3629
3707
#define NV_CTRL_BINARY_DATA_LAST_ATTRIBUTE \
3630
 
        NV_CTRL_BINARY_DATA_GPUS_USED_BY_LOGICAL_XSCREEN
 
3708
        NV_CTRL_BINARY_DATA_THERMAL_SENSORS_USED_BY_GPU
3631
3709
 
3632
3710
 
3633
3711
/**************************************************************************/
3806
3884
 * Upon successful configuration or querying of this attribute, a string
3807
3885
 * representing the current topology for all known streams on the device
3808
3886
 * will be returned.  On failure, NULL is returned.
 
3887
 *
 
3888
 * Note: Setting this attribute may also result in the following
 
3889
 *       NV-CONTROL attributes being reset on the GVI device (to ensure
 
3890
 *       the configuration remains valid):
 
3891
 *           NV_CTRL_GVIO_REQUESTED_VIDEO_FORMAT
 
3892
 *           NV_CTRL_GVI_REQUESTED_STREAM_BITS_PER_COMPONENT
 
3893
 *           NV_CTRL_GVI_REQUESTED_STREAM_COMPONENT_SAMPLING
3809
3894
 */
3810
3895
 
3811
3896
#define NV_CTRL_STRING_OPERATION_GVI_CONFIGURE_STREAMS         4 /* RW-I */
3887
3972
#define ATTRIBUTE_TYPE_VCSC       0x080
3888
3973
#define ATTRIBUTE_TYPE_GVI        0x100
3889
3974
#define ATTRIBUTE_TYPE_COOLER     0x200
 
3975
#define ATTRIBUTE_TYPE_THERMAL_SENSOR 0x400
3890
3976
 
3891
3977
typedef struct _NVCTRLAttributeValidValues {
3892
3978
    int type;