diff options
author | Aaron Plattner <aplattner@nvidia.com> | 2008-02-12 21:30:28 -0800 |
---|---|---|
committer | Aaron Plattner <aplattner@nvidia.com> | 2008-02-12 21:30:28 -0800 |
commit | 423e470521758ad9b64b91ed197f72542999b0b4 (patch) | |
tree | 0389245818c52ca812fb5847badd7720ef8eb671 | |
parent | 818140c39f7818755070e3b853956b818c842f2e (diff) |
1.0-97621.0-9762
-rw-r--r-- | src/gtk+-2.x/ctkdisplaylayout.c | 10 | ||||
-rw-r--r-- | src/gtk+-2.x/ctkevent.c | 3 | ||||
-rw-r--r-- | src/gtk+-2.x/ctkframelock.c | 15 | ||||
-rw-r--r-- | src/libXNVCtrl/NVCtrl.h | 14 | ||||
-rw-r--r-- | src/libXNVCtrl/libXNVCtrl.a | bin | 17180 -> 17180 bytes | |||
-rw-r--r-- | src/parse.c | 3 |
6 files changed, 32 insertions, 13 deletions
diff --git a/src/gtk+-2.x/ctkdisplaylayout.c b/src/gtk+-2.x/ctkdisplaylayout.c index bbbd562..bb53122 100644 --- a/src/gtk+-2.x/ctkdisplaylayout.c +++ b/src/gtk+-2.x/ctkdisplaylayout.c @@ -3161,14 +3161,13 @@ void ctk_display_layout_set_display_position(CtkDisplayLayout *ctk_object, clear_layout(ctk_object); - /* XXX When transitioning from absolute to relative, make sure + /* XXX When configuring a relative position, make sure * all displays that are relative to us become absolute. * This is to avoid relationship loops. Eventually, we'll want * to be able to handle weird loops since X does this. */ - if (display->cur_mode->position_type == CONF_ADJ_ABSOLUTE && - position_type != CONF_ADJ_ABSOLUTE) { + if (position_type != CONF_ADJ_ABSOLUTE) { nvDisplayPtr other; @@ -3380,14 +3379,13 @@ void ctk_display_layout_set_screen_position(CtkDisplayLayout *ctk_object, } - /* XXX When transitioning from absolute to relative, make sure + /* XXX When configuring a relative position, make sure * all screens that are relative to us become absolute. * This is to avoid relationship loops. Eventually, we'll want * to be able to handle weird loops since X does this. */ - if (screen->position_type == CONF_ADJ_ABSOLUTE && - position_type != CONF_ADJ_ABSOLUTE) { + if (position_type != CONF_ADJ_ABSOLUTE) { nvScreenPtr other; diff --git a/src/gtk+-2.x/ctkevent.c b/src/gtk+-2.x/ctkevent.c index 75cfee5..7789549 100644 --- a/src/gtk+-2.x/ctkevent.c +++ b/src/gtk+-2.x/ctkevent.c @@ -242,6 +242,7 @@ static void ctk_event_class_init(CtkEventClass *ctk_event_class) MAKE_SIGNAL(NV_CTRL_GPU_SCALING_ACTIVE); MAKE_SIGNAL(NV_CTRL_DFP_SCALING_ACTIVE); MAKE_SIGNAL(NV_CTRL_FSAA_APPLICATION_ENHANCED); + MAKE_SIGNAL(NV_CTRL_FRAMELOCK_SYNC_RATE_4); #undef MAKE_SIGNAL @@ -252,7 +253,7 @@ static void ctk_event_class_init(CtkEventClass *ctk_event_class) * knows about. */ -#if NV_CTRL_LAST_ATTRIBUTE != NV_CTRL_FSAA_APPLICATION_ENHANCED +#if NV_CTRL_LAST_ATTRIBUTE != NV_CTRL_FRAMELOCK_SYNC_RATE_4 #warning "There are attributes that do not emit signals!" #endif diff --git a/src/gtk+-2.x/ctkframelock.c b/src/gtk+-2.x/ctkframelock.c index 5d65fab..93a3c15 100644 --- a/src/gtk+-2.x/ctkframelock.c +++ b/src/gtk+-2.x/ctkframelock.c @@ -3157,9 +3157,9 @@ void list_entry_update_framelock_status(CtkFramelock *ctk_framelock, gboolean use_house_sync; gboolean framelock_enabled; gboolean is_server; + ReturnStatus ret; - NvCtrlGetAttribute(data->handle, NV_CTRL_FRAMELOCK_SYNC_RATE, &rate); NvCtrlGetAttribute(data->handle, NV_CTRL_FRAMELOCK_SYNC_DELAY, &delay); NvCtrlGetAttribute(data->handle, NV_CTRL_FRAMELOCK_HOUSE_STATUS, &house); NvCtrlGetAttribute(data->handle, NV_CTRL_FRAMELOCK_PORT0_STATUS, &port0); @@ -3189,8 +3189,15 @@ void list_entry_update_framelock_status(CtkFramelock *ctk_framelock, /* Sync Rate */ gtk_widget_set_sensitive(data->rate_label, framelock_enabled); gtk_widget_set_sensitive(data->rate_text, framelock_enabled); - fvalue = (float) rate / 1000.0; - snprintf(str, 32, "%.2f Hz", fvalue); // 6.2f + + ret = + NvCtrlGetAttribute(data->handle, NV_CTRL_FRAMELOCK_SYNC_RATE_4, &rate); + if (ret == NvCtrlSuccess) { + snprintf(str, 32, "%d.%.4d Hz", (rate / 10000), (rate % 10000)); + } else { + NvCtrlGetAttribute(data->handle, NV_CTRL_FRAMELOCK_SYNC_RATE, &rate); + snprintf(str, 32, "%d.%.3d Hz", (rate / 1000), (rate % 1000)); + } gtk_label_set_text(GTK_LABEL(data->rate_text), str); /* Sync Delay (Skew) */ @@ -4875,7 +4882,7 @@ static unsigned int add_framelock_devices(CtkFramelock *ctk_framelock, if (ret != NvCtrlSuccess) { goto fail; } - revision_str = g_strdup_printf("%d", val); + revision_str = g_strdup_printf("0x%X", val); framelock_data->label = gtk_label_new(""); diff --git a/src/libXNVCtrl/NVCtrl.h b/src/libXNVCtrl/NVCtrl.h index 58fd564..7048154 100644 --- a/src/libXNVCtrl/NVCtrl.h +++ b/src/libXNVCtrl/NVCtrl.h @@ -2980,7 +2980,19 @@ #define NV_CTRL_FSAA_APPLICATION_ENHANCED_ENABLED 1 #define NV_CTRL_FSAA_APPLICATION_ENHANCED_DISABLED 0 -#define NV_CTRL_LAST_ATTRIBUTE NV_CTRL_FSAA_APPLICATION_ENHANCED + +/* + * NV_CTRL_FRAMELOCK_SYNC_RATE_4 - This is the refresh rate that the + * frame lock board is sending to the GPU with 4 digits of precision. + * + * This attribute may be queried through XNVCTRLQueryTargetAttribute() + * using a NV_CTRL_TARGET_TYPE_FRAMELOCK. + */ + +#define NV_CTRL_FRAMELOCK_SYNC_RATE_4 256 /* R--F */ + + +#define NV_CTRL_LAST_ATTRIBUTE NV_CTRL_FRAMELOCK_SYNC_RATE_4 /**************************************************************************/ diff --git a/src/libXNVCtrl/libXNVCtrl.a b/src/libXNVCtrl/libXNVCtrl.a Binary files differindex 1aae24f..212bb3a 100644 --- a/src/libXNVCtrl/libXNVCtrl.a +++ b/src/libXNVCtrl/libXNVCtrl.a diff --git a/src/parse.c b/src/parse.c index 92358ec..d207c71 100644 --- a/src/parse.c +++ b/src/parse.c @@ -133,6 +133,7 @@ AttributeTableEntry attributeTable[] = { { "FrameLockTestSignal", NV_CTRL_FRAMELOCK_TEST_SIGNAL, N|F|G }, { "FrameLockEthDetected", NV_CTRL_FRAMELOCK_ETHERNET_DETECTED, N|F|G }, { "FrameLockSyncRate", NV_CTRL_FRAMELOCK_SYNC_RATE, N|F|G }, + { "FrameLockSyncRate4", NV_CTRL_FRAMELOCK_SYNC_RATE_4, N|F|G }, { "FrameLockTiming", NV_CTRL_FRAMELOCK_TIMING, N|F|G }, { "FrameLockMasterable", NV_CTRL_FRAMELOCK_MASTERABLE, N|F|G }, { "FrameLockFPGARevision", NV_CTRL_FRAMELOCK_FPGA_REVISION, N|F|G }, @@ -195,7 +196,7 @@ AttributeTableEntry attributeTable[] = { * about. */ -#if NV_CTRL_LAST_ATTRIBUTE != NV_CTRL_FSAA_APPLICATION_ENHANCED +#if NV_CTRL_LAST_ATTRIBUTE != NV_CTRL_FRAMELOCK_SYNC_RATE_4 #warning "Have you forgotten to add a new integer attribute to attributeTable?" #endif |