All of lore.kernel.org
 help / color / mirror / Atom feed
* scrollmode selection problem
@ 2005-12-12 17:38 Knut Petersen
  2005-12-13  0:36 ` Antonino A. Daplas
  2005-12-13 11:07 ` Geert Uytterhoeven
  0 siblings, 2 replies; 7+ messages in thread
From: Knut Petersen @ 2005-12-12 17:38 UTC (permalink / raw)
  To: linux-fbdev-devel

Have a look at the following problem:

framebuffer memory size is 8MB
xres is 800, yres is 600, bpp is 8.
xres_virtual is 1024, yres_virtual is 8192.
font dimensions 8x16

check_var() and set_par() are called, set_par() decides that ywrap
scrolling is possible and sets FBINFO_HWACCEL_YWRAP.

Well, that decision is _wrong_  as  600/16 results in a 37 line display
height, 8 pixel lines at the bottom are unused. But they are displayed,
and obviously they contain garbage as YWRAP scrolling is selected by
updatescrollmode().

As the driver does know nothing about fonts, the obvious place to
change is updatescrollmode().

        int good_wrap = (cap & FBINFO_HWACCEL_YWRAP) &&
                divides(ywrap, vc->vc_font.height) &&
                divides(vc->vc_font.height, vyres) &&
                divides(vc->vc_font.height, yres);

would be a solution, but I don´t like it. There is no real reason that 
ywrap
scrolling should be disallowed when divides(vc->vc_font.height, vyres)
or divides(vc->vc_font.height, yres) are false ... only limitations of the
fbcon scrolling code.

Has someone already written code to remove that limitation?

cu,
 Knut



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: scrollmode selection problem
  2005-12-12 17:38 scrollmode selection problem Knut Petersen
@ 2005-12-13  0:36 ` Antonino A. Daplas
  2005-12-13 11:07 ` Geert Uytterhoeven
  1 sibling, 0 replies; 7+ messages in thread
From: Antonino A. Daplas @ 2005-12-13  0:36 UTC (permalink / raw)
  To: linux-fbdev-devel; +Cc: Knut Petersen

Knut Petersen wrote:
> Have a look at the following problem:
> 
> framebuffer memory size is 8MB
> xres is 800, yres is 600, bpp is 8.
> xres_virtual is 1024, yres_virtual is 8192.
> font dimensions 8x16
> 
> check_var() and set_par() are called, set_par() decides that ywrap
> scrolling is possible and sets FBINFO_HWACCEL_YWRAP.
> 
> Well, that decision is _wrong_  as  600/16 results in a 37 line display
> height, 8 pixel lines at the bottom are unused. But they are displayed,
> and obviously they contain garbage as YWRAP scrolling is selected by
> updatescrollmode().

I agree.

> 
> As the driver does know nothing about fonts, the obvious place to
> change is updatescrollmode().
> 
>        int good_wrap = (cap & FBINFO_HWACCEL_YWRAP) &&
>                divides(ywrap, vc->vc_font.height) &&
>                divides(vc->vc_font.height, vyres) &&
>                divides(vc->vc_font.height, yres);
> 
> would be a solution, but I don´t like it. There is no real reason that

It's a solution, and the correct one with the current code.

> ywrap
> scrolling should be disallowed when divides(vc->vc_font.height, vyres)
> or divides(vc->vc_font.height, yres) are false ... only limitations of the
> fbcon scrolling code.
> 
> Has someone already written code to remove that limitation?

None that I know of. Unfortunately, there's only a sprinkling of hardware
that supports ywrap, so you're the best bet to do that (hint, hint :-) 

Tony


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: scrollmode selection problem
  2005-12-12 17:38 scrollmode selection problem Knut Petersen
  2005-12-13  0:36 ` Antonino A. Daplas
@ 2005-12-13 11:07 ` Geert Uytterhoeven
  2005-12-13 12:28   ` Knut Petersen
  1 sibling, 1 reply; 7+ messages in thread
From: Geert Uytterhoeven @ 2005-12-13 11:07 UTC (permalink / raw)
  To: Linux Frame Buffer Device Development

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: TEXT/PLAIN; charset=UTF-8, Size: 1701 bytes --]

On Mon, 12 Dec 2005, Knut Petersen wrote:
> Have a look at the following problem:
> 
> framebuffer memory size is 8MB
> xres is 800, yres is 600, bpp is 8.
> xres_virtual is 1024, yres_virtual is 8192.
> font dimensions 8x16
> 
> check_var() and set_par() are called, set_par() decides that ywrap
> scrolling is possible and sets FBINFO_HWACCEL_YWRAP.
> 
> Well, that decision is _wrong_  as  600/16 results in a 37 line display
> height, 8 pixel lines at the bottom are unused. But they are displayed,
> and obviously they contain garbage as YWRAP scrolling is selected by
> updatescrollmode().
> 
> As the driver does know nothing about fonts, the obvious place to
> change is updatescrollmode().
> 
>        int good_wrap = (cap & FBINFO_HWACCEL_YWRAP) &&
>                divides(ywrap, vc->vc_font.height) &&
>                divides(vc->vc_font.height, vyres) &&
>                divides(vc->vc_font.height, yres);
> 
> would be a solution, but I don´t like it. There is no real reason that ywrap
> scrolling should be disallowed when divides(vc->vc_font.height, vyres)
> or divides(vc->vc_font.height, yres) are false ... only limitations of the
> fbcon scrolling code.
> 
> Has someone already written code to remove that limitation?

This used to work fine (garbage in borders was cleared when fbcon did
pan/wrap), so I consider it a regression.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: scrollmode selection problem
  2005-12-13 11:07 ` Geert Uytterhoeven
