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/hp300/dev/diofb.c | |
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/hp300/dev/diofb.c')
-rw-r--r-- | sys/arch/hp300/dev/diofb.c | 11 |
1 files changed, 5 insertions, 6 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 |