diff options
author | Gordon Ross <gordon.w.ross@gmail.com> | 2016-12-31 18:07:58 -0500 |
---|---|---|
committer | Gordon Ross <gordon.w.ross@gmail.com> | 2017-01-04 00:07:54 -0500 |
commit | 554dcc660772c7f4a99cd82c7551a363c51a9ddf (patch) | |
tree | 7e5acb67289a01b61657acb8e14cf43b65a8b363 | |
parent | ea2e621b452709890c257314f9ef991f6ffda030 (diff) | |
download | illumos-gfx-drm-554dcc660772c7f4a99cd82c7551a363c51a9ddf.tar.gz |
7728 turn -Werror back on and fix warnings
Reviewed by: Toomas Soome <tsoome@me.com>
-rw-r--r-- | usr/src/Makefile.master | 2 | ||||
-rw-r--r-- | usr/src/cmd/drm-tests/Makefile.drm | 4 | ||||
-rw-r--r-- | usr/src/common/libdrm/Makefile.drm | 5 | ||||
-rw-r--r-- | usr/src/common/libdrm/patches/exynos.patch | 44 | ||||
-rw-r--r-- | usr/src/common/libdrm/patches/freedreno.patch | 18 | ||||
-rw-r--r-- | usr/src/common/libdrm/patches/intel-drm.patch | 13 |
6 files changed, 72 insertions, 14 deletions
diff --git a/usr/src/Makefile.master b/usr/src/Makefile.master index 94d9cca..bdffa0a 100644 --- a/usr/src/Makefile.master +++ b/usr/src/Makefile.master @@ -368,7 +368,7 @@ XSTRCONST= -xstrconst # # turn warnings into errors (C) -CERRWARN = -errtags=yes # -errwarn=%all +CERRWARN = -errtags=yes -errwarn=%all CERRWARN += -erroff=E_EMPTY_TRANSLATION_UNIT CERRWARN += -erroff=E_STATEMENT_NOT_REACHED diff --git a/usr/src/cmd/drm-tests/Makefile.drm b/usr/src/cmd/drm-tests/Makefile.drm index 32329b0..416c21d 100644 --- a/usr/src/cmd/drm-tests/Makefile.drm +++ b/usr/src/cmd/drm-tests/Makefile.drm @@ -23,3 +23,7 @@ ROOTCMDDIR=$(ROOT)/opt/drm-tests LIBUTIL32=$(SRC)/cmd/drm-tests/util/i386/libutil.a LIBUTIL64=$(SRC)/cmd/drm-tests/util/amd64/libutil.a + +# We don't really care about warnings in the tests. +CERRWARN += -_gcc=-Wno-parentheses +CERRWARN += -_gcc=-Wno-uninitialized diff --git a/usr/src/common/libdrm/Makefile.drm b/usr/src/common/libdrm/Makefile.drm index e8f4b42..a26cd51 100644 --- a/usr/src/common/libdrm/Makefile.drm +++ b/usr/src/common/libdrm/Makefile.drm @@ -26,7 +26,7 @@ ROOTLIBDIR64 = $(ROOT)/usr/lib/xorg/$(MACH64) CPPFLAGS += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -# Defines that would normally come from autoconf. ook through +# Defines that would normally come from autoconf. Look through # libdrm-$(LIBDRM_VERS)/config.h.in when updating libdrm to # check for new ones we might need to define. CPPFLAGS += -DHAVE_ALLOCA_H @@ -39,3 +39,6 @@ CPPFLAGS += -DMAJOR_IN_MKDEV CPPFLAGS += -I$(SRC)/uts/common \ -I$(SRC)/uts/common/drm \ -I$(LIBDRM_CMN_DIR)/include/drm + +# The libdrm code has lots of parentheses warnings. Suppress. +CERRWARN += -_gcc=-Wno-parentheses diff --git a/usr/src/common/libdrm/patches/exynos.patch b/usr/src/common/libdrm/patches/exynos.patch index 5d2f929..cff1c8f 100644 --- a/usr/src/common/libdrm/patches/exynos.patch +++ b/usr/src/common/libdrm/patches/exynos.patch @@ -1,6 +1,6 @@ -diff ... libdrm-2.4.71/exynos/exynos_drm.c ---- libdrm-2.4.71-ref/exynos/exynos_drm.c Thu Apr 21 09:40:06 2016 -+++ libdrm-2.4.71/exynos/exynos_drm.c Sat Nov 19 21:07:12 2016 +diff ... libdrm-2.4.73/exynos/exynos_drm.c +--- libdrm-2.4.73-ref/exynos/exynos_drm.c Wed Aug 24 12:57:39 2016 ++++ libdrm-2.4.73/exynos/exynos_drm.c Sat Dec 31 12:27:53 2016 @@ -35,7 +35,7 @@ #include <unistd.h> @@ -10,9 +10,9 @@ diff ... libdrm-2.4.71/exynos/exynos_drm.c #include <xf86drm.h> -diff ... libdrm-2.4.71/exynos/exynos_fimg2d.c ---- libdrm-2.4.71-ref/exynos/exynos_fimg2d.c Sun Jan 17 16:22:14 2016 -+++ libdrm-2.4.71/exynos/exynos_fimg2d.c Sat Nov 19 21:07:12 2016 +diff ... libdrm-2.4.73/exynos/exynos_fimg2d.c +--- libdrm-2.4.73-ref/exynos/exynos_fimg2d.c Wed Aug 24 12:57:39 2016 ++++ libdrm-2.4.73/exynos/exynos_fimg2d.c Sat Dec 31 17:52:27 2016 @@ -21,7 +21,7 @@ #include <assert.h> @@ -22,9 +22,35 @@ diff ... libdrm-2.4.71/exynos/exynos_fimg2d.c #include <xf86drm.h> -diff ... libdrm-2.4.71/tests/exynos/exynos_fimg2d_test.c ---- libdrm-2.4.71-ref/tests/exynos/exynos_fimg2d_test.c Sun Jan 17 16:22:14 2016 -+++ libdrm-2.4.71/tests/exynos/exynos_fimg2d_test.c Sat Nov 19 21:07:12 2016 +@@ -698,9 +698,10 @@ + if (negative) + negative = 1; + +- if (src_w == dst_w && src_h == dst_h) ++ if (src_w == dst_w && src_h == dst_h) { + scale = 0; +- else { ++ scale_x = scale_y = 0; /* GCC warnings */ ++ } else { + scale = 1; + scale_x = g2d_get_scaling(src_w, dst_w); + scale_y = g2d_get_scaling(src_h, dst_h); +@@ -920,9 +921,10 @@ + unsigned int scale, gem_space; + unsigned int scale_x, scale_y; + +- if (src_w == dst_w && src_h == dst_h) ++ if (src_w == dst_w && src_h == dst_h) { + scale = 0; +- else { ++ scale_x = scale_y = 0; /* GCC warnings */ ++ } else { + scale = 1; + scale_x = g2d_get_scaling(src_w, dst_w); + scale_y = g2d_get_scaling(src_h, dst_h); +diff ... libdrm-2.4.73/tests/exynos/exynos_fimg2d_test.c +--- libdrm-2.4.73-ref/tests/exynos/exynos_fimg2d_test.c Wed Aug 24 12:57:39 2016 ++++ libdrm-2.4.73/tests/exynos/exynos_fimg2d_test.c Sat Dec 31 12:27:53 2016 @@ -22,7 +22,7 @@ #include <unistd.h> diff --git a/usr/src/common/libdrm/patches/freedreno.patch b/usr/src/common/libdrm/patches/freedreno.patch index ebabc4b..622faac 100644 --- a/usr/src/common/libdrm/patches/freedreno.patch +++ b/usr/src/common/libdrm/patches/freedreno.patch @@ -1,5 +1,6 @@ ---- libdrm-2.4.70/freedreno/kgsl/kgsl_bo.c.orig 2016-09-14 01:56:02.447145494 +0200 -+++ libdrm-2.4.70/freedreno/kgsl/kgsl_bo.c 2016-09-14 01:57:13.859602672 +0200 +diff ... libdrm-2.4.73/freedreno/kgsl/kgsl_bo.c +--- libdrm-2.4.73-ref/freedreno/kgsl/kgsl_bo.c Wed Aug 24 12:57:41 2016 ++++ libdrm-2.4.73/freedreno/kgsl/kgsl_bo.c Sat Dec 31 12:27:53 2016 @@ -32,7 +32,12 @@ #include "kgsl_priv.h" @@ -13,3 +14,16 @@ static int set_memtype(struct fd_device *dev, uint32_t handle, uint32_t flags) { +diff ... libdrm-2.4.73/freedreno/kgsl/kgsl_ringbuffer.c +--- libdrm-2.4.73-ref/freedreno/kgsl/kgsl_ringbuffer.c Mon Nov 14 12:55:20 2016 ++++ libdrm-2.4.73/freedreno/kgsl/kgsl_ringbuffer.c Sat Dec 31 18:02:19 2016 +@@ -146,7 +146,8 @@ + ibdesc.gpuaddr = kgsl_ring->bo->gpuaddr; + ibdesc.hostptr = kgsl_ring->bo->hostptr; + ibdesc.sizedwords = 0x145; +- req.timestamp = (uint32_t)kgsl_ring->bo->hostptr; ++ /* This way to avoid GCC -Wpointer-to-int-cast */ ++ req.timestamp = (unsigned int) (unsigned long) kgsl_ring->bo->hostptr; + } + + do { diff --git a/usr/src/common/libdrm/patches/intel-drm.patch b/usr/src/common/libdrm/patches/intel-drm.patch index 7049f56..a621086 100644 --- a/usr/src/common/libdrm/patches/intel-drm.patch +++ b/usr/src/common/libdrm/patches/intel-drm.patch @@ -1,6 +1,6 @@ diff ... libdrm-2.4.73/intel/intel_bufmgr_gem.c --- libdrm-2.4.73-ref/intel/intel_bufmgr_gem.c Mon Nov 14 14:48:04 2016 -+++ libdrm-2.4.73/intel/intel_bufmgr_gem.c Mon Nov 28 14:37:11 2016 ++++ libdrm-2.4.73/intel/intel_bufmgr_gem.c Sat Dec 31 12:27:53 2016 @@ -3352,6 +3352,16 @@ static pthread_mutex_t bufmgr_list_mutex = PTHREAD_MUTEX_INITIALIZER; static drmMMListHead bufmgr_list = { &bufmgr_list, &bufmgr_list }; @@ -28,3 +28,14 @@ diff ... libdrm-2.4.73/intel/intel_bufmgr_gem.c atomic_inc(&bufmgr_gem->refcount); return bufmgr_gem; } +diff ... libdrm-2.4.73/intel/intel_decode.c +--- libdrm-2.4.73-ref/intel/intel_decode.c Wed Aug 24 12:57:39 2016 ++++ libdrm-2.4.73/intel/intel_decode.c Sat Dec 31 17:49:32 2016 +@@ -402,6 +402,7 @@ + format = "1555"; + break; + case 3: ++ default: /* Keep GCC happy. */ + format = "8888"; + break; + } |