* [PATCH 2/4] FB accel capabilities (core update)
2004-05-20 15:54 ` [PATCH 1/4] James' fbcon init and con2fb cleanup David Eger
@ 2004-05-20 15:59 ` David Eger
2004-05-20 16:00 ` [PATCH 1/4] James' fbcon init and con2fb cleanup James Simmons
` (2 subsequent siblings)
3 siblings, 0 replies; 18+ messages in thread
From: David Eger @ 2004-05-20 15:59 UTC (permalink / raw)
To: Andrew Morton; +Cc: David Eger, linux-fbdev-devel, linux-kernel
Baseline patch to make framebuffer/fbcon interaction more sane by
basing the fbcon heuristics on capabilities advertized by underlying
framebuffer via the fb_info.flags field.
This patch updates fbcon, fb.h, and skeletonfb.c.
It does *not* yet update the drivers themselves. They should compile
and work, but their hinting is not correct yet, meaning most fb drivers
will be slow until I set the flags to the right hinting driver-by-driver.
diff -Nru a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
--- a/drivers/video/console/fbcon.c Sat May 15 22:53:10 2004
+++ b/drivers/video/console/fbcon.c Sat May 15 22:53:10 2004
@@ -599,15 +599,14 @@
static void fbcon_init(struct vc_data *vc, int init)
{
int unit = vc->vc_num;
- struct fb_info *info;
- /* on which frame buffer will we open this console? */
- info = registered_fb[(int) con2fb_map[unit]];
+ /* get the frame buffer capabilities for the fb we are opening */
+ int cap = registered_fb[(int) con2fb_map[unit]]->flags;
- if (info->var.accel_flags)
- fb_display[unit].scrollmode = SCROLL_YNOMOVE;
- else
- fb_display[unit].scrollmode = SCROLL_YREDRAW;
+ if ((cap & FBINFO_HWACCEL_COPYAREA) && !(cap & FBINFO_HWACCEL_DISABLED))
+ fb_display[unit].scrollmode = SCROLL_ACCEL;
+ else /* default to something safe */
+ fb_display[unit].scrollmode = SCROLL_REDRAW;
con_set_default_unimap(unit);
fbcon_set_display(vc, init, !init);
}
@@ -622,21 +621,23 @@
static __inline__ void updatescrollmode(struct display *p, struct vc_data *vc)
{
struct fb_info *info = registered_fb[(int) con2fb_map[vc->vc_num]];
+ int cap = info->flags;
- int m;
- if (p->scrollmode & __SCROLL_YFIXED)
- return;
- if (divides(info->fix.ywrapstep, vc->vc_font.height) &&
- divides(vc->vc_font.height, info->var.yres_virtual))
- m = __SCROLL_YWRAP;
- else if (divides(info->fix.ypanstep, vc->vc_font.height) &&
+ if ((cap & FBINFO_HWACCEL_COPYAREA) && !(cap & FBINFO_HWACCEL_DISABLED))
+ p->scrollmode = SCROLL_ACCEL;
+ else if ((cap & FBINFO_HWACCEL_YWRAP) &&
+ divides(info->fix.ywrapstep, vc->vc_font.height) &&
+ divides(vc->vc_font.height, info->var.yres_virtual))
+ p->scrollmode = SCROLL_WRAP;
+ else if ((cap & FBINFO_HWACCEL_YPAN) &&
+ divides(info->fix.ypanstep, vc->vc_font.height) &&
info->var.yres_virtual >= info->var.yres + vc->vc_font.height)
- m = __SCROLL_YPAN;
- else if (p->scrollmode & __SCROLL_YNOMOVE)
- m = __SCROLL_YREDRAW;
+ p->scrollmode = SCROLL_PAN;
+ else if (cap & FBINFO_READS_FAST)
+ /* okay, we'll use software version of accel funcs... */
+ p->scrollmode = SCROLL_ACCEL;
else
- m = __SCROLL_YMOVE;
- p->scrollmode = (p->scrollmode & ~__SCROLL_YMASK) | m;
+ p->scrollmode = SCROLL_REDRAW;
}
static void fbcon_set_display(struct vc_data *vc, int init, int logo)
@@ -647,7 +648,7 @@
unsigned short *save = NULL, *r, *q;
struct font_desc *font;
- if (vc->vc_num != fg_console || (info->flags & FBINFO_FLAG_MODULE) ||
+ if (vc->vc_num != fg_console || (info->flags & FBINFO_MODULE) ||
(info->fix.type == FB_TYPE_TEXT))
logo = 0;
@@ -1311,7 +1312,7 @@
{
struct fb_info *info = registered_fb[(int) con2fb_map[vc->vc_num]];
struct display *p = &fb_display[vc->vc_num];
- int scroll_partial = !(p->scrollmode & __SCROLL_YNOPARTIAL);
+ int scroll_partial = info->flags & FBINFO_PARTIAL_PAN_OK;
if (!info->fbops->fb_blank && console_blanked)
return 0;
@@ -1335,15 +1336,15 @@
fbcon_softback_note(vc, t, count);
if (logo_shown >= 0)
goto redraw_up;
- switch (p->scrollmode & __SCROLL_YMASK) {
- case __SCROLL_YMOVE:
+ switch (p->scrollmode) {
+ case SCROLL_ACCEL:
accel_bmove(vc, info, t + count, 0, t, 0,
b - t - count, vc->vc_cols);
accel_clear(vc, info, b - count, 0, count,
vc->vc_cols);
break;
- case __SCROLL_YWRAP:
+ case SCROLL_WRAP:
if (b - t - count > 3 * vc->vc_rows >> 2) {
if (t > 0)
fbcon_bmove(vc, 0, 0, count, 0, t,
@@ -1353,15 +1354,15 @@
fbcon_bmove(vc, b - count, 0, b, 0,
vc->vc_rows - b,
vc->vc_cols);
- } else if (p->scrollmode & __SCROLL_YPANREDRAW)
- goto redraw_up;
- else
+ } else if (info->flags & FBINFO_READS_FAST)
fbcon_bmove(vc, t + count, 0, t, 0,
b - t - count, vc->vc_cols);
+ else
+ goto redraw_up;
fbcon_clear(vc, b - count, 0, count, vc->vc_cols);
break;
- case __SCROLL_YPAN:
+ case SCROLL_PAN:
if ((p->yscroll + count <=
2 * (p->vrows - vc->vc_rows))
&& ((!scroll_partial && (b - t == vc->vc_rows))
@@ -1376,15 +1377,15 @@
fbcon_bmove(vc, b - count, 0, b, 0,
vc->vc_rows - b,
vc->vc_cols);
- } else if (p->scrollmode & __SCROLL_YPANREDRAW)
- goto redraw_up;
- else
+ } else if (info->flags & FBINFO_READS_FAST)
fbcon_bmove(vc, t + count, 0, t, 0,
b - t - count, vc->vc_cols);
+ else
+ goto redraw_up;
fbcon_clear(vc, b - count, 0, count, vc->vc_cols);
break;
- case __SCROLL_YREDRAW:
+ case SCROLL_REDRAW:
redraw_up:
fbcon_redraw(vc, p, t, b - t - count,
count * vc->vc_cols);
@@ -1402,14 +1403,14 @@
case SM_DOWN:
if (count > vc->vc_rows) /* Maximum realistic size */
count = vc->vc_rows;
- switch (p->scrollmode & __SCROLL_YMASK) {
- case __SCROLL_YMOVE:
+ switch (p->scrollmode) {
+ case SCROLL_ACCEL:
accel_bmove(vc, info, t, 0, t + count, 0,
b - t - count, vc->vc_cols);
accel_clear(vc, info, t, 0, count, vc->vc_cols);
break;
- case __SCROLL_YWRAP:
+ case SCROLL_WRAP:
if (b - t - count > 3 * vc->vc_rows >> 2) {
if (vc->vc_rows - b > 0)
fbcon_bmove(vc, b, 0, b - count, 0,
@@ -1419,15 +1420,15 @@
if (t > 0)
fbcon_bmove(vc, count, 0, 0, 0, t,
vc->vc_cols);
- } else if (p->scrollmode & __SCROLL_YPANREDRAW)
- goto redraw_down;
- else
+ } else if (info->flags & FBINFO_READS_FAST)
fbcon_bmove(vc, t, 0, t + count, 0,
b - t - count, vc->vc_cols);
+ else
+ goto redraw_down;
fbcon_clear(vc, t, 0, count, vc->vc_cols);
break;
- case __SCROLL_YPAN:
+ case SCROLL_PAN:
if ((count - p->yscroll <= p->vrows - vc->vc_rows)
&& ((!scroll_partial && (b - t == vc->vc_rows))
|| (scroll_partial
@@ -1441,15 +1442,15 @@
if (t > 0)
fbcon_bmove(vc, count, 0, 0, 0, t,
vc->vc_cols);
- } else if (p->scrollmode & __SCROLL_YPANREDRAW)
- goto redraw_down;
- else
+ } else if (info->flags & FBINFO_READS_FAST)
fbcon_bmove(vc, t, 0, t + count, 0,
b - t - count, vc->vc_cols);
+ else
+ goto redraw_down;
fbcon_clear(vc, t, 0, count, vc->vc_cols);
break;
- case __SCROLL_YREDRAW:
+ case SCROLL_REDRAW:
redraw_down:
fbcon_redraw(vc, p, b - 1, b - t - count,
-count * vc->vc_cols);
@@ -1594,12 +1595,12 @@
}
if (info)
info->var.yoffset = p->yscroll = 0;
- fbcon_resize(vc, vc->vc_cols, vc->vc_rows);
- switch (p->scrollmode & __SCROLL_YMASK) {
- case __SCROLL_YWRAP:
+ fbcon_resize(vc, vc->vc_cols, vc->vc_rows);
+ switch (p->scrollmode) {
+ case SCROLL_WRAP:
scrollback_phys_max = p->vrows - vc->vc_rows;
break;
- case __SCROLL_YPAN:
+ case SCROLL_PAN:
scrollback_phys_max = p->vrows - 2 * vc->vc_rows;
if (scrollback_phys_max < 0)
scrollback_phys_max = 0;
@@ -2173,11 +2174,11 @@
offset = p->yscroll - scrollback_current;
limit = p->vrows;
- switch (p->scrollmode && __SCROLL_YMASK) {
- case __SCROLL_YWRAP:
+ switch (p->scrollmode) {
+ case SCROLL_WRAP:
info->var.vmode |= FB_VMODE_YWRAP;
break;
- case __SCROLL_YPAN:
+ case SCROLL_PAN:
limit -= vc->vc_rows;
info->var.vmode &= ~FB_VMODE_YWRAP;
break;
diff -Nru a/drivers/video/console/fbcon.h b/drivers/video/console/fbcon.h
--- a/drivers/video/console/fbcon.h Sat May 15 22:53:10 2004
+++ b/drivers/video/console/fbcon.h Sat May 15 22:53:10 2004
@@ -68,40 +68,27 @@
* Scroll Method
*/
-/* Internal flags */
-#define __SCROLL_YPAN 0x001
-#define __SCROLL_YWRAP 0x002
-#define __SCROLL_YMOVE 0x003
-#define __SCROLL_YREDRAW 0x004
-#define __SCROLL_YMASK 0x00f
-#define __SCROLL_YFIXED 0x010
-#define __SCROLL_YNOMOVE 0x020
-#define __SCROLL_YPANREDRAW 0x040
-#define __SCROLL_YNOPARTIAL 0x080
-
-/* Only these should be used by the drivers */
-/* Which one should you use? If you have a fast card and slow bus,
- then probably just 0 to indicate fbcon should choose between
- YWRAP/YPAN+MOVE/YMOVE. On the other side, if you have a fast bus
- and even better if your card can do fonting (1->8/32bit painting),
- you should consider either SCROLL_YREDRAW (if your card is
- able to do neither YPAN/YWRAP), or SCROLL_YNOMOVE.
- The best is to test it with some real life scrolling (usually, not
- all lines on the screen are filled completely with non-space characters,
- and REDRAW performs much better on such lines, so don't cat a file
- with every line covering all screen columns, it would not be the right
- benchmark).
+/* There are several methods fbcon can use to move text around the screen:
+ *
+ * + use the hardware engine to move the text
+ * (hw-accelerated copyarea() and fillrect())
+ * + use hardware-supported panning on a large virtual screen
+ * + amifb can not only pan, but also wrap the display by N lines
+ * (i.e. visible line i = physical line (i+N) % yres).
+ * + read what's already rendered on the screen and
+ * write it in a different place (this is cfb_copyarea())
+ * + re-render the text to the screen
+ *
+ * Whether to use wrapping or panning can only be figured out at
+ * runtime (when we know whether our font height is a multiple
+ * of the pan/wrap step)
+ *
*/
-#define SCROLL_YREDRAW (__SCROLL_YFIXED|__SCROLL_YREDRAW)
-#define SCROLL_YNOMOVE (__SCROLL_YNOMOVE|__SCROLL_YPANREDRAW)
-/* SCROLL_YNOPARTIAL, used in combination with the above, is for video
- cards which can not handle using panning to scroll a portion of the
- screen without excessive flicker. Panning will only be used for
- whole screens.
- */
-/* Namespace consistency */
-#define SCROLL_YNOPARTIAL __SCROLL_YNOPARTIAL
+#define SCROLL_ACCEL 0x001
+#define SCROLL_PAN 0x002
+#define SCROLL_WRAP 0x003
+#define SCROLL_REDRAW 0x004
extern int fb_console_init(void);
diff -Nru a/drivers/video/skeletonfb.c b/drivers/video/skeletonfb.c
--- a/drivers/video/skeletonfb.c Sat May 15 22:53:10 2004
+++ b/drivers/video/skeletonfb.c Sat May 15 22:53:10 2004
@@ -539,7 +539,13 @@
info.fbops = &xxxfb_ops;
info.fix = xxxfb_fix;
info.pseudo_palette = pseudo_palette;
- info.flags = FBINFO_FLAG_DEFAULT;
+
+ /*
+ * Set up flags to indicate what sort of acceleration your
+ * driver can provide (pan/wrap/copyarea/etc.) and whether it
+ * is a module -- see FBINFO_* in include/linux/fb.h
+ */
+ info.flags = FBINFO_DEFAULT;
info.par = current_par;
/*
diff -Nru a/include/linux/fb.h b/include/linux/fb.h
--- a/include/linux/fb.h Sat May 15 22:53:10 2004
+++ b/include/linux/fb.h Sat May 15 22:53:10 2004
@@ -125,7 +125,8 @@
unsigned long mmio_start; /* Start of Memory Mapped I/O */
/* (physical address) */
__u32 mmio_len; /* Length of Memory Mapped I/O */
- __u32 accel; /* Type of acceleration available */
+ __u32 accel; /* Indicate to driver which */
+ /* specific chip/card we have */
__u16 reserved[3]; /* Reserved for future compatibility */
};
@@ -154,7 +155,7 @@
#define FB_ACTIVATE_ALL 64 /* change all VCs on this fb */
#define FB_ACTIVATE_FORCE 128 /* force apply even when no change*/
-#define FB_ACCELF_TEXT 1 /* text mode acceleration */
+#define FB_ACCELF_TEXT 1 /* (OBSOLETE) see fb_info.flags and vc_mode */
#define FB_SYNC_HOR_HIGH_ACT 1 /* horizontal sync high active */
#define FB_SYNC_VERT_HIGH_ACT 2 /* vertical sync high active */
@@ -200,7 +201,7 @@
__u32 height; /* height of picture in mm */
__u32 width; /* width of picture in mm */
- __u32 accel_flags; /* acceleration flags (hints) */
+ __u32 accel_flags; /* (OBSOLETE) see fb_info.flags */
/* Timing: All values in pixclocks, except pixclock (of course) */
__u32 pixclock; /* pixel clock in ps (pico seconds) */
@@ -502,10 +503,28 @@
int (*fb_mmap)(struct fb_info *info, struct file *file, struct vm_area_struct *vma);
};
+/* FBINFO_* = fb_info.flags bit flags */
+#define FBINFO_MODULE 0x0001 /* Low-level driver is a module */
+#define FBINFO_HWACCEL_DISABLED 0x0002
+
+/* hints */
+#define FBINFO_PARTIAL_PAN_OK 0x0040 /* otw use pan only for double-buffering */
+#define FBINFO_READS_FAST 0x0080 /* soft-copy faster than rendering */
+
+/* hardware supported ops */
+#define FBINFO_HWACCEL_NONE 0x0000
+#define FBINFO_HWACCEL_COPYAREA 0x0100
+#define FBINFO_HWACCEL_FILLRECT 0x0200
+#define FBINFO_HWACCEL_ROTATE 0x0400
+#define FBINFO_HWACCEL_IMAGEBLIT 0x0800
+#define FBINFO_HWACCEL_XPAN 0x1000
+#define FBINFO_HWACCEL_YPAN 0x2000
+#define FBINFO_HWACCEL_YWRAP 0x4000
+
+
struct fb_info {
int node;
int flags;
-#define FBINFO_FLAG_MODULE 1 /* Low-level driver is a module */
struct fb_var_screeninfo var; /* Current var */
struct fb_fix_screeninfo fix; /* Current fix */
struct fb_monspecs monspecs; /* Current Monitor specs */
@@ -528,9 +547,9 @@
};
#ifdef MODULE
-#define FBINFO_FLAG_DEFAULT FBINFO_FLAG_MODULE
+#define FBINFO_DEFAULT FBINFO_MODULE
#else
-#define FBINFO_FLAG_DEFAULT 0
+#define FBINFO_DEFAULT 0
#endif
// This will go away
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/4] James' fbcon init and con2fb cleanup
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 ` James Simmons
2004-05-20 16:01 ` [PATCH 3/4] s/FBINFO_FLAG_/FBINFO_/g David Eger
2004-05-20 16:03 ` [PATCH 4/4] radeonfb accel capabilities David Eger
3 siblings, 0 replies; 18+ messages in thread
From: James Simmons @ 2004-05-20 16:00 UTC (permalink / raw)
To: David Eger; +Cc: Andrew Morton, David Eger, linux-fbdev-devel, linux-kernel
I'm going to be sending these patch's very shortly to Andrew. I'm
preparing the tree for him still.
On Thu, 20 May 2004, David Eger wrote:
>
> James' patch to fix up the fbcon initialization sequence:
> fixes con2fb initialization
>
>
> # This is a BitKeeper generated diff -Nru style patch.
> #
> # ChangeSet
> # 2004/05/15 21:42:23+02:00 eger@rosencrantz.theboonies.us
> # fbcon initialization cleanup; No more calling fb_console_init twice.
> # - James Simmons
> #
> # drivers/video/fbmem.c
> # 2004/05/15 21:36:32+02:00 eger@rosencrantz.theboonies.us +2 -2
> # fb con init cleanup
> #
> # drivers/video/console/fbcon.h
> # 2004/05/15 21:36:32+02:00 eger@rosencrantz.theboonies.us +1 -1
> # fix con2fb API
> #
> # drivers/video/console/fbcon.c
> # 2004/05/15 21:36:31+02:00 eger@rosencrantz.theboonies.us +21 -28
> # fbcon init cleanup:
> # factor out retrieving the vc_data from the fbcon_event_notify path
> # remove fbcon_event_notifier_registered cruft
> # cleanup/fix con2fb code
> #
> diff -Nru a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
> --- a/drivers/video/console/fbcon.c Sat May 15 22:54:19 2004
> +++ b/drivers/video/console/fbcon.c Sat May 15 22:54:19 2004
> @@ -296,15 +296,17 @@
> * Maps a virtual console @unit to a frame buffer device
> * @newidx.
> */
> -int set_con2fb_map(int unit, int newidx)
> +int set_con2fb_map(int start, int end, int newidx)
> {
> - struct vc_data *vc = vc_cons[unit].d;
> + struct vc_data *vc = vc_cons[start].d;
> + int i;
>
> if (!vc)
> return -ENODEV;
> - con2fb_map[unit] = newidx;
> + for (i = start; i < end; i++)
> + con2fb_map[i] = newidx;
> fbcon_is_default = (vc->vc_sw == &fb_con) ? 1 : 0;
> - return take_over_console(&fb_con, unit, unit, fbcon_is_default);
> + return take_over_console(&fb_con, start, end, fbcon_is_default);
> }
>
> /*
> @@ -2203,34 +2205,32 @@
> return 0;
> }
>
> -static void fbcon_suspended(struct fb_info *info)
> +static void fbcon_suspended(struct fb_info *info, struct vc_data *vc)
> {
> /* Clear cursor, restore saved data */
> - info->cursor.enable = 0;
> - info->fbops->fb_cursor(info, &info->cursor);
> + fbcon_cursor(vc, CM_ERASE);
> }
>
> -static void fbcon_resumed(struct fb_info *info)
> +static void fbcon_resumed(struct fb_info *info, struct vc_data *vc)
> {
> - struct vc_data *vc;
> -
> - if (info->currcon < 0)
> - return;
> - vc = vc_cons[info->currcon].d;
> -
> update_screen(vc->vc_num);
> }
> static int fbcon_event_notify(struct notifier_block *self,
> unsigned long action, void *data)
> {
> struct fb_info *info = (struct fb_info *) data;
> + struct vc_data *vc;
> +
> + if (info->currcon < 0)
> + return 0;
> + vc = vc_cons[info->currcon].d;
>
> switch(action) {
> case FB_EVENT_SUSPEND:
> - fbcon_suspended(info);
> + fbcon_suspended(info, vc);
> break;
> case FB_EVENT_RESUME:
> - fbcon_resumed(info);
> + fbcon_resumed(info, vc);
> break;
> }
> return 0;
> @@ -2265,12 +2265,14 @@
> .notifier_call = fbcon_event_notify,
> };
>
> -static int fbcon_event_notifier_registered;
> -
> int __init fb_console_init(void)
> {
> int err;
>
> + acquire_console_sem();
> + fb_register_client(&fbcon_event_notifer);
> + release_console_sem();
> +
> if (!num_registered_fb)
> return -ENODEV;
>
> @@ -2281,12 +2283,6 @@
> if (err)
> return err;
>
> - acquire_console_sem();
> - if (!fbcon_event_notifier_registered) {
> - fb_register_client(&fbcon_event_notifer);
> - fbcon_event_notifier_registered = 1;
> - }
> - release_console_sem();
> return 0;
> }
>
> @@ -2289,10 +2285,7 @@
> void __exit fb_console_exit(void)
> {
> acquire_console_sem();
> - if (fbcon_event_notifier_registered) {
> - fb_unregister_client(&fbcon_event_notifer);
> - fbcon_event_notifier_registered = 0;
> - }
> + fb_unregister_client(&fbcon_event_notifer);
> release_console_sem();
> give_up_console(&fb_con);
> }
> diff -Nru a/drivers/video/console/fbcon.h b/drivers/video/console/fbcon.h
> --- a/drivers/video/console/fbcon.h Sat May 15 22:54:19 2004
> +++ b/drivers/video/console/fbcon.h Sat May 15 22:54:19 2004
> @@ -38,7 +38,7 @@
>
> /* drivers/video/console/fbcon.c */
> extern char con2fb_map[MAX_NR_CONSOLES];
> -extern int set_con2fb_map(int unit, int newidx);
> +extern int set_con2fb_map(int start, int end, int newidx);
>
> /*
> * Attribute Decoding
> diff -Nru a/drivers/video/fbmem.c b/drivers/video/fbmem.c
> --- a/drivers/video/fbmem.c Sat May 15 22:54:19 2004
> +++ b/drivers/video/fbmem.c Sat May 15 22:54:19 2004
> @@ -1096,9 +1096,9 @@
> if (!registered_fb[con2fb.framebuffer])
> return -EINVAL;
> if (con2fb.console != 0)
> - set_con2fb_map(con2fb.console-1, con2fb.framebuffer);
> + set_con2fb_map(con2fb.console-1, con2fb.console-1, con2fb.framebuffer);
> else
> - fb_console_init();
> + set_con2fb_map(0, MAX_NR_CONSOLES, con2fb.framebuffer);
> return 0;
> #endif /* CONFIG_FRAMEBUFFER_CONSOLE */
> case FBIOBLANK:
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 3/4] s/FBINFO_FLAG_/FBINFO_/g
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:01 ` David Eger
2004-05-20 16:03 ` [PATCH 4/4] radeonfb accel capabilities David Eger
3 siblings, 0 replies; 18+ messages in thread
From: David Eger @ 2004-05-20 16:01 UTC (permalink / raw)
To: Andrew Morton; +Cc: David Eger, linux-fbdev-devel, linux-kernel
# This is a BitKeeper generated diff -Nru style patch.
#
# 2004/05/15 14:09:31+02:00 eger@rosencrantz.theboonies.us
# Baseline patch to make framebuffer/fbcon interaction more sane by
# basing the fbcon heuristics on capabilities advertized by underlying
# framebuffer via the fb_info.flags field.
#
# This patch runs 's/FBINFO_FLAG_DEFAULT/FBINFO_DEFAULT/g' on the fb drivers
# to let them compile with the new flags (see part a of this patch).
#
diff -Nru a/drivers/video/S3triofb.c b/drivers/video/S3triofb.c
--- a/drivers/video/S3triofb.c Sat May 15 22:53:10 2004
+++ b/drivers/video/S3triofb.c Sat May 15 22:53:10 2004
@@ -536,7 +536,7 @@
fb_info.setcmap = &s3triofbcon_setcmap;
#endif
- fb_info.flags = FBINFO_FLAG_DEFAULT;
+ fb_info.flags = FBINFO_DEFAULT;
if (register_framebuffer(&fb_info) < 0)
return;
diff -Nru a/drivers/video/amifb.c b/drivers/video/amifb.c
--- a/drivers/video/amifb.c Sat May 15 22:53:10 2004
+++ b/drivers/video/amifb.c Sat May 15 22:53:10 2004
@@ -2382,7 +2382,7 @@
fb_info.fbops = &amifb_ops;
fb_info.par = ¤tpar;
- fb_info.flags = FBINFO_FLAG_DEFAULT;
+ fb_info.flags = FBINFO_DEFAULT;
if (!fb_find_mode(&fb_info.var, &fb_info, mode_option, ami_modedb,
NUM_TOTAL_MODES, &ami_modedb[defmode], 4)) {
diff -Nru a/drivers/video/atafb.c b/drivers/video/atafb.c
--- a/drivers/video/atafb.c Sat May 15 22:53:10 2004
+++ b/drivers/video/atafb.c Sat May 15 22:53:10 2004
@@ -2798,7 +2798,7 @@
fb_info.currcon = -1;
fb_info.switch_con = &atafb_switch;
fb_info.updatevar = &fb_update_var;
- fb_info.flags = FBINFO_FLAG_DEFAULT;
+ fb_info.flags = FBINFO_DEFAULT;
do_fb_set_var(&atafb_predefined[default_par-1], 1);
strcat(fb_info.modename, fb_var_names[default_par-1][0]);
diff -Nru a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c
--- a/drivers/video/aty/aty128fb.c Sat May 15 22:53:10 2004
+++ b/drivers/video/aty/aty128fb.c Sat May 15 22:53:10 2004
@@ -1771,7 +1771,7 @@
/* fill in info */
info->fbops = &aty128fb_ops;
- info->flags = FBINFO_FLAG_DEFAULT;
+ info->flags = FBINFO_DEFAULT;
#ifdef CONFIG_PMAC_PBOOK
par->lcd_on = default_lcd_on;
diff -Nru a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c
--- a/drivers/video/aty/atyfb_base.c Sat May 15 22:53:10 2004
+++ b/drivers/video/aty/atyfb_base.c Sat May 15 22:53:10 2004
@@ -1790,7 +1790,7 @@
info->fbops = &atyfb_ops;
info->pseudo_palette = pseudo_palette;
- info->flags = FBINFO_FLAG_DEFAULT;
+ info->flags = FBINFO_DEFAULT;
#ifdef CONFIG_PMAC_BACKLIGHT
if (M64_HAS(G3_PB_1_1) && machine_is_compatible("PowerBook1,1")) {
diff -Nru a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c
--- a/drivers/video/aty/radeon_base.c Sat May 15 22:53:10 2004
+++ b/drivers/video/aty/radeon_base.c Sat May 15 22:53:10 2004
@@ -1781,7 +1781,7 @@
info->currcon = -1;
info->par = rinfo;
info->pseudo_palette = rinfo->pseudo_palette;
- info->flags = FBINFO_FLAG_DEFAULT;
+ info->flags = FBINFO_DEFAULT;
info->fbops = &radeonfb_ops;
info->display_fg = NULL;
info->screen_base = (char *)rinfo->fb_base;
diff -Nru a/drivers/video/bw2.c b/drivers/video/bw2.c
--- a/drivers/video/bw2.c Sat May 15 22:53:10 2004
+++ b/drivers/video/bw2.c Sat May 15 22:53:10 2004
@@ -347,7 +347,7 @@
all->par.fbsize = PAGE_ALIGN(linebytes * all->info.var.yres);
- all->info.flags = FBINFO_FLAG_DEFAULT;
+ all->info.flags = FBINFO_DEFAULT;
all->info.fbops = &bw2_ops;
#if defined(CONFIG_SPARC32)
if (sdev)
diff -Nru a/drivers/video/cg14.c b/drivers/video/cg14.c
--- a/drivers/video/cg14.c Sat May 15 22:53:10 2004
+++ b/drivers/video/cg14.c Sat May 15 22:53:10 2004
@@ -550,7 +550,7 @@
all->par.mode = MDI_8_PIX;
all->par.ramsize = (is_8mb ? 0x800000 : 0x400000);
- all->info.flags = FBINFO_FLAG_DEFAULT;
+ all->info.flags = FBINFO_DEFAULT;
all->info.fbops = &cg14_ops;
all->info.currcon = -1;
all->info.par = &all->par;
diff -Nru a/drivers/video/cg3.c b/drivers/video/cg3.c
--- a/drivers/video/cg3.c Sat May 15 22:53:10 2004
+++ b/drivers/video/cg3.c Sat May 15 22:53:10 2004
@@ -398,7 +398,7 @@
sbus_ioremap(&sdev->resource[0], CG3_REGS_OFFSET,
sizeof(struct cg3_regs), "cg3 regs");
- all->info.flags = FBINFO_FLAG_DEFAULT;
+ all->info.flags = FBINFO_DEFAULT;
all->info.fbops = &cg3_ops;
#ifdef CONFIG_SPARC32
all->info.screen_base = (char *)
diff -Nru a/drivers/video/cg6.c b/drivers/video/cg6.c
--- a/drivers/video/cg6.c Sat May 15 22:53:10 2004
+++ b/drivers/video/cg6.c Sat May 15 22:53:10 2004
@@ -712,7 +712,7 @@
sbus_ioremap(&sdev->resource[0], CG6_FHC_OFFSET,
sizeof(u32), "cgsix fhc");
- all->info.flags = FBINFO_FLAG_DEFAULT;
+ all->info.flags = FBINFO_DEFAULT;
all->info.fbops = &cg6_ops;
#ifdef CONFIG_SPARC32
all->info.screen_base = (char *)
diff -Nru a/drivers/video/chipsfb.c b/drivers/video/chipsfb.c
--- a/drivers/video/chipsfb.c Sat May 15 22:53:10 2004
+++ b/drivers/video/chipsfb.c Sat May 15 22:53:10 2004
@@ -362,7 +362,7 @@
p->var = chipsfb_var;
p->fbops = &chipsfb_ops;
- p->flags = FBINFO_FLAG_DEFAULT;
+ p->flags = FBINFO_DEFAULT;
fb_alloc_cmap(&p->cmap, 256, 0);
diff -Nru a/drivers/video/cirrusfb.c b/drivers/video/cirrusfb.c
--- a/drivers/video/cirrusfb.c Sat May 15 22:53:10 2004
+++ b/drivers/video/cirrusfb.c Sat May 15 22:53:10 2004
@@ -2786,7 +2786,7 @@
fb_info->gen.info.changevar = NULL;
fb_info->gen.info.switch_con = &fbgen_switch;
fb_info->gen.info.updatevar = &fbgen_update_var;
- fb_info->gen.info.flags = FBINFO_FLAG_DEFAULT;
+ fb_info->gen.info.flags = FBINFO_DEFAULT;
for (j = 0; j < 256; j++) {
if (j < 16) {
diff -Nru a/drivers/video/clps711xfb.c b/drivers/video/clps711xfb.c
--- a/drivers/video/clps711xfb.c Sat May 15 22:53:10 2004
+++ b/drivers/video/clps711xfb.c Sat May 15 22:53:10 2004
@@ -372,7 +372,7 @@
strcpy(cfb->fix.id, "clps711x");
cfb->fbops = &clps7111fb_ops;
- cfb->flags = FBINFO_FLAG_DEFAULT;
+ cfb->flags = FBINFO_DEFAULT;
clps711x_guess_lcd_params(cfb);
diff -Nru a/drivers/video/controlfb.c b/drivers/video/controlfb.c
--- a/drivers/video/controlfb.c Sat May 15 22:53:10 2004
+++ b/drivers/video/controlfb.c Sat May 15 22:53:10 2004
@@ -1010,7 +1010,7 @@
info->par = &p->par;
info->fbops = &controlfb_ops;
info->pseudo_palette = p->pseudo_palette;
- info->flags = FBINFO_FLAG_DEFAULT;
+ info->flags = FBINFO_DEFAULT;
info->screen_base = (char *) p->frame_buffer + CTRLFB_OFF;
fb_alloc_cmap(&info->cmap, 256, 0);
diff -Nru a/drivers/video/cyber2000fb.c b/drivers/video/cyber2000fb.c
--- a/drivers/video/cyber2000fb.c Sat May 15 22:53:10 2004
+++ b/drivers/video/cyber2000fb.c Sat May 15 22:53:10 2004
@@ -1281,7 +1281,7 @@
cfb->fb.var.accel_flags = FB_ACCELF_TEXT;
cfb->fb.fbops = &cyber2000fb_ops;
- cfb->fb.flags = FBINFO_FLAG_DEFAULT;
+ cfb->fb.flags = FBINFO_DEFAULT;
cfb->fb.pseudo_palette = (void *)(cfb + 1);
fb_alloc_cmap(&cfb->fb.cmap, NR_PALETTE, 0);
diff -Nru a/drivers/video/ffb.c b/drivers/video/ffb.c
--- a/drivers/video/ffb.c Sat May 15 22:53:11 2004
+++ b/drivers/video/ffb.c Sat May 15 22:53:11 2004
@@ -1027,7 +1027,7 @@
all->par.prom_node = node;
all->par.prom_parent_node = parent;
- all->info.flags = FBINFO_FLAG_DEFAULT;
+ all->info.flags = FBINFO_DEFAULT;
all->info.fbops = &ffb_ops;
all->info.screen_base = (char *) all->par.physbase + FFB_DFB24_POFF;
all->info.currcon = -1;
diff -Nru a/drivers/video/fm2fb.c b/drivers/video/fm2fb.c
--- a/drivers/video/fm2fb.c Sat May 15 22:53:10 2004
+++ b/drivers/video/fm2fb.c Sat May 15 22:53:10 2004
@@ -280,7 +280,7 @@
info->pseudo_palette = info->par;
info->par = NULL;
info->fix = fb_fix;
- info->flags = FBINFO_FLAG_DEFAULT;
+ info->flags = FBINFO_DEFAULT;
if (register_framebuffer(info) < 0) {
fb_dealloc_cmap(&info->cmap);
diff -Nru a/drivers/video/g364fb.c b/drivers/video/g364fb.c
--- a/drivers/video/g364fb.c Sat May 15 22:53:10 2004
+++ b/drivers/video/g364fb.c Sat May 15 22:53:10 2004
@@ -241,7 +241,7 @@
fb_info.screen_base = (char *) G364_MEM_BASE; /* virtual kernel address */
fb_info.var = fb_var;
fb_info.fix = fb_fix;
- fb_info.flags = FBINFO_FLAG_DEFAULT;
+ fb_info.flags = FBINFO_DEFAULT;
fb_alloc_cmap(&fb_info.cmap, 255, 0);
diff -Nru a/drivers/video/hgafb.c b/drivers/video/hgafb.c
--- a/drivers/video/hgafb.c Sat May 15 22:53:10 2004
+++ b/drivers/video/hgafb.c Sat May 15 22:53:10 2004
@@ -558,7 +558,7 @@
hga_fix.smem_start = VGA_MAP_MEM(hga_vram_base);
hga_fix.smem_len = hga_vram_len;
- fb_info.flags = FBINFO_FLAG_DEFAULT;
+ fb_info.flags = FBINFO_DEFAULT;
fb_info.var = hga_default_var;
fb_info.fix = hga_fix;
fb_info.monspecs.hfmin = 0;
diff -Nru a/drivers/video/hitfb.c b/drivers/video/hitfb.c
--- a/drivers/video/hitfb.c Sat May 15 22:53:10 2004
+++ b/drivers/video/hitfb.c Sat May 15 22:53:10 2004
@@ -321,7 +321,7 @@
fb_info.var = hitfb_var;
fb_info.fix = hitfb_fix;
fb_info.pseudo_palette = pseudo_palette;
- fb_info.flags = FBINFO_FLAG_DEFAULT;
+ fb_info.flags = FBINFO_DEFAULT;
fb_info.screen_base = (void *)hitfb_fix.smem_start;
diff -Nru a/drivers/video/hpfb.c b/drivers/video/hpfb.c
--- a/drivers/video/hpfb.c Sat May 15 22:53:10 2004
+++ b/drivers/video/hpfb.c Sat May 15 22:53:10 2004
@@ -151,7 +151,7 @@
* Let there be consoles..
*/
fb_info.fbops = &hpfb_ops;
- fb_info.flags = FBINFO_FLAG_DEFAULT;
+ fb_info.flags = FBINFO_DEFAULT;
fb_info.var = hpfb_defined;
fb_info.fix = hpfb_fix;
fb_info.screen_base = (char *)hpfb_fix.smem_start; // FIXME
diff -Nru a/drivers/video/i810/i810_main.c b/drivers/video/i810/i810_main.c
--- a/drivers/video/i810/i810_main.c Sat May 15 22:53:10 2004
+++ b/drivers/video/i810/i810_main.c Sat May 15 22:53:10 2004
@@ -1879,7 +1879,7 @@
info->screen_base = par->fb.virtual;
info->fbops = &par->i810fb_ops;
info->pseudo_palette = par->pseudo_palette;
- info->flags = FBINFO_FLAG_DEFAULT;
+ info->flags = FBINFO_DEFAULT;
fb_alloc_cmap(&info->cmap, 256, 0);
diff -Nru a/drivers/video/igafb.c b/drivers/video/igafb.c
--- a/drivers/video/igafb.c Sat May 15 22:53:10 2004
+++ b/drivers/video/igafb.c Sat May 15 22:53:10 2004
@@ -357,7 +357,7 @@
video_cmap_len = 256;
info->fbops = &igafb_ops;
- info->flags = FBINFO_FLAG_DEFAULT;
+ info->flags = FBINFO_DEFAULT;
fb_alloc_cmap(&info->cmap, video_cmap_len, 0);
diff -Nru a/drivers/video/imsttfb.c b/drivers/video/imsttfb.c
--- a/drivers/video/imsttfb.c Sat May 15 22:53:10 2004
+++ b/drivers/video/imsttfb.c Sat May 15 22:53:10 2004
@@ -1441,7 +1441,7 @@
info->var.pixclock = 1000000 / getclkMHz(par);
info->fbops = &imsttfb_ops;
- info->flags = FBINFO_FLAG_DEFAULT;
+ info->flags = FBINFO_DEFAULT;
fb_alloc_cmap(&info->cmap, 0, 0);
diff -Nru a/drivers/video/kyro/fbdev.c b/drivers/video/kyro/fbdev.c
--- a/drivers/video/kyro/fbdev.c Sat May 15 22:53:10 2004
+++ b/drivers/video/kyro/fbdev.c Sat May 15 22:53:10 2004
@@ -714,7 +714,7 @@
info->fix = kyro_fix;
info->par = currentpar;
info->pseudo_palette = (void *)(currentpar + 1);
- info->flags = FBINFO_FLAG_DEFAULT;
+ info->flags = FBINFO_DEFAULT;
SetCoreClockPLL(deviceInfo.pSTGReg, pdev);
diff -Nru a/drivers/video/leo.c b/drivers/video/leo.c
--- a/drivers/video/leo.c Sat May 15 22:53:10 2004
+++ b/drivers/video/leo.c Sat May 15 22:53:10 2004
@@ -588,7 +588,7 @@
sbus_ioremap(&sdev->resource[0], LEO_OFF_LX_CURSOR,
sizeof(struct leo_cursor), "leolx cursor");
- all->info.flags = FBINFO_FLAG_DEFAULT;
+ all->info.flags = FBINFO_DEFAULT;
all->info.fbops = &leo_ops;
all->info.currcon = -1;
all->info.par = &all->par;
diff -Nru a/drivers/video/macfb.c b/drivers/video/macfb.c
--- a/drivers/video/macfb.c Sat May 15 22:53:10 2004
+++ b/drivers/video/macfb.c Sat May 15 22:53:10 2004
@@ -947,7 +947,7 @@
fb_info.var = macfb_defined;
fb_info.fix = macfb_fix;
fb_info.pseudo_palette = pseudo_palette;
- fb_info.flags = FBINFO_FLAG_DEFAULT;
+ fb_info.flags = FBINFO_DEFAULT;
fb_alloc_cmap(&fb_info.cmap, video_cmap_len, 0);
diff -Nru a/drivers/video/matrox/matroxfb_base.c b/drivers/video/matrox/matroxfb_base.c
--- a/drivers/video/matrox/matroxfb_base.c Sat May 15 22:53:10 2004
+++ b/drivers/video/matrox/matroxfb_base.c Sat May 15 22:53:10 2004
@@ -1716,7 +1716,7 @@
ACCESS_FBINFO(fbcon.fbops) = &ACCESS_FBINFO(fbops);
ACCESS_FBINFO(fbcon.pseudo_palette) = ACCESS_FBINFO(cmap);
/* after __init time we are like module... no logo */
- ACCESS_FBINFO(fbcon.flags) = hotplug ? FBINFO_FLAG_MODULE : FBINFO_FLAG_DEFAULT;
+ ACCESS_FBINFO(fbcon.flags) = hotplug ? FBINFO_MODULE : FBINFO_DEFAULT;
ACCESS_FBINFO(video.len_usable) &= PAGE_MASK;
fb_alloc_cmap(&ACCESS_FBINFO(fbcon.cmap), 256, 1);
diff -Nru a/drivers/video/matrox/matroxfb_crtc2.c b/drivers/video/matrox/matroxfb_crtc2.c
--- a/drivers/video/matrox/matroxfb_crtc2.c Sat May 15 22:53:10 2004
+++ b/drivers/video/matrox/matroxfb_crtc2.c Sat May 15 22:53:10 2004
@@ -602,7 +602,7 @@
void* oldcrtc2;
m2info->fbcon.fbops = &matroxfb_dh_ops;
- m2info->fbcon.flags = FBINFO_FLAG_DEFAULT;
+ m2info->fbcon.flags = FBINFO_DEFAULT;
m2info->fbcon.currcon = -1;
m2info->fbcon.pseudo_palette = m2info->cmap;
fb_alloc_cmap(&m2info->fbcon.cmap, 256, 1);
diff -Nru a/drivers/video/maxinefb.c b/drivers/video/maxinefb.c
--- a/drivers/video/maxinefb.c Sat May 15 22:53:10 2004
+++ b/drivers/video/maxinefb.c Sat May 15 22:53:10 2004
@@ -159,7 +159,7 @@
fb_info.screen_base = (char *) maxinefb_fix.smem_start;
fb_info.var = maxinefb_defined;
fb_info.fix = maxinefb_fix;
- fb_info.flags = FBINFO_FLAG_DEFAULT;
+ fb_info.flags = FBINFO_DEFAULT;
fb_alloc_cmap(&fb_info.cmap, 256, 0);
diff -Nru a/drivers/video/neofb.c b/drivers/video/neofb.c
--- a/drivers/video/neofb.c Sat May 15 22:53:10 2004
+++ b/drivers/video/neofb.c Sat May 15 22:53:10 2004
@@ -2055,7 +2055,7 @@
info->fix.accel = id->driver_data;
info->fbops = &neofb_ops;
- info->flags = FBINFO_FLAG_DEFAULT;
+ info->flags = FBINFO_DEFAULT;
info->pseudo_palette = (void *) (par + 1);
return info;
}
diff -Nru a/drivers/video/offb.c b/drivers/video/offb.c
--- a/drivers/video/offb.c Sat May 15 22:53:10 2004
+++ b/drivers/video/offb.c Sat May 15 22:53:10 2004
@@ -527,7 +527,7 @@
info->screen_base = ioremap(address, fix->smem_len);
info->par = par;
info->pseudo_palette = (void *) (info + 1);
- info->flags = FBINFO_FLAG_DEFAULT;
+ info->flags = FBINFO_DEFAULT;
fb_alloc_cmap(&info->cmap, 256, 0);
diff -Nru a/drivers/video/p9100.c b/drivers/video/p9100.c
--- a/drivers/video/p9100.c Sat May 15 22:53:10 2004
+++ b/drivers/video/p9100.c Sat May 15 22:53:10 2004
@@ -297,7 +297,7 @@
sbus_ioremap(&sdev->resource[0], 0,
sizeof(struct p9100_regs), "p9100 regs");
- all->info.flags = FBINFO_FLAG_DEFAULT;
+ all->info.flags = FBINFO_DEFAULT;
all->info.fbops = &p9100_ops;
#ifdef CONFIG_SPARC32
all->info.screen_base = (char *)
diff -Nru a/drivers/video/platinumfb.c b/drivers/video/platinumfb.c
--- a/drivers/video/platinumfb.c Sat May 15 22:53:10 2004
+++ b/drivers/video/platinumfb.c Sat May 15 22:53:10 2004
@@ -311,7 +311,7 @@
/* Fill fb_info */
info->fbops = &platinumfb_ops;
info->pseudo_palette = pinfo->pseudo_palette;
- info->flags = FBINFO_FLAG_DEFAULT;
+ info->flags = FBINFO_DEFAULT;
info->screen_base = (char *) pinfo->frame_buffer + 0x20;
fb_alloc_cmap(&info->cmap, 256, 0);
diff -Nru a/drivers/video/pm2fb.c b/drivers/video/pm2fb.c
--- a/drivers/video/pm2fb.c Sat May 15 22:53:10 2004
+++ b/drivers/video/pm2fb.c Sat May 15 22:53:10 2004
@@ -1124,7 +1124,7 @@
info->fbops = &pm2fb_ops;
info->fix = pm2fb_fix;
info->pseudo_palette = (void *)(default_par + 1);
- info->flags = FBINFO_FLAG_DEFAULT;
+ info->flags = FBINFO_DEFAULT;
#ifndef MODULE
if (!mode)
diff -Nru a/drivers/video/pm3fb.c b/drivers/video/pm3fb.c
--- a/drivers/video/pm3fb.c Sat May 15 22:53:10 2004
+++ b/drivers/video/pm3fb.c Sat May 15 22:53:10 2004
@@ -1608,7 +1608,7 @@
fontn[l_fb_info->board_num]);
l_fb_info->gen.info.switch_con = &fbgen_switch;
l_fb_info->gen.info.updatevar = &fbgen_update_var; /* */
- l_fb_info->gen.info.flags = FBINFO_FLAG_DEFAULT;
+ l_fb_info->gen.info.flags = FBINFO_DEFAULT;
pm3fb_mapIO(l_fb_info);
diff -Nru a/drivers/video/pmag-ba-fb.c b/drivers/video/pmag-ba-fb.c
--- a/drivers/video/pmag-ba-fb.c Sat May 15 22:53:10 2004
+++ b/drivers/video/pmag-ba-fb.c Sat May 15 22:53:10 2004
@@ -142,7 +142,7 @@
info->var = pmagbafb_defined;
info->fix = pmagbafb_fix;
info->screen_base = pmagbafb_fix.smem_start;
- info->flags = FBINFO_FLAG_DEFAULT;
+ info->flags = FBINFO_DEFAULT;
fb_alloc_cmap(&fb_info.cmap, 256, 0);
diff -Nru a/drivers/video/pmagb-b-fb.c b/drivers/video/pmagb-b-fb.c
--- a/drivers/video/pmagb-b-fb.c Sat May 15 22:53:10 2004
+++ b/drivers/video/pmagb-b-fb.c Sat May 15 22:53:10 2004
@@ -145,7 +145,7 @@
info->var = pmagbbfb_defined;
info->fix = pmagbbfb_fix;
info->screen_base = pmagbbfb_fix.smem_start;
- info->flags = FBINFO_FLAG_DEFAULT;
+ info->flags = FBINFO_DEFAULT;
fb_alloc_cmap(&fb_info.cmap, 256, 0);
diff -Nru a/drivers/video/pvr2fb.c b/drivers/video/pvr2fb.c
--- a/drivers/video/pvr2fb.c Sat May 15 22:53:10 2004
+++ b/drivers/video/pvr2fb.c Sat May 15 22:53:10 2004
@@ -795,7 +795,7 @@
fb_info->fix = pvr2_fix;
fb_info->par = currentpar;
fb_info->pseudo_palette = (void *)(fb_info->par + 1);
- fb_info->flags = FBINFO_FLAG_DEFAULT;
+ fb_info->flags = FBINFO_DEFAULT;
if (video_output == VO_VGA)
defmode = DEFMODE_VGA;
diff -Nru a/drivers/video/q40fb.c b/drivers/video/q40fb.c
--- a/drivers/video/q40fb.c Sat May 15 22:53:10 2004
+++ b/drivers/video/q40fb.c Sat May 15 22:53:10 2004
@@ -105,7 +105,7 @@
info->var = q40fb_var;
info->fix = q40fb_fix;
info->fbops = &q40fb_ops;
- info->flags = FBINFO_FLAG_DEFAULT; /* not as module for now */
+ info->flags = FBINFO_DEFAULT; /* not as module for now */
info->pseudo_palette = info->par;
info->par = NULL;
info->screen_base = (char *) q40fb_fix.smem_start;
diff -Nru a/drivers/video/radeonfb.c b/drivers/video/radeonfb.c
--- a/drivers/video/radeonfb.c Sat May 15 22:53:10 2004
+++ b/drivers/video/radeonfb.c Sat May 15 22:53:10 2004
@@ -2250,7 +2250,7 @@
info->currcon = -1;
info->par = rinfo;
info->pseudo_palette = rinfo->pseudo_palette;
- info->flags = FBINFO_FLAG_DEFAULT;
+ info->flags = FBINFO_DEFAULT;
info->fbops = &radeonfb_ops;
info->display_fg = NULL;
info->screen_base = (char *)rinfo->fb_base;
diff -Nru a/drivers/video/retz3fb.c b/drivers/video/retz3fb.c
--- a/drivers/video/retz3fb.c Sat May 15 22:53:10 2004
+++ b/drivers/video/retz3fb.c Sat May 15 22:53:10 2004
@@ -1408,7 +1408,7 @@
fb_info->currcon = -1;
fb_info->switch_con = &z3fb_switch;
fb_info->updatevar = &z3fb_updatevar;
- fb_info->flags = FBINFO_FLAG_DEFAULT;
+ fb_info->flags = FBINFO_DEFAULT;
strlcpy(fb_info->fontname, fontname, sizeof(fb_info->fontname));
if (z3fb_mode == -1)
diff -Nru a/drivers/video/riva/fbdev.c b/drivers/video/riva/fbdev.c
--- a/drivers/video/riva/fbdev.c Sat May 15 22:53:10 2004
+++ b/drivers/video/riva/fbdev.c Sat May 15 22:53:10 2004
@@ -1589,7 +1589,7 @@
struct riva_par *par = (struct riva_par *) info->par;
unsigned int cmap_len;
- info->flags = FBINFO_FLAG_DEFAULT;
+ info->flags = FBINFO_DEFAULT;
info->var = rivafb_default_var;
info->fix = rivafb_fix;
info->fbops = &riva_fb_ops;
diff -Nru a/drivers/video/sa1100fb.c b/drivers/video/sa1100fb.c
--- a/drivers/video/sa1100fb.c Sat May 15 22:53:10 2004
+++ b/drivers/video/sa1100fb.c Sat May 15 22:53:10 2004
@@ -1673,7 +1673,7 @@
fbi->fb.var.vmode = FB_VMODE_NONINTERLACED;
fbi->fb.fbops = &sa1100fb_ops;
- fbi->fb.flags = FBINFO_FLAG_DEFAULT;
+ fbi->fb.flags = FBINFO_DEFAULT;
fbi->fb.monspecs = monspecs;
fbi->fb.currcon = -1;
fbi->fb.pseudo_palette = (fbi + 1);
diff -Nru a/drivers/video/sgivwfb.c b/drivers/video/sgivwfb.c
--- a/drivers/video/sgivwfb.c Sat May 15 22:53:10 2004
+++ b/drivers/video/sgivwfb.c Sat May 15 22:53:10 2004
@@ -790,7 +790,7 @@
fb_info.fbops = &sgivwfb_ops;
fb_info.pseudo_palette = pseudo_palette;
fb_info.par = &default_par;
- fb_info.flags = FBINFO_FLAG_DEFAULT;
+ fb_info.flags = FBINFO_DEFAULT;
fb_info.screen_base = ioremap_nocache((unsigned long) sgivwfb_mem_phys, sgivwfb_mem_size);
if (!fb_info.screen_base) {
diff -Nru a/drivers/video/sis/sis_main.c b/drivers/video/sis/sis_main.c
--- a/drivers/video/sis/sis_main.c Sat May 15 22:53:10 2004
+++ b/drivers/video/sis/sis_main.c Sat May 15 22:53:10 2004
@@ -4914,7 +4914,7 @@
}
}
- sis_fb_info->flags = FBINFO_FLAG_DEFAULT;
+ sis_fb_info->flags = FBINFO_DEFAULT;
sis_fb_info->var = default_var;
sis_fb_info->fix = sisfb_fix;
sis_fb_info->par = &ivideo;
diff -Nru a/drivers/video/sstfb.c b/drivers/video/sstfb.c
--- a/drivers/video/sstfb.c Sat May 15 22:53:10 2004
+++ b/drivers/video/sstfb.c Sat May 15 22:53:10 2004
@@ -1473,7 +1473,7 @@
f_ddprintk("membase_phys: %#lx\n", fix->smem_start);
f_ddprintk("fbbase_virt: %p\n", info->screen_base);
- info->flags = FBINFO_FLAG_DEFAULT;
+ info->flags = FBINFO_DEFAULT;
info->fbops = &sstfb_ops;
info->currcon = -1;
info->pseudo_palette = &all->pseudo_palette;
diff -Nru a/drivers/video/stifb.c b/drivers/video/stifb.c
--- a/drivers/video/stifb.c Sat May 15 22:53:11 2004
+++ b/drivers/video/stifb.c Sat May 15 22:53:11 2004
@@ -1324,7 +1324,7 @@
strcpy(fix->id, "stifb");
info->fbops = &stifb_ops;
info->screen_base = (void*) REGION_BASE(fb,1);
- info->flags = FBINFO_FLAG_DEFAULT;
+ info->flags = FBINFO_DEFAULT;
info->currcon = -1;
/* This has to been done !!! */
diff -Nru a/drivers/video/sun3fb.c b/drivers/video/sun3fb.c
--- a/drivers/video/sun3fb.c Sat May 15 22:53:10 2004
+++ b/drivers/video/sun3fb.c Sat May 15 22:53:10 2004
@@ -576,7 +576,7 @@
fb->info.changevar = NULL;
fb->info.switch_con = &sun3fbcon_switch;
fb->info.updatevar = &sun3fbcon_updatevar;
- fb->info.flags = FBINFO_FLAG_DEFAULT;
+ fb->info.flags = FBINFO_DEFAULT;
fb->cursor.hwsize.fbx = 32;
fb->cursor.hwsize.fby = 32;
diff -Nru a/drivers/video/tcx.c b/drivers/video/tcx.c
--- a/drivers/video/tcx.c Sat May 15 22:53:10 2004
+++ b/drivers/video/tcx.c Sat May 15 22:53:10 2004
@@ -412,7 +412,7 @@
all->par.mmap_map[i].poff = sdev->reg_addrs[j].phys_addr;
}
- all->info.flags = FBINFO_FLAG_DEFAULT;
+ all->info.flags = FBINFO_DEFAULT;
all->info.fbops = &tcx_ops;
#ifdef CONFIG_SPARC32
all->info.screen_base = (char *)
diff -Nru a/drivers/video/tdfxfb.c b/drivers/video/tdfxfb.c
--- a/drivers/video/tdfxfb.c Sat May 15 22:53:10 2004
+++ b/drivers/video/tdfxfb.c Sat May 15 22:53:10 2004
@@ -1253,7 +1253,7 @@
info->fix = tdfx_fix;
info->par = default_par;
info->pseudo_palette = (void *)(default_par + 1);
- info->flags = FBINFO_FLAG_DEFAULT;
+ info->flags = FBINFO_DEFAULT;
#ifndef MODULE
if (!mode_option)
diff -Nru a/drivers/video/tgafb.c b/drivers/video/tgafb.c
--- a/drivers/video/tgafb.c Sat May 15 22:53:10 2004
+++ b/drivers/video/tgafb.c Sat May 15 22:53:10 2004
@@ -1425,7 +1425,7 @@
pci_read_config_byte(pdev, PCI_REVISION_ID, &all->par.tga_chip_rev);
/* Setup framebuffer. */
- all->info.flags = FBINFO_FLAG_DEFAULT;
+ all->info.flags = FBINFO_DEFAULT;
all->info.fbops = &tgafb_ops;
all->info.screen_base = (char *) all->par.tga_fb_base;
all->info.currcon = -1;
diff -Nru a/drivers/video/tridentfb.c b/drivers/video/tridentfb.c
--- a/drivers/video/tridentfb.c Sat May 15 22:53:10 2004
+++ b/drivers/video/tridentfb.c Sat May 15 22:53:10 2004
@@ -1149,7 +1149,7 @@
fb_info.fbops = &tridentfb_ops;
- fb_info.flags = FBINFO_FLAG_DEFAULT;
+ fb_info.flags = FBINFO_DEFAULT;
fb_info.pseudo_palette = pseudo_pal;
if (!fb_find_mode(&default_var,&fb_info,mode,NULL,0,NULL,bpp))
diff -Nru a/drivers/video/tx3912fb.c b/drivers/video/tx3912fb.c
--- a/drivers/video/tx3912fb.c Sat May 15 22:53:10 2004
+++ b/drivers/video/tx3912fb.c Sat May 15 22:53:10 2004
@@ -296,7 +296,7 @@
fb_info.var = tx3912fb_var;
fb_info.fix = tx3912fb_fix;
fb_info.pseudo_palette = pseudo_palette;
- fb_info.flags = FBINFO_FLAG_DEFAULT;
+ fb_info.flags = FBINFO_DEFAULT;
/* Clear the framebuffer */
memset((void *) fb_info.fix.smem_start, 0xff, fb_info.fix.smem_len);
diff -Nru a/drivers/video/valkyriefb.c b/drivers/video/valkyriefb.c
--- a/drivers/video/valkyriefb.c Sat May 15 22:53:10 2004
+++ b/drivers/video/valkyriefb.c Sat May 15 22:53:10 2004
@@ -541,7 +541,7 @@
{
info->fbops = &valkyriefb_ops;
info->screen_base = (char *) p->frame_buffer + 0x1000;
- info->flags = FBINFO_FLAG_DEFAULT;
+ info->flags = FBINFO_DEFAULT;
info->pseudo_palette = p->pseudo_palette;
fb_alloc_cmap(&info->cmap, 256, 0);
info->par = &p->par;
diff -Nru a/drivers/video/vesafb.c b/drivers/video/vesafb.c
--- a/drivers/video/vesafb.c Sat May 15 22:53:10 2004
+++ b/drivers/video/vesafb.c Sat May 15 22:53:10 2004
@@ -362,7 +362,7 @@
info->fbops = &vesafb_ops;
info->var = vesafb_defined;
info->fix = vesafb_fix;
- info->flags = FBINFO_FLAG_DEFAULT;
+ info->flags = FBINFO_DEFAULT;
if (fb_alloc_cmap(&fb_info.cmap, video_cmap_len, 0) < 0) {
err = -ENXIO;
diff -Nru a/drivers/video/vfb.c b/drivers/video/vfb.c
--- a/drivers/video/vfb.c Sat May 15 22:53:10 2004
+++ b/drivers/video/vfb.c Sat May 15 22:53:10 2004
@@ -435,7 +435,7 @@
info->fix = vfb_fix;
info->pseudo_palette = &vfb_pseudo_palette;
info->par = NULL;
- info->flags = FBINFO_FLAG_DEFAULT;
+ info->flags = FBINFO_DEFAULT;
retval = fb_alloc_cmap(&fb_info.cmap, 256, 0);
if (retval < 0)
diff -Nru a/drivers/video/vga16fb.c b/drivers/video/vga16fb.c
--- a/drivers/video/vga16fb.c Sat May 15 22:53:10 2004
+++ b/drivers/video/vga16fb.c Sat May 15 22:53:10 2004
@@ -1370,7 +1370,7 @@
vga16fb.var = vga16fb_defined;
vga16fb.fix = vga16fb_fix;
vga16fb.par = &vga16_par;
- vga16fb.flags = FBINFO_FLAG_DEFAULT;
+ vga16fb.flags = FBINFO_DEFAULT;
vga16fb.fix.smem_start = VGA_MAP_MEM(vga16fb.fix.smem_start);
diff -Nru a/drivers/video/virgefb.c b/drivers/video/virgefb.c
--- a/drivers/video/virgefb.c Sat May 15 22:53:10 2004
+++ b/drivers/video/virgefb.c Sat May 15 22:53:10 2004
@@ -1788,7 +1788,7 @@
fb_info.currcon = -1;
fb_info.switch_con = &virgefb_switch;
fb_info.updatevar = &virgefb_updatevar;
- fb_info.flags = FBINFO_FLAG_DEFAULT;
+ fb_info.flags = FBINFO_DEFAULT;
fbhw->init();
fbhw->decode_var(&virgefb_default, &par);
fbhw->encode_var(&virgefb_default, &par);
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 4/4] radeonfb accel capabilities
2004-05-20 15:54 ` [PATCH 1/4] James' fbcon init and con2fb cleanup David Eger
` (2 preceding siblings ...)
2004-05-20 16:01 ` [PATCH 3/4] s/FBINFO_FLAG_/FBINFO_/g David Eger
@ 2004-05-20 16:03 ` David Eger
3 siblings, 0 replies; 18+ messages in thread
From: David Eger @ 2004-05-20 16:03 UTC (permalink / raw)
To: Andrew Morton; +Cc: David Eger, linux-fbdev-devel, linux-kernel
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)
^ permalink raw reply [flat|nested] 18+ messages in thread