Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm/dist/shared-core When building r128drm(...



details:   https://anonhg.NetBSD.org/src/rev/3046e190b50a
branches:  trunk
changeset: 1004302:3046e190b50a
user:      hauke <hauke%NetBSD.org@localhost>
date:      Tue Oct 22 13:19:47 2019 +0000

description:
When building r128drm(4), gcc objects to shifting into bit 31 of a
(signed) int. Make sure we are shifting an unsigned in those cases.

See also <http://mail-index.netbsd.org/tech-x11/2019/08/01/msg002010.html>.

XXX There are probably more of these in the header.

diffstat:

 sys/external/bsd/drm/dist/shared-core/r128_drv.h |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (23 lines):

diff -r 42c80ad7eb26 -r 3046e190b50a sys/external/bsd/drm/dist/shared-core/r128_drv.h
--- a/sys/external/bsd/drm/dist/shared-core/r128_drv.h  Tue Oct 22 12:09:11 2019 +0000
+++ b/sys/external/bsd/drm/dist/shared-core/r128_drv.h  Tue Oct 22 13:19:47 2019 +0000
@@ -277,7 +277,7 @@
  */
 #define R128_PM4_BUFFER_OFFSET         0x0700
 #define R128_PM4_BUFFER_CNTL           0x0704
-#      define R128_PM4_MASK                    (15 << 28)
+#      define R128_PM4_MASK                    (15u << 28)
 #      define R128_PM4_NONPM4                  (0  << 28)
 #      define R128_PM4_192PIO                  (1  << 28)
 #      define R128_PM4_192BM                   (2  << 28)
@@ -286,8 +286,8 @@
 #      define R128_PM4_64PIO_128INDBM          (5  << 28)
 #      define R128_PM4_64BM_128INDBM           (6  << 28)
 #      define R128_PM4_64PIO_64VCBM_64INDBM    (7  << 28)
-#      define R128_PM4_64BM_64VCBM_64INDBM     (8  << 28)
-#      define R128_PM4_64PIO_64VCPIO_64INDPIO  (15 << 28)
+#      define R128_PM4_64BM_64VCBM_64INDBM     (8u  << 28)
+#      define R128_PM4_64PIO_64VCPIO_64INDPIO  (15u << 28)
 #      define R128_PM4_BUFFER_CNTL_NOUPDATE    (1  << 27)
 
 #define R128_PM4_BUFFER_WM_CNTL                0x0708



Home | Main Index | Thread Index | Old Index