Permalink
Browse files

375.10

  • Loading branch information...
aaronp24 committed Oct 21, 2016
1 parent 9712ba1 commit 7155801a4e8e162981fdb963cd5b76982a2deb76
@@ -1 +1 @@
NVIDIA_VERSION = 370.28
NVIDIA_VERSION = 375.10
@@ -1 +1 @@
NVIDIA_VERSION = 370.28
NVIDIA_VERSION = 375.10
@@ -150,17 +150,19 @@ LDFLAGS += $(X_LDFLAGS)
# Link against NVIDIA NVML library if available

# Set to 1 if NVML is available on the target system
NVML_AVAILABLE ?= 0

ifeq (1,$(NVML_AVAILABLE))
# Here "gdk" stands for "GPU Developer Kit", rather than gtk's lower-level
# "GIMP Drawing Kit"
NVML_CFLAGS ?= -I /usr/include/nvidia/gdk -DNVML_AVAILABLE
NVML_LDFLAGS ?=
CFLAGS += $(NVML_CFLAGS)
LDFLAGS += $(NVML_LDFLAGS)
LIBS += -lnvidia-ml
endif
NVML_EXPERIMENTAL ?=

# Here "gdk" stands for "GPU Developer Kit", rather than gtk's lower-level
# "GIMP Drawing Kit"
NVML_CFLAGS ?= -I /usr/include/nvidia/gdk

NVML_CFLAGS += $(if $(NVML_EXPERIMENTAL),-DNVML_EXPERIMENTAL)

NVML_LDFLAGS ?=
CFLAGS += $(NVML_CFLAGS)
LDFLAGS += $(NVML_LDFLAGS)
LIBS += -lnvidia-ml


# Some older Linux distributions do not have the dynamic library
# libXxf86vm.so, though some newer Linux distributions do not have the
@@ -52,6 +52,7 @@
#include "gvi_pixdata.h"
#include "sdi_pixdata.h"
#include "sdi_shared_sync_bnc_pixdata.h"
#include "server_licensing_pixdata.h"
#include "slimm_pixdata.h"
#include "solaris_pixdata.h"
#include "thermal_pixdata.h"
@@ -427,6 +428,7 @@ static gboolean select_artwork(BannerArtworkType artwork,
{ BANNER_ARTWORK_PENGUIN, TRUE, 16, &penguin_pixdata },
{ BANNER_ARTWORK_SDI, FALSE, 16, &sdi_pixdata },
{ BANNER_ARTWORK_SDI_SHARED_SYNC_BNC, FALSE, 16, &sdi_shared_sync_bnc_pixdata },
{ BANNER_ARTWORK_SERVER_LICENSING, FALSE, 16, &server_licensing_pixdata },
{ BANNER_ARTWORK_SLIMM, FALSE, 16, &slimm_pixdata },
{ BANNER_ARTWORK_SOLARIS, TRUE, 16, &solaris_pixdata },
{ BANNER_ARTWORK_THERMAL, FALSE, 16, &thermal_pixdata },
@@ -61,6 +61,7 @@ typedef enum {
BANNER_ARTWORK_PENGUIN,
BANNER_ARTWORK_SDI,
BANNER_ARTWORK_SDI_SHARED_SYNC_BNC,
BANNER_ARTWORK_SERVER_LICENSING,
BANNER_ARTWORK_SLIMM,
BANNER_ARTWORK_SOLARIS,
BANNER_ARTWORK_THERMAL,
@@ -662,7 +662,20 @@ static void apply_mode_attribute_token(char *token, char *value, void *data)
} else if (!strcasecmp("8k", value)) {
mode->pixelshift = PIXELSHIFT_8K;
}

/* ForceCompositionPipeline */
} else if (!strcasecmp("forcecompositionpipeline", token)) {
if (!strcasecmp("on", value)) {
mode->forceCompositionPipeline = True;
}

/* ForceFullCompositionPipeline */
} else if (!strcasecmp("forcefullcompositionpipeline", token)) {
if (!strcasecmp("on", value)) {
mode->forceFullCompositionPipeline = True;
}
}

}


