diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2005-01-16 16:14:11 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2005-01-16 16:14:11 +0000 |
commit | 1c35d368e8eafbab2f43155306875a5fc879d035 (patch) | |
tree | 720c3a6fbc9a8ac5518cd309898c9a3c2b16e429 /sys/arch | |
parent | cb414a18f7738fc2d2a41903019f370ee2e3e66a (diff) |
Simplify diofb_fbinquire(), since in the only case where we need to know
the video registers size, this value can easily be computed from the standard
fb registers.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/hp300/dev/diofb.c | 11 | ||||
-rw-r--r-- | sys/arch/hp300/dev/diofbvar.h | 6 | ||||
-rw-r--r-- | sys/arch/hp300/dev/dvbox.c | 4 | ||||
-rw-r--r-- | sys/arch/hp300/dev/gbox.c | 4 | ||||
-rw-r--r-- | sys/arch/hp300/dev/hyper.c | 4 | ||||
-rw-r--r-- | sys/arch/hp300/dev/rbox.c | 4 | ||||
-rw-r--r-- | sys/arch/hp300/dev/topcat.c | 4 |
7 files changed, 17 insertions, 20 deletions
diff --git a/sys/arch/hp300/dev/diofb.c b/sys/arch/hp300/dev/diofb.c index 8930d3de62d..fbf8b3c8150 100644 --- a/sys/arch/hp300/dev/diofb.c +++ b/sys/arch/hp300/dev/diofb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: diofb.c,v 1.1 2005/01/14 22:39:25 miod Exp $ */ +/* $OpenBSD: diofb.c,v 1.2 2005/01/16 16:14:09 miod Exp $ */ /* * Copyright (c) 2005, Miodrag Vallat @@ -111,15 +111,14 @@ const struct wsdisplay_emulops diofb_emulops = { */ int -diofb_fbinquire(struct diofb *fb, int scode, struct diofbreg *fbr, int regsize) +diofb_fbinquire(struct diofb *fb, int scode, struct diofbreg *fbr) { - int fboff; + int fboff, regsize; if (ISIIOVA(fbr)) fb->regaddr = (caddr_t)IIOP(fbr); else fb->regaddr = dio_scodetopa(scode); - fb->regsize = regsize; if (fb->fbwidth == 0 || fb->fbheight == 0) { fb->fbwidth = (fbr->fbwmsb << 8) | fbr->fbwlsb; @@ -137,10 +136,10 @@ diofb_fbinquire(struct diofb *fb, int scode, struct diofbreg *fbr, int regsize) * of the framebuffer. Hence it is also implicitly * the size of the set. */ - fb->regsize = (int)fb->fbaddr; + regsize = (int)fb->fbaddr; fb->fbaddr += (int)fb->regaddr; fb->regkva = (caddr_t)fbr; - fb->fbkva = (caddr_t)fbr + fb->regsize; + fb->fbkva = (caddr_t)fbr + regsize; } else { /* * For DIO space we need to map the separate diff --git a/sys/arch/hp300/dev/diofbvar.h b/sys/arch/hp300/dev/diofbvar.h index 3cf1e88407d..e7b94801e29 100644 --- a/sys/arch/hp300/dev/diofbvar.h +++ b/sys/arch/hp300/dev/diofbvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: diofbvar.h,v 1.1 2005/01/14 22:39:25 miod Exp $ */ +/* $OpenBSD: diofbvar.h,v 1.2 2005/01/16 16:14:10 miod Exp $ */ /* * Copyright (c) 2005, Miodrag Vallat @@ -66,8 +66,6 @@ struct diofb { caddr_t fbkva; /* KVA of framebuffer */ caddr_t regaddr; /* control registers physaddr */ - int regsize; /* control registers size */ - caddr_t fbaddr; /* frame buffer physaddr */ int fbsize; /* frame buffer size */ @@ -116,7 +114,7 @@ struct diofb { void diofb_end_attach(void *, struct wsdisplay_accessops *, struct diofb *, int, int, const char *); -int diofb_fbinquire(struct diofb *, int, struct diofbreg *, int); +int diofb_fbinquire(struct diofb *, int, struct diofbreg *); void diofb_fbsetup(struct diofb *); void diofb_fontunpack(struct diofb *); diff --git a/sys/arch/hp300/dev/dvbox.c b/sys/arch/hp300/dev/dvbox.c index 6be9dbce31c..af49deb8b36 100644 --- a/sys/arch/hp300/dev/dvbox.c +++ b/sys/arch/hp300/dev/dvbox.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dvbox.c,v 1.2 2005/01/15 21:08:36 miod Exp $ */ +/* $OpenBSD: dvbox.c,v 1.3 2005/01/16 16:14:10 miod Exp $ */ /* * Copyright (c) 2005, Miodrag Vallat @@ -228,7 +228,7 @@ dvbox_reset(struct diofb *fb, int scode, struct diofbreg *fbr) int rc; int i; - if ((rc = diofb_fbinquire(fb, scode, fbr, 0x20000)) != 0) + if ((rc = diofb_fbinquire(fb, scode, fbr)) != 0) return (rc); fb->planes = 8; diff --git a/sys/arch/hp300/dev/gbox.c b/sys/arch/hp300/dev/gbox.c index d411452dbe3..3cdb00e407e 100644 --- a/sys/arch/hp300/dev/gbox.c +++ b/sys/arch/hp300/dev/gbox.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gbox.c,v 1.3 2005/01/15 21:19:42 miod Exp $ */ +/* $OpenBSD: gbox.c,v 1.4 2005/01/16 16:14:10 miod Exp $ */ /* * Copyright (c) 2005, Miodrag Vallat @@ -245,7 +245,7 @@ gbox_reset(struct diofb *fb, int scode, struct diofbreg *fbr) fb->fbheight = 1024; fb->dwidth = 1024; fb->dheight = 768; - if ((rc = diofb_fbinquire(fb, scode, fbr, 0x10000)) != 0) + if ((rc = diofb_fbinquire(fb, scode, fbr)) != 0) return (rc); /* diff --git a/sys/arch/hp300/dev/hyper.c b/sys/arch/hp300/dev/hyper.c index cbc7b20aa21..c39948f54dd 100644 --- a/sys/arch/hp300/dev/hyper.c +++ b/sys/arch/hp300/dev/hyper.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hyper.c,v 1.3 2005/01/16 00:16:07 miod Exp $ */ +/* $OpenBSD: hyper.c,v 1.4 2005/01/16 16:14:10 miod Exp $ */ /* * Copyright (c) 2005, Miodrag Vallat. @@ -184,7 +184,7 @@ hyper_reset(struct diofb *fb, int scode, struct diofbreg *fbr) volatile struct hyboxfb *hy = (struct hyboxfb *)fbr; int rc; - if ((rc = diofb_fbinquire(fb, scode, fbr, 0x20000)) != 0) + if ((rc = diofb_fbinquire(fb, scode, fbr)) != 0) return (rc); fb->planes = hy->num_planes; diff --git a/sys/arch/hp300/dev/rbox.c b/sys/arch/hp300/dev/rbox.c index 8646d8f179f..20f2d0bd50d 100644 --- a/sys/arch/hp300/dev/rbox.c +++ b/sys/arch/hp300/dev/rbox.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rbox.c,v 1.2 2005/01/15 21:08:37 miod Exp $ */ +/* $OpenBSD: rbox.c,v 1.3 2005/01/16 16:14:10 miod Exp $ */ /* * Copyright (c) 2005, Miodrag Vallat @@ -228,7 +228,7 @@ rbox_reset(struct diofb *fb, int scode, struct diofbreg *fbr) int rc; int i; - if ((rc = diofb_fbinquire(fb, scode, fbr, 0x20000)) != 0) + if ((rc = diofb_fbinquire(fb, scode, fbr)) != 0) return (rc); fb->planes = 8; diff --git a/sys/arch/hp300/dev/topcat.c b/sys/arch/hp300/dev/topcat.c index c478c09228e..7680d60638b 100644 --- a/sys/arch/hp300/dev/topcat.c +++ b/sys/arch/hp300/dev/topcat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: topcat.c,v 1.2 2005/01/15 21:08:37 miod Exp $ */ +/* $OpenBSD: topcat.c,v 1.3 2005/01/16 16:14:10 miod Exp $ */ /* * Copyright (c) 2005, Miodrag Vallat. @@ -283,7 +283,7 @@ topcat_reset(struct diofb *fb, int scode, struct diofbreg *fbr) volatile struct tcboxfb *tc = (struct tcboxfb *)fbr; int rc; - if ((rc = diofb_fbinquire(fb, scode, fbr, 0x10000)) != 0) + if ((rc = diofb_fbinquire(fb, scode, fbr)) != 0) return (rc); fb->planes = tc->num_planes; |