@ 2005-12-13 12:28   ` Knut Petersen
  2005-12-13 12:35     ` Geert Uytterhoeven
  2005-12-13 16:04     ` Antonino A. Daplas
  0 siblings, 2 replies; 7+ messages in thread
From: Knut Petersen @ 2005-12-13 12:28 UTC (permalink / raw)
  To: linux-fbdev-devel


>This used to work fine (garbage in borders was cleared when fbcon did
>pan/wrap), so I consider it a regression.
>
>  
>
Well, it definitely is broken. If you don´t have a quick fix, we should 
disable
that code path for 2.6.15 as I suggested.

Our goal should be

       int good_wrap = (cap & FBINFO_HWACCEL_YWRAP) &&
               divides(ywrap, vc->vc_font.height) &&
-               divides(vc->vc_font.height, vyres) &&
-               divides(vc->vc_font.height, yres);
 

for one of the next releases.

cu,
 Knut



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: scrollmode selection problem
  2005-12-13 12:28   ` Knut Petersen
@ 2005-12-13 12:35     ` Geert Uytterhoeven
  2005-12-13 16:04     ` Antonino A. Daplas
  1 sibling, 0 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2005-12-13 12:35 UTC (permalink / raw)
  To: Linux Frame Buffer Device Development

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1028 bytes --]

On Tue, 13 Dec 2005, Knut Petersen wrote:
> > This used to work fine (garbage in borders was cleared when fbcon did
> > pan/wrap), so I consider it a regression.
> > 
> >  
> Well, it definitely is broken. If you don´t have a quick fix, we should
> disable
> that code path for 2.6.15 as I suggested.
> 
> Our goal should be
> 
>       int good_wrap = (cap & FBINFO_HWACCEL_YWRAP) &&
>               divides(ywrap, vc->vc_font.height) &&
> -               divides(vc->vc_font.height, vyres) &&
> -               divides(vc->vc_font.height, yres);
> 
> 
> for one of the next releases.

You're right, I was confused with ypan. Upon more reflections, for ywrap, it
probably never worked before.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: scrollmode selection problem
  2005-12-13 12:28   ` Knut Petersen
  2005-12-13 12:35     ` Geert Uytterhoeven
@ 2005-12-13 16:04     ` Antonino A. Daplas
  2005-12-13 16:09       ` Antonino A. Daplas
  1 sibling, 1 reply; 7+ messages in thread
From: Antonino A. Daplas @ 2005-12-13 16:04 UTC (permalink / raw)
  To: linux-fbdev-devel

Knut Petersen wrote:
> 
>> This used to work fine (garbage in borders was cleared when fbcon did
>> pan/wrap), so I consider it a regression.
>>
>>  
>>
> Well, it definitely is broken. If you don´t have a quick fix, we should
> disable
> that code path for 2.6.15 as I suggested.

What if you insert

	fbcon_clear_margins(vc, 1);

after
	ops->update_start(info);

in ywrap_up() and ywrap_down() inf fbcon.c?

Tony 


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: scrollmode selection problem
  2005-12-13 16:04     ` Antonino A. Daplas
@ 2005-12-13 16:09       ` Antonino A. Daplas
  0 siblings, 0 replies; 7+ messages in thread
From: Antonino A. Daplas @ 2005-12-13 16:09 UTC (permalink / raw)
  To: Antonino A. Daplas; +Cc: linux-fbdev-devel

Antonino A. Daplas wrote:
> Knut Petersen wrote:
>>> This used to work fine (garbage in borders was cleared when fbcon did
>>> pan/wrap), so I consider it a regression.
>>>
>>>  
>>>
>> Well, it definitely is broken. If you don´t have a quick fix, we should
>> disable
>> that code path for 2.6.15 as I suggested.
> 
> What if you insert
> 
> 	fbcon_clear_margins(vc, 1);
> 
> after
> 	ops->update_start(info);
> 
> in ywrap_up() and ywrap_down() inf fbcon.c?

Forget this, it won't work. ops->clear_margins will need to be
rewritten so it recognizes when it's in the ywrap boundary.

Tony


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-12-13 16:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-12 17:38 scrollmode selection problem Knut Petersen
2005-12-13  0:36 ` Antonino A. Daplas
2005-12-13 11:07 ` Geert Uytterhoeven
2005-12-13 12:28   ` Knut Petersen
2005-12-13 12:35     ` Geert Uytterhoeven
2005-12-13 16:04     ` Antonino A. Daplas
2005-12-13 16:09       ` Antonino A. Daplas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.