CVS commit: src/sys/external/bsd/drm/dist/shared-core

2019-10-22 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Tue Oct 22 13:19:47 UTC 2019

Modified Files:
src/sys/external/bsd/drm/dist/shared-core: r128_drv.h

Log Message:
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 .

XXX There are probably more of these in the header.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/drm/dist/shared-core/r128_drv.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/bsd/drm/dist/shared-core/r128_drv.h
diff -u src/sys/external/bsd/drm/dist/shared-core/r128_drv.h:1.2 src/sys/external/bsd/drm/dist/shared-core/r128_drv.h:1.3
--- src/sys/external/bsd/drm/dist/shared-core/r128_drv.h:1.2	Thu Feb 24 07:59:44 2011
+++ src/sys/external/bsd/drm/dist/shared-core/r128_drv.h	Tue Oct 22 13:19:47 2019
@@ -277,7 +277,7 @@ extern long r128_compat_ioctl(struct fil
  */
 #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 @@ extern long r128_compat_ioctl(struct fil
 #	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



CVS commit: src/sys/external/bsd/drm/dist/shared-core

2019-10-22 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Tue Oct 22 13:19:47 UTC 2019

Modified Files:
src/sys/external/bsd/drm/dist/shared-core: r128_drv.h

Log Message:
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 .

XXX There are probably more of these in the header.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/drm/dist/shared-core/r128_drv.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm/dist/shared-core

2019-08-29 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Aug 30 03:34:37 UTC 2019

Modified Files:
src/sys/external/bsd/drm/dist/shared-core: radeon_cs.c

Log Message:
Delete dead-as-a-doornail-in-a-dead-horse branch.

If dev_priv is null here, you're hosed to begin with, so the apparent
null pointer dereference in this branch is moot; also this is the old
drm code that we should maybe just delete altogether...

Potential null pointer dereference reported by Dr Silvio Cesare of
InfoSect.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/bsd/drm/dist/shared-core/radeon_cs.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm/dist/shared-core

2019-08-29 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Aug 30 03:34:37 UTC 2019

Modified Files:
src/sys/external/bsd/drm/dist/shared-core: radeon_cs.c

Log Message:
Delete dead-as-a-doornail-in-a-dead-horse branch.

If dev_priv is null here, you're hosed to begin with, so the apparent
null pointer dereference in this branch is moot; also this is the old
drm code that we should maybe just delete altogether...

Potential null pointer dereference reported by Dr Silvio Cesare of
InfoSect.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/bsd/drm/dist/shared-core/radeon_cs.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/bsd/drm/dist/shared-core/radeon_cs.c
diff -u src/sys/external/bsd/drm/dist/shared-core/radeon_cs.c:1.2 src/sys/external/bsd/drm/dist/shared-core/radeon_cs.c:1.3
--- src/sys/external/bsd/drm/dist/shared-core/radeon_cs.c:1.2	Thu Oct 17 21:15:18 2013
+++ src/sys/external/bsd/drm/dist/shared-core/radeon_cs.c	Fri Aug 30 03:34:37 2019
@@ -148,11 +148,6 @@ int radeon_cs_ioctl(struct drm_device *d
 	cs_id = 0;
 	cs->cs_id = cs_id;
 
-	if (dev_priv == NULL) {
-		DRM_ERROR("called with no initialization\n");
-		DRM_SPINUNLOCK(_priv->cs.cs_mutex);
-		return -EINVAL;
-	}
 	if (!cs->num_chunks) {
 		DRM_SPINUNLOCK(_priv->cs.cs_mutex);
 		return 0;



CVS commit: src/sys/external/bsd/drm/dist/shared-core

2019-08-02 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Fri Aug  2 14:55:57 UTC 2019

Modified Files:
src/sys/external/bsd/drm/dist/shared-core: savage_state.c

Log Message:
Deal with gcc's "warning: this statement may fall through
[-Wimplicit-fallthrough=]" by adding the missing KNF FALLTHROUGH
comments.

christos@ approved.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/sys/external/bsd/drm/dist/shared-core/savage_state.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm/dist/shared-core

2019-08-02 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Fri Aug  2 14:55:57 UTC 2019

Modified Files:
src/sys/external/bsd/drm/dist/shared-core: savage_state.c

Log Message:
Deal with gcc's "warning: this statement may fall through
[-Wimplicit-fallthrough=]" by adding the missing KNF FALLTHROUGH
comments.

christos@ approved.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/sys/external/bsd/drm/dist/shared-core/savage_state.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/bsd/drm/dist/shared-core/savage_state.c
diff -u src/sys/external/bsd/drm/dist/shared-core/savage_state.c:1.4 src/sys/external/bsd/drm/dist/shared-core/savage_state.c:1.5
--- src/sys/external/bsd/drm/dist/shared-core/savage_state.c:1.4	Tue Jun 23 04:42:01 2009
+++ src/sys/external/bsd/drm/dist/shared-core/savage_state.c	Fri Aug  2 14:55:57 2019
@@ -297,6 +297,7 @@ static int savage_dispatch_dma_prim(drm_
 	case SAVAGE_PRIM_TRILIST_201:
 		reorder = 1;
 		prim = SAVAGE_PRIM_TRILIST;
+		/* FALLTHROUGH */
 	case SAVAGE_PRIM_TRILIST:
 		if (n % 3 != 0) {
 			DRM_ERROR("wrong number of vertices %u in TRILIST\n",
@@ -434,6 +435,7 @@ static int savage_dispatch_vb_prim(drm_s
 	case SAVAGE_PRIM_TRILIST_201:
 		reorder = 1;
 		prim = SAVAGE_PRIM_TRILIST;
+		/* FALLTHROUGH */
 	case SAVAGE_PRIM_TRILIST:
 		if (n % 3 != 0) {
 			DRM_ERROR("wrong number of vertices %u in TRILIST\n",
@@ -555,6 +557,7 @@ static int savage_dispatch_dma_idx(drm_s
 	case SAVAGE_PRIM_TRILIST_201:
 		reorder = 1;
 		prim = SAVAGE_PRIM_TRILIST;
+		/* FALLTHROUGH */
 	case SAVAGE_PRIM_TRILIST:
 		if (n % 3 != 0) {
 			DRM_ERROR("wrong number of indices %u in TRILIST\n", n);
@@ -693,6 +696,7 @@ static int savage_dispatch_vb_idx(drm_sa
 	case SAVAGE_PRIM_TRILIST_201:
 		reorder = 1;
 		prim = SAVAGE_PRIM_TRILIST;
+		/* FALLTHROUGH */
 	case SAVAGE_PRIM_TRILIST:
 		if (n % 3 != 0) {
 			DRM_ERROR("wrong number of indices %u in TRILIST\n", n);
@@ -1060,7 +1064,7 @@ int savage_bci_cmdbuf(struct drm_device 
 DMA_FLUSH();
 return -EINVAL;
 			}
-			/* fall through */
+			/* FALLTHROUGH */
 		case SAVAGE_CMD_DMA_PRIM:
 		case SAVAGE_CMD_VB_PRIM:
 			if (!first_draw_cmd)



Re: CVS commit: src/sys/external/bsd/drm/dist/shared-core

2014-09-07 Thread Cherry G. Mathew
Hi Matt,

This doesn't fix drm2 i915 breakage. Could you revisit this please, since
it's in external/ ?

Thanks,


On 5 September 2014 15:10, Matt Thomas m...@netbsd.org wrote:

 Module Name:src
 Committed By:   matt
 Date:   Fri Sep  5 09:40:44 UTC 2014

 Modified Files:
 src/sys/external/bsd/drm/dist/shared-core: i915_drv.h
 i915_suspend.c

 Log Message:
 Rename enum pipe to enum pipe so it won't conflcit with struct pipe.


 To generate a diff of this commit:
 cvs rdiff -u -r1.5 -r1.6
 src/sys/external/bsd/drm/dist/shared-core/i915_drv.h
 cvs rdiff -u -r1.6 -r1.7 \
 src/sys/external/bsd/drm/dist/shared-core/i915_suspend.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.




-- 
~~Cherry


Re: CVS commit: src/sys/external/bsd/drm/dist/shared-core

2014-09-06 Thread Matt Thomas

On Sep 6, 2014, at 12:28 PM, Cherry G. Mathew cherry.g.mat...@gmail.com wrote:

 Hi Matt,
 
 This doesn't fix drm2 i915 breakage. Could you revisit this please, since 
 it's in external/ ?
 
 Thanks,
 

If I revert, it still won't build.  So no.

i915 shouldn't be using enum pipe since it conflicts with struct pipe.