Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/amiga/dev Fixed bug in wsdisplay copyrows textop.
details: https://anonhg.NetBSD.org/src/rev/673a2db78638
branches: trunk
changeset: 341673:673a2db78638
user: phx <phx%NetBSD.org@localhost>
date: Mon Nov 16 21:24:06 2015 +0000
description:
Fixed bug in wsdisplay copyrows textop.
Fixed WSDISPLAYIO_SVIDEO, which had inverted functionality.
Improved FBINFO setup. 15 and 16 bits depth both have 16bpp now.
diffstat:
sys/arch/amiga/dev/grf_cv.c | 26 ++++++++++++++------------
sys/arch/amiga/dev/grf_cv3d.c | 28 +++++++++++++++-------------
2 files changed, 29 insertions(+), 25 deletions(-)
diffs (184 lines):
diff -r 5f75e2bcb530 -r 673a2db78638 sys/arch/amiga/dev/grf_cv.c
--- a/sys/arch/amiga/dev/grf_cv.c Mon Nov 16 21:14:51 2015 +0000
+++ b/sys/arch/amiga/dev/grf_cv.c Mon Nov 16 21:24:06 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: grf_cv.c,v 1.58 2015/11/12 12:01:53 phx Exp $ */
+/* $NetBSD: grf_cv.c,v 1.59 2015/11/16 21:24:06 phx Exp $ */
/*
* Copyright (c) 1995 Michael Teske
@@ -33,7 +33,7 @@
#include "opt_amigacons.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: grf_cv.c,v 1.58 2015/11/12 12:01:53 phx Exp $");
+__KERNEL_RCSID(0, "$NetBSD: grf_cv.c,v 1.59 2015/11/16 21:24:06 phx Exp $");
#include "grfcv.h"
#include "ite.h"
@@ -543,8 +543,10 @@
gp->g_defaultscr = &cv_defaultscreen;
gp->g_scrlist = &cv_screenlist;
#else
+#if NITE > 0
grfcv_iteinit(gp);
#endif
+#endif /* NWSDISPLAY > 0 */
(void)cv_load_mon(gp, &cvconsole_mode);
#endif
}
@@ -2387,7 +2389,7 @@
gp = scr->scr_cookie;
src = dst = gp->g_fbkva;
n = ri->ri_cols * nrows;
- if (src < dst) {
+ if (srcrow < dstrow) {
/* need to copy backwards */
src += gp->g_rowoffset[srcrow + nrows] << 1;
dst += gp->g_rowoffset[dstrow + nrows] << 1;
@@ -2485,7 +2487,7 @@
return 0;
case WSDISPLAYIO_SVIDEO:
- return cv_blank(gp, *(u_int *)data == WSDISPLAYIO_VIDEO_OFF);
+ return cv_blank(gp, *(u_int *)data == WSDISPLAYIO_VIDEO_ON);
case WSDISPLAYIO_SMODE:
if ((*(int *)data) != gp->g_wsmode) {
@@ -2525,34 +2527,34 @@
md = monitor_current;
abits = 0;
- fbi->fbi_width = md->disp_width;
- fbi->fbi_height = md->disp_height;
- fbi->fbi_bitsperpixel = md->depth;
-
switch (md->depth) {
case 8:
- fbi->fbi_stride = md->disp_width;
+ fbi->fbi_bitsperpixel = 8;
rbits = gbits = bbits = 6; /* keep gcc happy */
break;
case 15:
- fbi->fbi_stride = md->disp_width * 2;
+ fbi->fbi_bitsperpixel = 16;
rbits = gbits = bbits = 5;
break;
case 16:
- fbi->fbi_stride = md->disp_width * 2;
+ fbi->fbi_bitsperpixel = 16;
rbits = bbits = 5;
gbits = 6;
break;
case 32:
abits = 8;
case 24:
- fbi->fbi_stride = md->disp_width * 4;
+ fbi->fbi_bitsperpixel = 32;
rbits = gbits = bbits = 8;
break;
default:
return EINVAL;
}
+ fbi->fbi_stride = (fbi->fbi_bitsperpixel / 8) * md->disp_width;
+ fbi->fbi_width = md->disp_width;
+ fbi->fbi_height = md->disp_height;
+
if (md->depth > 8) {
fbi->fbi_pixeltype = WSFB_RGB;
fbi->fbi_subtype.fbi_rgbmasks.red_offset = bbits + gbits;
diff -r 5f75e2bcb530 -r 673a2db78638 sys/arch/amiga/dev/grf_cv3d.c
--- a/sys/arch/amiga/dev/grf_cv3d.c Mon Nov 16 21:14:51 2015 +0000
+++ b/sys/arch/amiga/dev/grf_cv3d.c Mon Nov 16 21:24:06 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: grf_cv3d.c,v 1.32 2015/11/12 12:01:53 phx Exp $ */
+/* $NetBSD: grf_cv3d.c,v 1.33 2015/11/16 21:24:06 phx Exp $ */
/*
* Copyright (c) 1995 Michael Teske
@@ -33,11 +33,11 @@
#include "opt_amigacons.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: grf_cv3d.c,v 1.32 2015/11/12 12:01:53 phx Exp $");
+__KERNEL_RCSID(0, "$NetBSD: grf_cv3d.c,v 1.33 2015/11/16 21:24:06 phx Exp $");
+#include "grfcv3d.h"
#include "ite.h"
#include "wsdisplay.h"
-#include "grfcv3d.h"
#if NGRFCV3D > 0
/*
@@ -493,7 +493,9 @@
gp->g_defaultscr = &cv3d_defaultscreen;
gp->g_scrlist = &cv3d_screenlist;
#else
+#if NITE > 0
grfcv3d_iteinit(gp);
+#endif
#endif /* NWSDISPLAY > 0 */
(void)cv3d_load_mon(gp, &cv3dconsole_mode);
#endif
@@ -2242,7 +2244,7 @@
gp = scr->scr_cookie;
src = dst = gp->g_fbkva;
n = ri->ri_cols * nrows;
- if (src < dst) {
+ if (srcrow < dstrow) {
/* need to copy backwards */
src += gp->g_rowoffset[srcrow + nrows] << 1;
dst += gp->g_rowoffset[dstrow + nrows] << 1;
@@ -2340,7 +2342,7 @@
return 0;
case WSDISPLAYIO_SVIDEO:
- return cv3d_blank(gp, *(u_int *)data == WSDISPLAYIO_VIDEO_OFF);
+ return cv3d_blank(gp, *(u_int *)data == WSDISPLAYIO_VIDEO_ON);
case WSDISPLAYIO_SMODE:
if ((*(int *)data) != gp->g_wsmode) {
@@ -2380,34 +2382,34 @@
md = monitor_current;
abits = 0;
- fbi->fbi_width = md->disp_width;
- fbi->fbi_height = md->disp_height;
- fbi->fbi_bitsperpixel = md->depth;
-
switch (md->depth) {
case 8:
- fbi->fbi_stride = md->disp_width;
+ fbi->fbi_bitsperpixel = 8;
rbits = gbits = bbits = 6; /* keep gcc happy */
break;
case 15:
- fbi->fbi_stride = md->disp_width * 2;
+ fbi->fbi_bitsperpixel = 16;
rbits = gbits = bbits = 5;
break;
case 16:
- fbi->fbi_stride = md->disp_width * 2;
+ fbi->fbi_bitsperpixel = 16;
rbits = bbits = 5;
gbits = 6;
break;
case 32:
abits = 8;
case 24:
- fbi->fbi_stride = md->disp_width * 4;
+ fbi->fbi_bitsperpixel = 32;
rbits = gbits = bbits = 8;
break;
default:
return EINVAL;
}
+ fbi->fbi_stride = (fbi->fbi_bitsperpixel / 8) * md->disp_width;
+ fbi->fbi_width = md->disp_width;
+ fbi->fbi_height = md->disp_height;
+
if (md->depth > 8) {
fbi->fbi_pixeltype = WSFB_RGB;
fbi->fbi_subtype.fbi_rgbmasks.red_offset = bbits + gbits;
Home |
Main Index |
Thread Index |
Old Index