commit 7bbb6c837cad7a075e80435891379db6d7737fc9
Author: Leigh Scott <leigh123linux(a)gmail.com>
Date: Fri Jun 26 20:25:40 2020 +0100
Update to 390.138
.gitignore | 1 +
gcc-10.patch | 116 +++++++++++++++++++++++++++++++++------------
nvidia-settings-390xx.spec | 10 ++--
sources | 2 +-
4 files changed, 93 insertions(+), 36 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index dbd566d..d7ae97e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
/nvidia-settings-390.116.tar.bz2
/nvidia-settings-390.129.tar.bz2
/nvidia-settings-390.132.tar.bz2
+/nvidia-settings-390.138.tar.bz2
diff --git a/gcc-10.patch b/gcc-10.patch
index 26c5548..0646fae 100644
--- a/gcc-10.patch
+++ b/gcc-10.patch
@@ -1,54 +1,108 @@
-From 292dcc6c02e615e73791f67cdf76b5d191657822 Mon Sep 17 00:00:00 2001
-From: Jeroen Roovers <jer(a)gentoo.org>
-Date: Mon, 27 Jan 2020 20:49:20 +0100
-Subject: [PATCH] ctkvdpau: Fix CFLAGS=-fno-common
+From a7c1f5fce6303a643fadff7d85d59934bd0cf6b6 Mon Sep 17 00:00:00 2001
+From: Aaron Plattner <aplattner(a)nvidia.com>
+Date: Mon, 18 May 2020 15:27:01 -0700
+Subject: [PATCH] nvidia-settings: Make VDPAUDeviceFunctions static to
+ ctkvdpau.c
-GCC 10 will enable -fno-common by default[0], which causes the linker to
-fail like this [1], even for older GCC versions for which it is
-explicitly enabled:
+GCC 10 defaults to building with -fno-common, which exposes a bug in
+nvidia-settings: The VDPAUDeviceFunctions structure is defined as global in
+ctkvdpau.h, so both ctkvdpau.o and ctkwindow.o have it as a global, non-static
+"tentative definition" symbol. The GCC 10 man page describes it like this:
-```
-/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld:
-./gtk3/ctkvdpau.o:/home/jer/portage/x11-drivers/nvidia-drivers-440.44-r1/work/nvidia-settings-440.44/src/gtk+-2.x/ctkvdpau.h:70:
-multiple definition of `VDPAUDeviceFunctions';
-./gtk3/ctkwindow.o:/home/jer/portage/x11-drivers/nvidia-drivers-440.44-r1/work/nvidia-settings-440.44/src/gtk+-2.x/ctkvdpau.h:70:
-first defined here
+ -fcommon
+ In C code, this option controls the placement of global variables
+ defined without an initializer, known as tentative definitions in
+ the C standard. Tentative definitions are distinct from
+ declarations of a variable with the "extern" keyword, which do not
+ allocate storage.
-```
+ The default is -fno-common, which specifies that the compiler
+ places uninitialized global variables in the BSS section of the
+ object file. This inhibits the merging of tentative definitions by
+ the linker so you get a multiple-definition error if the same
+ variable is accidentally defined in more than one compilation unit.
-Fix this by declaring VDPAUDeviceFunctions as extern and by defining it
-explicitly.
+ The -fcommon places uninitialized global variables in a common
+ block. This allows the linker to resolve all tentative definitions
+ of the same variable in different compilation units to the same
+ object, or to a non-tentative definition. This behavior is
+ inconsistent with C++, and on many targets implies a speed and code
+ size penalty on global variable references. It is mainly useful to
+ enable legacy code to link without errors.
-[0]
https://gcc.gnu.org/gcc-10/porting_to.html#common
-[1]
https://bugs.gentoo.org/706742
+Since the copy of VDPAUDeviceFunctions in ctkwindow.o is not used, just remove
+it by moving the definition of this structure into ctkvdpau.c.
---
- src/gtk+-2.x/ctkvdpau.c | 2 ++
- src/gtk+-2.x/ctkvdpau.h | 2 +-
- 2 files changed, 3 insertions(+), 1 deletion(-)
+ src/gtk+-2.x/ctkvdpau.c | 23 +++++++++++++++++++++++
+ src/gtk+-2.x/ctkvdpau.h | 24 ------------------------
+ 2 files changed, 23 insertions(+), 24 deletions(-)
diff --git a/src/gtk+-2.x/ctkvdpau.c b/src/gtk+-2.x/ctkvdpau.c
-index 2f120f0..315243f 100644
+index 2f120f0..6149c28 100644
--- a/src/gtk+-2.x/ctkvdpau.c
+++ b/src/gtk+-2.x/ctkvdpau.c
-@@ -103,6 +103,8 @@ const gchar* __video_mixer_parameter_help =
+@@ -103,6 +103,29 @@ const gchar* __video_mixer_parameter_help =
const gchar* __video_mixer_attribute_help =
"This shows the video mixer attributes and any applicable ranges.";
-+struct VDPAUDeviceImpl VDPAUDeviceFunctions;
++static struct VDPAUDeviceImpl {
++
++ VdpGetErrorString *GetErrorString;
++ VdpGetProcAddress *GetProcAddress;
++ VdpGetApiVersion *GetApiVersion;
++ VdpGetInformationString *GetInformationString;
++ VdpVideoSurfaceQueryCapabilities *VideoSurfaceQueryCapabilities;
++ VdpVideoSurfaceQueryGetPutBitsYCbCrCapabilities
++ *VideoSurfaceQueryGetPutBitsYCbCrCapabilities;
++ VdpOutputSurfaceQueryCapabilities *OutputSurfaceQueryCapabilities;
++ VdpOutputSurfaceQueryGetPutBitsNativeCapabilities
++ *OutputSurfaceQueryGetPutBitsNativeCapabilities;
++ VdpOutputSurfaceQueryPutBitsYCbCrCapabilities
++ *OutputSurfaceQueryPutBitsYCbCrCapabilities;
++ VdpBitmapSurfaceQueryCapabilities *BitmapSurfaceQueryCapabilities;
++ VdpDecoderQueryCapabilities *DecoderQueryCapabilities;
++ VdpVideoMixerQueryFeatureSupport *VideoMixerQueryFeatureSupport;
++ VdpVideoMixerQueryParameterSupport *VideoMixerQueryParameterSupport;
++ VdpVideoMixerQueryAttributeSupport *VideoMixerQueryAttributeSupport;
++ VdpVideoMixerQueryParameterValueRange *VideoMixerQueryParameterValueRange;
++ VdpVideoMixerQueryAttributeValueRange *VideoMixerQueryAttributeValueRange;
++} VDPAUDeviceFunctions;
+
static int queryOutputSurface(CtkVDPAU *ctk_vdpau, VdpDevice device,
VdpGetProcAddress *getProcAddress);
diff --git a/src/gtk+-2.x/ctkvdpau.h b/src/gtk+-2.x/ctkvdpau.h
-index ec58d36..ffff839 100644
+index ec58d36..2652f6f 100644
--- a/src/gtk+-2.x/ctkvdpau.h
+++ b/src/gtk+-2.x/ctkvdpau.h
-@@ -46,7 +46,7 @@ G_BEGIN_DECLS
+@@ -45,30 +45,6 @@ G_BEGIN_DECLS
+ #define CTK_VDPAU_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), CTK_TYPE_VDPAU, CtkVDPAUClass))
-
+-
-struct VDPAUDeviceImpl {
-+extern struct VDPAUDeviceImpl {
-
- VdpGetErrorString *GetErrorString;
- VdpGetProcAddress *GetProcAddress;
+-
+- VdpGetErrorString *GetErrorString;
+- VdpGetProcAddress *GetProcAddress;
+- VdpGetApiVersion *GetApiVersion;
+- VdpGetInformationString *GetInformationString;
+- VdpVideoSurfaceQueryCapabilities *VideoSurfaceQueryCapabilities;
+- VdpVideoSurfaceQueryGetPutBitsYCbCrCapabilities
+- *VideoSurfaceQueryGetPutBitsYCbCrCapabilities;
+- VdpOutputSurfaceQueryCapabilities *OutputSurfaceQueryCapabilities;
+- VdpOutputSurfaceQueryGetPutBitsNativeCapabilities
+- *OutputSurfaceQueryGetPutBitsNativeCapabilities;
+- VdpOutputSurfaceQueryPutBitsYCbCrCapabilities
+- *OutputSurfaceQueryPutBitsYCbCrCapabilities;
+- VdpBitmapSurfaceQueryCapabilities *BitmapSurfaceQueryCapabilities;
+- VdpDecoderQueryCapabilities *DecoderQueryCapabilities;
+- VdpVideoMixerQueryFeatureSupport *VideoMixerQueryFeatureSupport;
+- VdpVideoMixerQueryParameterSupport *VideoMixerQueryParameterSupport;
+- VdpVideoMixerQueryAttributeSupport *VideoMixerQueryAttributeSupport;
+- VdpVideoMixerQueryParameterValueRange *VideoMixerQueryParameterValueRange;
+- VdpVideoMixerQueryAttributeValueRange *VideoMixerQueryAttributeValueRange;
+-} VDPAUDeviceFunctions;
+-
+ /* Generic description structure */
+ typedef struct
+ {
diff --git a/nvidia-settings-390xx.spec b/nvidia-settings-390xx.spec
index 9689b3f..4260004 100644
--- a/nvidia-settings-390xx.spec
+++ b/nvidia-settings-390xx.spec
@@ -1,6 +1,6 @@
Name: nvidia-settings-390xx
-Version: 390.132
-Release: 2%{?dist}
+Version: 390.138
+Release: 1%{?dist}
Summary: Configure the NVIDIA 390xx series graphics driver
License: GPLv2+
@@ -8,8 +8,7 @@ URL:
https://download.nvidia.com/XFree86/nvidia-settings/
Source0: %{url}/nvidia-settings-%{version}.tar.bz2
Source1: nvidia-settings-user.desktop
Source2: nvidia-settings.appdata.xml
-#
https://github.com/NVIDIA/nvidia-settings/pull/47
-Patch0: gcc-10.patch
+Patch0:
https://github.com/NVIDIA/nvidia-settings/commit/a7c1f5fce6303a643fadff7d...
ExclusiveArch: i686 x86_64 armv7hl
@@ -127,6 +126,9 @@ appstream-util validate-relax --nonet
%{buildroot}%{_metainfodir}/*.appdata.xml
%changelog
+* Fri Jun 26 2020 Leigh Scott <leigh123linux(a)gmail.com> - 390.138-1
+- Update to 390.138
+
* Wed Feb 05 2020 RPM Fusion Release Engineering <leigh123linux(a)gmail.com> -
390.132-2
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
diff --git a/sources b/sources
index d1a4711..645acc5 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (nvidia-settings-390.132.tar.bz2) =
12553edc1a1ba9c3f578e0e921b25ec7114cbc80a55621cbd612a1bd85c9a518e221b30809058e4df5da6ae75ea7a1cd5c3d9c8f02a0898bc8c08ac9c22ccee3
+SHA512 (nvidia-settings-390.138.tar.bz2) =
6c54ff039840098c23f2091b4c33ab2b712ff90c16829c568bc39c9375cb2f4fb677bb5ab90efcf2034b15a1d93d13f1fbb40dde1d90092073af7d9f3c16de97