* [PATCH] atyfb accel capabilities
@ 2004-06-03 2:40 David Eger
2004-06-06 11:10 ` Geert Uytterhoeven
0 siblings, 1 reply; 2+ messages in thread
From: David Eger @ 2004-06-03 2:40 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: linux-fbdev-devel
Dear Geert,
The following patch updates atyfb for the new fb accel capabilities
patch I'm sending upstream. Please test the core patch + this patch,
and let me know it works for you. You ought to be able to use fbset
to turn the acceleration on and off, though i think the current state
of things is a hack... sysfs is the way to really do this...
-dte
atyfb (Mach 64): update to advertise acceleration capabilities via fbinfo.flags
yay fast console!
Signed-off-by: David Eger <eger@havoc.gtf.org>
#
# drivers/video/aty/mach64_gx.c
# 2004/06/02 22:31:14+02:00 eger@rosencrantz.theboonies.us +5 -8
# atyfb (Mach 64): update to advertise acceleration capabilities via fbinfo.flags
# yay fast console!
#
# Signed-off-by: David Eger <eger@havoc.gtf.org>
# cc: Geert Uytterhoeven <geert@linux-m68k.org>
#
# drivers/video/aty/mach64_accel.c
# 2004/06/02 22:31:14+02:00 eger@rosencrantz.theboonies.us +2 -2
# atyfb (Mach 64): update to advertise acceleration capabilities via fbinfo.flags
# yay fast console!
#
# Signed-off-by: David Eger <eger@havoc.gtf.org>
# cc: Geert Uytterhoeven <geert@linux-m68k.org>
#
# drivers/video/aty/atyfb_base.c
# 2004/06/02 22:31:14+02:00 eger@rosencrantz.theboonies.us +20 -14
# atyfb (Mach 64): update to advertise acceleration capabilities via fbinfo.flags
# yay fast console!
#
# Signed-off-by: David Eger <eger@havoc.gtf.org>
# cc: Geert Uytterhoeven <geert@linux-m68k.org>
#
# drivers/video/aty/atyfb.h
# 2004/06/02 22:31:14+02:00 eger@rosencrantz.theboonies.us +1 -2
# atyfb (Mach 64): update to advertise acceleration capabilities via fbinfo.flags
# yay fast console!
#
# Signed-off-by: David Eger <eger@havoc.gtf.org>
# cc: Geert Uytterhoeven <geert@linux-m68k.org>
#
diff -Nru a/drivers/video/aty/atyfb.h b/drivers/video/aty/atyfb.h
--- a/drivers/video/aty/atyfb.h Wed Jun 2 22:38:17 2004
+++ b/drivers/video/aty/atyfb.h Wed Jun 2 22:38:17 2004
@@ -79,7 +79,6 @@
u8 ram_type;
u8 mem_refresh_rate;
u8 blitter_may_be_busy;
- u32 accel_flags;
#ifdef __sparc__
struct pci_mmap_map *mmap_map;
u8 mmaped;
@@ -195,7 +194,7 @@
struct aty_dac_ops {
int (*set_dac) (const struct fb_info * info,
- const union aty_pll * pll, u32 bpp, u32 accel);
+ const union aty_pll * pll, u32 bpp);
};
extern const struct aty_dac_ops aty_dac_ibm514; /* IBM RGB514 */
diff -Nru a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c
--- a/drivers/video/aty/atyfb_base.c Wed Jun 2 22:38:17 2004
+++ b/drivers/video/aty/atyfb_base.c Wed Jun 2 22:38:17 2004
@@ -779,7 +779,12 @@
var->bits_per_pixel, &par->pll)))
return err;
- par->accel_flags = var->accel_flags; /* hack */
+#ifdef STUPID_ACCELF_TEXT_SHIT
+ if (var->accel_flags == FB_ACCELF_TEXT)
+ info->flags &= ~FBINFO_HWACCEL_DISABLED;
+ else
+ info->flags |= FBINFO_HWACCEL_DISABLED;
+#endif
if (par->blitter_may_be_busy)
wait_for_idle(par);
@@ -789,8 +794,7 @@
/* better call aty_StrobeClock ?? */
aty_st_8(CLOCK_CNTL + par->clk_wr_offset, CLOCK_STROBE, par);
- par->dac_ops->set_dac(info, &par->pll, var->bits_per_pixel,
- par->accel_flags);
+ par->dac_ops->set_dac(info, &par->pll, var->bits_per_pixel);
par->pll_ops->set_pll(info, &par->pll);
if (!M64_HAS(INTEGRATED)) {
@@ -850,7 +854,7 @@
FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_DIRECTCOLOR;
/* Initialize the graphics engine */
- if (par->accel_flags & FB_ACCELF_TEXT)
+ if (!(info->flags & FBINFO_HWACCEL_DISABLED))
aty_init_engine(par, info);
#ifdef CONFIG_BOOTX_TEXT
@@ -947,10 +951,6 @@
* correctly.
*/
var = default_var;
- if (noaccel)
- var.accel_flags &= ~FB_ACCELF_TEXT;
- else
- var.accel_flags |= FB_ACCELF_TEXT;
if (var.yres == var.yres_virtual) {
u32 vram =
(info->fix.smem_len -
@@ -1412,7 +1412,7 @@
if (par->blitter_may_be_busy)
wait_for_idle(par);
/* Stop accel engine (stop bus mastering) */
- if (par->accel_flags & FB_ACCELF_TEXT)
+ if (!(info->flags & FBINFO_HWACCEL_DISABLED))
aty_reset_engine(par);
/* Backup fb content */
@@ -1787,7 +1787,17 @@
info->fbops = &atyfb_ops;
info->pseudo_palette = pseudo_palette;
- info->flags = FBINFO_FLAG_DEFAULT;
+ info->flags = FBINFO_DEFAULT
+ | FBINFO_HWACCEL_FILLRECT
+ | FBINFO_HWACCEL_COPYAREA
+ | FBINFO_HWACCEL_XPAN
+ | FBINFO_HWACCEL_YPAN;
+ if (noaccel)
+ info->flags |= FBINFO_HWACCEL_DISABLED;
+
+#ifdef STUPID_ACCELF_TEXT_SHIT
+ var.accel_flags = noaccel ? 0 : FB_ACCELF_TEXT;
+#endif
#ifdef CONFIG_PMAC_BACKLIGHT
if (M64_HAS(G3_PB_1_1) && machine_is_compatible("PowerBook1,1")) {
@@ -1863,10 +1873,6 @@
#endif /* !__sparc__ */
#endif /* !CONFIG_PPC */
#endif /* !MODULE */
- if (noaccel)
- var.accel_flags &= ~FB_ACCELF_TEXT;
- else
- var.accel_flags |= FB_ACCELF_TEXT;
if (var.yres == var.yres_virtual) {
u32 vram = (info->fix.smem_len - (PAGE_SIZE << 2));
diff -Nru a/drivers/video/aty/mach64_accel.c b/drivers/video/aty/mach64_accel.c
--- a/drivers/video/aty/mach64_accel.c Wed Jun 2 22:38:17 2004
+++ b/drivers/video/aty/mach64_accel.c Wed Jun 2 22:38:17 2004
@@ -179,7 +179,7 @@
if (!area->width || !area->height)
return;
- if (!par->accel_flags) {
+ if (info->flags & FBINFO_HWACCEL_DISABLED) {
if (par->blitter_may_be_busy)
wait_for_idle(par);
cfb_copyarea(info, area);
@@ -223,7 +223,7 @@
if (!rect->width || !rect->height)
return;
- if (!par->accel_flags) {
+ if (info->flags & FBINFO_HWACCEL_DISABLED) {
if (par->blitter_may_be_busy)
wait_for_idle(par);
cfb_fillrect(info, rect);
diff -Nru a/drivers/video/aty/mach64_gx.c b/drivers/video/aty/mach64_gx.c
--- a/drivers/video/aty/mach64_gx.c Wed Jun 2 22:38:17 2004
+++ b/drivers/video/aty/mach64_gx.c Wed Jun 2 22:38:17 2004
@@ -78,7 +78,7 @@
}
static int aty_set_dac_514(const struct fb_info *info,
- const union aty_pll *pll, u32 bpp, u32 accel)
+ const union aty_pll *pll, u32 bpp)
{
struct atyfb_par *par = (struct atyfb_par *) info->par;
static struct {
@@ -204,8 +204,7 @@
*/
static int aty_set_dac_ATI68860_B(const struct fb_info *info,
- const union aty_pll *pll, u32 bpp,
- u32 accel)
+ const union aty_pll *pll, u32 bpp)
{
struct atyfb_par *par = (struct atyfb_par *) info->par;
u32 gModeReg, devSetupRegA, temp, mask;
@@ -237,7 +236,7 @@
break;
}
- if (!accel) {
+ if (!(info->flags & FBINFO_HWACCEL_DISABLED)) {
gModeReg = 0x80;
devSetupRegA = 0x61;
}
@@ -287,8 +286,7 @@
*/
static int aty_set_dac_ATT21C498(const struct fb_info *info,
- const union aty_pll *pll, u32 bpp,
- u32 accel)
+ const union aty_pll *pll, u32 bpp)
{
struct atyfb_par *par = (struct atyfb_par *) info->par;
u32 dotClock;
@@ -883,8 +881,7 @@
*/
static int aty_set_dac_unsupported(const struct fb_info *info,
- const union aty_pll *pll, u32 bpp,
- u32 accel)
+ const union aty_pll *pll, u32 bpp)
{
struct atyfb_par *par = (struct atyfb_par *) info->par;
-------------------------------------------------------
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] atyfb accel capabilities
2004-06-03 2:40 [PATCH] atyfb accel capabilities David Eger
@ 2004-06-06 11:10 ` Geert Uytterhoeven
0 siblings, 0 replies; 2+ messages in thread
From: Geert Uytterhoeven @ 2004-06-06 11:10 UTC (permalink / raw)
To: David Eger; +Cc: Linux Frame Buffer Device Development
On Wed, 2 Jun 2004, David Eger wrote:
> The following patch updates atyfb for the new fb accel capabilities
> patch I'm sending upstream. Please test the core patch + this patch,
> and let me know it works for you. You ought to be able to use fbset
Looks OK. Unfortunately I cannot test it on my RAGE II+, since my PPC box died
2 weeks ago :-(
I _could_ still give it a try on the laptop from work (Mobility M1), but I
first need to get atyfb in 2.6 work on that one...
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-06-06 11:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-03 2:40 [PATCH] atyfb accel capabilities David Eger
2004-06-06 11:10 ` Geert Uytterhoeven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).