@@ -1149,6 +1162,22 @@ static gchar *mode_get_str(nvModePtr mode, int force_target_id_name)
flags_str = tmp;
}

/* ForceCompositionPipeline */
if (mode->forceCompositionPipeline) {
tmp = g_strdup_printf("%s, ForceCompositionPipeline=On",
(flags_str ? flags_str : ""));
g_free(flags_str);
flags_str = tmp;
}

/* ForceFullCompositionPipeline */
if (mode->forceFullCompositionPipeline) {
tmp = g_strdup_printf("%s, ForceFullCompositionPipeline=On",
(flags_str ? flags_str : ""));
g_free(flags_str);
flags_str = tmp;
}

if (flags_str) {
tmp = g_strdup_printf("%s {%s}",
mode_str,
@@ -114,6 +114,8 @@ static void display_config_attribute_changed(GtkWidget *object,
static void reset_layout(CtkDisplayConfig *ctk_object);
static gboolean force_layout_reset(gpointer user_data);
static void user_changed_attributes(CtkDisplayConfig *ctk_object);
static void update_forcecompositionpipeline_buttons(CtkDisplayConfig
*ctk_object);

static XConfigPtr xconfig_generate(XConfigPtr xconfCur,
Bool merge,
@@ -260,6 +262,17 @@ static const char * __dpy_primary_help =
"important windows etc; changing this option may require restarting your X "
"server, depending on your window manager.";

static const char * __dpy_forcecompositionpipeline_help =
"The NVIDIA X driver can use a composition pipeline to apply X screen "
"transformations and rotations. \"ForceCompositionPipeline\" can be used to "
"force the use of this pipeline, even when no transformations or rotations are "
"applied to the screen. This option is implicitly set by "
"ForceFullCompositionPipeline.";

static const char * __dpy_forcefullcompositionpipeline_help =
"This option implicitly enables \"ForceCompositionPipeline\" and additionally "
"makes use of the composition pipeline to apply ViewPortOut scaling.";

/* Screen tooltips */

static const char * __screen_virtual_size_help =
@@ -1097,6 +1110,109 @@ static void user_changed_attributes(CtkDisplayConfig *ctk_object)



/** display_forcecompositionpipeline_toggled() ************************
*
* Sets ForceCompositionPipeline for a dpy.
*
**/
static void display_forcecompositionpipeline_toggled(GtkWidget *widget,
gpointer user_data)
{
CtkDisplayConfig *ctk_object = CTK_DISPLAY_CONFIG(user_data);
gint enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
nvDisplayPtr display = ctk_display_layout_get_selected_display
(CTK_DISPLAY_LAYOUT(ctk_object->obj_layout));

if (enabled) {
display->cur_mode->forceCompositionPipeline = TRUE;
} else {
display->cur_mode->forceCompositionPipeline = FALSE;
}

update_forcecompositionpipeline_buttons(ctk_object);
user_changed_attributes(ctk_object);
}



/** display_forcefullcompositionpipeline_toggled() ********************
*
* Sets ForceFullCompositionPipeline for a dpy.
*
**/
static void display_forcefullcompositionpipeline_toggled(GtkWidget *widget,
gpointer user_data)
{
CtkDisplayConfig *ctk_object = CTK_DISPLAY_CONFIG(user_data);
gint enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
nvDisplayPtr display = ctk_display_layout_get_selected_display
(CTK_DISPLAY_LAYOUT(ctk_object->obj_layout));

if (enabled) {
display->cur_mode->forceFullCompositionPipeline = TRUE;
/* forceFullCompositionPipeline implies forceCompositionPipeline in the
* X driver, so we should reflect that within nvidia-settings even
* before actually changing the current X MetaMode.
*/
display->cur_mode->forceCompositionPipeline = TRUE;
} else {
display->cur_mode->forceFullCompositionPipeline = FALSE;
}

update_forcecompositionpipeline_buttons(ctk_object);
user_changed_attributes(ctk_object);
}



/** update_forcecompositionpipeline_buttons() *************************
*
* Updates the buttons for Force{Full,}CompositionPipeline to reflect their
* state and sensitivity.
*
**/

static void update_forcecompositionpipeline_buttons(CtkDisplayConfig *ctk_object)
{
nvDisplayPtr display = ctk_display_layout_get_selected_display
(CTK_DISPLAY_LAYOUT(ctk_object->obj_layout));

g_signal_handlers_block_by_func
(G_OBJECT(ctk_object->chk_forcecompositionpipeline_enabled),
G_CALLBACK(display_forcecompositionpipeline_toggled),
(gpointer)ctk_object);

g_signal_handlers_block_by_func
(G_OBJECT(ctk_object->chk_forcefullcompositionpipeline_enabled),
G_CALLBACK(display_forcefullcompositionpipeline_toggled),
(gpointer)ctk_object);

gtk_toggle_button_set_active
(GTK_TOGGLE_BUTTON(ctk_object->chk_forcecompositionpipeline_enabled),
display->cur_mode->forceCompositionPipeline |
display->cur_mode->forceFullCompositionPipeline);

gtk_toggle_button_set_active
(GTK_TOGGLE_BUTTON(ctk_object->chk_forcefullcompositionpipeline_enabled),
display->cur_mode->forceFullCompositionPipeline);

gtk_widget_set_sensitive
(GTK_WIDGET(ctk_object->chk_forcecompositionpipeline_enabled),
!display->cur_mode->forceFullCompositionPipeline);

g_signal_handlers_unblock_by_func
(G_OBJECT(ctk_object->chk_forcecompositionpipeline_enabled),
G_CALLBACK(display_forcecompositionpipeline_toggled),
(gpointer)ctk_object);

g_signal_handlers_unblock_by_func
(G_OBJECT(ctk_object->chk_forcefullcompositionpipeline_enabled),
G_CALLBACK(display_forcefullcompositionpipeline_toggled),
(gpointer)ctk_object);
}



/** screen_primary_display_toggled() ******************************
*
* Sets the primary display for a screen.
@@ -1957,6 +2073,36 @@ GtkWidget* ctk_display_config_new(CtrlTarget *ctrl_target,
gtk_box_pack_start(GTK_BOX(hbox), ctk_object->chk_primary_display,
TRUE, TRUE, 0);

/* checkboxes for Force{Full,}CompositionPipeline */
hbox = gtk_hbox_new(FALSE, 5);
gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, TRUE, 0);
ctk_object->chk_forcecompositionpipeline_enabled =
gtk_check_button_new_with_label("Force Composition Pipeline");
ctk_config_set_tooltip(ctk_config,
ctk_object->chk_forcecompositionpipeline_enabled,
__dpy_forcecompositionpipeline_help);
g_signal_connect(G_OBJECT(ctk_object->chk_forcecompositionpipeline_enabled),
"toggled",
G_CALLBACK(display_forcecompositionpipeline_toggled),
(gpointer)ctk_object);
gtk_box_pack_start(GTK_BOX(hbox),
ctk_object->chk_forcecompositionpipeline_enabled,
TRUE, TRUE, 0);

ctk_object->chk_forcefullcompositionpipeline_enabled =
gtk_check_button_new_with_label("Force Full Composition Pipeline");
ctk_config_set_tooltip(ctk_config,
ctk_object->
chk_forcefullcompositionpipeline_enabled,
__dpy_forcefullcompositionpipeline_help);
g_signal_connect(G_OBJECT(ctk_object->chk_forcefullcompositionpipeline_enabled),
"toggled",
G_CALLBACK(display_forcefullcompositionpipeline_toggled),
(gpointer)ctk_object);
gtk_box_pack_start(GTK_BOX(hbox),
ctk_object->chk_forcefullcompositionpipeline_enabled,
TRUE, TRUE, 0);

/* Up the object ref count to make sure that the page and its widgets
* do not get freed if/when the page is removed from the notebook.
*/
@@ -4106,6 +4252,39 @@ static void setup_display_position(CtkDisplayConfig *ctk_object)



/** setup_forcecompositionpipeline_buttons() *************************
*
* Sets up the ForceCompositionPipeline and ForceFullCompositionPipeline
* checkboxes to reflect whether or not they are selected in the current
* MetaMode.
*
**/

static void setup_forcecompositionpipeline_buttons(CtkDisplayConfig *ctk_object)
{
nvDisplayPtr display = ctk_display_layout_get_selected_display
(CTK_DISPLAY_LAYOUT(ctk_object->obj_layout));

if (!display || !display->screen || !ctk_object->advanced_mode) {
gtk_widget_hide(ctk_object->chk_forcecompositionpipeline_enabled);
gtk_widget_hide(ctk_object->chk_forcefullcompositionpipeline_enabled);
return;
}

if (!display->cur_mode) {
gtk_widget_hide(ctk_object->chk_forcecompositionpipeline_enabled);
gtk_widget_hide(ctk_object->chk_forcefullcompositionpipeline_enabled);
return;
}

gtk_widget_show(ctk_object->chk_forcecompositionpipeline_enabled);
gtk_widget_show(ctk_object->chk_forcefullcompositionpipeline_enabled);

update_forcecompositionpipeline_buttons(ctk_object);
}



/** setup_primary_display() ******************************************
*
* Sets up the primary display device for an X screen.
@@ -4231,6 +4410,7 @@ static void setup_display_page(CtkDisplayConfig *ctk_object)
setup_display_viewport_out(ctk_object);
setup_display_position(ctk_object);
setup_display_panning(ctk_object);
setup_forcecompositionpipeline_buttons(ctk_object);
setup_primary_display(ctk_object);

} /* setup_display_page() */
@@ -93,6 +93,9 @@ typedef struct _CtkDisplayConfig
GtkWidget *chk_primary_display;
gboolean primary_display_changed;

GtkWidget *chk_forcecompositionpipeline_enabled;
GtkWidget *chk_forcefullcompositionpipeline_enabled;

GtkWidget *mnu_selected_item;
SelectableItem *selected_item_table;
int selected_item_table_len;
@@ -224,6 +224,9 @@ typedef struct nvModeRec {
Reflection reflection;
PixelShift pixelshift;

Bool forceCompositionPipeline;
Bool forceFullCompositionPipeline;

} nvMode, *nvModePtr;


@@ -207,6 +207,7 @@ static void ctk_event_class_init(CtkEventClass *ctk_event_class)
MAKE_SIGNAL(NV_CTRL_PCI_DEVICE);
MAKE_SIGNAL(NV_CTRL_PCI_FUNCTION);
MAKE_SIGNAL(NV_CTRL_FRAMELOCK_FPGA_REVISION);
MAKE_SIGNAL(NV_CTRL_FRAMELOCK_FIRMWARE_VERSION);
MAKE_SIGNAL(NV_CTRL_MAX_SCREEN_WIDTH);
MAKE_SIGNAL(NV_CTRL_MAX_SCREEN_HEIGHT);
MAKE_SIGNAL(NV_CTRL_MAX_DISPLAYS);
@@ -353,7 +354,7 @@ static void ctk_event_class_init(CtkEventClass *ctk_event_class)
* knows about.
*/

#if NV_CTRL_LAST_ATTRIBUTE != NV_CTRL_GPU_MEM_TRANSFER_RATE_OFFSET_ALL_PERFORMANCE_LEVELS
#if NV_CTRL_LAST_ATTRIBUTE != NV_CTRL_FRAMELOCK_FIRMWARE_VERSION
#warning "There are attributes that do not emit signals!"
#endif

Oops, something went wrong.

0 comments on commit 7155801

Please sign in to comment.