NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/48528: wsfb/genfb - display dramatically off center if GENFB_SHADOWFB is enabled
The following reply was made to PR kern/48528; it has been noted by GNATS.
From: Nat Sloss <nathanialsloss%yahoo.com.au@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: Martin Husemann <martin%duskware.de@localhost>
Subject: Re: kern/48528: wsfb/genfb - display dramatically off center if
GENFB_SHADOWFB is enabled
Date: Sat, 18 Jan 2014 14:08:07 +1100
On Sat, 18 Jan 2014 10:20:00 AM you wrote:
> The following reply was made to PR kern/48528; it has been noted by GNATS.
>
> From: Nat Sloss <nathanialsloss%yahoo.com.au@localhost>
> To: gnats-bugs%netbsd.org@localhost
> Cc: Martin Husemann <martin%duskware.de@localhost>
> Subject: Re: kern/48528: wsfb/genfb - display dramatically off center if
> GENFB_SHADOWFB is enabled Date: Sat, 18 Jan 2014 10:16:00 +1100
>
> > > + rasops_init(ri, sc->sc_height / 8, sc->sc_width / 8);
> >
> > Isn't the divisor display mode depend?
> > Even if it is static (for now), it may be better to express it as such.
> >
> > Martin
>
> My understanding is that by using the lowest font height and width in
> sthis case eight pixels, rasops_reconfig adjusts the rows and columns
> based on screen width, height and font size once fonts have been
> initialized.
>
> So rasops_init should be called with the largest possible number of rows
> and columns for the largest possible screen size.
>
> As yet I have not found a define for the smallest font height and width,
> but I'm still looking. :)
>
I've found the cause for the problem ri_bits accumulates on calling
raspos_reconfig because RI_CFGDONE is set. So this alternate patch also
works:
Index: src/sys/dev/wsfb/genfb.c
===================================================================
RCS file: /cvsroot/src/sys/dev/wsfb/genfb.c,v
retrieving revision 1.51
diff -u -r1.51 genfb.c
--- src/sys/dev/wsfb/genfb.c 9 Oct 2013 17:20:54 -0000 1.51
+++ src/sys/dev/wsfb/genfb.c 18 Jan 2014 02:58:33 -0000
@@ -547,6 +547,14 @@
rasops_init(ri, 0, 0);
ri->ri_caps = WSSCREEN_WSCOLORS;
+#ifdef GENFB_SHADOWFB
+ if (sc->sc_shadowfb != NULL) {
+
+ ri->ri_hwbits = (char *)sc->sc_fbaddr;
+ ri->ri_bits = (char *)sc->sc_shadowfb;
+ }
+#endif
+
rasops_reconfig(ri, sc->sc_height / ri->ri_font->fontheight,
sc->sc_width / ri->ri_font->fontwidth);
Regards,
Nat.
Home |
Main Index |
Thread Index |
Old Index