Module Name: src Committed By: rin Date: Fri Jul 26 11:16:19 UTC 2019
Modified Files: src/sys/dev/rasops: rasops.c Log Message: Put back byte-wise copy to stop using memcpy, which does not work for device memory on some platforms. Pointed out by Jared, many thanks! To generate a diff of this commit: cvs rdiff -u -r1.91 -r1.92 src/sys/dev/rasops/rasops.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/dev/rasops/rasops.c diff -u src/sys/dev/rasops/rasops.c:1.91 src/sys/dev/rasops/rasops.c:1.92 --- src/sys/dev/rasops/rasops.c:1.91 Fri Jul 26 10:48:45 2019 +++ src/sys/dev/rasops/rasops.c Fri Jul 26 11:16:19 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops.c,v 1.91 2019/07/26 10:48:45 rin Exp $ */ +/* $NetBSD: rasops.c,v 1.92 2019/07/26 11:16:19 rin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.91 2019/07/26 10:48:45 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.92 2019/07/26 11:16:19 rin Exp $"); #include "opt_rasops.h" #include "rasops_glue.h" @@ -1186,12 +1186,21 @@ rasops_erasecols(void *cookie, int row, } } else { while (height--) { - memset(rp, clr, num); + dp = rp; DELTA(rp, ri->ri_stride, uint32_t *); if (ri->ri_hwbits) { - memset(hrp, clr, num); + hp = hrp; DELTA(hrp, ri->ri_stride, uint32_t *); } + + for (cnt = num; cnt; cnt--) { + *(uint8_t *)dp = clr; + DELTA(dp, 1, uint32_t *); + if (ri->ri_hwbits) { + *(uint8_t *)hp = clr; + DELTA(hp, 1, uint32_t *); + } + } } }