You can subscribe to this list here.
| 2001 |
Jan
|
Feb
|
Mar
(1) |
Apr
(104) |
May
(81) |
Jun
(248) |
Jul
(133) |
Aug
(33) |
Sep
(53) |
Oct
(82) |
Nov
(166) |
Dec
(71) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2002 |
Jan
(121) |
Feb
(42) |
Mar
(39) |
Apr
(84) |
May
(87) |
Jun
(58) |
Jul
(97) |
Aug
(130) |
Sep
(32) |
Oct
(139) |
Nov
(108) |
Dec
(216) |
| 2003 |
Jan
(299) |
Feb
(136) |
Mar
(392) |
Apr
(141) |
May
(137) |
Jun
(107) |
Jul
(94) |
Aug
(262) |
Sep
(300) |
Oct
(216) |
Nov
(72) |
Dec
(94) |
| 2004 |
Jan
(174) |
Feb
(192) |
Mar
(215) |
Apr
(314) |
May
(319) |
Jun
(293) |
Jul
(205) |
Aug
(161) |
Sep
(192) |
Oct
(226) |
Nov
(308) |
Dec
(89) |
| 2005 |
Jan
(127) |
Feb
(269) |
Mar
(588) |
Apr
(106) |
May
(77) |
Jun
(77) |
Jul
(161) |
Aug
(239) |
Sep
(86) |
Oct
(112) |
Nov
(153) |
Dec
(145) |
| 2006 |
Jan
(87) |
Feb
(57) |
Mar
(129) |
Apr
(109) |
May
(102) |
Jun
(232) |
Jul
(97) |
Aug
(69) |
Sep
(67) |
Oct
(69) |
Nov
(214) |
Dec
(82) |
| 2007 |
Jan
(133) |
Feb
(307) |
Mar
(121) |
Apr
(171) |
May
(229) |
Jun
(156) |
Jul
(185) |
Aug
(160) |
Sep
(122) |
Oct
(130) |
Nov
(78) |
Dec
(27) |
| 2008 |
Jan
(105) |
Feb
(137) |
Mar
(146) |
Apr
(148) |
May
(239) |
Jun
(208) |
Jul
(157) |
Aug
(244) |
Sep
(119) |
Oct
(125) |
Nov
(189) |
Dec
(225) |
| 2009 |
Jan
(157) |
Feb
(139) |
Mar
(106) |
Apr
(130) |
May
(246) |
Jun
(189) |
Jul
(128) |
Aug
(127) |
Sep
(88) |
Oct
(86) |
Nov
(216) |
Dec
(9) |
| 2010 |
Jan
(5) |
Feb
|
Mar
(11) |
Apr
(31) |
May
(3) |
Jun
|
Jul
(7) |
Aug
|
Sep
(1) |
Oct
|
Nov
(1) |
Dec
|
| 2012 |
Jan
|
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2013 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Paul M. <pa...@sa...> - 2002-08-19 11:57:16
|
I have converted aty128fb.c in current 2.5 to the new framebuffer API, imported various fixes from the 2.4 PPC tree (fixes for running at 15bpp and 16bpp, plus support for sleeping (suspending) on powerbooks), and reindented it to 8-column tabs. Since the patch is rather large, I didn't include it here. It is available at ftp://ftp.samba.org/pub/paulus/aty128.patch instead. Paul. |
|
From: Paul M. <pa...@sa...> - 2002-08-19 11:14:13
|
This patch fixes a number of problems in atyfb.
- atyfb_encode_var was zeroing the whole var struct, which meant that
var.accel_flags got cleared, which meant that aty_init_engine didn't
get called, which meant that atyfb_fillrect and atyfb_copyarea
caused the chip to hang.
- par needs to be set inside the loop in aty_sleep_notify, since info
is different each time around the loop.
- we weren't calling gen_set_disp to set up info->disp.
Paul.
diff -urN linux-2.5/drivers/video/aty/atyfb_base.c pmac-2.5/drivers/video/aty/atyfb_base.c
--- linux-2.5/drivers/video/aty/atyfb_base.c Wed Aug 14 09:15:02 2002
+++ pmac-2.5/drivers/video/aty/atyfb_base.c Mon Aug 19 12:08:33 2002
@@ -694,6 +694,13 @@
(v_sync_pol ? 0 : FB_SYNC_VERT_HIGH_ACT) |
(c_sync ? FB_SYNC_COMP_HIGH_ACT : 0);
+ var->red.msb_right = 0;
+ var->green.msb_right = 0;
+ var->blue.offset = 0;
+ var->blue.msb_right = 0;
+ var->transp.offset = 0;
+ var->transp.length = 0;
+ var->transp.msb_right = 0;
switch (pix_width) {
#if 0
case CRTC_PIX_WIDTH_4BPP:
@@ -702,10 +709,7 @@
var->red.length = 8;
var->green.offset = 0;
var->green.length = 8;
- var->blue.offset = 0;
var->blue.length = 8;
- var->transp.offset = 0;
- var->transp.length = 0;
break;
#endif
case CRTC_PIX_WIDTH_8BPP:
@@ -714,10 +718,7 @@
var->red.length = 8;
var->green.offset = 0;
var->green.length = 8;
- var->blue.offset = 0;
var->blue.length = 8;
- var->transp.offset = 0;
- var->transp.length = 0;
break;
case CRTC_PIX_WIDTH_15BPP: /* RGB 555 */
bpp = 16;
@@ -725,10 +726,7 @@
var->red.length = 5;
var->green.offset = 5;
var->green.length = 5;
- var->blue.offset = 0;
var->blue.length = 5;
- var->transp.offset = 0;
- var->transp.length = 0;
break;
#if 0
case CRTC_PIX_WIDTH_16BPP: /* RGB 565 */
@@ -737,10 +735,7 @@
var->red.length = 5;
var->green.offset = 5;
var->green.length = 6;
- var->blue.offset = 0;
var->blue.length = 5;
- var->transp.offset = 0;
- var->transp.length = 0;
break;
#endif
case CRTC_PIX_WIDTH_24BPP: /* RGB 888 */
@@ -749,10 +744,7 @@
var->red.length = 8;
var->green.offset = 8;
var->green.length = 8;
- var->blue.offset = 0;
var->blue.length = 8;
- var->transp.offset = 0;
- var->transp.length = 0;
break;
case CRTC_PIX_WIDTH_32BPP: /* ARGB 8888 */
bpp = 32;
@@ -760,7 +752,6 @@
var->red.length = 8;
var->green.offset = 8;
var->green.length = 8;
- var->blue.offset = 0;
var->blue.length = 8;
var->transp.offset = 24;
var->transp.length = 8;
@@ -870,8 +861,7 @@
#ifdef CONFIG_BOOTX_TEXT
btext_update_display(info->fix.smem_start,
- (((par->crtc.h_tot_disp >> 16) & 0xff) +
- 1) * 8,
+ (((par->crtc.h_tot_disp >> 16) & 0xff) + 1) * 8,
((par->crtc.v_tot_disp >> 16) & 0x7ff) + 1,
info->var.bits_per_pixel,
par->crtc.vxres * info->var.bits_per_pixel / 8);
@@ -905,14 +895,13 @@
{
int err;
- memset(var, 0, sizeof(struct fb_var_screeninfo));
-
if ((err = aty_crtc_to_var(&par->crtc, var)))
return err;
var->pixclock = par->pll_ops->pll_to_var(info, &par->pll);
var->height = -1;
var->width = -1;
+ var->nonstd = 0;
return 0;
}
@@ -1442,15 +1431,15 @@
static int aty_sleep_notify(struct pmu_sleep_notifier *self, int when)
{
struct fb_info *info;
- struct atyfb_par *par = (struct atyfb_par *) info->fb.par;
+ struct atyfb_par *par;
int result;
result = PBOOK_SLEEP_OK;
for (info = first_display; info != NULL; info = par->next) {
- struct fb_fix_screeninfo fix;
int nb;
+ par = (struct atyfb_par *) info->par;
nb = fb_display[fg_console].var.yres * info->fix.line_length;
switch (when) {
@@ -1469,7 +1458,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->var.accel_flags & FB_ACCELF_TEXT)
aty_reset_engine(par);
/* Backup fb content */
@@ -1848,7 +1837,6 @@
strcpy(info->modename, info->fix.id);
info->node = NODEV;
info->fbops = &atyfb_ops;
- info->disp = disp;
info->pseudo_palette = pseudo_palette;
info->currcon = -1;
strcpy(info->fontname, fontname);
@@ -1978,7 +1966,9 @@
info->var = var;
fb_alloc_cmap(&info->cmap, 256, 0);
+ gen_set_disp(-1, info);
+ var.activate = FB_ACTIVATE_NOW;
gen_set_var(&var, -1, info);
if (register_framebuffer(info) < 0)
@@ -2383,7 +2373,6 @@
if (first_display == NULL)
pmu_register_sleep_notifier
(&aty_sleep_notifier);
- /* FIXME info->next = first_display; */
default_par->next = first_display;
#endif
}
@@ -2410,7 +2399,7 @@
return -ENOMEM;
}
memset(info, 0, sizeof(struct fb_info));
- info->fix = atyfb_fix;
+ info->fix = atyfb_fix;
/*
* Map the video memory (physical address given) to somewhere in the
@@ -2421,7 +2410,7 @@
info->fix.smem_start = info->screen_base; /* Fake! */
default_par->ati_regbase = (unsigned long)ioremap(phys_guiregbase[m64_num],
0x10000) + 0xFC00ul;
- info->fix.mmio_start = par->ati_regbase; /* Fake! */
+ info->fix.mmio_start = default_par->ati_regbase; /* Fake! */
aty_st_le32(CLOCK_CNTL, 0x12345678, default_par);
clock_r = aty_ld_le32(CLOCK_CNTL, default_par);
|
|
From: Geert U. <ge...@li...> - 2002-08-19 09:11:58
|
On Mon, 19 Aug 2002, Geert Uytterhoeven wrote:
> In cfb_copyarea(), `tmp' must be unsigned long because it is used to store
> unsigned long values (see patch at the end).
>
> cfb_copyarea() also doesn't clear the bits to modify in the first and last
> words of a line, e.g. it does
>
> | last = (FB_READ(src) & start_mask);
> |
> | if (shift > 0)
> | FB_WRITE(FB_READ(dst) | (last >> shift_right), dst);
> ^^^^^^^^^^^^
> After this read, the bits to modify must be cleared first, before the OR!
>
> I'm working on a version of cfb_copyarea() that fixes this and handles _all_
> possible values of var.bits_per_pixel (the current code assumes
> var.bits_per_pixel is a multiple of 8). Stay tuned!
^^^^^^^^^^^^^^^
Oops, actually 8, 16, or 32 only (and 24 after Antonino Daplas' patch). I also
plan on relaxing the current limitation that line_size must be a multiple of
sizeof(unsigned long).
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@li...
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
|
|
From: Geert U. <ge...@li...> - 2002-08-19 09:02:26
|
Hi,
In cfb_copyarea(), `tmp' must be unsigned long because it is used to store
unsigned long values (see patch at the end).
cfb_copyarea() also doesn't clear the bits to modify in the first and last
words of a line, e.g. it does
| last = (FB_READ(src) & start_mask);
|
| if (shift > 0)
| FB_WRITE(FB_READ(dst) | (last >> shift_right), dst);
^^^^^^^^^^^^
After this read, the bits to modify must be cleared first, before the OR!
I'm working on a version of cfb_copyarea() that fixes this and handles _all_
possible values of var.bits_per_pixel (the current code assumes
var.bits_per_pixel is a multiple of 8). Stay tuned!
--- fbdev-2.5/drivers/video/cfbcopyarea.c Mon Aug 19 10:49:58 2002
+++ geert-2.5/devivers/video/cfbcopyarea.c Mon Aug 19 10:55:53 2002
@@ -40,10 +40,10 @@
{
int x2, y2, lineincr, shift, shift_right, shift_left, old_dx, old_dy;
int j, linesize = p->fix.line_length, bpl = sizeof(unsigned long);
- unsigned long start_index, end_index, start_mask, end_mask, last;
+ unsigned long start_index, end_index, start_mask, end_mask, last, tmp;
unsigned long *dst = NULL, *src = NULL;
char *src1, *dst1;
- int tmp, height;
+ int height;
/* clip the destination */
old_dx = area->dx;
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@li...
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
|
|
From: Antonino D. <ad...@po...> - 2002-08-19 01:01:37
|
On Mon, 2002-08-19 at 07:05, Petr Vandrovec wrote: > Hi Linus, > > Since vesafb was converted to the (strange) cfb* interface, it uses random > colors for the cursor, making cursor invisible when console uses black foreground > (f.e. Midnight Commander does that). Problem is common to all fbdevs which > use fbcon-accel interface. > > This change tries to restore old behavior which existed before cfb* came in. > Unfortunately due to region.color semantic it is not possible to completely > restore previous behavior - > + for truecolor cfbfillrect always consults current palette, so we do not > have "always invert" constant available, and so we do inversion with palette > color 15 (it is light white, ~0, by default) > + for directcolor it assumes that display has at least 4 bits per color. > + for pseudocolor it works as old code worked. > I think it has been agreed that all color entries in fbcon-accel should always be an index to the pseudopalette regardless of the visuals. So a more consistent change is to have cfbfillrect look up the color from the pseudopalette assuming that the driver correctly loaded the value to the pseudopalette. |
|
From: Petr V. <van...@vc...> - 2002-08-18 23:07:50
|
Hi Linus, Since vesafb was converted to the (strange) cfb* interface, it uses random colors for the cursor, making cursor invisible when console uses black foreground (f.e. Midnight Commander does that). Problem is common to all fbdevs which use fbcon-accel interface. This change tries to restore old behavior which existed before cfb* came in. Unfortunately due to region.color semantic it is not possible to completely restore previous behavior - + for truecolor cfbfillrect always consults current palette, so we do not have "always invert" constant available, and so we do inversion with palette color 15 (it is light white, ~0, by default) + for directcolor it assumes that display has at least 4 bits per color. + for pseudocolor it works as old code worked. Thanks, Petr Vandrovec van...@vc... diff -urdN linux/drivers/video/fbcon-accel.c linux/drivers/video/fbcon-accel.c --- linux/drivers/video/fbcon-accel.c 2002-08-18 01:35:06.000000000 +0200 +++ linux/drivers/video/fbcon-accel.c 2002-08-18 15:07:42.000000000 +0200 @@ -104,7 +104,10 @@ struct fb_info *info = p->fb_info; struct fb_fillrect region; - region.color = attr_fgcol_ec(p, p->conp); + if (info->fix.visual == FB_VISUAL_PSEUDOCOLOR || info->fix.visual == FB_VISUAL_TRUECOLOR) + region.color = 0x0F; + else + region.color = (0x0F << info->var.red.offset) | (0x0F << info->var.green.offset) | (0x0F << info->var.blue.offset); region.dx = xx * fontwidth(p); region.dy = yy * fontheight(p); region.width = fontwidth(p); |
|
From: Yann D. <yd...@al...> - 2002-08-17 22:24:28
|
Hi,
I just bought a 8500DV, and find out that the fb device does not know about
it yet. I'd be happy to play with the driver and test stuff, but I lack
knowledge of the driver's architecture, and of the hardware... Needless to
say, if you have any pointers that could help me much :)
I've looked at the driver code and have a couple of questions:
- I notice there is already a PCI id for 8500 (R200 chip), and the 8500DV
uses a different ID. I suppose I should add it, but I'm wondering about the
naming conventions used for PCI_DEVICE_ID_RADEON_* (I'd be tempted to use
DV, but well... :)
BTW, the device info is as follows, I suppose the ID to add is 4242 ?
# lspci -s 1:0.0
01:00.0 VGA compatible controller: ATI Technologies Inc Radeon 8500 DV
# lspci -s 1:0.0 -vv -n
01:00.0 Class 0300: 1002:4242
Subsystem: 1002:02aa
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping+ SERR+ FastB2B-
Status: Cap+ 66Mhz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 64 (2000ns min), cache line size 08
Interrupt: pin A routed to IRQ 16
Region 0: Memory at d0000000 (32-bit, prefetchable) [size=128M]
Region 1: I/O ports at b800 [size=256]
Region 2: Memory at dfee0000 (32-bit, non-prefetchable) [size=128K]
Region 4: Memory at dfed0000 (32-bit, non-prefetchable) [size=64K]
Expansion ROM at dfea0000 [disabled] [size=128K]
Capabilities: [58] AGP version 2.0
Status: RQ=47 SBA+ 64bit- FW- Rate=x1,x2,x4
Command: RQ=0 SBA+ AGP- 64bit- FW- Rate=<none>
Capabilities: [50] Power Management version 2
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
- I'll suppose I'll have to add an entry to radeon_get_pllinfo() - what are
those pll fields, and how am I supposed to find out the values ?
- should there be any additional info to add, aside from this and the small
stuff in radeonfb_pci_register() ?
- the drm module appears to recognize the card (I still have to fetch
XFree86 4.2 to check whether this works) - is there any chance there is
any info to get from their implementation ?
# cat /proc/dri/0/name
radeon 0xe200
Best regards,
--
Yann Dirson <yd...@al...> | Why make M$-Bill richer & richer ?
Debian-related: <di...@de...> | Support Debian GNU/Linux:
Pro: <yan...@fr...> | Freedom, Power, Stability, Gratuity
http://ydirson.free.fr/ | Check <http://www.debian.org/>
|
|
From: Stephane W. <ste...@be...> - 2002-08-17 17:58:42
|
-- Stephane Wirtel <ste...@be...> Web : www.linux-mons.be "Linux Is Not UniX !!!" |
|
From: Stephane W. <ste...@be...> - 2002-08-17 09:45:14
|
-- Stephane Wirtel <ste...@be...> Web : www.linux-mons.be "Linux Is Not UniX !!!" |
|
From: Carlo E. P. <fl...@fl...> - 2002-08-17 06:22:16
|
Subject: [Linux-fbdev-devel] how to change the background's color ?
Date: sab, ago 17, 2002 at 04:49:14 +0200
Quoting Stephane Wirtel (ste...@be...):
> i would like to change the background's color.
This is not specific to framebuffers. See
man setterm
or you can send ansi escape codes to your console. You cand find some
info in the Bash-Prompt-HOWTO (that can be found in the standard
locations - probably you have it somewhere). The howto includes this
nifty script for testing all possible colour combinations:
--8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<--
#!/bin/bash
#
# This file echoes a bunch of color codes to the
# terminal to demonstrate what's available. Each
# line is the color code of one foreground color,
# out of 17 (default + 16 escapes), followed by a
# test use of that color on all nine background
# colors (default + 8 escapes).
#
T='gYw' # The test text
echo -e "\n 40m 41m 42m 43m\
44m 45m 46m 47m";
for FGs in ' m' ' 1m' ' 30m' '1;30m' ' 31m' '1;31m' ' 32m' \
'1;32m' ' 33m' '1;33m' ' 34m' '1;34m' ' 35m' '1;35m' \
' 36m' '1;36m' ' 37m' '1;37m';
do FG=${FGs// /}
echo -en " $FGs \033[$FG $T "
for BG in 40m 41m 42m 43m 44m 45m 46m 47m;
do echo -en "$EINS \033[$FG\033[$BG $T \033[0m";
done
echo;
done
echo
--8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<--
It is probably best for you to include the background change escape
sequence in your shell prompt, so your preferred colour is re-set each
time the prompt is displayed (programs like mc and ls (colorized)
change the setting).
Hope it helps.
Carlo
--
* Se la Strada e la sua Virtu' non fossero state messe da parte,
* K * Carlo E. Prelz - fl...@fl... che bisogno ci sarebbe
* di parlare tanto di amore e di rettitudine? (Chuang-Tzu)
|
|
From: Stephane W. <ste...@be...> - 2002-08-17 02:49:20
|
hi ! i would like to change the background's color. how to change ? thanks -- Stephane Wirtel <ste...@be...> Web : www.linux-mons.be "Linux Is Not UniX !!!" |
|
From: Petr V. <van...@vc...> - 2002-08-16 23:07:33
|
On Fri, Aug 16, 2002 at 03:40:31PM -0700, Nikhil Jagtiani wrote: > Hi, > > I am running linux on an ipaq with framebuffer support. I need to enable > support for an external graphics card through a pcmcia slot - the > driver for which does not exist. > > As this is my first in terms of device driver writing, I would be > grateful for some advice. > > Is it possible to write this additional driver as a dynamic kernel > module (along the lines of fbmem.c which is static), which however > itself implements all device specific functions? Can this make use of > the same ioctl functions that fbmem.c uses (defined in fb.h)? Would > there be a conflict considering that fbmem would remain in the system? Couple of fbdevs can be compiled as a module, just look for tristate in drivers/video/Config.in... You can insmod/rmmod such driver as you want, only thing you must ensure is that there are no users of your fbdev when you do rmmod. If you have two fbdevs, just move VTs from "main" to "testing" and back by using con2fb/con2fbmap. If you'll have only "testing" fbdev in your ipaq, and you have kernel with support for virtual terminals, it is very tricky, usually impossible to unload such module - it will have usecount 64 or 128 or another multiple of 64 as soon as you'll see 'Console: switching to ...' on your screen. Petr Vandrovec van...@vc... |
|
From: Nikhil J. <a3...@mo...> - 2002-08-16 22:40:15
|
Hi, I am running linux on an ipaq with framebuffer support. I need to enable support for an external graphics card through a pcmcia slot - the driver for which does not exist. As this is my first in terms of device driver writing, I would be grateful for some advice. Is it possible to write this additional driver as a dynamic kernel module (along the lines of fbmem.c which is static), which however itself implements all device specific functions? Can this make use of the same ioctl functions that fbmem.c uses (defined in fb.h)? Would there be a conflict considering that fbmem would remain in the system? Alternately if i am to write this as a static module (which loads onto fbmem.c) - is there any way i could test it out without having to recompile the kernel repeatedly? Any other suggestions on how to proceed would be very welcome. Many Thanks, Nikhil Jagtiani |
|
From: Paul M. <pa...@au...> - 2002-08-15 23:22:18
|
James Simmons writes: > That was done to push people to port there drivers to the new api. Well, what _is_ the new API? Anyway, you could apply this patch, for a start. I wish you would be a bit more careful about details. Paul. diff -urN linux-2.5/drivers/video/Makefile pmac-2.5/drivers/video/Makefile --- linux-2.5/drivers/video/Makefile Wed Aug 14 09:15:02 2002 +++ pmac-2.5/drivers/video/Makefile Fri Aug 16 09:08:34 2002 @@ -60,7 +60,7 @@ obj-$(CONFIG_FB_3DFX) += tdfxfb.o obj-$(CONFIG_FB_MAC) += macfb.o macmodes.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_HP300) += hpfb.o cfbfillrect.o cfbimgblt.o -obj-$(CONFIG_FB_OF) += offb.o cfbfillrect.o cfbimgblit.o cfbcopyarea.o +obj-$(CONFIG_FB_OF) += offb.o cfbfillrect.o cfbimgblt.o cfbcopyarea.o obj-$(CONFIG_FB_IMSTT) += imsttfb.o obj-$(CONFIG_FB_RETINAZ3) += retz3fb.o obj-$(CONFIG_FB_CLGEN) += clgenfb.o |
|
From: Petr V. <VAN...@vc...> - 2002-08-15 10:31:03
|
On 14 Aug 02 at 21:30, James Simmons wrote:
> > Hi Linus, hello others,
> > please apply this.
> >
> > line_length, type and visual moved from display struct to the fb_info's fix
> > structure during last fbdev updates. Unfortunately generic code was not updated
> > together, so now every fbdev driver is broken.
>
> That was done to push people to port there drivers to the new api. I
> applied the patch to the Bk repository but expect more breakage.
Which new API? If you are going to remove logo and unaccelerated fbcon-cfb*,
then remove them completely. If you are not going to remove unaccelerated
fbcon-cfb*, then there is no reason for breaking them.
I'm not going to remove unaccelerated code from the matroxfb. Never.
Petr Vandrovec
van...@vc...
|
|
From: James S. <jsi...@in...> - 2002-08-15 04:36:49
|
> Hi Linus, hello others, > please apply this. > > line_length, type and visual moved from display struct to the fb_info's fix > structure during last fbdev updates. Unfortunately generic code was not updated > together, so now every fbdev driver is broken. That was done to push people to port there drivers to the new api. I applied the patch to the Bk repository but expect more breakage. |
|
From: Petr V. <van...@vc...> - 2002-08-14 19:29:56
|
Hello,
I have strange VGA driver which supports also 360x480 in 256 colors by using 4 planes,
and which supports native text mode. I updated it to the new fbdev API. If you are
really using vga16fb, please tell me whether you are interested in this code or not.
If you are interested, please verify whether it works correctly on your hardware
(especially non-ia32), and persuade me to send it to Linus. Otherwise I'll drop it
and will forget about crappy VGA hardware.
For working driver you also need patch to generic drivers/video/* files I sent
few minutes ago.
Best regards,
Petr Vandrovec
van...@vc...
diff -urdN linux/drivers/video/Makefile linux/drivers/video/Makefile
--- linux/drivers/video/Makefile 2002-08-14 17:55:07.000000000 +0200
+++ linux/drivers/video/Makefile 2002-08-14 17:59:19.000000000 +0200
@@ -8,7 +8,7 @@
export-objs := fbmem.o fbcmap.o fbcon.o fbmon.o modedb.o \
fbcon-afb.o fbcon-ilbm.o fbcon-accel.o \
fbcon-vga.o fbcon-iplan2p2.o fbcon-iplan2p4.o \
- fbcon-iplan2p8.o fbcon-vga-planes.o fbcon-cfb16.o \
+ fbcon-iplan2p8.o fbcon-vga-planes.o fbcon-vga8-planes.o fbcon-cfb16.o \
fbcon-cfb2.o fbcon-cfb24.o fbcon-cfb32.o fbcon-cfb4.o \
fbcon-cfb8.o fbcon-mfb.o fbcon-hga.o \
cyber2000fb.o sa1100fb.o fbgen.o
@@ -68,7 +68,7 @@
obj-$(CONFIG_FB_S3TRIO) += S3triofb.o
obj-$(CONFIG_FB_TGA) += tgafb.o
obj-$(CONFIG_FB_VESA) += vesafb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o
-obj-$(CONFIG_FB_VGA16) += vga16fb.o fbcon-vga-planes.o
+obj-$(CONFIG_FB_VGA16) += vga16fb.o fbcon-vga-planes.o fbcon-vga8-planes.o
obj-$(CONFIG_FB_VIRGE) += virgefb.o
obj-$(CONFIG_FB_G364) += g364fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o
obj-$(CONFIG_FB_FM2) += fm2fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o
diff -urdN linux/drivers/video/fbcon-vga8-planes.c linux/drivers/video/fbcon-vga8-planes.c
--- linux/drivers/video/fbcon-vga8-planes.c 1970-01-01 01:00:00.000000000 +0100
+++ linux/drivers/video/fbcon-vga8-planes.c 2002-08-14 17:59:19.000000000 +0200
@@ -0,0 +1,382 @@
+/*
+ * linux/drivers/video/fbcon-vga8-planes.c -- Low level frame buffer operations
+ * for VGA 256 color, 4-plane modes
+ *
+ * Created Feb 2, 1999, by Petr Vandrovec <van...@vc...>
+ * and Ben Pfaff
+ * Based on code by Michael Schmitz
+ * Based on the old macfb.c 4bpp code by Alan Cox
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file COPYING in the main directory of this archive for
+ * more details.
+ */
+
+#include <linux/module.h>
+#include <linux/tty.h>
+#include <linux/console.h>
+#include <linux/string.h>
+#include <linux/fb.h>
+#include <linux/vt_buffer.h>
+
+#include <asm/io.h>
+
+#include <video/fbcon.h>
+#include <video/fbcon-vga-planes.h>
+#include "vga.h"
+
+#define GRAPHICS_ADDR_REG VGA_GFX_I /* Graphics address register. */
+#define GRAPHICS_DATA_REG VGA_GFX_D /* Graphics data register. */
+
+#define SET_RESET_INDEX VGA_GFX_SR_VALUE /* Set/Reset Register index. */
+#define ENABLE_SET_RESET_INDEX VGA_GFX_SR_ENABLE /* Enable Set/Reset Register index. */
+#define DATA_ROTATE_INDEX VGA_GFX_DATA_ROTATE /* Data Rotate Register index. */
+#define GRAPHICS_MODE_INDEX VGA_GFX_MODE /* Graphics Mode Register index. */
+#define BIT_MASK_INDEX VGA_GFX_BIT_MASK /* Bit Mask Register index. */
+
+/* The VGA's weird architecture often requires that we read a byte and
+ write a byte to the same location. It doesn't matter *what* byte
+ we write, however. This is because all the action goes on behind
+ the scenes in the VGA's 32-bit latch register, and reading and writing
+ video memory just invokes latch behavior.
+
+ To avoid race conditions (is this necessary?), reading and writing
+ the memory byte should be done with a single instruction. One
+ suitable instruction is the x86 bitwise OR. The following
+ read-modify-write routine should optimize to one such bitwise
+ OR. */
+static inline void rmw(volatile char *p)
+{
+ readb(p);
+ writeb(0, p);
+}
+
+/* Set the Graphics Mode Register, and return its previous value.
+ Bits 0-1 are write mode, bit 3 is read mode. */
+static inline int setmode(int mode)
+{
+ int oldmode;
+ vga_io_w(GRAPHICS_ADDR_REG, GRAPHICS_MODE_INDEX);
+ oldmode = vga_io_r(GRAPHICS_DATA_REG);
+ vga_io_w(GRAPHICS_DATA_REG, mode);
+ return oldmode;
+}
+
+/* Select the Bit Mask Register and return its value. */
+static inline int selectmask(void)
+{
+ return vga_io_rgfx(BIT_MASK_INDEX);
+}
+
+/* Set the value of the Bit Mask Register. */
+static inline void setmask(int mask)
+{
+ vga_io_w(GRAPHICS_DATA_REG, mask);
+}
+
+/* Set the Data Rotate Register and return its old value. Bits 0-2
+ are rotate count, bits 3-4 are logical operation (0=NOP, 1=AND,
+ 2=OR, 3=XOR). */
+static inline int setop(int op)
+{
+ int oldop;
+ vga_io_w(GRAPHICS_ADDR_REG, DATA_ROTATE_INDEX);
+ oldop = vga_io_r(GRAPHICS_DATA_REG);
+ vga_io_w(GRAPHICS_DATA_REG, op);
+ return oldop;
+}
+
+/* Set the Enable Set/Reset Register and return its old value. The
+ code here always uses value 0xf for this register. */
+static inline int setsr(int sr)
+{
+ int oldsr;
+ vga_io_w(GRAPHICS_ADDR_REG, ENABLE_SET_RESET_INDEX);
+ oldsr = vga_io_r(GRAPHICS_DATA_REG);
+ vga_io_w(GRAPHICS_DATA_REG, sr);
+ return oldsr;
+}
+
+/* Set the Set/Reset Register and return its old value. */
+static inline int setcolor(int color)
+{
+ int oldcolor;
+ vga_io_w(GRAPHICS_ADDR_REG, SET_RESET_INDEX);
+ oldcolor = vga_io_r(GRAPHICS_DATA_REG);
+ vga_io_w(GRAPHICS_DATA_REG, color);
+ return oldcolor;
+}
+
+/* Return the value in the Graphics Address Register. */
+static inline int getindex(void)
+{
+ return vga_io_r(GRAPHICS_ADDR_REG);
+}
+
+/* Set the value in the Graphics Address Register. */
+static inline void setindex(int index)
+{
+ vga_io_w(GRAPHICS_ADDR_REG, index);
+}
+
+static void fbcon_vga8_planes_setup(struct display *p)
+{
+}
+
+static void fbcon_vga8_planes_bmove(struct display *p, int sy, int sx,
+ int dy, int dx, int height, int width)
+{
+ char oldindex = getindex();
+ char oldmode = setmode(0x41);
+ char oldop = setop(0);
+ char oldsr = setsr(0xf);
+
+ char *src;
+ char *dest;
+ int line_ofs;
+ int x;
+
+ sy *= fontheight(p);
+ dy *= fontheight(p);
+ height *= fontheight(p);
+ sx *= fontwidth(p) / 4;
+ dx *= fontwidth(p) / 4;
+ width *= fontwidth(p) / 4;
+ if (dy < sy || (dy == sy && dx < sx)) {
+ line_ofs = p->fb_info->fix.line_length - width;
+ dest = p->fb_info->screen_base + dx + dy * p->fb_info->fix.line_length;
+ src = p->fb_info->screen_base + sx + sy * p->fb_info->fix.line_length;
+ while (height--) {
+ for (x = 0; x < width; x++) {
+ readb(src);
+ writeb(0, dest);
+ src++;
+ dest++;
+ }
+ src += line_ofs;
+ dest += line_ofs;
+ }
+ } else {
+ line_ofs = p->fb_info->fix.line_length - width;
+ dest = p->fb_info->screen_base + dx + width + (dy + height - 1) * p->fb_info->fix.line_length;
+ src = p->fb_info->screen_base + sx + width + (sy + height - 1) * p->fb_info->fix.line_length;
+ while (height--) {
+ for (x = 0; x < width; x++) {
+ --src;
+ --dest;
+ readb(src);
+ writeb(0, dest);
+ }
+ src -= line_ofs;
+ dest -= line_ofs;
+ }
+ }
+
+ setsr(oldsr);
+ setop(oldop);
+ setmode(oldmode);
+ setindex(oldindex);
+}
+
+static void fbcon_vga8_planes_clear(struct vc_data *conp, struct display *p,
+ int sy, int sx, int height, int width)
+{
+ char oldindex = getindex();
+ char oldmode = setmode(0x40);
+ char oldop = setop(0);
+ char oldsr = setsr(0);
+ char oldmask = selectmask();
+
+ int line_ofs;
+ char *where;
+ int color = attr_bgcol_ec(p, conp);
+
+ width *= fontwidth(p) / 4;
+ sx *= fontwidth(p) / 4;
+ line_ofs = p->fb_info->fix.line_length - width;
+ setmask(0xff);
+
+ sy *= fontheight(p);
+ height *= fontheight(p);
+
+ where = p->fb_info->screen_base + sx + sy * p->fb_info->fix.line_length;
+ while (height--) {
+ int x;
+
+ /* we can do memset... */
+ for (x = width; x > 0; --x) {
+ writeb(color, where);
+ where++;
+ }
+ where += line_ofs;
+ }
+
+ setmask(oldmask);
+ setsr(oldsr);
+ setop(oldop);
+ setmode(oldmode);
+ setindex(oldindex);
+}
+
+#ifdef __LITTLE_ENDIAN
+static unsigned int transl_l[] =
+{0x0,0x8,0x4,0xC,0x2,0xA,0x6,0xE,0x1,0x9,0x5,0xD,0x3,0xB,0x7,0xF};
+static unsigned int transl_h[] =
+{0x000, 0x800, 0x400, 0xC00, 0x200, 0xA00, 0x600, 0xE00,
+ 0x100, 0x900, 0x500, 0xD00, 0x300, 0xB00, 0x700, 0xF00};
+#else
+#ifdef __BIG_ENDIAN
+static unsigned int transl_h[] =
+{0x0,0x8,0x4,0xC,0x2,0xA,0x6,0xE,0x1,0x9,0x5,0xD,0x3,0xB,0x7,0xF};
+static unsigned int transl_l[] =
+{0x000, 0x800, 0x400, 0xC00, 0x200, 0xA00, 0x600, 0xE00,
+ 0x100, 0x900, 0x500, 0xD00, 0x300, 0xB00, 0x700, 0xF00};
+#else
+#error "Only __BIG_ENDIAN and __LITTLE_ENDIAN are supported in vga-planes"
+#endif
+#endif
+static void fbcon_vga8_planes_putc(struct vc_data *conp, struct display *p,
+ int c, int yy, int xx)
+{
+ int fg = attr_fgcol(p,c);
+ int bg = attr_bgcol(p,c);
+
+ char oldindex = getindex();
+ char oldmode = setmode(0x40);
+ char oldop = setop(0);
+ char oldsr = setsr(0);
+ char oldmask = selectmask();
+
+ int y;
+ u8 *cdat = p->fontdata + (c & p->charmask) * fontheight(p);
+ char *where;
+
+ xx *= fontwidth(p) / 4;
+ where = p->fb_info->screen_base + xx + yy * p->fb_info->fix.line_length * fontheight(p);
+
+ setmask(0xff);
+ writeb(bg, where);
+ readb(where);
+ selectmask();
+ setmask(fg ^ bg);
+ setmode(0x42);
+ setop(0x18);
+ for (y = 0; y < fontheight(p); y++, where += p->fb_info->fix.line_length) {
+ writew(transl_h[cdat[y]&0xF] | transl_l[cdat[y] >> 4],
+ where);
+ }
+ setmask(oldmask);
+ setsr(oldsr);
+ setop(oldop);
+ setmode(oldmode);
+ setindex(oldindex);
+}
+
+static void fbcon_vga8_planes_putcs(struct vc_data *conp, struct display *p,
+ const unsigned short *s, int count,
+ int yy, int xx)
+{
+ int fg = attr_fgcol(p,scr_readw(s));
+ int bg = attr_bgcol(p,scr_readw(s));
+
+ char oldindex = getindex();
+ char oldmode = setmode(0x40);
+ char oldop = setop(0);
+ char oldsr = setsr(0);
+ char oldmask = selectmask();
+
+ char *where;
+ int n;
+
+ xx *= fontwidth(p) / 4;
+ /* First clear it all to the background color. */
+ setmask(0xff);
+ where = p->fb_info->screen_base + xx + yy * p->fb_info->fix.line_length * fontheight(p);
+ writeb(bg, where);
+ readb(where); /* fill latches with background */
+ selectmask();
+ setmask(fg ^ bg);
+ setmode(0x42);
+ setop(0x18);
+ for (n = 0; n < count; n++) {
+ int y;
+ int c = scr_readw(s++) & p->charmask;
+ u8 *cdat = p->fontdata + (c & p->charmask) * fontheight(p);
+
+ for (y = 0; y < fontheight(p); y++, cdat++) {
+ writew(transl_h[*cdat&0xF] | transl_l[*cdat >> 4],
+ where);
+ where += p->fb_info->fix.line_length;
+ }
+ where += 2 - p->fb_info->fix.line_length * fontheight(p);
+ }
+
+ selectmask();
+ setmask(oldmask);
+ setop(oldop);
+ setmode(oldmode);
+ setsr(oldsr);
+ setindex(oldindex);
+}
+
+static void fbcon_vga8_planes_revc(struct display *p, int xx, int yy)
+{
+ char oldindex = getindex();
+ char oldmode = setmode(0x40);
+ char oldop = setop(0x18);
+ char oldsr = setsr(0xf);
+ char oldcolor = setcolor(0xf);
+ char oldmask = selectmask();
+
+ char *where;
+ int y;
+
+ xx *= fontwidth(p) / 4;
+ where = p->fb_info->screen_base + xx + yy * p->fb_info->fix.line_length * fontheight(p);
+
+ setmask(0x0F);
+ for (y = 0; y < fontheight(p); y++) {
+ rmw(where);
+ rmw(where+1);
+ where += p->fb_info->fix.line_length;
+ }
+
+ setmask(oldmask);
+ setcolor(oldcolor);
+ setsr(oldsr);
+ setop(oldop);
+ setmode(oldmode);
+ setindex(oldindex);
+}
+
+struct display_switch fbcon_vga8_planes = {
+ fbcon_vga8_planes_setup, fbcon_vga8_planes_bmove, fbcon_vga8_planes_clear,
+ fbcon_vga8_planes_putc, fbcon_vga8_planes_putcs, fbcon_vga8_planes_revc,
+ NULL, NULL, NULL, FONTWIDTH(8)
+};
+
+#ifdef MODULE
+int init_module(void)
+{
+ return 0;
+}
+
+void cleanup_module(void)
+{}
+#endif /* MODULE */
+
+
+ /*
+ * Visible symbols for modules
+ */
+
+EXPORT_SYMBOL(fbcon_vga8_planes);
+
+/*
+ * Overrides for Emacs so that we follow Linus's tabbing style.
+ * ---------------------------------------------------------------------------
+ * Local variables:
+ * c-basic-offset: 8
+ * End:
+ */
+
diff -urdN linux/drivers/video/vga16fb.c linux/drivers/video/vga16fb.c
--- linux/drivers/video/vga16fb.c 2002-08-14 17:55:10.000000000 +0200
+++ linux/drivers/video/vga16fb.c 2002-08-14 18:38:25.000000000 +0200
@@ -27,10 +27,13 @@
#include <video/fbcon.h>
#include <video/fbcon-vga-planes.h>
+#include <video/fbcon-vga.h>
+#include <video/fbcon-cfb4.h>
+#include <video/fbcon-cfb8.h>
#include "vga.h"
-#define dac_reg (0x3c8)
-#define dac_val (0x3c9)
+#define dac_reg (VGA_PEL_IW)
+#define dac_val (VGA_PEL_D)
#define VGA_FB_PHYS 0xA0000
#define VGA_FB_PHYS_LEN 65536
@@ -70,11 +73,11 @@
struct vga16fb_par {
u8 crtc[VGA_CRT_C];
- u8 atc[VGA_ATT_C];
- u8 gdc[VGA_GFX_C];
- u8 seq[VGA_SEQ_C];
u8 misc;
+ u8 pel_msk;
u8 vss;
+ int mode;
+ u8 clkdiv;
struct fb_var_screeninfo var;
};
@@ -104,103 +107,142 @@
/* --------------------------------------------------------------------- */
-static void vga16fb_pan_var(struct fb_info *info, struct fb_var_screeninfo *var)
+static void vga16fb_pan_var(struct fb_info *info,
+ struct fb_var_screeninfo *var,
+ struct display *p)
{
- u32 pos = (var->xres_virtual * var->yoffset + var->xoffset) >> 3;
- outb(VGA_CRTC_START_HI, VGA_CRT_IC);
- outb(pos >> 8, VGA_CRT_DC);
- outb(VGA_CRTC_START_LO, VGA_CRT_IC);
- outb(pos & 0xFF, VGA_CRT_DC);
-#if 0
+ u32 pos;
+ u32 xoffset;
+
+ xoffset = var->xoffset;
+ if (info->var.bits_per_pixel == 8) {
+ pos = (info->var.xres_virtual * var->yoffset + xoffset) >> 2;
+ } else if (info->var.bits_per_pixel == 0) {
+ int fh = fontheight(p);
+ if (!fh) fh = 16;
+ pos = (info->var.xres_virtual * (var->yoffset / fh) + xoffset) >> 3;
+ } else {
+ if (info->var.nonstd)
+ xoffset--;
+ pos = (info->var.xres_virtual * var->yoffset + xoffset) >> 3;
+ }
+ vga_io_wcrt(VGA_CRTC_START_HI, pos >> 8);
+ vga_io_wcrt(VGA_CRTC_START_LO, pos & 0xFF);
+/* if we support CFB4, then we must! support xoffset with pixel granularity */
/* if someone supports xoffset in bit resolution */
- inb(VGA_IS1_RC); /* reset flip-flop */
- outb(VGA_ATC_PEL, VGA_ATT_IW);
- outb(xoffset & 7, VGA_ATT_IW);
- inb(VGA_IS1_RC);
- outb(0x20, VGA_ATT_IW);
-#endif
+ vga_io_r(VGA_IS1_RC); /* reset flip-flop */
+ vga_io_w(VGA_ATT_IW, VGA_ATC_PEL);
+ if (var->bits_per_pixel == 8)
+ vga_io_w(VGA_ATT_IW, (xoffset & 3) << 1);
+ else
+ vga_io_w(VGA_ATT_IW, xoffset & 7);
+ vga_io_r(VGA_IS1_RC);
+ vga_io_w(VGA_ATT_IW, 0x20);
}
static int vga16fb_update_var(int con, struct fb_info *info)
{
- vga16fb_pan_var(info, &fb_display[con].var);
+ struct display* p;
+
+ p = (con < 0) ? info->disp : fb_display + con;
+ vga16fb_pan_var(info, &p->var, p);
return 0;
}
-static int vga16fb_get_fix(struct fb_fix_screeninfo *fix, int con,
- struct fb_info *info)
+static void vga16fb_update_fix(struct fb_info *info)
{
- struct display *p;
-
- if (con < 0)
- p = &disp;
- else
- p = fb_display + con;
+ struct fb_fix_screeninfo *fix = &info->fix;
memset(fix, 0, sizeof(struct fb_fix_screeninfo));
strcpy(fix->id,"VGA16 VGA");
fix->smem_start = VGA_FB_PHYS;
fix->smem_len = VGA_FB_PHYS_LEN;
- fix->type = FB_TYPE_VGA_PLANES;
+ if (info->var.bits_per_pixel == 4) {
+ if (info->var.nonstd) {
+ fix->type = FB_TYPE_PACKED_PIXELS;
+ fix->line_length = info->var.xres_virtual / 2;
+ } else {
+ fix->type = FB_TYPE_VGA_PLANES;
+ fix->type_aux = FB_AUX_VGA_PLANES_VGA4;
+ fix->line_length = info->var.xres_virtual / 8;
+ }
+ } else if (info->var.bits_per_pixel == 0) {
+ fix->type = FB_TYPE_TEXT;
+ fix->type_aux = FB_AUX_TEXT_CGA;
+ fix->line_length = info->var.xres_virtual / 4;
+ } else { /* 8bpp */
+ if (info->var.nonstd) {
+ fix->type = FB_TYPE_VGA_PLANES;
+ fix->type_aux = FB_AUX_VGA_PLANES_CFB8;
+ fix->line_length = info->var.xres_virtual / 4;
+ } else {
+ fix->type = FB_TYPE_PACKED_PIXELS;
+ fix->line_length = info->var.xres_virtual;
+ }
+ }
fix->visual = FB_VISUAL_PSEUDOCOLOR;
fix->xpanstep = 8;
fix->ypanstep = 1;
fix->ywrapstep = 0;
- fix->line_length = p->var.xres_virtual / 8;
- return 0;
-}
-
-static int vga16fb_get_var(struct fb_var_screeninfo *var, int con,
- struct fb_info *info)
-{
- if(con==-1)
- memcpy(var, &vga16fb_defined, sizeof(struct fb_var_screeninfo));
- else
- *var=fb_display[con].var;
- return 0;
}
static void vga16fb_set_disp(int con, struct vga16fb_info *info)
{
- struct fb_fix_screeninfo fix;
+ struct fb_fix_screeninfo *fix = &info->fb_info.fix;
struct display *display;
- if (con < 0)
- display = &disp;
- else
- display = fb_display + con;
-
-
- vga16fb_get_fix(&fix, con, &info->fb_info);
+ display = (con < 0) ? info->fb_info.disp : fb_display + con;
- display->visual = fix.visual;
- display->type = fix.type;
- display->type_aux = fix.type_aux;
- display->ypanstep = fix.ypanstep;
- display->ywrapstep = fix.ywrapstep;
- display->line_length = fix.line_length;
- display->next_line = fix.line_length;
+ if (con != info->fb_info.currcon) {
+ display->dispsw = &fbcon_dummy;
+ return;
+ }
+ vga16fb_update_fix(&info->fb_info);
+ display->next_line = fix->line_length;
display->can_soft_blank = 1;
display->inverse = 0;
- if (info->isVGA)
- display->dispsw = &fbcon_vga_planes;
- else
- display->dispsw = &fbcon_ega_planes;
- display->scrollmode = SCROLL_YREDRAW;
-}
-
-static void vga16fb_encode_var(struct fb_var_screeninfo *var,
- const struct vga16fb_par *par,
- const struct vga16fb_info *info)
-{
- *var = par->var;
+ switch (fix->type) {
+#ifdef FBCON_HAS_VGA_PLANES
+ case FB_TYPE_VGA_PLANES:
+ if (fix->type_aux == FB_AUX_VGA_PLANES_VGA4) {
+ if (info->isVGA)
+ display->dispsw = &fbcon_vga_planes;
+ else
+ display->dispsw = &fbcon_ega_planes;
+ } else
+ display->dispsw = &fbcon_vga8_planes;
+ break;
+#endif
+#ifdef FBCON_HAS_VGA
+ case FB_TYPE_TEXT:
+ display->dispsw = &fbcon_vga;
+ break;
+#endif
+ default: /* only FB_TYPE_PACKED_PIXELS */
+ switch (display->var.bits_per_pixel) {
+#ifdef FBCON_HAS_CFB4
+ case 4:
+ display->dispsw = &fbcon_cfb4;
+ break;
+#endif
+#ifdef FBCON_HAS_CFB8
+ case 8:
+ display->dispsw = &fbcon_cfb8;
+ break;
+#endif
+ default:
+ display->dispsw = &fbcon_dummy;
+ }
+ break;
+ }
}
static void vga16fb_clock_chip(struct vga16fb_par *par,
unsigned int pixclock,
- const struct vga16fb_info *info)
+ const struct vga16fb_info *info,
+ int mul, int div)
{
static struct {
u32 pixclock;
@@ -214,6 +256,7 @@
{ 0 /* bad */, 0x00, 0x00}};
int err;
+ pixclock = (pixclock * mul) / div;
best = vgaclocks;
err = pixclock - best->pixclock;
if (err < 0) err = -err;
@@ -228,25 +271,89 @@
}
}
par->misc |= best->misc;
- par->seq[VGA_SEQ_CLOCK_MODE] |= best->seq_clock_mode;
- par->var.pixclock = best->pixclock;
+ par->clkdiv = best->seq_clock_mode;
+ par->var.pixclock = (best->pixclock * div) / mul;
}
#define FAIL(X) return -EINVAL
+#define MODE_SKIP4 1
+#define MODE_8BPP 2
+#define MODE_CFB 4
+#define MODE_TEXT 8
static int vga16fb_decode_var(const struct fb_var_screeninfo *var,
struct vga16fb_par *par,
- const struct vga16fb_info *info)
+ const struct vga16fb_info *info,
+ struct display *p)
{
u32 xres, right, hslen, left, xtotal;
u32 yres, lower, vslen, upper, ytotal;
u32 vxres, xoffset, vyres, yoffset;
u32 pos;
u8 r7, rMode;
- int i;
+ int shift;
+ int mode;
+ u32 maxmem;
- if (var->bits_per_pixel != 4)
+ par->pel_msk = 0xFF;
+
+ if (var->bits_per_pixel == 4) {
+ if (var->nonstd) {
+#ifdef FBCON_HAS_CFB4
+ if (!info->isVGA)
+ return -EINVAL;
+ shift = 3;
+ mode = MODE_SKIP4 | MODE_CFB;
+ maxmem = 16384;
+ par->pel_msk = 0x0F;
+#else
+ return -EINVAL;
+#endif
+ } else {
+#ifdef FBCON_HAS_VGA_PLANES
+ shift = 3;
+ mode = 0;
+ maxmem = 65536;
+#else
+ return -EINVAL;
+#endif
+ }
+ } else if (var->bits_per_pixel == 8) {
+ if (!info->isVGA)
+ return -EINVAL; /* no support on EGA */
+ shift = 2;
+ if (var->nonstd) {
+#ifdef FBCON_HAS_VGA_PLANES
+ mode = MODE_8BPP | MODE_CFB;
+ maxmem = 65536;
+#else
+ return -EINVAL;
+#endif
+ } else {
+#ifdef FBCON_HAS_CFB8
+ mode = MODE_SKIP4 | MODE_8BPP | MODE_CFB;
+ maxmem = 16384;
+#else
+ return -EINVAL;
+#endif
+ }
+ }
+#ifdef FBCON_HAS_VGA
+ else if (var->bits_per_pixel == 0) {
+ int fh;
+
+ shift = 3;
+ mode = MODE_TEXT;
+ fh = fontheight(p);
+ if (!fh)
+ fh = 16;
+ maxmem = 32768 * fh;
+ }
+#endif
+ else
return -EINVAL;
+ par->var.nonstd = var->nonstd;
+
xres = (var->xres + 7) & ~7;
vxres = (var->xres_virtual + 0xF) & ~0xF;
xoffset = (var->xoffset + 7) & ~7;
@@ -266,11 +373,11 @@
par->var.xres_virtual = vxres;
par->var.xoffset = xoffset;
- xres >>= 3;
- right >>= 3;
- hslen >>= 3;
- left >>= 3;
- vxres >>= 3;
+ xres >>= shift;
+ right >>= shift;
+ hslen >>= shift;
+ left >>= shift;
+ vxres >>= shift;
xtotal = xres + right + hslen + left;
if (xtotal >= 256)
FAIL("xtotal too big");
@@ -299,8 +406,8 @@
if (yres > vyres)
vyres = yres;
- if (vxres * vyres > 65536) {
- vyres = 65536 / vxres;
+ if (vxres * vyres > maxmem) {
+ vyres = maxmem / vxres;
if (vyres < yres)
return -ENOMEM;
}
@@ -344,7 +451,9 @@
par->crtc[VGA_CRTC_MAX_SCAN] |= 0x80;
par->crtc[VGA_CRTC_CURSOR_START] = 0x20;
par->crtc[VGA_CRTC_CURSOR_END] = 0x00;
- pos = yoffset * vxres + (xoffset >> 3);
+ if ((mode & (MODE_CFB | MODE_8BPP)) == MODE_CFB)
+ xoffset--;
+ pos = yoffset * vxres + (xoffset >> shift);
par->crtc[VGA_CRTC_START_HI] = pos >> 8;
par->crtc[VGA_CRTC_START_LO] = pos & 0xFF;
par->crtc[VGA_CRTC_CURSOR_HI] = 0x00;
@@ -372,53 +481,39 @@
if (vxres >= 512)
FAIL("vxres too long");
par->crtc[VGA_CRTC_OFFSET] = vxres >> 1;
- par->crtc[VGA_CRTC_UNDERLINE] = 0x1F;
- par->crtc[VGA_CRTC_MODE] = rMode | 0xE3;
+ if (mode & MODE_SKIP4)
+ par->crtc[VGA_CRTC_UNDERLINE] = 0x5F; /* 256, cfb8 */
+ else
+ par->crtc[VGA_CRTC_UNDERLINE] = 0x1F; /* 16, vgap */
+ par->crtc[VGA_CRTC_MODE] = rMode | ((mode & MODE_TEXT) ? 0xA3 : 0xE3);
par->crtc[VGA_CRTC_LINE_COMPARE] = 0xFF;
par->crtc[VGA_CRTC_OVERFLOW] = r7;
par->vss = 0x00; /* 3DA */
- for (i = 0x00; i < 0x10; i++)
- par->atc[i] = i;
- par->atc[VGA_ATC_MODE] = 0x81;
- par->atc[VGA_ATC_OVERSCAN] = 0x00; /* 0 for EGA, 0xFF for VGA */
- par->atc[VGA_ATC_PLANE_ENABLE] = 0x0F;
- par->atc[VGA_ATC_PEL] = xoffset & 7;
- par->atc[VGA_ATC_COLOR_PAGE] = 0x00;
-
- par->misc = 0xC3; /* enable CPU, ports 0x3Dx, positive sync */
+ par->misc = 0xE3; /* enable CPU, ports 0x3Dx, positive sync */
par->var.sync = var->sync;
if (var->sync & FB_SYNC_HOR_HIGH_ACT)
par->misc &= ~0x40;
if (var->sync & FB_SYNC_VERT_HIGH_ACT)
par->misc &= ~0x80;
- par->seq[VGA_SEQ_CLOCK_MODE] = 0x01;
- par->seq[VGA_SEQ_PLANE_WRITE] = 0x0F;
- par->seq[VGA_SEQ_CHARACTER_MAP] = 0x00;
- par->seq[VGA_SEQ_MEMORY_MODE] = 0x06;
-
- par->gdc[VGA_GFX_SR_VALUE] = 0x00;
- par->gdc[VGA_GFX_SR_ENABLE] = 0x0F;
- par->gdc[VGA_GFX_COMPARE_VALUE] = 0x00;
- par->gdc[VGA_GFX_DATA_ROTATE] = 0x20;
- par->gdc[VGA_GFX_PLANE_READ] = 0;
- par->gdc[VGA_GFX_MODE] = 0x00;
- par->gdc[VGA_GFX_MISC] = 0x05;
- par->gdc[VGA_GFX_COMPARE_MASK] = 0x0F;
- par->gdc[VGA_GFX_BIT_MASK] = 0xFF;
-
- vga16fb_clock_chip(par, var->pixclock, info);
+ par->mode = mode;
- par->var.bits_per_pixel = 4;
+ if (mode & MODE_8BPP)
+ /* pixel clock == vga clock / 2 */
+ vga16fb_clock_chip(par, var->pixclock, info, 1, 2);
+ else
+ /* pixel clock == vga clock */
+ vga16fb_clock_chip(par, var->pixclock, info, 1, 1);
+
+ par->var.bits_per_pixel = var->bits_per_pixel;
par->var.grayscale = var->grayscale;
par->var.red.offset = par->var.green.offset = par->var.blue.offset =
par->var.transp.offset = 0;
par->var.red.length = par->var.green.length = par->var.blue.length =
(info->isVGA) ? 6 : 2;
par->var.transp.length = 0;
- par->var.nonstd = 0;
par->var.activate = FB_ACTIVATE_NOW;
par->var.height = -1;
par->var.width = -1;
@@ -428,69 +523,158 @@
}
#undef FAIL
-static int vga16fb_set_par(const struct vga16fb_par *par,
- struct vga16fb_info *info)
+static void vga16fb_load_font(struct display* p) {
+ int chars;
+ unsigned char* font;
+ unsigned char* dest;
+
+ if (!p || !p->fontdata)
+ return;
+ chars = 256;
+ font = p->fontdata;
+ dest = vga16fb.video_vbase;
+
+ vga_io_wseq(0x00, 0x01);
+ vga_io_wseq(VGA_SEQ_PLANE_WRITE, 0x04);
+ vga_io_wseq(VGA_SEQ_MEMORY_MODE, 0x07);
+ vga_io_wseq(0x00, 0x03);
+ vga_io_wgfx(VGA_GFX_MODE, 0x00);
+ vga_io_wgfx(VGA_GFX_MISC, 0x04);
+ while (chars--) {
+ int i;
+
+ for (i = fontheight(p); i > 0; i--)
+ writeb(*font++, dest++);
+ dest += 32 - fontheight(p);
+ }
+ vga_io_wseq(0x00, 0x01);
+ vga_io_wseq(VGA_SEQ_PLANE_WRITE, 0x03);
+ vga_io_wseq(VGA_SEQ_MEMORY_MODE, 0x03);
+ vga_io_wseq(0x00, 0x03);
+ vga_io_wgfx(VGA_GFX_MODE, 0x10);
+ vga_io_wgfx(VGA_GFX_MISC, 0x06);
+}
+
+static int vga16fb_set_par(struct vga16fb_par *par,
+ struct vga16fb_info *info,
+ struct display *p)
{
int i;
+ int fh;
+ u8 gdc[VGA_GFX_C];
+ u8 seq[VGA_SEQ_C];
+ u8 atc[VGA_ATT_C];
- outb(inb(VGA_MIS_R) | 0x01, VGA_MIS_W);
+ seq[VGA_SEQ_CLOCK_MODE] = 0x01 | par->clkdiv;
+ if (par->mode & MODE_TEXT)
+ seq[VGA_SEQ_PLANE_WRITE] = 0x03;
+ else
+ seq[VGA_SEQ_PLANE_WRITE] = 0x0F;
+ seq[VGA_SEQ_CHARACTER_MAP] = 0x00;
+ if (par->mode & MODE_TEXT)
+ seq[VGA_SEQ_MEMORY_MODE] = 0x03;
+ else if (par->mode & MODE_SKIP4)
+ seq[VGA_SEQ_MEMORY_MODE] = 0x0E;
+ else
+ seq[VGA_SEQ_MEMORY_MODE] = 0x06;
+
+ gdc[VGA_GFX_SR_VALUE] = 0x00;
+ gdc[VGA_GFX_SR_ENABLE] = 0x00;
+ gdc[VGA_GFX_COMPARE_VALUE] = 0x00;
+ gdc[VGA_GFX_DATA_ROTATE] = 0x00;
+ gdc[VGA_GFX_PLANE_READ] = 0;
+ if (par->mode & MODE_TEXT) {
+ gdc[VGA_GFX_MODE] = 0x10;
+ gdc[VGA_GFX_MISC] = 0x06;
+ } else {
+ if (par->mode & MODE_CFB)
+ gdc[VGA_GFX_MODE] = 0x40;
+ else
+ gdc[VGA_GFX_MODE] = 0x00;
+ gdc[VGA_GFX_MISC] = 0x05;
+ }
+ gdc[VGA_GFX_COMPARE_MASK] = 0x0F;
+ gdc[VGA_GFX_BIT_MASK] = 0xFF;
+
+ for (i = 0x00; i < 0x10; i++)
+ atc[i] = i;
+ if (par->mode & MODE_TEXT)
+ atc[VGA_ATC_MODE] = 0x04;
+ else if (par->mode & MODE_8BPP)
+ atc[VGA_ATC_MODE] = 0x41;
+ else
+ atc[VGA_ATC_MODE] = 0x81;
+ atc[VGA_ATC_OVERSCAN] = 0x00; /* 0 for EGA, 0xFF for VGA */
+ atc[VGA_ATC_PLANE_ENABLE] = 0x0F;
+ if (par->mode & MODE_8BPP)
+ atc[VGA_ATC_PEL] = (par->var.xoffset & 3) << 1;
+ else
+ atc[VGA_ATC_PEL] = par->var.xoffset & 7;
+ atc[VGA_ATC_COLOR_PAGE] = 0x00;
+
+ if (par->mode & MODE_TEXT) {
+ fh = fontheight(p);
+ if (!fh)
+ fh = 16;
+ par->crtc[VGA_CRTC_MAX_SCAN] = (par->crtc[VGA_CRTC_MAX_SCAN]
+ & ~0x1F) | (fh - 1);
+ }
+
+ vga_io_w(VGA_MIS_W, vga_io_r(VGA_MIS_R) | 0x01);
/* Enable graphics register modification */
if (!info->isVGA) {
- outb(0x00, EGA_GFX_E0);
- outb(0x01, EGA_GFX_E1);
+ vga_io_w(EGA_GFX_E0, 0x00);
+ vga_io_w(EGA_GFX_E1, 0x01);
}
/* update misc output register */
- outb(par->misc, VGA_MIS_W);
+ vga_io_w(VGA_MIS_W, par->misc);
/* synchronous reset on */
- outb(0x00, VGA_SEQ_I);
- outb(0x01, VGA_SEQ_D);
-
+ vga_io_wseq(0x00, 0x01);
+
+ if (info->isVGA)
+ vga_io_w(VGA_PEL_MSK, par->pel_msk);
+
/* write sequencer registers */
- outb(1, VGA_SEQ_I);
- outb(par->seq[1] | 0x20, VGA_SEQ_D);
+ vga_io_wseq(VGA_SEQ_CLOCK_MODE, seq[VGA_SEQ_CLOCK_MODE] | 0x20);
for (i = 2; i < VGA_SEQ_C; i++) {
- outb(i, VGA_SEQ_I);
- outb(par->seq[i], VGA_SEQ_D);
+ vga_io_wseq(i, seq[i]);
}
/* synchronous reset off */
- outb(0x00, VGA_SEQ_I);
- outb(0x03, VGA_SEQ_D);
-
+ vga_io_wseq(0x00, 0x03);
+
/* deprotect CRT registers 0-7 */
- outb(0x11, VGA_CRT_IC);
- outb(par->crtc[0x11], VGA_CRT_DC);
+ vga_io_wcrt(VGA_CRTC_V_SYNC_END, par->crtc[VGA_CRTC_V_SYNC_END]);
/* write CRT registers */
- for (i = 0; i < VGA_CRT_C; i++) {
- outb(i, VGA_CRT_IC);
- outb(par->crtc[i], VGA_CRT_DC);
+ for (i = 0; i < VGA_CRTC_REGS; i++) {
+ vga_io_wcrt(i, par->crtc[i]);
}
/* write graphics controller registers */
for (i = 0; i < VGA_GFX_C; i++) {
- outb(i, VGA_GFX_I);
- outb(par->gdc[i], VGA_GFX_D);
+ vga_io_wgfx(i, gdc[i]);
}
/* write attribute controller registers */
for (i = 0; i < VGA_ATT_C; i++) {
- inb_p(VGA_IS1_RC); /* reset flip-flop */
- outb_p(i, VGA_ATT_IW);
- outb_p(par->atc[i], VGA_ATT_IW);
+ vga_io_r(VGA_IS1_RC); /* reset flip-flop */
+ vga_io_wattr(i, atc[i]);
}
+ if (par->mode & MODE_TEXT)
+ vga16fb_load_font(p);
+
/* Wait for screen to stabilize. */
mdelay(50);
- outb(0x01, VGA_SEQ_I);
- outb(par->seq[1], VGA_SEQ_D);
+ vga_io_wseq(VGA_SEQ_CLOCK_MODE, seq[VGA_SEQ_CLOCK_MODE]);
- inb(VGA_IS1_RC);
- outb(0x20, VGA_ATT_IW);
+ vga_io_r(VGA_IS1_RC);
+ vga_io_w(VGA_ATT_IW, 0x20);
return 0;
}
@@ -507,33 +691,39 @@
display = fb->disp;
else
display = fb_display + con;
- if ((err = vga16fb_decode_var(var, &par, info)) != 0)
+ if ((err = vga16fb_decode_var(var, &par, info, display)) != 0)
return err;
- vga16fb_encode_var(var, &par, info);
if ((var->activate & FB_ACTIVATE_MASK) == FB_ACTIVATE_TEST)
return 0;
if ((var->activate & FB_ACTIVATE_MASK) == FB_ACTIVATE_NOW) {
- u32 oldxres, oldyres, oldvxres, oldvyres, oldbpp;
+ u32 oldxres, oldyres, oldvxres, oldvyres, oldbpp, oldnonstd;
oldxres = display->var.xres;
oldyres = display->var.yres;
oldvxres = display->var.xres_virtual;
oldvyres = display->var.yres_virtual;
oldbpp = display->var.bits_per_pixel;
+ oldnonstd = display->var.nonstd;
- display->var = *var;
+ display->var = par.var;
- if (oldxres != var->xres || oldyres != var->yres ||
- oldvxres != var->xres_virtual || oldvyres != var->yres_virtual ||
- oldbpp != var->bits_per_pixel) {
- vga16fb_set_disp(con, info);
+ if (con == info->fb_info.currcon) {
+ info->fb_info.var = par.var;
+ }
+ vga16fb_set_disp(con, info);
+ if (oldxres != var->xres ||
+ oldyres != var->yres ||
+ oldvxres != var->xres_virtual ||
+ oldvyres != var->yres_virtual ||
+ oldbpp != var->bits_per_pixel ||
+ oldnonstd != var->nonstd) {
if (info->fb_info.changevar)
info->fb_info.changevar(con);
}
if (con == info->fb_info.currcon)
- vga16fb_set_par(&par, info);
+ vga16fb_set_par(&par, info, display);
}
return 0;
@@ -544,12 +734,13 @@
static unsigned char map[] = { 000, 001, 010, 011 };
int val;
+ if (regno >= 16)
+ return;
val = map[red>>14] | ((map[green>>14]) << 1) | ((map[blue>>14]) << 2);
- inb_p(0x3DA); /* ! 0x3BA */
- outb_p(regno, 0x3C0);
- outb_p(val, 0x3C0);
- inb_p(0x3DA); /* some clones need it */
- outb_p(0x20, 0x3C0); /* unblank screen */
+ vga_io_r(VGA_IS1_RC); /* ! 0x3BA */
+ vga_io_wattr(regno, val);
+ vga_io_r(VGA_IS1_RC); /* some clones need it */
+ vga_io_w(VGA_ATT_IW, 0x20); /* unblank screen */
}
static int vga16_getcolreg(unsigned regno, unsigned *red, unsigned *green,
@@ -561,7 +752,7 @@
* Return != 0 for invalid regno.
*/
- if (regno >= 16)
+ if (regno >= 256)
return 1;
*red = palette[regno].red;
@@ -592,7 +783,7 @@
* != 0 for invalid regno.
*/
- if (regno >= 16)
+ if (regno >= 256)
return 1;
palette[regno].red = red;
@@ -600,7 +791,7 @@
palette[regno].blue = blue;
if (fb_info->currcon < 0)
- gray = disp.var.grayscale;
+ gray = fb_info->disp->var.grayscale;
else
gray = fb_display[fb_info->currcon].var.grayscale;
if (gray) {
@@ -635,7 +826,7 @@
var->yoffset + fb_display[con].var.yres > fb_display[con].var.yres_virtual)
return -EINVAL;
if (con == info->currcon)
- vga16fb_pan_var(info, var);
+ vga16fb_pan_var(info, var, fb_display + con);
fb_display[con].var.xoffset = var->xoffset;
fb_display[con].var.yoffset = var->yoffset;
fb_display[con].var.vmode &= ~FB_VMODE_YWRAP;
@@ -646,59 +837,49 @@
blanking code was originally by Huang shi chao, and modified by
Christoph Rimek (ch...@to...) and todd j. derr
(tj...@ba...) for Linux. */
-#define attrib_port 0x3c0
-#define seq_port_reg 0x3c4
-#define seq_port_val 0x3c5
-#define gr_port_reg 0x3ce
-#define gr_port_val 0x3cf
-#define video_misc_rd 0x3cc
-#define video_misc_wr 0x3c2
-#define vga_video_port_reg 0x3d4
-#define vga_video_port_val 0x3d5
+#define attrib_port VGA_ATC_IW
+#define seq_port_reg VGA_SEQ_I
+#define seq_port_val VGA_SEQ_D
+#define gr_port_reg VGA_GFX_I
+#define gr_port_val VGA_GFX_D
+#define video_misc_rd VGA_MIS_R
+#define video_misc_wr VGA_MIS_W
+#define vga_video_port_reg VGA_CRT_IC
+#define vga_video_port_val VGA_CRT_DC
static void vga_vesa_blank(struct vga16fb_info *info, int mode)
{
unsigned char SeqCtrlIndex;
unsigned char CrtCtrlIndex;
- cli();
- SeqCtrlIndex = inb_p(seq_port_reg);
- CrtCtrlIndex = inb_p(vga_video_port_reg);
+ //cli();
+ SeqCtrlIndex = vga_io_r(seq_port_reg);
+ CrtCtrlIndex = vga_io_r(vga_video_port_reg);
/* save original values of VGA controller registers */
if(!info->vesa_blanked) {
- info->vga_state.CrtMiscIO = inb_p(video_misc_rd);
- sti();
+ info->vga_state.CrtMiscIO = vga_io_r(video_misc_rd);
+ //sti();
- outb_p(0x00,vga_video_port_reg); /* HorizontalTotal */
- info->vga_state.HorizontalTotal = inb_p(vga_video_port_val);
- outb_p(0x01,vga_video_port_reg); /* HorizDisplayEnd */
- info->vga_state.HorizDisplayEnd = inb_p(vga_video_port_val);
- outb_p(0x04,vga_video_port_reg); /* StartHorizRetrace */
- info->vga_state.StartHorizRetrace = inb_p(vga_video_port_val);
- outb_p(0x05,vga_video_port_reg); /* EndHorizRetrace */
- info->vga_state.EndHorizRetrace = inb_p(vga_video_port_val);
- outb_p(0x07,vga_video_port_reg); /* Overflow */
- info->vga_state.Overflow = inb_p(vga_video_port_val);
- outb_p(0x10,vga_video_port_reg); /* StartVertRetrace */
- info->vga_state.StartVertRetrace = inb_p(vga_video_port_val);
- outb_p(0x11,vga_video_port_reg); /* EndVertRetrace */
- info->vga_state.EndVertRetrace = inb_p(vga_video_port_val);
- outb_p(0x17,vga_video_port_reg); /* ModeControl */
- info->vga_state.ModeControl = inb_p(vga_video_port_val);
- outb_p(0x01,seq_port_reg); /* ClockingMode */
- info->vga_state.ClockingMode = inb_p(seq_port_val);
+ info->vga_state.HorizontalTotal = vga_io_rcrt(0x00); /* HorizontalTotal */
+ info->vga_state.HorizDisplayEnd = vga_io_rcrt(0x01); /* HorizDisplayEnd */
+ info->vga_state.StartHorizRetrace = vga_io_rcrt(0x04); /* StartHorizRetrace */
+ info->vga_state.EndHorizRetrace = vga_io_rcrt(0x05); /* EndHorizRetrace */
+ info->vga_state.Overflow = vga_io_rcrt(0x07); /* Overflow */
+ info->vga_state.StartVertRetrace = vga_io_rcrt(0x10); /* StartVertRetrace */
+ info->vga_state.EndVertRetrace = vga_io_rcrt(0x11); /* EndVertRetrace */
+ info->vga_state.ModeControl = vga_io_rcrt(0x17); /* ModeControl */
+ info->vga_state.ClockingMode = vga_io_rseq(0x01); /* ClockingMode */
}
/* assure that video is enabled */
/* "0x20" is VIDEO_ENABLE_bit in register 01 of sequencer */
- cli();
- outb_p(0x01,seq_port_reg);
- outb_p(info->vga_state.ClockingMode | 0x20,seq_port_val);
+ //cli();
+ vga_io_wseq(0x01, info->vga_state.ClockingMode | 0x20);
/* test for vertical retrace in process.... */
if ((info->vga_state.CrtMiscIO & 0x80) == 0x80)
- outb_p(info->vga_state.CrtMiscIO & 0xef,video_misc_wr);
+ vga_io_w(video_misc_wr, info->vga_state.CrtMiscIO & 0xef);
/*
* Set <End of vertical retrace> to minimum (0) and
@@ -729,7 +910,7 @@
/* restore both index registers */
outb_p(SeqCtrlIndex,seq_port_reg);
outb_p(CrtCtrlIndex,vga_video_port_reg);
- sti();
+ //sti();
}
static void vga_vesa_unblank(struct vga16fb_info *info)
@@ -737,36 +918,36 @@
unsigned char SeqCtrlIndex;
unsigned char CrtCtrlIndex;
- cli();
- SeqCtrlIndex = inb_p(seq_port_reg);
- CrtCtrlIndex = inb_p(vga_video_port_reg);
+ //cli();
+ SeqCtrlIndex = vga_io_r(seq_port_reg);
+ CrtCtrlIndex = vga_io_r(vga_video_port_reg);
/* restore original values of VGA controller registers */
- outb_p(info->vga_state.CrtMiscIO,video_misc_wr);
+ vga_io_w(video_misc_wr, info->vga_state.CrtMiscIO);
- outb_p(0x00,vga_video_port_reg); /* HorizontalTotal */
- outb_p(info->vga_state.HorizontalTotal,vga_video_port_val);
- outb_p(0x01,vga_video_port_reg); /* HorizDisplayEnd */
- outb_p(info->vga_state.HorizDisplayEnd,vga_video_port_val);
- outb_p(0x04,vga_video_port_reg); /* StartHorizRetrace */
- outb_p(info->vga_state.StartHorizRetrace,vga_video_port_val);
- outb_p(0x05,vga_video_port_reg); /* EndHorizRetrace */
- outb_p(info->vga_state.EndHorizRetrace,vga_video_port_val);
- outb_p(0x07,vga_video_port_reg); /* Overflow */
- outb_p(info->vga_state.Overflow,vga_video_port_val);
- outb_p(0x10,vga_video_port_reg); /* StartVertRetrace */
- outb_p(info->vga_state.StartVertRetrace,vga_video_port_val);
- outb_p(0x11,vga_video_port_reg); /* EndVertRetrace */
- outb_p(info->vga_state.EndVertRetrace,vga_video_port_val);
- outb_p(0x17,vga_video_port_reg); /* ModeControl */
- outb_p(info->vga_state.ModeControl,vga_video_port_val);
- outb_p(0x01,seq_port_reg); /* ClockingMode */
- outb_p(info->vga_state.ClockingMode,seq_port_val);
+ /* HorizontalTotal */
+ vga_io_wcrt(0x00, info->vga_state.HorizontalTotal);
+ /* HorizDisplayEnd */
+ vga_io_wcrt(0x01, info->vga_state.HorizDisplayEnd);
+ /* StartHorizRetrace */
+ vga_io_wcrt(0x04, info->vga_state.StartHorizRetrace);
+ /* EndHorizRetrace */
+ vga_io_wcrt(0x05, info->vga_state.EndHorizRetrace);
+ /* Overflow */
+ vga_io_wcrt(0x07, info->vga_state.Overflow);
+ /* StartVertRetrace */
+ vga_io_wcrt(0x10, info->vga_state.StartVertRetrace);
+ /* EndVertRetrace */
+ vga_io_wcrt(0x11, info->vga_state.EndVertRetrace);
+ /* ModeControl */
+ vga_io_wcrt(0x17, info->vga_state.ModeControl);
+ /* ClockingMode */
+ vga_io_wseq(0x01, info->vga_state.ClockingMode);
/* restore index/control registers */
- outb_p(SeqCtrlIndex,seq_port_reg);
- outb_p(CrtCtrlIndex,vga_video_port_reg);
- sti();
+ vga_io_w(seq_port_reg, SeqCtrlIndex);
+ vga_io_w(vga_video_port_reg, CrtCtrlIndex);
+ //sti();
}
static void vga_pal_blank(void)
@@ -811,8 +992,6 @@
static struct fb_ops vga16fb_ops = {
.owner = THIS_MODULE,
- .fb_get_fix = vga16fb_get_fix,
- .fb_get_var = vga16fb_get_var,
.fb_set_var = vga16fb_set_var,
.fb_get_cmap = vga16fb_get_cmap,
.fb_set_cmap = gen_set_cmap,
@@ -850,8 +1029,8 @@
fb);
fb->currcon = con;
- vga16fb_decode_var(&fb_display[con].var, &par, info);
- vga16fb_set_par(&par, info);
+ vga16fb_decode_var(&fb_display[con].var, &par, info, fb_display + con);
+ vga16fb_set_par(&par, info, fb_display + con);
vga16fb_set_disp(con, info);
/* Install new colormap */
diff -urdN linux/drivers/video/vgacon.c linux/drivers/video/vgacon.c
--- linux/drivers/video/vgacon.c 2002-08-14 17:55:14.000000000 +0200
+++ linux/drivers/video/vgacon.c 2002-08-14 17:59:19.000000000 +0200
@@ -180,6 +180,13 @@
#endif
}
+ /* VGA16 modes are not handled by VGACON */
+ if ((ORIG_VIDEO_MODE == 0x0D) || /* 320x200/4 */
+ (ORIG_VIDEO_MODE == 0x0E) || /* 640x200/4 */
+ (ORIG_VIDEO_MODE == 0x10) || /* 640x350/4 */
+ (ORIG_VIDEO_MODE == 0x12) || /* 640x480/4 */
+ (ORIG_VIDEO_MODE == 0x6A)) /* 800x600/4, 0x6A is very common */
+ goto no_vga;
vga_video_num_lines = ORIG_VIDEO_LINES;
vga_video_num_columns = ORIG_VIDEO_COLS;
diff -urdN linux/include/video/fbcon-vga-planes.h linux/include/video/fbcon-vga-planes.h
--- linux/include/video/fbcon-vga-planes.h 2002-08-14 17:55:05.000000000 +0200
+++ linux/include/video/fbcon-vga-planes.h 2002-08-14 17:59:19.000000000 +0200
@@ -18,6 +18,7 @@
#endif
extern struct display_switch fbcon_vga_planes;
+extern struct display_switch fbcon_vga8_planes;
extern struct display_switch fbcon_ega_planes;
extern void fbcon_vga_planes_setup(struct display *p);
extern void fbcon_vga_planes_bmove(struct display *p, int sy, int sx, int dy, int dx,
|
|
From: Petr V. <van...@vc...> - 2002-08-14 19:22:40
|
Hi Linus, hello others,
please apply this.
line_length, type and visual moved from display struct to the fb_info's fix
structure during last fbdev updates. Unfortunately generic code was not updated
together, so now every fbdev driver is broken.
Thanks,
Petr Vandrovec
van...@vc...
diff -urdN linux/drivers/video/fbcon-cfb16.c linux/drivers/video/fbcon-cfb16.c
--- linux/drivers/video/fbcon-cfb16.c 2002-08-14 17:55:16.000000000 +0200
+++ linux/drivers/video/fbcon-cfb16.c 2002-08-14 17:59:19.000000000 +0200
@@ -36,7 +36,7 @@
void fbcon_cfb16_setup(struct display *p)
{
- p->next_line = p->line_length ? p->line_length : p->var.xres_virtual<<1;
+ p->next_line = p->fb_info->fix.line_length ? p->fb_info->fix.line_length : p->var.xres_virtual<<1;
p->next_plane = 0;
}
diff -urdN linux/drivers/video/fbcon-cfb32.c linux/drivers/video/fbcon-cfb32.c
--- linux/drivers/video/fbcon-cfb32.c 2002-08-14 17:55:09.000000000 +0200
+++ linux/drivers/video/fbcon-cfb32.c 2002-08-14 17:59:19.000000000 +0200
@@ -25,7 +25,7 @@
void fbcon_cfb32_setup(struct display *p)
{
- p->next_line = p->line_length ? p->line_length : p->var.xres_virtual<<2;
+ p->next_line = p->fb_info->fix.line_length ? p->fb_info->fix.line_length : p->var.xres_virtual<<2;
p->next_plane = 0;
}
diff -urdN linux/drivers/video/fbcon-cfb4.c linux/drivers/video/fbcon-cfb4.c
--- linux/drivers/video/fbcon-cfb4.c 2002-08-14 17:55:12.000000000 +0200
+++ linux/drivers/video/fbcon-cfb4.c 2002-08-14 17:59:19.000000000 +0200
@@ -50,7 +50,7 @@
void fbcon_cfb4_setup(struct display *p)
{
- p->next_line = p->line_length ? p->line_length : p->var.xres_virtual>>1;
+ p->next_line = p->fb_info->fix.line_length ? p->fb_info->fix.line_length : p->var.xres_virtual>>1;
p->next_plane = 0;
}
diff -urdN linux/drivers/video/fbcon-cfb8.c linux/drivers/video/fbcon-cfb8.c
--- linux/drivers/video/fbcon-cfb8.c 2002-08-14 17:55:16.000000000 +0200
+++ linux/drivers/video/fbcon-cfb8.c 2002-08-14 17:59:19.000000000 +0200
@@ -41,7 +41,7 @@
void fbcon_cfb8_setup(struct display *p)
{
- p->next_line = p->line_length ? p->line_length : p->var.xres_virtual;
+ p->next_line = p->fb_info->fix.line_length ? p->fb_info->fix.line_length : p->var.xres_virtual;
p->next_plane = 0;
}
diff -urdN linux/drivers/video/fbcon-vga-planes.c linux/drivers/video/fbcon-vga-planes.c
--- linux/drivers/video/fbcon-vga-planes.c 2002-08-14 17:55:16.000000000 +0200
+++ linux/drivers/video/fbcon-vga-planes.c 2002-08-14 17:59:19.000000000 +0200
@@ -119,9 +119,9 @@
height *= fontheight(p);
if (dy < sy || (dy == sy && dx < sx)) {
- line_ofs = p->line_length - width;
- dest = p->fb_info->screen_base + dx + dy * p->line_length;
- src = p->fb_info->screen_base + sx + sy * p->line_length;
+ line_ofs = p->fb_info->fix.line_length - width;
+ dest = p->fb_info->screen_base + dx + dy * p->fb_info->fix.line_length;
+ src = p->fb_info->screen_base + sx + sy * p->fb_info->fix.line_length;
while (height--) {
for (x = 0; x < width; x++) {
readb(src);
@@ -133,9 +133,9 @@
dest += line_ofs;
}
} else {
- line_ofs = p->line_length - width;
- dest = p->fb_info->screen_base + dx + width + (dy + height - 1) * p->line_length;
- src = p->fb_info->screen_base + sx + width + (sy + height - 1) * p->line_length;
+ line_ofs = p->fb_info->fix.line_length - width;
+ dest = p->fb_info->screen_base + dx + width + (dy + height - 1) * p->fb_info->fix.line_length;
+ src = p->fb_info->screen_base + sx + width + (sy + height - 1) * p->fb_info->fix.line_length;
while (height--) {
for (x = 0; x < width; x++) {
dest--;
@@ -152,7 +152,7 @@
void fbcon_vga_planes_clear(struct vc_data *conp, struct display *p, int sy, int sx,
int height, int width)
{
- int line_ofs = p->line_length - width;
+ int line_ofs = p->fb_info->fix.line_length - width;
char *where;
int x;
@@ -167,7 +167,7 @@
sy *= fontheight(p);
height *= fontheight(p);
- where = p->fb_info->screen_base + sx + sy * p->line_length;
+ where = p->fb_info->screen_base + sx + sy * p->fb_info->fix.line_length;
while (height--) {
for (x = 0; x < width; x++) {
writeb(0, where);
@@ -184,7 +184,7 @@
int y;
u8 *cdat = p->fontdata + (c & p->charmask) * fontheight(p);
- char *where = p->fb_info->screen_base + xx + yy * p->line_length * fontheight(p);
+ char *where = p->fb_info->screen_base + xx + yy * p->fb_info->fix.line_length * fontheight(p);
setmode(0);
setop(0);
@@ -193,13 +193,13 @@
selectmask();
setmask(0xff);
- for (y = 0; y < fontheight(p); y++, where += p->line_length)
+ for (y = 0; y < fontheight(p); y++, where += p->fb_info->fix.line_length)
rmw(where);
- where -= p->line_length * y;
+ where -= p->fb_info->fix.line_length * y;
setcolor(fg);
selectmask();
- for (y = 0; y < fontheight(p); y++, where += p->line_length)
+ for (y = 0; y < fontheight(p); y++, where += p->fb_info->fix.line_length)
if (cdat[y]) {
setmask(cdat[y]);
rmw(where);
@@ -213,7 +213,7 @@
int y;
u8 *cdat = p->fontdata + (c & p->charmask) * fontheight(p);
- char *where = p->fb_info->screen_base + xx + yy * p->line_length * fontheight(p);
+ char *where = p->fb_info->screen_base + xx + yy * p->fb_info->fix.line_length * fontheight(p);
setmode(2);
setop(0);
@@ -227,7 +227,7 @@
readb(where); /* fill latches */
setmode(3);
wmb();
- for (y = 0; y < fontheight(p); y++, where += p->line_length)
+ for (y = 0; y < fontheight(p); y++, where += p->fb_info->fix.line_length)
writeb(cdat[y], where);
wmb();
}
@@ -248,7 +248,7 @@
selectmask();
setmask(0xff);
- where = p->fb_info->screen_base + xx + yy * p->line_length * fontheight(p);
+ where = p->fb_info->screen_base + xx + yy * p->fb_info->fix.line_length * fontheight(p);
writeb(bg, where);
rmb();
readb(where); /* fill latches */
@@ -263,9 +263,9 @@
outb(*cdat++, GRAPHICS_DATA_REG);
wmb();
writeb(fg, where);
- where += p->line_length;
+ where += p->fb_info->fix.line_length;
}
- where += 1 - p->line_length * fontheight(p);
+ where += 1 - p->fb_info->fix.line_length * fontheight(p);
}
wmb();
@@ -289,7 +289,7 @@
selectmask();
setmask(0xff);
- where = p->fb_info->screen_base + xx + yy * p->line_length * fontheight(p);
+ where = p->fb_info->screen_base + xx + yy * p->fb_info->fix.line_length * fontheight(p);
writeb(bg, where);
rmb();
readb(where); /* fill latches */
@@ -302,9 +302,9 @@
for (y = 0; y < fontheight(p); y++, cdat++) {
writeb (*cdat, where);
- where += p->line_length;
+ where += p->fb_info->fix.line_length;
}
- where += 1 - p->line_length * fontheight(p);
+ where += 1 - p->fb_info->fix.line_length * fontheight(p);
}
wmb();
@@ -312,7 +312,7 @@
void fbcon_vga_planes_revc(struct display *p, int xx, int yy)
{
- char *where = p->fb_info->screen_base + xx + yy * p->line_length * fontheight(p);
+ char *where = p->fb_info->screen_base + xx + yy * p->fb_info->fix.line_length * fontheight(p);
int y;
setmode(0);
@@ -324,7 +324,7 @@
setmask(0xff);
for (y = 0; y < fontheight(p); y++) {
rmw(where);
- where += p->line_length;
+ where += p->fb_info->fix.line_length;
}
}
diff -urdN linux/drivers/video/fbcon.c linux/drivers/video/fbcon.c
--- linux/drivers/video/fbcon.c 2002-08-14 17:55:08.000000000 +0200
+++ linux/drivers/video/fbcon.c 2002-08-14 17:59:19.000000000 +0200
@@ -2306,7 +2306,7 @@
}
#endif
#if defined(CONFIG_FBCON_CFB4)
- if (depth == 4 && p->type == FB_TYPE_PACKED_PIXELS) {
+ if (depth == 4 && info->fix.type == FB_TYPE_PACKED_PIXELS) {
src = logo;
for( y1 = 0; y1 < LOGO_H; y1++) {
dst = fb + y1*line + x/2;
@@ -2320,7 +2320,7 @@
}
#endif
#if defined(CONFIG_FBCON_CFB8) || defined(CONFIG_FB_SBUS)
- if (depth == 8 && p->type == FB_TYPE_PACKED_PIXELS) {
+ if (depth == 8 && info->fix.type == FB_TYPE_PACKED_PIXELS) {
/* depth 8 or more, packed, with color registers */
src = logo;
@@ -2335,8 +2335,8 @@
#if defined(CONFIG_FBCON_AFB) || defined(CONFIG_FBCON_ILBM) || \
defined(CONFIG_FBCON_IPLAN2P2) || defined(CONFIG_FBCON_IPLAN2P4) || \
defined(CONFIG_FBCON_IPLAN2P8)
- if (depth >= 2 && (p->type == FB_TYPE_PLANES ||
- p->type == FB_TYPE_INTERLEAVED_PLANES)) {
+ if (depth >= 2 && (info->fix.type == FB_TYPE_PLANES ||
+ info->fix.type == FB_TYPE_INTERLEAVED_PLANES)) {
/* planes (normal or interleaved), with color registers */
int bit;
unsigned char val, mask;
@@ -2388,9 +2388,9 @@
#if defined(CONFIG_FBCON_MFB) || defined(CONFIG_FBCON_AFB) || \
defined(CONFIG_FBCON_ILBM) || defined(CONFIG_FBCON_HGA)
- if (depth == 1 && (p->type == FB_TYPE_PACKED_PIXELS ||
- p->type == FB_TYPE_PLANES ||
- p->type == FB_TYPE_INTERLEAVED_PLANES)) {
+ if (depth == 1 && (p->fix.type == FB_TYPE_PACKED_PIXELS ||
+ p->fix.type == FB_TYPE_PLANES ||
+ p->fix.type == FB_TYPE_INTERLEAVED_PLANES)) {
/* monochrome */
unsigned char inverse = p->inverse || p->visual == FB_VISUAL_MONO01
@@ -2411,7 +2411,7 @@
}
#endif
#if defined(CONFIG_FBCON_VGA_PLANES)
- if (depth == 4 && p->type == FB_TYPE_VGA_PLANES) {
+ if (depth == 4 && info->fix.type == FB_TYPE_VGA_PLANES) {
outb_p(1,0x3ce); outb_p(0xf,0x3cf);
outb_p(3,0x3ce); outb_p(0,0x3cf);
outb_p(5,0x3ce); outb_p(0,0x3cf);
|
|
From: Petr V. <van...@vc...> - 2002-08-14 19:15:55
|
Hello, if you want working matroxfb in the latest 2.5.31-bk tree, please either pull from the bk://matroxfb.bkbits.net/linux-2.5, or download patch from ftp://platan.vc.cvut.cz/pub/linux/matrox-latest/linux-2.5.31bk-matroxfb.gz. Petr Vandrovec van...@vc... ----- Forwarded message from Petr Vandrovec <van...@vc...> ----- Date: Wed, 14 Aug 2002 21:13:32 +0200 From: Petr Vandrovec <van...@vc...> To: tor...@tr... Subject: [BKPATCH] matroxfb is broken by recent fbdev updates Hi Linus, please either do pull by using bk pull bk://matroxfb.bkbits.net/linux-2.5 or apply bk-patch below. Matroxfb (and couple of other drivers) is broken by recent fbdev update from JSimmons. Thanks, Petr Vandrovec van...@vc... You can import this changeset into BK by piping this whole message to: '| bk receive [path to repository]' or apply the patch as usual. =================================================================== ChangeSet@1.522, 2002-08-14 17:53:32+02:00, van...@vc... Update matroxfb to current fbdev API. ChangeSet@1.521, 2002-08-14 16:38:36+02:00, van...@vc... Set system PLL vcomax correctly in matroxfb. Discovered by Dirk Uffmann. ChangeSet@1.520, 2002-08-14 16:38:04+02:00, van...@vc... matroxfb: Do not store results of bitwise AND directly in variables which are treated as a booleans. Comparsion does not work correctly on them. ChangeSet@1.519, 2002-08-14 16:37:23+02:00, van...@vc... Add support for MGA-TVO-B into matroxfb. By Mike Pieper. ChangeSet@1.518, 2002-08-14 16:36:45+02:00, van...@vc... Return ENOTTY instead of EINVAL for unknown ioctl ops in matroxfb. ChangeSet@1.517, 2002-08-14 16:36:06+02:00, van...@vc... Use sizeof(*var) instead of sizeof(struct xxx) in matroxfb. ChangeSet@1.516, 2002-08-14 16:35:29+02:00, van...@vc... Remove currcon field from private fb_info in matroxfb. It was moved to the generic layer long ago. ChangeSet@1.515, 2002-08-14 16:34:44+02:00, van...@vc... Make debug printouts in matroxfb G400 TV-out disabled by default. OUTPUT_MODE are values, not a bitmap, so use compare instead of bitwise AND. ChangeSet@1.514, 2002-08-14 16:32:33+02:00, van...@vc... Add TV-Out support for Matrox G450/G550. Due to the hardware only secondary CRTC can be used as a source for TV output. ChangeSet@1.513, 2002-08-14 16:30:01+02:00, van...@vc... matroxfb DVI updates: Handle DVI output on G450/G550. Powerdown unused portions of G450/G550 DAC. Split G450/G550 DAC from older DAC1064 handling. Modify PLL setting when both CRTCs use same pixel clocks. ChangeSet@1.512, 2002-08-14 16:24:08+02:00, van...@vc... Initialize Matrox G100 and G400 hardware with values read from BIOS instead of with failsafe settings discovered in the past. Fixes corrupted screen display on some G100. ChangeSet@1.511, 2002-08-14 16:23:10+02:00, van...@vc... Use container_of instead of simple typecast when we convert pointers from pointer to fb_info to pointers to matrox_fb_info. ChangeSet@1.510, 2002-08-14 16:21:59+02:00, van...@vc... Store pointer to matroxfb specific fb information instead of universal fb_info* pointer for secondary head. Saves some typecasts. ChangeSet@1.509, 2002-08-14 16:20:37+02:00, van...@vc... Use arrays for holding Matrox output drivers, it is nicer and more extensible than current solution with per-CRTC bitmaps. ChangeSet@1.508, 2002-08-14 16:19:37+02:00, van...@vc... Simplify rules for writting secondary output drivers to matroxfb. Update some initializations to use C99 initializers. ChangeSet@1.507, 2002-08-14 16:11:17+02:00, van...@vc... matroxfb: Find appropriate setting for specified color depth by looking through table instead of using if-else branches in code. Source is cleaner, and generated code is smaller with this change. By Denis Zaitsev <zz...@cd...> ChangeSet@1.506, 2002-08-14 16:08:09+02:00, van...@vc... Remove structure holding state of secondary output in the matroxfb driver. We do not have any state stored here. ChangeSet@1.505, 2002-08-14 16:04:20+02:00, van...@vc... Make secondary output support mandatory for Matrox G450/G550. ChangeSet@1.504, 2002-08-14 16:01:28+02:00, van...@vc... Support secondary head DDC on G450/G550. Simplify i2c-matroxfb code. Config.help | 58 ++-- Config.in | 9 matrox/Makefile | 6 matrox/g450_pll.c | 85 +++--- matrox/g450_pll.h | 2 matrox/matroxfb_DAC1064.c | 332 +++++++++++++++++-------- matrox/matroxfb_DAC1064.h | 4 matrox/matroxfb_Ti3026.c | 22 + matrox/matroxfb_accel.c | 34 +- matrox/matroxfb_accel.h | 2 matrox/matroxfb_base.c | 590 ++++++++++++++++++++++------------------------ matrox/matroxfb_base.h | 55 ++-- matrox/matroxfb_crtc2.c | 381 ++++++++++++++++------------- matrox/matroxfb_crtc2.h | 3 matrox/matroxfb_g450.c | 467 ++++++++++++++++++++++++++++-------- matrox/matroxfb_g450.h | 14 - matrox/matroxfb_maven.c | 123 ++++----- matrox/matroxfb_misc.c | 14 - 18 files changed, 1331 insertions(+), 870 deletions(-) |
|
From: James S. <jsi...@ph...> - 2002-08-14 15:09:31
|
This is normal. The api is changing no several drivers are going to be broken. On Wed, 14 Aug 2002, Meelis Roos wrote: > vga16fb.c: In function `vga16fb_set_disp': > vga16fb.c:177: structure has no member named `visual' > vga16fb.c:178: structure has no member named `type' > vga16fb.c:179: structure has no member named `type_aux' > vga16fb.c:180: structure has no member named `ypanstep' > vga16fb.c:181: structure has no member named `ywrapstep' > vga16fb.c:182: structure has no member named `line_length' > vga16fb.c: In function `vga_vesa_blank': > vga16fb.c:664: warning: implicit declaration of function `cli' > vga16fb.c:671: warning: implicit declaration of function `sti' > vga16fb.c: In function `vga16fb_blank': > vga16fb.c:796: warning: implicit declaration of function `do_install_cmap_R982b4616' > vga16fb.c: At top level: > vga16fb.c:814: unknown field `fb_get_fix' specified in initializer > vga16fb.c:814: warning: initialization from incompatible pointer type > vga16fb.c:815: unknown field `fb_get_var' specified in initializer > vga16fb.c:815: warning: initialization from incompatible pointer type > > |
|
From: Holzrichter, B. <bru...@mo...> - 2002-08-14 15:09:24
|
> > Oops. Fixed now. > Whoa, that was neat! ;o) Just an fyi from my last attempt. Upon booting with FB enabled with the changes, The screen was completely filled with blocks displayed on the screen. I could see in the background the display change as it tried to print out the kern messages, but they just mangled the blocks on the screen. It looked like a screen full of extended ascii character 222 and 223's.. :o) However, due to other problems I am having with it, most likely still IDE related, I can't give much more of a report than this.... B. |
|
From: Meelis R. <mr...@li...> - 2002-08-14 09:33:20
|
vga16fb.c: In function `vga16fb_set_disp': vga16fb.c:177: structure has no member named `visual' vga16fb.c:178: structure has no member named `type' vga16fb.c:179: structure has no member named `type_aux' vga16fb.c:180: structure has no member named `ypanstep' vga16fb.c:181: structure has no member named `ywrapstep' vga16fb.c:182: structure has no member named `line_length' vga16fb.c: In function `vga_vesa_blank': vga16fb.c:664: warning: implicit declaration of function `cli' vga16fb.c:671: warning: implicit declaration of function `sti' vga16fb.c: In function `vga16fb_blank': vga16fb.c:796: warning: implicit declaration of function `do_install_cmap_R982b4616' vga16fb.c: At top level: vga16fb.c:814: unknown field `fb_get_fix' specified in initializer vga16fb.c:814: warning: initialization from incompatible pointer type vga16fb.c:815: unknown field `fb_get_var' specified in initializer vga16fb.c:815: warning: initialization from incompatible pointer type -- Meelis Roos (mr...@li...) |
|
From: Stephane W. <ste...@be...> - 2002-08-14 08:23:13
|
best regards, thanks -- Stephane Wirtel <ste...@be...> Web : www.linux-mons.be "Linux Is Not UniX !!!" |
|
From: Geert U. <ge...@li...> - 2002-08-14 06:59:39
|
On Wed, 14 Aug 2002, Petr Vandrovec wrote:
> fbdev bussiness. And while you'll move dispsw pointer, change
> it to the embeded structure. It will make life easier to
> atafb and matroxfb at least, as they like to modify fb_ops
> according to the hardware they find, and currently they
> modify structure global to the driver.
Yes, this can cause problems on machines with multiple graphics cards of the
same family, but using different acceleration features. That's why I made the
dispsw structs const, to make sure you copy them before modifying them. But now
e.g. atyfb doesn't compile anymore due to `assignment discards qualifiers from
pointer target type'.
> P.S.: I do not have your new email address here at home,
> and you are neither in MAINTAINERS nor in the CREDITS,
> I hope that the address I randomly choosed from the credits
> in fbdev files will work.
Fortunately you've picked the right one ;-)
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@li...
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
|
|
From: Petr V. <van...@vc...> - 2002-08-14 01:55:02
|
Hello James,
besides that the beast does not compile because of
the use of p->type instead of info->fix.type in the logo code,
what's the reason for having next_line, next_plane
(and maybe other too - can_soft_blank, inverse, yscroll)
in the display struct, if you moved rest of the values
into fix. So now I maintain half of state in per-display
structs, and half in the per-fbdev structure? Nigthmare.
Can you create some ('tmp' or 'par' or whatever) structure
and hold them in fb_info too?
Also because of you moved these type/line_length and
other into the fix, there is no point in having dispsw
in the display struct: these functions must not be invoked
on the fbdev with con != fbcon.currcon now because of
part of state exists only for foreground console now. So
move them into per-fb_info structure too, and handle
con != fbcon.currcon in generic code (if not done already).
Then it will be clear what is really per-VT structure
which should be maintained by upper layer, and what is
fbdev bussiness. And while you'll move dispsw pointer, change
it to the embeded structure. It will make life easier to
atafb and matroxfb at least, as they like to modify fb_ops
according to the hardware they find, and currently they
modify structure global to the driver.
That's all for now, I'll see what will happen after reboot.
Expect first public matroxfb updates tomorrow.
Best regards,
Petr Vandrovec
P.S.: I do not have your new email address here at home,
and you are neither in MAINTAINERS nor in the CREDITS,
I hope that the address I randomly choosed from the credits
in fbdev files will work.
|