[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#134014: bterm causes split screen



On Sun, Mar 17, 2002 at 11:31:09AM -0500, Daniel Jacobowitz wrote:
> On Sun, Mar 17, 2002 at 08:48:44PM +0900, Junichi Uekawa wrote:
> > "Chris Tillman" <tillman@voicetrak.com> cum veritate scripsit:
> > 
> > > reassign 134014 bterm
> > > quit
> > > 
> > > I verified the problem also occurs with the same video monitor using 
> > > a different computer (9500). 
> > 
> > I haven't seen the split-screen effect directly so I do not exactly 
> > know, but it sounds most likely that the framebuffer driver is at 
> > fault. 
> 
> Maybe, maybe not.  Chris, two things: can you reproduce this without
> the boot-floppies (just running bterm, but booting that kernel with the
> same settings)?  And does this patch make a difference?  I think it
> should.
>

The patch works! Thanks Dan! 

It also helps the appearance because it's sized properly now.

Adam, we need a new bterm to come in for the next build to fix this.

> Index: bogl.c
> ===================================================================
> RCS file: /opt/local/cvs/bogl/bogl.c,v
> retrieving revision 1.3
> diff -u -p -r1.3 bogl.c
> --- bogl.c	2001/12/01 17:14:20	1.3
> +++ bogl.c	2002/03/17 16:30:30
> @@ -39,6 +39,11 @@
>  #include <sys/types.h>
>  #include <termios.h>
>  #include <unistd.h>
> +
> +/* Yes, I know, we shouldn't be including headers from the kernel.  But
> +   XFree86 also uses this one (to get PAGE_MASK) so it's probably safe.  */
> +#include <asm/page.h>
> +
>  #include "bogl.h"
>  #include "boglP.h"
>  #if BOGL_VGA16_FB
> @@ -85,6 +90,9 @@ static __u16 saved_blue[16];
>  
>  static int gray;		/* Convert colors to grayscale? */
>  
> +static char *bogl_frame_mapped;	/* Page aligned, while bogl_frame might
> +				   not be.  */
> +
>  /* Functions. */
>  
>  static size_t init_fb (void);
> @@ -101,6 +109,7 @@ static struct fb_fix_screeninfo fb_fix;
>  int
>  bogl_init (void)
>  {
> +  unsigned long bogl_frame_offset, bogl_frame_len;
>    struct fb_var_screeninfo fb_var;
>    struct vt_stat vts;
>  
> @@ -151,10 +160,17 @@ bogl_init (void)
>    if (!init_fb())
>      return 0;
>  
> -  bogl_frame = mmap (NULL, fb_fix.smem_len, PROT_READ | PROT_WRITE, MAP_SHARED, fb, 0);
> -  if (bogl_frame == NULL || bogl_frame == (char *) -1)
> +  bogl_frame_offset = fb_fix.smem_start & ~PAGE_MASK;
> +  bogl_frame_len = ((bogl_frame_offset + fb_fix.smem_len + ~PAGE_MASK)
> +		    & PAGE_MASK);
> +
> +  bogl_frame_mapped
> +    = mmap (NULL, bogl_frame_len, PROT_READ | PROT_WRITE, MAP_SHARED, fb, 0);
> +  if (bogl_frame_mapped == NULL || bogl_frame_mapped == (char *) -1)
>       return bogl_fail ("mmaping /dev/fb0: %s", strerror (errno));
> -  
> +
> +  bogl_frame = bogl_frame_mapped + bogl_frame_offset;
> +
>    kbd_init ();
>  
>    if (visual == FB_VISUAL_PSEUDOCOLOR
> 
> 
> -- 
> Daniel Jacobowitz                           Carnegie Mellon University
> MontaVista Software                         Debian GNU/Linux Developer
> 

-- 
*------v--------- Installing Debian GNU/Linux 3.0 --------v------*
|      <http://www.debian.org/releases/woody/installmanual>      |
|   debian-imac (potato): <http://debian-imac.sourceforge.net>   |
|            Chris Tillman        tillman@voicetrak.com          |
|                   May the Source be with you                   |
*----------------------------------------------------------------*



Reply to: