tech-x11 archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Building legacy DRM drivers on -current, and the fallout
All,
I need to build a kernel for a Thinkpad T23, which sports an S3 Savage.
Enabling the legacy DRM drivers on -current (and disabling the DRMKMS
ones) leads to fall-out for r128drm(4) and savagedrm(4):
# compile T23/r128_cce.o
/u/netbsd-builds/developer/i386/tools/bin/i486--netbsdelf-gcc
-msoft-float -mno-mmx -mno-sse -mno-avx -mindirect-branch=thunk
-mindirect-branch-register -ffreestanding -fno-zero-initialized-in-bss
-fno-delete-null-pointer-checks
/public/netbsd-developer/sys/external/bsd/drm/dist/shared-core/r128_cce.c:
In function 'r128_do_init_cce':
/public/netbsd-developer/sys/external/bsd/drm/dist/shared-core/r128_cce.c:415:2:
error: case label does not reduce to an integer constant
case R128_PM4_64BM_64VCBM_64INDBM:
^~~~
/public/netbsd-developer/sys/external/bsd/drm/dist/shared-core/r128_cce.c:416:2:
error: case label does not reduce to an integer constant
case R128_PM4_64PIO_64VCPIO_64INDPIO:
^~~~
*** Failed target: r128_cce.o
% /<8>dist/shared-core > egrep
'R128_PM4_64BM_64VCBM_64INDBM|R128_PM4_64PIO_64VCPIO_64INDPIO' *
r128_cce.c: (init->cce_mode != R128_PM4_64BM_64VCBM_64INDBM)) {
r128_cce.c: case R128_PM4_64BM_64VCBM_64INDBM:
r128_cce.c: case R128_PM4_64PIO_64VCPIO_64INDPIO:
r128_drv.h:# define R128_PM4_64BM_64VCBM_64INDBM (8 << 28)
r128_drv.h:# define R128_PM4_64PIO_64VCPIO_64INDPIO (15 << 28)
%
-- These look constant to me, and of integer type, so I am not sure what
gcc is trying to flag here, and what to do about it.
"savage_state.c", OTOH, triggered several "warning: this statement may
fall through [-Wimplicit-fallthrough=]". The attached patch deals with
that - the flagged fallthroughs look legit to me.
Okay to commit?
Cheerio,
hauke
--
The ASCII Ribbon Campaign Hauke Fath
() No HTML/RTF in email Institut für Nachrichtentechnik
/\ No Word docs in email TU Darmstadt
Respect for open standards Ruf +49-6151-16-21344
Index: savage_state.c
===================================================================
RCS file: /cvsroot/src/sys/external/bsd/drm/dist/shared-core/savage_state.c,v
retrieving revision 1.4
diff -u -u -r1.4 savage_state.c
--- savage_state.c 23 Jun 2009 04:42:01 -0000 1.4
+++ savage_state.c 22 Jul 2019 15:20:46 -0000
@@ -297,6 +297,7 @@
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 @@
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 @@
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 @@
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 @@
DMA_FLUSH();
return -EINVAL;
}
- /* fall through */
+ /* FALLTHROUGH */
case SAVAGE_CMD_DMA_PRIM:
case SAVAGE_CMD_VB_PRIM:
if (!first_draw_cmd)
Home |
Main Index |
Thread Index |
Old Index