From: David Eger <eger@havoc.gtf.org>
To: Andrew Morton <akpm@osdl.org>
Cc: David Eger <eger@theboonies.us>,
linux-fbdev-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: [PATCH 4/4] radeonfb accel capabilities
Date: Thu, 20 May 2004 12:03:47 -0400 [thread overview]
Message-ID: <20040520160347.GC17807@havoc.gtf.org> (raw)
In-Reply-To: <20040520155439.GA17330@havoc.gtf.org>
radeonfb: upgrade accel indication to fb_info->flags semantics
(now with accelerated framebuffer console!)
diff -Nru a/drivers/video/aty/radeon_accel.c b/drivers/video/aty/radeon_accel.c
--- a/drivers/video/aty/radeon_accel.c Tue May 18 12:39:09 2004
+++ b/drivers/video/aty/radeon_accel.c Tue May 18 12:39:09 2004
@@ -30,7 +30,7 @@
if (info->state != FBINFO_STATE_RUNNING)
return;
- if (radeon_accel_disabled()) {
+ if (info->flags & FBINFO_HWACCEL_DISABLED) {
cfb_fillrect(info, region);
return;
}
@@ -96,7 +96,7 @@
if (info->state != FBINFO_STATE_RUNNING)
return;
- if (radeon_accel_disabled()) {
+ if (info->flags & FBINFO_HWACCEL_DISABLED) {
cfb_copyarea(info, area);
return;
}
@@ -144,6 +144,9 @@
u32 clock_cntl_index, mclk_cntl, rbbm_soft_reset;
u32 host_path_cntl;
+ if (rinfo->info->flags & FBINFO_HWACCEL_DISABLED)
+ return;
+
radeon_engine_flush (rinfo);
/* Some ASICs have bugs with dynamic-on feature, which are
@@ -239,6 +242,9 @@
{
unsigned long temp;
+ if (rinfo->info->flags & FBINFO_HWACCEL_DISABLED)
+ return;
+
/* disable 3D engine */
OUTREG(RB3D_CNTL, 0);
diff -Nru a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c
--- a/drivers/video/aty/radeon_base.c Tue May 18 12:39:09 2004
+++ b/drivers/video/aty/radeon_base.c Tue May 18 12:39:09 2004
@@ -242,8 +242,6 @@
static int nomtrr = 0;
#endif
-int radeonfb_noaccel = 0;
-
/*
* prototypes
*/
@@ -810,9 +808,8 @@
/* XXX I'm adjusting xres_virtual to the pitch, that may help XFree
* with some panels, though I don't quite like this solution
*/
- if (radeon_accel_disabled()) {
+ if (rinfo->info->flags & FBINFO_HWACCEL_DISABLED) {
v.xres_virtual = v.xres_virtual & ~7ul;
- v.accel_flags = 0;
} else {
pitch = ((v.xres_virtual * ((v.bits_per_pixel + 1) / 8) + 0x3f)
& ~(0x3f)) >> 6;
@@ -1523,7 +1520,7 @@
newmode.crtc_v_sync_strt_wid = (((vSyncStart - 1) & 0xfff) |
(vsync_wid << 16) | (v_sync_pol << 23));
- if (!radeon_accel_disabled()) {
+ if (!(info->flags & FBINFO_HWACCEL_DISABLED)) {
/* We first calculate the engine pitch */
rinfo->pitch = ((mode->xres_virtual * ((mode->bits_per_pixel + 1) / 8) + 0x3f)
& ~(0x3f)) >> 6;
@@ -1671,12 +1668,10 @@
if (!rinfo->asleep) {
radeon_write_mode (rinfo, &newmode);
/* (re)initialize the engine */
- if (!radeon_accel_disabled())
- radeonfb_engine_init (rinfo);
-
+ radeonfb_engine_init (rinfo);
}
/* Update fix */
- if (!radeon_accel_disabled())
+ if (!(info->flags & FBINFO_HWACCEL_DISABLED))
info->fix.line_length = rinfo->pitch*64;
else
info->fix.line_length = mode->xres_virtual
@@ -1781,7 +1776,11 @@
info->currcon = -1;
info->par = rinfo;
info->pseudo_palette = rinfo->pseudo_palette;
- info->flags = FBINFO_DEFAULT;
+ info->flags = FBINFO_DEFAULT
+ | FBINFO_HWACCEL_COPYAREA
+ | FBINFO_HWACCEL_FILLRECT
+ | FBINFO_HWACCEL_XPAN
+ | FBINFO_HWACCEL_YPAN;
info->fbops = &radeonfb_ops;
info->display_fg = NULL;
info->screen_base = (char *)rinfo->fb_base;
@@ -1798,17 +1797,11 @@
info->fix.type_aux = 0;
info->fix.mmio_start = rinfo->mmio_base_phys;
info->fix.mmio_len = RADEON_REGSIZE;
- if (radeon_accel_disabled())
- info->fix.accel = FB_ACCEL_NONE;
- else
- info->fix.accel = FB_ACCEL_ATI_RADEON;
fb_alloc_cmap(&info->cmap, 256, 0);
-
- if (radeon_accel_disabled())
- info->var.accel_flags &= ~FB_ACCELF_TEXT;
- else
- info->var.accel_flags |= FB_ACCELF_TEXT;
+
+ if (noaccel)
+ info->flags |= FBINFO_HWACCEL_DISABLED;
return 0;
}
@@ -2398,7 +2391,6 @@
int __init radeonfb_init (void)
{
- radeonfb_noaccel = noaccel;
return pci_module_init (&radeonfb_driver);
}
@@ -2420,7 +2412,7 @@
continue;
if (!strncmp(this_opt, "noaccel", 7)) {
- noaccel = radeonfb_noaccel = 1;
+ noaccel = 1;
} else if (!strncmp(this_opt, "mirror", 6)) {
mirror = 1;
} else if (!strncmp(this_opt, "force_dfp", 9)) {
diff -Nru a/drivers/video/aty/radeon_pm.c b/drivers/video/aty/radeon_pm.c
--- a/drivers/video/aty/radeon_pm.c Tue May 18 12:39:09 2004
+++ b/drivers/video/aty/radeon_pm.c Tue May 18 12:39:09 2004
@@ -859,12 +859,10 @@
fb_set_suspend(info, 1);
- if (!radeon_accel_disabled()) {
- /* Make sure engine is reset */
- radeon_engine_idle();
- radeonfb_engine_reset(rinfo);
- radeon_engine_idle();
- }
+ /* Make sure engine is reset */
+ radeon_engine_idle();
+ radeonfb_engine_reset(rinfo);
+ radeon_engine_idle();
/* Blank display and LCD */
radeonfb_blank(VESA_POWERDOWN+1, info);
diff -Nru a/drivers/video/aty/radeonfb.h b/drivers/video/aty/radeonfb.h
--- a/drivers/video/aty/radeonfb.h Tue May 18 12:39:09 2004
+++ b/drivers/video/aty/radeonfb.h Tue May 18 12:39:09 2004
@@ -527,12 +527,6 @@
printk(KERN_ERR "radeonfb: Idle Timeout !\n");
}
-static inline int radeon_accel_disabled(void)
-{
- extern int radeonfb_noaccel;
- return radeonfb_noaccel;
-}
-
#define radeon_engine_idle() _radeon_engine_idle(rinfo)
#define radeon_fifo_wait(entries) _radeon_fifo_wait(rinfo,entries)
next prev parent reply other threads:[~2004-05-20 16:03 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-19 9:36 FB accel capabilities patch David Eger
2004-05-19 10:03 ` Andrew Morton
2004-05-19 10:03 ` Andrew Morton
2004-05-19 11:14 ` Geert Uytterhoeven
2004-05-19 11:14 ` [Linux-fbdev-devel] " Geert Uytterhoeven
2004-05-19 23:31 ` Benjamin Herrenschmidt
2004-05-19 23:31 ` [Linux-fbdev-devel] " Benjamin Herrenschmidt
2004-05-20 8:19 ` [OT ML related] Emiliano 'AlberT' Gabrielli
2004-05-20 8:54 ` Jurriaan
2004-05-20 9:09 ` Emiliano 'AlberT' Gabrielli
2004-05-20 9:20 ` DervishD
2004-05-20 9:23 ` Emiliano 'AlberT' Gabrielli
2004-05-20 9:32 ` Russell King
2004-05-20 15:54 ` [PATCH 1/4] James' fbcon init and con2fb cleanup David Eger
2004-05-20 15:59 ` [PATCH 2/4] FB accel capabilities (core update) David Eger
2004-05-20 16:00 ` [PATCH 1/4] James' fbcon init and con2fb cleanup James Simmons
2004-05-20 16:00 ` James Simmons
2004-05-20 16:01 ` [PATCH 3/4] s/FBINFO_FLAG_/FBINFO_/g David Eger
2004-05-20 16:03 ` David Eger [this message]
2004-05-19 19:34 ` [Linux-fbdev-devel] FB accel capabilities patch James Simmons
2004-05-19 19:34 ` James Simmons
2004-05-19 21:39 ` David Eger
2004-05-19 21:39 ` [Linux-fbdev-devel] " David Eger
2004-05-19 21:47 ` James Simmons
2004-05-19 21:47 ` James Simmons
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040520160347.GC17807@havoc.gtf.org \
--to=eger@havoc.gtf.org \
--cc=akpm@osdl.org \
--cc=eger@theboonies.us \
--cc=linux-fbdev-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.