summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2008-02-12 21:29:00 -0800
committerAaron Plattner <aplattner@nvidia.com>2008-02-12 21:29:00 -0800
commit9e1bb0627faf1777bfe0db3d8810704422581b67 (patch)
treec18e9e837c6ec21dd677c65259de8314bf9a3f14
parentf513358f729cc7c91a0a441ed8e8cf247bfb9a7d (diff)
100.14.23100.14.23
-rw-r--r--src/gtk+-2.x/ctkclocks.c25
-rw-r--r--src/libXNVCtrl/libXNVCtrl.abin143448 -> 17180 bytes
2 files changed, 18 insertions, 7 deletions
diff --git a/src/gtk+-2.x/ctkclocks.c b/src/gtk+-2.x/ctkclocks.c
index 5bcf6fb..127b6bd 100644
--- a/src/gtk+-2.x/ctkclocks.c
+++ b/src/gtk+-2.x/ctkclocks.c
@@ -366,7 +366,7 @@ GtkWidget* ctk_clocks_new(NvCtrlAttributeHandle *handle,
object = g_object_new(CTK_TYPE_CLOCKS, NULL);
ctk_object = CTK_CLOCKS(object);
- /* Cache the handke and configuration */
+ /* Cache the handle and configuration */
ctk_object->handle = handle;
ctk_object->ctk_config = ctk_config;
@@ -864,6 +864,8 @@ static void overclocking_state_update_gui(CtkClocks *ctk_object)
{
ReturnStatus ret;
int value;
+ NVCTRLAttributeValidValuesRec range_detection;
+ gboolean probing_optimal = TRUE;
gboolean enabled;
@@ -888,12 +890,21 @@ static void overclocking_state_update_gui(CtkClocks *ctk_object)
*/
if ( enabled ) {
- ret = NvCtrlGetAttribute(ctk_object->handle,
- NV_CTRL_GPU_OPTIMAL_CLOCK_FREQS_DETECTION_STATE,
- &value);
- if ( ret == NvCtrlSuccess )
- ctk_object->probing_optimal =
- (value == NV_CTRL_GPU_OPTIMAL_CLOCK_FREQS_DETECTION_STATE_BUSY);
+ ret = NvCtrlGetValidAttributeValues(ctk_object->handle,
+ NV_CTRL_GPU_OPTIMAL_CLOCK_FREQS_DETECTION,
+ &range_detection);
+ if ( ret == NvCtrlSuccess ) {
+ ret = NvCtrlGetAttribute(ctk_object->handle,
+ NV_CTRL_GPU_OPTIMAL_CLOCK_FREQS_DETECTION_STATE,
+ &value);
+ if ( ret == NvCtrlSuccess ) {
+ probing_optimal =
+ (value == NV_CTRL_GPU_OPTIMAL_CLOCK_FREQS_DETECTION_STATE_BUSY);
+ }
+ ctk_object->probing_optimal = probing_optimal;
+
+ ctk_object->auto_detection_available = TRUE;
+ }
}
/* Sync the gui to be able to modify the clocks */
diff --git a/src/libXNVCtrl/libXNVCtrl.a b/src/libXNVCtrl/libXNVCtrl.a
index 9f1eef0..b4368fa 100644
--- a/src/libXNVCtrl/libXNVCtrl.a
+++ b/src/libXNVCtrl/libXNVCtrl.a
Binary files differ