From: David Eger <hidden> Date: 2004-06-03 02:44:49
Dear Thomas,
The following patch updates sisfb for the new fb accel capabilities
patch I'm sending upstream. By default, this patch will rely on your
copyarea() and fillrect() accel functions instead of the panning.
Please test the core patch + this patch, and let me know your console
works. I'm interested to hear what speeds you see :-)
Also, using fbset to turn acceleration on and off ought to work, though
i still think this is better done via sysfs... just don't have time to
learn that ATM...
-dte
sisfb: update to new fbinfo.flags accel capabilities
Signed-off-by: David Eger <redacted>
# drivers/video/sis/sis_main.h
# 2004/06/02 22:49:50+02:00 eger@rosencrantz.theboonies.us +1 -1
# get rid of referece to setup variable
#
# drivers/video/sis/sis_main.c
# 2004/06/02 22:49:49+02:00 eger@rosencrantz.theboonies.us +33 -35
# migrate to new fbinfo->flags hwaccel semantics;
#
# get rid of attempt to do "wrap" in pan_display,
# as the code doesn't seem to indicate it actually ever worked.
# wrap is just a weird amiga thing anyways ;-)
#
# drivers/video/sis/sis_accel.h
# 2004/06/02 22:49:49+02:00 eger@rosencrantz.theboonies.us +0 -1
# get rid of referece to setup variable
#
# drivers/video/sis/sis_accel.c
# 2004/06/02 22:49:49+02:00 eger@rosencrantz.theboonies.us +0 -1
# get rid of referece to setup variable
#
diff -Nru a/drivers/video/sis/sis_accel.c b/drivers/video/sis/sis_accel.c
--- a/drivers/video/sis/sis_accel.c Wed Jun 2 22:51:34 2004+++ b/drivers/video/sis/sis_accel.c Wed Jun 2 22:51:34 2004
--- a/drivers/video/sis/sis_main.h Wed Jun 2 22:51:34 2004+++ b/drivers/video/sis/sis_main.h Wed Jun 2 22:51:34 2004
@@ -402,7 +402,7 @@staticintsisfb_fstn=0;VGA_ENGINEsisvga_engine=UNKNOWN_VGA;-intsisfb_accel=-1;+staticintsisfb_accel=-1;/* synced to !(info.flags & FBINFO_HWACCEL_DISABLED *//* These are to adapted according to VGA_ENGINE type */staticintsisfb_hwcursor_size=0;-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
From: Thomas Winischhofer <thomas@winischhofer.net> Date: 2004-06-03 09:54:05
David,
David Eger wrote:
Dear Thomas,
The following patch updates sisfb for the new fb accel capabilities
patch I'm sending upstream. By default, this patch will rely on your
copyarea() and fillrect() accel functions instead of the panning.
Could you give me any hint why this should be faster than panning?
Frankly, I don't think that's a good idea... panning is by far the
fastest of all scrollmodes, especially when the virtual screen is much
larger than the visible area. sisfb (unless told not to do so) maximizes
the virtual y resolution to the available video memory, so by default
that's eg. about 1024x16000 with 32MB of video ram (which is usual these
days). The console is fast as hell here...
Perhaps you should make the decision whether to use either
fillrect/copyarea or panning by the size of the virtual framebuffer? I
understand panning is not as fast if the virtual screen is only little
bigger than the visible area, but as soon as it has a certain size that
makes copying the entire screen to the start of the framebuffer a seldom
event, it's much faster.
Hm. On second thought, even if the virtual screen is only little larger
than the visible screen, using panning will reduce the times where a
copy of the entire screen is required. With SCROLL_ACCEL, you need a
copy/move over the entire screen on every scrolling event; each
additional line of text that fits into the virtual screen means calling
copy/move one time less.
What am I missing here?
BTW:
1) fillrect and copyarea WERE (resp. ARE) being called here despite your
previous statement that they were not. Fillrect is used to clear every
line after pressing enter, and copyrect was used to copy the buffer to
the start of the virtual screen when the end was reached.)
2) I still don't understand the meaning of FBINFO_HWACCEL_XPAN
(especially as your sisfb patch sets it although sisfb did not support
x-panning until yesterday evening...)
Please test the core patch + this patch, and let me know your console
works. I'm interested to hear what speeds you see :-)
I will, but it will take some while. I need to merge your changes into
my development version (which has been modified quite a bit).
Furthermore I need to make sure it still compiles and works under 2.4.
(You may have missed this fact but the driver is unified for both 2.4
and 2.6. No time to maintain two separate versions.)
(BTW: The "get rid of reference to setup variable" and "YWARP" stuff was
already removed there... So your patch boils down to a very few lines in
sis_main.c only.)
Also, using fbset to turn acceleration on and off ought to work, though
i still think this is better done via sysfs... just don't have time to
learn that ATM...
This depends on that STUPID_ACCELF_TEXT_SHIT, right? Nice name... ;)
Note that not only fbset needs this, but DirectFB as well.
Thomas
--
Thomas Winischhofer
Vienna/Austria
thomas AT winischhofer DOT net *** http://www.winischhofer.net
twini AT xfree86 DOT org
-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
From: David Eger <hidden> Date: 2004-06-03 13:26:58
Quoting Thomas Winischhofer [off-list ref]:
David Eger wrote:
quoted
The following patch updates sisfb for the new fb accel capabilities
patch I'm sending upstream. By default, this patch will rely on your
copyarea() and fillrect() accel functions instead of the panning.
Could you give me any hint why this should be faster than panning?
The logic to prefer copyarea()/fillrect() to panning is in the main patch. If
panning is faster than using these for most cards, then the default when both
are available should be panning as you say. But I'll need numbers to determine
that ;-) I think many drivers just map a chunk of video ram just big enough
for the requested resolution, so panning does zero for them :-/
1) fillrect and copyarea WERE (resp. ARE) being called here despite your
previous statement that they were not. Fillrect is used to clear every
line after pressing enter, and copyrect was used to copy the buffer to
the start of the virtual screen when the end was reached.)
bizarre. For radeonfb, fillrect() was called to clear the last line as you say,
but copyarea() never was. I'll have to dig back through the old code to really
grok your statement.
2) I still don't understand the meaning of FBINFO_HWACCEL_XPAN
(especially as your sisfb patch sets it although sisfb did not support
x-panning until yesterday evening...)
Good catch. My patch should not set that flag, as it's inaccurate for your
driver. My bad. Good thing these are going through the individual driver
maintainers ;-)
quoted
Please test the core patch + this patch, and let me know your console
works. I'm interested to hear what speeds you see :-)
I will, but it will take some while. I need to merge your changes into
my development version (which has been modified quite a bit).
Thanks.
-dte
-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
From: Antonino A. Daplas <hidden> Date: 2004-06-03 15:07:16
On Thursday 03 June 2004 21:26, David Eger wrote:
Quoting Thomas Winischhofer [off-list ref]:
quoted
David Eger wrote:
quoted
The following patch updates sisfb for the new fb accel capabilities
patch I'm sending upstream. By default, this patch will rely on your
copyarea() and fillrect() accel functions instead of the panning.
Could you give me any hint why this should be faster than panning?
The logic to prefer copyarea()/fillrect() to panning is in the main patch.
If panning is faster than using these for most cards, then the default when
both are available should be panning as you say. But I'll need numbers to
determine that ;-) I think many drivers just map a chunk of video ram just
big enough for the requested resolution, so panning does zero for them :-/
I have benchamarked them before (sometime last year). Panning (with vyres at
least 2x yres) is significantly faster than without panning. If I remember
correctly, I tested at 1024x768, 8bpp, vyres = 4*yres, all drawing functions
are accelerated. Without panning, 'time cat /usr/src/linux/Documentation'
finished in around 2 seconds. With panning, it was done in 0.5 sec.
And if vyres = yres, then the driver should disable the panning/wrapping flag.
Or fbcon should at least recognize that panning may be impossible or not very
efficient if vyres < yres*2.
quoted
1) fillrect and copyarea WERE (resp. ARE) being called here despite your
previous statement that they were not. Fillrect is used to clear every
line after pressing enter, and copyrect was used to copy the buffer to
the start of the virtual screen when the end was reached.)
bizarre. For radeonfb, fillrect() was called to clear the last line as you
say, but copyarea() never was. I'll have to dig back through the old code
to really grok your statement.
Yes, this is true. Once you've scrolled down to the end of virtual memory,
the last screenful of data will be copied to the beginning of the
framebuffer. Then the whole scrolling process starts all over again.
(This is what I was trying to point out before, panning will always involve a
copyarea. Also, instead of copying, maybe the last screenful of data can be
redrawn. Advantage to framebuffers which has panning but with slow fb reads.
Currently, the latter is not available).
Tony
-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
From: Thomas Winischhofer <thomas@winischhofer.net> Date: 2004-06-03 16:41:53
David,
while modifying sisfb for your new flags, I went through the base patch
as posted to Andrew (and surprisingly fast merged into 2.6.7-rc2-mm2)
but failed to find any possibility for userland to disable acceleration
(considering that ACCELF_TEXT is now "stupid shit" aka deprecated).
You mention that this should be done through sysfs. Where is the
corresponding code?
Thomas
--
Thomas Winischhofer
Vienna/Austria
thomas AT winischhofer DOT net *** http://www.winischhofer.net
twini AT xfree86 DOT org
-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
From: David Eger <hidden> Date: 2004-06-03 17:08:51
I guess I shouldn't mark it "stupid shit" until I actually have the replacement
code ready ;-) You want me to revise the name of the #define?
Basically, I think the name FB_ACCELF_TEXT is silly and misleading:
+ it means the kernel is enabling the acceleration engine; not really to do with
_TEXT
+ it's not really a flag, since it and zero are the only valid settings
+ it doesn't really belong with the mode settings (i.e. 1024x768, 60 Hz 32bpp)
which is what var is, mainly
But it is how things are done now. So yes, fbset -accel 0 => var.accel_flags =
FB_ACCELF_TEXT => set_par() is still the only path that the drivers have to
enable/disable acceleration. You'll note that the main patch does #define this
to be true for now.
I'm generating an alternate kernel at the moment with Antonino's logic to see
how panning and accel compares on my chip. If it's faster, I should have a
patch with revised logic (favoring panning if there's sufficient yres_virtual)
by tomorrow..
-David
-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
Also, using fbset to turn acceleration on and off ought to work, though
i still think this is better done via sysfs... just don't have time to
learn that ATM...
This depends on that STUPID_ACCELF_TEXT_SHIT, right? Nice name... ;)
Note that not only fbset needs this, but DirectFB as well.
And XFree86, in fbdev-friendly mode.
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
-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
I guess I shouldn't mark it "stupid shit" until I actually have the replacement
code ready ;-) You want me to revise the name of the #define?
Yes, please do so. We need it for backwards compatibility.
Basically, I think the name FB_ACCELF_TEXT is silly and misleading:
+ it means the kernel is enabling the acceleration engine; not really to do with
_TEXT
Well, inside the kernel, the acceleration engine is used for acceleration the
text console emulation only.
+ it's not really a flag, since it and zero are the only valid settings
What other things do you do with a flag? Waiving? ;-)
+ it doesn't really belong with the mode settings (i.e. 1024x768, 60 Hz 32bpp)
which is what var is, mainly
A long time ago, we also intended to use it to switch to real text mode on
cards that supported it[*]. But no one ever implemented that.
[*] Remember, fbdev originated on platforms without VGA graphics. Although some
graphics cards were based on VGA-compatible chips, they all booted in graphics
mode.
But it is how things are done now. So yes, fbset -accel 0 => var.accel_flags =
Indeed.
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
-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
From: Thomas Winischhofer <thomas@winischhofer.net> Date: 2004-06-06 13:20:20
Geert Uytterhoeven wrote:
On Thu, 3 Jun 2004, David Eger wrote:
quoted
I guess I shouldn't mark it "stupid shit" until I actually have the replacement
code ready ;-) You want me to revise the name of the #define?
Yes, please do so. We need it for backwards compatibility.
ARGH.... well then, but please keep the #define STUPID... now that I
committed an update of sisfb to Andrew.
Thomas
--
Thomas Winischhofer
Vienna/Austria
thomas AT winischhofer DOT net http://www.winischhofer.net/
twini AT xfree86 DOT org
-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504