Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-9]: src/sys/arch/hp300/dev Pull up following revision(s) (request...
details: https://anonhg.NetBSD.org/src/rev/2a2e002fba29
branches: netbsd-9
changeset: 961474:2a2e002fba29
user: martin <martin%NetBSD.org@localhost>
date: Wed Apr 21 17:59:47 2021 +0000
description:
Pull up following revision(s) (requested by tsutsui in ticket #1248):
sys/arch/hp300/dev/topcat.c: revision 1.5
sys/arch/hp300/dev/diofb.c: revision 1.5
Fix two problems on old topcat(4) framebuffers found on HP332/340.
- Fix panic on monochrome framebuffers. They don't have palette registers.
The problem was reported from Anders Gustafsson and also Andrew Gillham
back in 2013:
https://mail-index.netbsd.org/port-hp300/2013/09/27/msg000086.html
https://mail-index.netbsd.org/port-hp300/2013/09/28/msg000087.html
- Fix incorrect framebuffer width of 98542/98544 framebuffers on HP332.
Reported from Andrew Gillham (98542) as above and Chris Hanson (98543):
https://mail-index.netbsd.org/port-hp300/2013/09/27/msg000083.html
https://mail-index.netbsd.org/port-hp300/2020/05/01/msg000164.html
Worth to pullup to netbsd-9.
diffstat:
sys/arch/hp300/dev/diofb.c | 11 ++++++++++-
sys/arch/hp300/dev/topcat.c | 15 +++++++++++++--
2 files changed, 23 insertions(+), 3 deletions(-)
diffs (70 lines):
diff -r fc4dcd6f7687 -r 2a2e002fba29 sys/arch/hp300/dev/diofb.c
--- a/sys/arch/hp300/dev/diofb.c Wed Apr 21 17:51:34 2021 +0000
+++ b/sys/arch/hp300/dev/diofb.c Wed Apr 21 17:59:47 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: diofb.c,v 1.4 2014/03/24 19:42:58 christos Exp $ */
+/* $NetBSD: diofb.c,v 1.4.34.1 2021/04/21 17:59:47 martin Exp $ */
/* $OpenBSD: diofb.c,v 1.18 2010/12/26 15:40:59 miod Exp $ */
/*
@@ -146,6 +146,15 @@
if (fb->dheight > fb->fbheight)
fb->dheight = fb->fbheight;
+ /*
+ * Some displays, such as the HP332 and HP340 internal video
+ * appear to return a display width of 1024 instead of 512.
+ */
+ if (fbr->num_planes == 1 || fbr->num_planes == 4) {
+ if (fb->dwidth == 1024 && fb->dheight == 400)
+ fb->dwidth = 512;
+ }
+
fb->planes = fbr->num_planes;
if (fb->planes > 8)
fb->planes = 8;
diff -r fc4dcd6f7687 -r 2a2e002fba29 sys/arch/hp300/dev/topcat.c
--- a/sys/arch/hp300/dev/topcat.c Wed Apr 21 17:51:34 2021 +0000
+++ b/sys/arch/hp300/dev/topcat.c Wed Apr 21 17:59:47 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: topcat.c,v 1.4 2011/02/18 19:15:43 tsutsui Exp $ */
+/* $NetBSD: topcat.c,v 1.4.64.1 2021/04/21 17:59:47 martin Exp $ */
/* $OpenBSD: topcat.c,v 1.15 2006/08/11 18:33:13 miod Exp $ */
/*
@@ -274,7 +274,10 @@
case GID_TOPCAT:
switch (sc->sc_fb->planes) {
case 1:
- fbname = "HP98544 topcat";
+ if (sc->sc_fb->dheight == 400)
+ fbname = "HP98542 topcat";
+ else
+ fbname = "HP98544 topcat";
break;
case 4:
if (sc->sc_fb->dheight == 400)
@@ -413,8 +416,12 @@
*(u_int *)data = fb->ri.ri_stride;
return 0;
case WSDISPLAYIO_GETCMAP:
+ if (fb->planemask == 1)
+ return EPASSTHROUGH;
return diofb_getcmap(fb, (struct wsdisplay_cmap *)data);
case WSDISPLAYIO_PUTCMAP:
+ if (fb->planemask == 1)
+ return EPASSTHROUGH;
return topcat_setcmap(fb, (struct wsdisplay_cmap *)data);
case WSDISPLAYIO_GVIDEO:
case WSDISPLAYIO_SVIDEO:
@@ -429,6 +436,10 @@
{
volatile struct tcboxfb *tc = (struct tcboxfb *)fb->regkva;
+ /* No color map registers on monochrome framebuffers. */
+ if (fb->planemask == 1)
+ return;
+
if (tc->regs.fbid != GID_TOPCAT) {
tccm_waitbusy(tc);
tc->plane_mask = 0xff;
Home |
Main Index |
Thread Index |
Old Index