Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Right-click on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
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
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
|
|
|
|
1
|
2
(6) |
3
(3) |
4
(11) |
5
(1) |
6
|
7
|
8
|
9
(1) |
10
(8) |
11
(2) |
12
(4) |
13
(2) |
14
(5) |
15
|
16
|
17
(6) |
18
(21) |
19
(6) |
20
|
21
|
22
(2) |
23
(2) |
24
(15) |
25
|
26
(9) |
27
(1) |
28
(1) |
29
|
30
|
31
(6) |
|
|
|
|
|
From: <syrjala@sc...> - 2005-10-31 22:12:31
|
The current init code sets hiprilvl to 0 and maxhipri to 5. According to the specs those values are illegal on both G200 and G400. It also causes distortions on the TV-out at least when CRTC2 is in YUV mode as is the case with DirectFB. This patch resets both values to 0. Signed-off-by: Ville Syrjälä <syrjala@...> --- matroxfb_DAC1064.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -uprN linux-2.6.14-4/drivers/video/matrox/matroxfb_DAC1064.c linux-2.6.14-5/drivers/video/matrox/matroxfb_DAC1064.c --- linux-2.6.14-4/drivers/video/matrox/matroxfb_DAC1064.c 2005-10-31 19:41:30.000000000 +0200 +++ linux-2.6.14-5/drivers/video/matrox/matroxfb_DAC1064.c 2005-10-31 22:10:22.000000000 +0200 @@ -978,7 +978,7 @@ static void MGAG100_reset(WPMINFO2) { hw->MXoptionReg |= 0x40; /* FIXME... */ pci_write_config_dword(ACCESS_FBINFO(pcidev), PCI_OPTION_REG, hw->MXoptionReg); } - mga_setr(M_EXTVGA_INDEX, 0x06, 0x50); + mga_setr(M_EXTVGA_INDEX, 0x06, 0x00); } } if (ACCESS_FBINFO(devflags.g450dac)) { |
From: <syrjala@sc...> - 2005-10-31 22:12:29
|
Add new entries for Mystique AGP with the PCI ID 0x051e. I don't actually have such boards but according to google they do exist. Curiosly X.Org doesn't recognize that PCI ID. And what's even more interesting is that Matrox's own Windows drivers don't recognize it either. After going through about a dozen different versions I did find one older driver that does list this particular ID. It is also listed in the pci.ids file. I'm not sure if non-220 AGP chips exist. I left the chip revision check intact for AGP chips nonetheless. Signed-off-by: Ville Syrjälä <syrjala@...> --- drivers/video/matrox/matroxfb_base.c | 14 ++++++++++++++ include/linux/pci_ids.h | 1 + 2 files changed, 15 insertions(+) diff -uprN linux-2.6.14-1/drivers/video/matrox/matroxfb_base.c linux-2.6.14-2/drivers/video/matrox/matroxfb_base.c --- linux-2.6.14-1/drivers/video/matrox/matroxfb_base.c 2005-10-31 17:44:11.000000000 +0200 +++ linux-2.6.14-2/drivers/video/matrox/matroxfb_base.c 2005-10-31 17:45:41.000000000 +0200 @@ -1428,6 +1428,20 @@ static struct board { MGA_1164, &vbMystique, "Mystique 220 (PCI)"}, + {PCI_VENDOR_ID_MATROX, PCI_DEVICE_ID_MATROX_MYS_AGP, 0x02, + 0, 0, + DEVF_VIDEO64BIT | DEVF_CROSS4MB, + 180000, + MGA_1064, + &vbMystique, + "Mystique (AGP)"}, + {PCI_VENDOR_ID_MATROX, PCI_DEVICE_ID_MATROX_MYS_AGP, 0xFF, + 0, 0, + DEVF_VIDEO64BIT | DEVF_SWAPS | DEVF_CROSS4MB, + 220000, + MGA_1164, + &vbMystique, + "Mystique 220 (AGP)"}, #endif #ifdef CONFIG_FB_MATROX_G {PCI_VENDOR_ID_MATROX, PCI_DEVICE_ID_MATROX_G100_MM, 0xFF, diff -uprN linux-2.6.14-1/include/linux/pci_ids.h linux-2.6.14-2/include/linux/pci_ids.h --- linux-2.6.14-1/include/linux/pci_ids.h 2005-10-31 17:43:06.000000000 +0200 +++ linux-2.6.14-2/include/linux/pci_ids.h 2005-10-31 17:46:34.000000000 +0200 @@ -568,6 +568,7 @@ #define PCI_DEVICE_ID_MATROX_MIL 0x0519 #define PCI_DEVICE_ID_MATROX_MYS 0x051A #define PCI_DEVICE_ID_MATROX_MIL_2 0x051b +#define PCI_DEVICE_ID_MATROX_MYS_AGP 0x051e #define PCI_DEVICE_ID_MATROX_MIL_2_AGP 0x051f #define PCI_DEVICE_ID_MATROX_MGA_IMP 0x0d10 #define PCI_DEVICE_ID_MATROX_G100_MM 0x1000 |
From: <syrjala@sc...> - 2005-10-31 22:12:29
|
No point in spamming the logs with a message about xres rounding. Signed-off-by: Ville Syrjälä <syrjala@...> --- matroxfb_base.c | 4 ---- 1 file changed, 4 deletions(-) diff -uprN linux-2.6.14-3/drivers/video/matrox/matroxfb_base.c linux-2.6.14-4/drivers/video/matrox/matroxfb_base.c --- linux-2.6.14-3/drivers/video/matrox/matroxfb_base.c 2005-10-31 19:40:02.000000000 +0200 +++ linux-2.6.14-4/drivers/video/matrox/matroxfb_base.c 2005-10-31 19:41:50.000000000 +0200 @@ -498,10 +498,6 @@ static int matroxfb_pitch_adjust(CPMINFO } else { xres_new = matroxfb_test_and_set_rounding(PMINFO xres, bpp); } - if (!xres_new) return 0; - if (xres != xres_new) { - printk(KERN_INFO "matroxfb: cannot set xres to %d, rounded up to %d\n", xres, xres_new); - } return xres_new; } |
From: <syrjala@sc...> - 2005-10-31 22:12:29
|
wait_event_event_interruptible() uses a private wait queue entry so there's no need for the caller to initialize one. Signed-off-by: Ville Syrjälä <syrjala@...> --- matroxfb_base.c | 2 -- 1 file changed, 2 deletions(-) diff -uprN linux-2.6.14-0/drivers/video/matrox/matroxfb_base.c linux-2.6.14-1/drivers/video/matrox/matroxfb_base.c --- linux-2.6.14-0/drivers/video/matrox/matroxfb_base.c 2005-10-28 03:02:08.000000000 +0300 +++ linux-2.6.14-1/drivers/video/matrox/matroxfb_base.c 2005-10-31 17:44:11.000000000 +0200 @@ -264,7 +264,6 @@ static void matroxfb_disable_irq(WPMINFO } int matroxfb_wait_for_sync(WPMINFO u_int32_t crtc) { - wait_queue_t __wait; struct matrox_vsync *vs; unsigned int cnt; int ret; @@ -286,7 +285,6 @@ int matroxfb_wait_for_sync(WPMINFO u_int if (ret) { return ret; } - init_waitqueue_entry(&__wait, current); cnt = vs->cnt; ret = wait_event_interruptible_timeout(vs->wait, cnt != vs->cnt, HZ/10); |
From: <syrjala@sc...> - 2005-10-31 22:12:29
|
Use the CACHEFLUSH register on all chip types. The register is listed in all other specs except 2064W. However I have verified that the register does work on a 2064W despite being marked reserved in the specs. There were no noticeable side effects after writing to the register. Signed-off-by: Ville Syrjälä <syrjala@...> --- matroxfb_DAC1064.c | 2 -- matroxfb_base.c | 9 ++------- matroxfb_base.h | 5 ----- 3 files changed, 2 insertions(+), 14 deletions(-) diff -uprN linux-2.6.14-2/drivers/video/matrox/matroxfb_base.c linux-2.6.14-3/drivers/video/matrox/matroxfb_base.c --- linux-2.6.14-2/drivers/video/matrox/matroxfb_base.c 2005-10-31 17:45:41.000000000 +0200 +++ linux-2.6.14-3/drivers/video/matrox/matroxfb_base.c 2005-10-31 19:40:02.000000000 +0200 @@ -1283,7 +1283,7 @@ static int matroxfb_getmemory(WPMINFO un vaddr_t vm; unsigned int offs; unsigned int offs2; - unsigned char store, orig; + unsigned char orig; unsigned char bytes[32]; unsigned char* tmp; @@ -1299,16 +1299,12 @@ static int matroxfb_getmemory(WPMINFO un orig = mga_inb(M_EXTVGA_DATA); mga_outb(M_EXTVGA_DATA, orig | 0x80); - store = mga_readb(vm, 0x1234); tmp = bytes; for (offs = 0x100000; offs < maxSize; offs += 0x200000) *tmp++ = mga_readb(vm, offs); for (offs = 0x100000; offs < maxSize; offs += 0x200000) mga_writeb(vm, offs, 0x02); - if (ACCESS_FBINFO(features.accel.has_cacheflush)) - mga_outb(M_CACHEFLUSH, 0x00); - else - mga_writeb(vm, 0x1234, 0x99); + mga_outb(M_CACHEFLUSH, 0x00); for (offs = 0x100000; offs < maxSize; offs += 0x200000) { if (mga_readb(vm, offs) != 0x02) break; @@ -1319,7 +1315,6 @@ static int matroxfb_getmemory(WPMINFO un tmp = bytes; for (offs2 = 0x100000; offs2 < maxSize; offs2 += 0x200000) mga_writeb(vm, offs2, *tmp++); - mga_writeb(vm, 0x1234, store); mga_outb(M_EXTVGA_INDEX, 0x03); mga_outb(M_EXTVGA_DATA, orig); diff -uprN linux-2.6.14-2/drivers/video/matrox/matroxfb_base.h linux-2.6.14-3/drivers/video/matrox/matroxfb_base.h --- linux-2.6.14-2/drivers/video/matrox/matroxfb_base.h 2005-10-31 17:44:36.000000000 +0200 +++ linux-2.6.14-3/drivers/video/matrox/matroxfb_base.h 2005-10-31 19:40:02.000000000 +0200 @@ -272,10 +272,6 @@ struct matrox_DAC1064_features { u_int8_t xmiscctrl; }; -struct matrox_accel_features { - int has_cacheflush; -}; - /* current hardware status */ struct mavenregs { u_int8_t regs[256]; @@ -440,7 +436,6 @@ struct matrox_fb_info { struct { struct matrox_pll_features pll; struct matrox_DAC1064_features DAC1064; - struct matrox_accel_features accel; } features; struct { spinlock_t DAC; diff -uprN linux-2.6.14-2/drivers/video/matrox/matroxfb_DAC1064.c linux-2.6.14-3/drivers/video/matrox/matroxfb_DAC1064.c --- linux-2.6.14-2/drivers/video/matrox/matroxfb_DAC1064.c 2005-10-31 17:44:36.000000000 +0200 +++ linux-2.6.14-3/drivers/video/matrox/matroxfb_DAC1064.c 2005-10-31 19:40:02.000000000 +0200 @@ -657,7 +657,6 @@ static int MGA1064_preinit(WPMINFO2) { /* ACCESS_FBINFO(capable.cfb4) = 0; ... preinitialized by 0 */ ACCESS_FBINFO(capable.text) = 1; ACCESS_FBINFO(capable.vxres) = vxres_mystique; - ACCESS_FBINFO(features.accel.has_cacheflush) = 1; ACCESS_FBINFO(outputs[0]).output = &m1064; ACCESS_FBINFO(outputs[0]).src = ACCESS_FBINFO(outputs[0]).default_src; @@ -842,7 +841,6 @@ static int MGAG100_preinit(WPMINFO2) { /* ACCESS_FBINFO(capable.cfb4) = 0; ... preinitialized by 0 */ ACCESS_FBINFO(capable.text) = 1; ACCESS_FBINFO(capable.vxres) = vxres_g100; - ACCESS_FBINFO(features.accel.has_cacheflush) = 1; ACCESS_FBINFO(capable.plnwt) = ACCESS_FBINFO(devflags.accelerator) == FB_ACCEL_MATROX_MGAG100 ? ACCESS_FBINFO(devflags.sgram) : 1; |
From: Andrew Morton <akpm@os...> - 2005-10-31 20:59:51
|
Begin forwarded message: Date: Mon, 31 Oct 2005 12:37:09 -0800 From: bugme-daemon@... To: bugme-new@... Subject: [Bugme-new] [Bug 5528] New: iBook 14'' 1.42 Ghz sleep, framebuffer issue http://bugme.osdl.org/show_bug.cgi?id=5528 Summary: iBook 14'' 1.42 Ghz sleep, framebuffer issue Kernel Version: 2.6.14 |
From: Jake Moilanen <moilanen@au...> - 2005-10-28 18:50:25
|
Here's the PCI ID for the ATI RN50 chip. Jake Signed-off-by: Jake Moilanen <moilanen@...> Index: 2.6.14/drivers/video/aty/ati_ids.h =================================================================== --- 2.6.14.orig/drivers/video/aty/ati_ids.h 2005-03-02 01:38:04.000000000 -0600 +++ 2.6.14/drivers/video/aty/ati_ids.h 2005-10-28 12:51:14.895957225 -0500 @@ -150,6 +150,7 @@ #define PCI_CHIP_RV200_QX 0x5158 #define PCI_CHIP_RV100_QY 0x5159 #define PCI_CHIP_RV100_QZ 0x515A +#define PCI_CHIP_RN50 0x515E #define PCI_CHIP_RAGE128RE 0x5245 #define PCI_CHIP_RAGE128RF 0x5246 #define PCI_CHIP_RAGE128RG 0x5247 Index: 2.6.14/drivers/video/aty/radeon_base.c =================================================================== --- 2.6.14.orig/drivers/video/aty/radeon_base.c 2005-10-28 09:54:59.864156837 -0500 +++ 2.6.14/drivers/video/aty/radeon_base.c 2005-10-28 12:52:32.164274339 -0500 @@ -113,6 +113,7 @@ /* Radeon VE/7000 */ CHIP_DEF(PCI_CHIP_RV100_QY, RV100, CHIP_HAS_CRTC2), CHIP_DEF(PCI_CHIP_RV100_QZ, RV100, CHIP_HAS_CRTC2), + CHIP_DEF(PCI_CHIP_RN50, RV100, CHIP_HAS_CRTC2), /* Radeon IGP320M (U1) */ CHIP_DEF(PCI_CHIP_RS100_4336, RS100, CHIP_HAS_CRTC2 | CHIP_IS_IGP | CHIP_IS_MOBILITY), /* Radeon IGP320 (A3) */ |
From: Antonino A. Daplas <adaplas@gm...> - 2005-10-27 00:09:37
|
Richard Purdie wrote: > On Wed, 2005-10-26 at 19:45 +0800, Antonino A. Daplas wrote: >> Hasjim Williams wrote: >>> Hi all, >>> >>> I am looking to rotate the framebuffer console on an embedded ARM >>> device. I know that both OPIE and GPE (X Windows) support screen >>> rotation in software. I think they use a shadow framebuffer... Has >>> anyone on either of the lists started implementing this in 2.6.x ??? I >>> know the Zaurus CL-3xxx series use the pxafb driver and fbcon is rotated >>> on these devices. My platform uses the amba_clcd driver and fbcon is >>> also rotated on this device. >>> >>> See http://sourceforge.net/mailarchive/message.php?msg_id=12904686 for >>> the Zaurus info. >>> >>> Is there some easy / good way to add rotated console support to the >>> kernel? Or do we have to use a shadow framebuffer? >> I had a patch that does software rotation for the framebuffer console. But >> this was during 2.5. The patch does this by having different putcs, putc, >> bmove, fill, and cursor methods depending on the orientation. >> >> If this is really desired, I may try to revive that patch... > > I was asked about this offlist and sent Hasjim a copy of the 2.5 patch. > > Console rotation would be extremely useful for several of the Zaurus > devices (Collie, Spitz, Akita and Borzoi). These use pxafb or sa1100fb > which don't support rotation in hardware. (The other Zaurus models use > w100fb which does support hardware rotation). > Ok, I have some spare time this weekend to update the patch. Tony |
From: Richard Purdie <rpurdie@rp...> - 2005-10-26 22:49:42
|
On Wed, 2005-10-26 at 19:45 +0800, Antonino A. Daplas wrote: > Hasjim Williams wrote: > > Hi all, > > > > I am looking to rotate the framebuffer console on an embedded ARM > > device. I know that both OPIE and GPE (X Windows) support screen > > rotation in software. I think they use a shadow framebuffer... Has > > anyone on either of the lists started implementing this in 2.6.x ??? I > > know the Zaurus CL-3xxx series use the pxafb driver and fbcon is rotated > > on these devices. My platform uses the amba_clcd driver and fbcon is > > also rotated on this device. > > > > See http://sourceforge.net/mailarchive/message.php?msg_id=12904686 for > > the Zaurus info. > > > > Is there some easy / good way to add rotated console support to the > > kernel? Or do we have to use a shadow framebuffer? > > I had a patch that does software rotation for the framebuffer console. But > this was during 2.5. The patch does this by having different putcs, putc, > bmove, fill, and cursor methods depending on the orientation. > > If this is really desired, I may try to revive that patch... I was asked about this offlist and sent Hasjim a copy of the 2.5 patch. Console rotation would be extremely useful for several of the Zaurus devices (Collie, Spitz, Akita and Borzoi). These use pxafb or sa1100fb which don't support rotation in hardware. (The other Zaurus models use w100fb which does support hardware rotation). I've been planning to make the patch apply to recent kernels but haven't found the time to do that yet... Richard |
From: Ralf Baechle <ralf@li...> - 2005-10-26 20:30:49
|
On Wed, Oct 26, 2005 at 12:59:01PM -0700, Andrew Morton wrote: > > diff --git a/drivers/video/au1200fb.c b/drivers/video/au1200fb.c > > index adde4f6..f7243b1 100644 > > --- a/drivers/video/au1200fb.c > > +++ b/drivers/video/au1200fb.c > > @@ -1555,7 +1555,6 @@ static struct fb_ops au1200fb_fb_ops = > > .fb_fillrect = cfb_fillrect, > > .fb_copyarea = cfb_copyarea, > > .fb_imageblit = cfb_imageblit, > > - .fb_cursor = soft_cursor, > > .fb_sync = NULL, > > .fb_ioctl = au1200fb_ioctl, > > .fb_mmap = au1200fb_fb_mmap, > > Well I dunno what to do about this one. There is no (longer) a au1200fb.c > in my tree and the drivers/video/Kconfig hunk already seems to have been > applied (by Ralf)? One or two days ago dropped the whole Au1200 framebuffer patch from my patchset for Andrew - it was actually only in by accident. > Which leaves us with a single hunk: > > > From: "Antonino A. Daplas" <adaplas@...> > > au1100fb and au1200fb still refers to soft_cursor. Remove. > > Signed-off-by: Antonino Daplas <adaplas@...> > Signed-off-by: Andrew Morton <akpm@...> > --- > > drivers/video/au1100fb.c | 1 - > 1 files changed, 1 deletion(-) > > diff -puN drivers/video/au1100fb.c~fbdev-remove-remaining-references-to-soft_cursor-from drivers/video/au1100fb.c > --- 25/drivers/video/au1100fb.c~fbdev-remove-remaining-references-to-soft_cursor-from Wed Oct 26 12:57:37 2005 > +++ 25-akpm/drivers/video/au1100fb.c Wed Oct 26 12:57:37 2005 > @@ -424,7 +424,6 @@ static struct fb_ops au1100fb_ops = > .fb_fillrect = cfb_fillrect, > .fb_copyarea = cfb_copyarea, > .fb_imageblit = cfb_imageblit, > - .fb_cursor = soft_cursor, > .fb_rotate = au1100fb_fb_rotate, > .fb_mmap = au1100fb_fb_mmap, > }; > _ > > Which I guess Ralf should apply. Done. > Ralf, if you're regularly going to be putting framebuffer patches in to the > MIPS tree then we're in for a hard time. I had posted that driver before (see below) and not received any feedback ... Ralf From: Ralf Baechle <ralf@...> Date: Fri, 14 Oct 2005 22:58:42 +0100 To: linux-fbdev-devel@... Cc: Andrew Morton <akpm@...> Subject: [PATCH] au1100fb framebuffer fixes Content-Type: text/plain; charset=us-ascii For reviewing pleassure. If nobody objects I'd like to submit this one as part of my pile of MIPS patches. The au1100fb driver is the driver for the AMD Alchemy SOCs. Ralf Author: Pete Popov <ppopov@...> Date: Mon Apr 4 01:06:19 2005 +0000 Au1100 FB driver uplift for 2.6. |
From: Andrew Morton <akpm@os...> - 2005-10-26 19:58:59
|
"Antonino A. Daplas" <adaplas@...> wrote: > > au1100fb and au1200fb still refers to soft_cursor. Remove. > > Signed-off-by: Antonino Daplas <adaplas@...> > --- > > drivers/video/Kconfig:1249:warning: 'select' used by config symbol 'FB_AU1200' refer to undefined symbol 'FB_SOFT_CURSOR' > > > > This might be due to a clash-of-intent between some of Tony's stuff and the > > MIPS tree. A fix against next -mm would suit, thanks. > > > > > > Here's the fix > > Kconfig | 1 - > au1100fb.c | 1 - > au1200fb.c | 1 - > 3 files changed, 3 deletions(-) > > > diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig > index fcb559b..55ae403 100644 > --- a/drivers/video/Kconfig > +++ b/drivers/video/Kconfig > @@ -1246,7 +1246,6 @@ config FB_AU1200 > select FB_CFB_FILLRECT > select FB_CFB_COPYAREA > select FB_CFB_IMAGEBLIT > - select FB_SOFT_CURSOR > help > This is the framebuffer driver for the AMD Au1200 SOC. It can drive > various panels and CRTs by passing in kernel cmd line option > diff --git a/drivers/video/au1100fb.c b/drivers/video/au1100fb.c > index bf3ac99..a512980 100644 > --- a/drivers/video/au1100fb.c > +++ b/drivers/video/au1100fb.c > @@ -424,7 +424,6 @@ static struct fb_ops au1100fb_ops = > .fb_fillrect = cfb_fillrect, > .fb_copyarea = cfb_copyarea, > .fb_imageblit = cfb_imageblit, > - .fb_cursor = soft_cursor, > .fb_rotate = au1100fb_fb_rotate, > .fb_mmap = au1100fb_fb_mmap, > }; > diff --git a/drivers/video/au1200fb.c b/drivers/video/au1200fb.c > index adde4f6..f7243b1 100644 > --- a/drivers/video/au1200fb.c > +++ b/drivers/video/au1200fb.c > @@ -1555,7 +1555,6 @@ static struct fb_ops au1200fb_fb_ops = > .fb_fillrect = cfb_fillrect, > .fb_copyarea = cfb_copyarea, > .fb_imageblit = cfb_imageblit, > - .fb_cursor = soft_cursor, > .fb_sync = NULL, > .fb_ioctl = au1200fb_ioctl, > .fb_mmap = au1200fb_fb_mmap, Well I dunno what to do about this one. There is no (longer) a au1200fb.c in my tree and the drivers/video/Kconfig hunk already seems to have been applied (by Ralf)? Which leaves us with a single hunk: From: "Antonino A. Daplas" <adaplas@...> au1100fb and au1200fb still refers to soft_cursor. Remove. Signed-off-by: Antonino Daplas <adaplas@...> Signed-off-by: Andrew Morton <akpm@...> --- drivers/video/au1100fb.c | 1 - 1 files changed, 1 deletion(-) diff -puN drivers/video/au1100fb.c~fbdev-remove-remaining-references-to-soft_cursor-from drivers/video/au1100fb.c --- 25/drivers/video/au1100fb.c~fbdev-remove-remaining-references-to-soft_cursor-from Wed Oct 26 12:57:37 2005 +++ 25-akpm/drivers/video/au1100fb.c Wed Oct 26 12:57:37 2005 @@ -424,7 +424,6 @@ static struct fb_ops au1100fb_ops = .fb_fillrect = cfb_fillrect, .fb_copyarea = cfb_copyarea, .fb_imageblit = cfb_imageblit, - .fb_cursor = soft_cursor, .fb_rotate = au1100fb_fb_rotate, .fb_mmap = au1100fb_fb_mmap, }; _ Which I guess Ralf should apply. Ralf, if you're regularly going to be putting framebuffer patches in to the MIPS tree then we're in for a hard time. |
From: Antonino A. Daplas <adaplas@gm...> - 2005-10-26 12:06:09
|
Convert i810fb, nvidiafb and savagefb to use the fb_find_best_display helper when searching for the initial video mode. Signed-off-by: Antonino Daplas <adaplas@...> --- i810/i810_main.c | 17 ++++------------- nvidia/nvidia.c | 18 +++--------------- savage/savagefb_driver.c | 21 ++++----------------- 3 files changed, 11 insertions(+), 45 deletions(-) diff --git a/drivers/video/i810/i810_main.c b/drivers/video/i810/i810_main.c index 96f5f62..c0c974b 100644 --- a/drivers/video/i810/i810_main.c +++ b/drivers/video/i810/i810_main.c @@ -1871,27 +1871,18 @@ static void __devinit i810fb_find_init_m fb_videomode_to_modelist(specs->modedb, specs->modedb_len, &info->modelist); if (specs->modedb != NULL) { - if (xres && yres) { - struct fb_videomode *m; + struct fb_videomode *m; + if (xres && yres) { if ((m = fb_find_best_mode(&var, &info->modelist))) { mode = *m; found = 1; } } - if (!found && specs->misc & FB_MISC_1ST_DETAIL) { - for (i = 0; i < specs->modedb_len; i++) { - if (specs->modedb[i].flag & FB_MODE_IS_FIRST) { - mode = specs->modedb[i]; - found = 1; - break; - } - } - } - if (!found) { - mode = specs->modedb[0]; + m = fb_find_best_display(&info->monspecs, &info->modelist); + mode = *m; found = 1; } diff --git a/drivers/video/nvidia/nvidia.c b/drivers/video/nvidia/nvidia.c index 3ceb74e..8c4cc36 100644 --- a/drivers/video/nvidia/nvidia.c +++ b/drivers/video/nvidia/nvidia.c @@ -1375,22 +1375,10 @@ static int __devinit nvidia_set_fbinfo(s fb_var_to_videomode(&modedb, &nvidiafb_default_var); if (specs->modedb != NULL) { - /* get preferred timing */ - if (specs->misc & FB_MISC_1ST_DETAIL) { - int i; - - for (i = 0; i < specs->modedb_len; i++) { - if (specs->modedb[i].flag & FB_MODE_IS_FIRST) { - modedb = specs->modedb[i]; - break; - } - } - } else { - /* otherwise, get first mode in database */ - modedb = specs->modedb[0]; - } + struct fb_videomode *modedb; - fb_videomode_to_var(&nvidiafb_default_var, &modedb); + modedb = fb_find_best_display(specs, &info->modelist); + fb_videomode_to_var(&nvidiafb_default_var, modedb); nvidiafb_default_var.bits_per_pixel = 8; } else if (par->fpWidth && par->fpHeight) { char buf[16]; diff --git a/drivers/video/savage/savagefb_driver.c b/drivers/video/savage/savagefb_driver.c index 46b1a9c..62c47ea 100644 --- a/drivers/video/savage/savagefb_driver.c +++ b/drivers/video/savage/savagefb_driver.c @@ -2052,24 +2052,11 @@ static int __devinit savagefb_probe (str info->monspecs.modedb, info->monspecs.modedb_len, NULL, 8); } else if (info->monspecs.modedb != NULL) { - struct fb_monspecs *specs = &info->monspecs; - struct fb_videomode modedb; + struct fb_videomode *modedb; - if (info->monspecs.misc & FB_MISC_1ST_DETAIL) { - int i; - - for (i = 0; i < specs->modedb_len; i++) { - if (specs->modedb[i].flag & FB_MODE_IS_FIRST) { - modedb = specs->modedb[i]; - break; - } - } - } else { - /* otherwise, get first mode in database */ - modedb = specs->modedb[0]; - } - - savage_update_var(&info->var, &modedb); + modedb = fb_find_best_display(&info->monspecs, + &info->modelist); + savage_update_var(&info->var, modedb); } /* maximize virtual vertical length */ |
From: Antonino A. Daplas <adaplas@gm...> - 2005-10-26 12:05:59
|
Add new helper, fb_find_best_display(), which will search the modelist for the best mode for the attached display. This requires an EDID block that is converted to struct fb_monspecs and a private modelist. The search will be done in this manner: - if 1st detailed timing is preferred, use that - else if dimensions of the display are known, use that to estimate xres and - else if modelist has detailed timings, use the first detailed timing - else, use the very first entry from the modelist Signed-off-by: Antonino Daplas <adaplas@...> --- drivers/video/modedb.c | 60 +++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/fb.h | 2 + 2 files changed, 62 insertions(+) diff --git a/drivers/video/modedb.c b/drivers/video/modedb.c index aadef04..1789a52 100644 --- a/drivers/video/modedb.c +++ b/drivers/video/modedb.c @@ -944,6 +944,66 @@ void fb_videomode_to_modelist(struct fb_ } } +struct fb_videomode *fb_find_best_display(struct fb_monspecs *specs, + struct list_head *head) +{ + struct list_head *pos; + struct fb_modelist *modelist; + struct fb_videomode *m, *m1 = NULL, *md = NULL, *best = NULL; + int first = 0; + + if (!head->prev || !head->next || list_empty(head)) + goto finished; + + /* get the first detailed mode and the very first mode */ + list_for_each(pos, head) { + modelist = list_entry(pos, struct fb_modelist, list); + m = &modelist->mode; + + if (!first) { + m1 = m; + first = 1; + } + + if (m->flag & FB_MODE_IS_FIRST) { + md = m; + break; + } + } + + /* first detailed timing is preferred */ + if (specs->misc & FB_MISC_1ST_DETAIL) { + best = md; + goto finished; + } + + /* find best mode based on display width and height */ + if (specs->max_x && specs->max_y) { + struct fb_var_screeninfo var; + + memset(&var, 0, sizeof(struct fb_var_screeninfo)); + var.xres = (specs->max_x * 7200)/254; + var.yres = (specs->max_y * 7200)/254; + m = fb_find_best_mode(&var, head); + if (m) { + best = m; + goto finished; + } + } + + /* use first detailed mode */ + if (md) { + best = md; + goto finished; + } + + /* last resort, use the very first mode */ + best = m1; +finished: + return best; +} +EXPORT_SYMBOL(fb_find_best_display); + EXPORT_SYMBOL(fb_videomode_to_var); EXPORT_SYMBOL(fb_var_to_videomode); EXPORT_SYMBOL(fb_mode_is_equal); diff --git a/include/linux/fb.h b/include/linux/fb.h index 68a7879..e7ff98e 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -902,6 +902,8 @@ extern struct fb_videomode *fb_find_near extern void fb_destroy_modelist(struct list_head *head); extern void fb_videomode_to_modelist(struct fb_videomode *modedb, int num, struct list_head *head); +extern struct fb_videomode *fb_find_best_display(struct fb_monspecs *specs, + struct list_head *head); /* drivers/video/fbcmap.c */ extern int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp); |
From: Antonino A. Daplas <adaplas@gm...> - 2005-10-26 12:05:56
|
Rearrange mode database entries such that preferred timings are entered first, and less preferred timings are entered last. (Detailed, VESA, established/standard). Signed-off-by: Antonino Daplas <adaplas@...> --- fbmon.c | 30 ++++++++++++++++-------------- 1 files changed, 16 insertions(+), 14 deletions(-) diff --git a/drivers/video/fbmon.c b/drivers/video/fbmon.c index 442a52d..fc7965b 100644 --- a/drivers/video/fbmon.c +++ b/drivers/video/fbmon.c @@ -538,25 +538,12 @@ static struct fb_videomode *fb_create_mo *dbsize = 0; - DPRINTK(" Supported VESA Modes\n"); - block = edid + ESTABLISHED_TIMING_1; - num += get_est_timing(block, &mode[num]); - - DPRINTK(" Standard Timings\n"); - block = edid + STD_TIMING_DESCRIPTIONS_START; - for (i = 0; i < STD_TIMING; i++, block += STD_TIMING_DESCRIPTION_SIZE) - num += get_std_timing(block, &mode[num]); - DPRINTK(" Detailed Timings\n"); block = edid + DETAILED_TIMING_DESCRIPTIONS_START; for (i = 0; i < 4; i++, block+= DETAILED_TIMING_DESCRIPTION_SIZE) { int first = 1; - if (block[0] == 0x00 && block[1] == 0x00) { - if (block[3] == 0xfa) { - num += get_dst_timing(block + 5, &mode[num]); - } - } else { + if (!(block[0] == 0x00 && block[1] == 0x00)) { get_detailed_timing(block, &mode[num]); if (first) { mode[num].flag |= FB_MODE_IS_FIRST; @@ -565,6 +552,21 @@ static struct fb_videomode *fb_create_mo num++; } } + + DPRINTK(" Supported VESA Modes\n"); + block = edid + ESTABLISHED_TIMING_1; + num += get_est_timing(block, &mode[num]); + + DPRINTK(" Standard Timings\n"); + block = edid + STD_TIMING_DESCRIPTIONS_START; + for (i = 0; i < STD_TIMING; i++, block += STD_TIMING_DESCRIPTION_SIZE) + num += get_std_timing(block, &mode[num]); + + block = edid + DETAILED_TIMING_DESCRIPTIONS_START; + for (i = 0; i < 4; i++, block+= DETAILED_TIMING_DESCRIPTION_SIZE) { + if (block[0] == 0x00 && block[1] == 0x00 && block[3] == 0xfa) + num += get_dst_timing(block + 5, &mode[num]); + } /* Yikes, EDID data is totally useless */ if (!num) { |
From: Antonino A. Daplas <adaplas@gm...> - 2005-10-26 12:05:48
|
au1100fb and au1200fb still refers to soft_cursor. Remove. Signed-off-by: Antonino Daplas <adaplas@...> --- > drivers/video/Kconfig:1249:warning: 'select' used by config symbol 'FB_AU1200' refer to undefined symbol 'FB_SOFT_CURSOR' > > This might be due to a clash-of-intent between some of Tony's stuff and the > MIPS tree. A fix against next -mm would suit, thanks. > > Here's the fix Kconfig | 1 - au1100fb.c | 1 - au1200fb.c | 1 - 3 files changed, 3 deletions(-) diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index fcb559b..55ae403 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -1246,7 +1246,6 @@ config FB_AU1200 select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT - select FB_SOFT_CURSOR help This is the framebuffer driver for the AMD Au1200 SOC. It can drive various panels and CRTs by passing in kernel cmd line option diff --git a/drivers/video/au1100fb.c b/drivers/video/au1100fb.c index bf3ac99..a512980 100644 --- a/drivers/video/au1100fb.c +++ b/drivers/video/au1100fb.c @@ -424,7 +424,6 @@ static struct fb_ops au1100fb_ops = .fb_fillrect = cfb_fillrect, .fb_copyarea = cfb_copyarea, .fb_imageblit = cfb_imageblit, - .fb_cursor = soft_cursor, .fb_rotate = au1100fb_fb_rotate, .fb_mmap = au1100fb_fb_mmap, }; diff --git a/drivers/video/au1200fb.c b/drivers/video/au1200fb.c index adde4f6..f7243b1 100644 --- a/drivers/video/au1200fb.c +++ b/drivers/video/au1200fb.c @@ -1555,7 +1555,6 @@ static struct fb_ops au1200fb_fb_ops = .fb_fillrect = cfb_fillrect, .fb_copyarea = cfb_copyarea, .fb_imageblit = cfb_imageblit, - .fb_cursor = soft_cursor, .fb_sync = NULL, .fb_ioctl = au1200fb_ioctl, .fb_mmap = au1200fb_fb_mmap, |
From: Antonino A. Daplas <adaplas@gm...> - 2005-10-26 11:46:26
|
Hasjim Williams wrote: > Hi all, > > I am looking to rotate the framebuffer console on an embedded ARM > device. I know that both OPIE and GPE (X Windows) support screen > rotation in software. I think they use a shadow framebuffer... Has > anyone on either of the lists started implementing this in 2.6.x ??? I > know the Zaurus CL-3xxx series use the pxafb driver and fbcon is rotated > on these devices. My platform uses the amba_clcd driver and fbcon is > also rotated on this device. > > See http://sourceforge.net/mailarchive/message.php?msg_id=12904686 for > the Zaurus info. > > Is there some easy / good way to add rotated console support to the > kernel? Or do we have to use a shadow framebuffer? I had a patch that does software rotation for the framebuffer console. But this was during 2.5. The patch does this by having different putcs, putc, bmove, fill, and cursor methods depending on the orientation. If this is really desired, I may try to revive that patch... Tony PS: The i810fb driver for 2.4 (http://i810fb.sf.net) supports console rotation in software. |
From: Hasjim Williams <hasjim.williams@fu...> - 2005-10-26 04:38:50
|
Hi all, I am looking to rotate the framebuffer console on an embedded ARM device. I know that both OPIE and GPE (X Windows) support screen rotation in software. I think they use a shadow framebuffer... Has anyone on either of the lists started implementing this in 2.6.x ??? I know the Zaurus CL-3xxx series use the pxafb driver and fbcon is rotated on these devices. My platform uses the amba_clcd driver and fbcon is also rotated on this device. See http://sourceforge.net/mailarchive/message.php?msg_id=12904686 for the Zaurus info. Is there some easy / good way to add rotated console support to the kernel? Or do we have to use a shadow framebuffer? Thanks for any help / suggestions ... |
From: James Simmons <jsimmons@in...> - 2005-10-24 23:15:16
|
There was a small typo discovered. So the patch is updated. Discard the older patch. This patch makes the mach64 chip on atari machines a platform device so it can be used via sysfs. Please apply. --- linus-2.6/drivers/video/aty/atyfb_base.c 2005-09-13 14:01:40.000000000 -0700 +++ fbdev-2.6/drivers/video/aty/atyfb_base.c 2005-10-24 16:11:05.000000000 -0700 @@ -244,9 +244,6 @@ */ static int aty_init(struct fb_info *info, const char *name); -#ifdef CONFIG_ATARI -static int store_video_par(char *videopar, unsigned char m64_num); -#endif static struct crtc saved_crtc; static union aty_pll saved_pll; @@ -321,10 +318,8 @@ #endif #ifdef CONFIG_ATARI -static unsigned int mach64_count __initdata = 0; -static unsigned long phys_vmembase[FB_MAX] __initdata = { 0, }; -static unsigned long phys_size[FB_MAX] __initdata = { 0, }; -static unsigned long phys_guiregbase[FB_MAX] __initdata = { 0, }; +static struct mach64_device* __init store_video_par(char *video_str, unsigned char m64_num); +static LIST_HEAD(mach64_list); #endif /* top -> down is an evolution of mach64 chipset, any corrections? */ @@ -2155,15 +2150,12 @@ * Initialisation */ -static struct fb_info *fb_list = NULL; - static int __init aty_init(struct fb_info *info, const char *name) { struct atyfb_par *par = (struct atyfb_par *) info->par; const char *ramname = NULL, *xtal; - int gtb_memsize; struct fb_var_screeninfo var; - u8 pll_ref_div; + int gtb_memsize; u32 i; #if defined(CONFIG_PPC) int sense; @@ -2276,18 +2268,20 @@ par->pll_limits.mclk = 63; } - if (M64_HAS(GTB_DSP) - && (pll_ref_div = aty_ld_pll_ct(PLL_REF_DIV, par))) { - int diff1, diff2; - diff1 = 510 * 14 / pll_ref_div - par->pll_limits.pll_max; - diff2 = 510 * 29 / pll_ref_div - par->pll_limits.pll_max; - if (diff1 < 0) - diff1 = -diff1; - if (diff2 < 0) - diff2 = -diff2; - if (diff2 < diff1) { - par->ref_clk_per = 1000000000000ULL / 29498928; - xtal = "29.498928"; + if (M64_HAS(GTB_DSP)) { + u8 pll_ref_div = aty_ld_pll_ct(PLL_REF_DIV, par); + if (pll_ref_div) { + int diff1, diff2; + diff1 = 510 * 14 / pll_ref_div - par->pll_limits.pll_max; + diff2 = 510 * 29 / pll_ref_div - par->pll_limits.pll_max; + if (diff1 < 0) + diff1 = -diff1; + if (diff2 < 0) + diff2 = -diff2; + if (diff2 < diff1) { + par->ref_clk_per = 1000000000000ULL / 29498928; + xtal = "29.498928"; + } } } #endif /* CONFIG_FB_ATY_CT */ @@ -2547,8 +2541,6 @@ if (register_framebuffer(info) < 0) goto aty_init_exit; - fb_list = info; - PRINTKI("fb%d: %s frame buffer device on %s\n", info->node, info->fix.id, name); return 0; @@ -2571,37 +2563,6 @@ return -1; } -#ifdef CONFIG_ATARI -static int __init store_video_par(char *video_str, unsigned char m64_num) -{ - char *p; - unsigned long vmembase, size, guiregbase; - - PRINTKI("store_video_par() '%s' \n", video_str); - - if (!(p = strsep(&video_str, ";")) || !*p) - goto mach64_invalid; - vmembase = simple_strtoul(p, NULL, 0); - if (!(p = strsep(&video_str, ";")) || !*p) - goto mach64_invalid; - size = simple_strtoul(p, NULL, 0); - if (!(p = strsep(&video_str, ";")) || !*p) - goto mach64_invalid; - guiregbase = simple_strtoul(p, NULL, 0); - - phys_vmembase[m64_num] = vmembase; - phys_size[m64_num] = size; - phys_guiregbase[m64_num] = guiregbase; - PRINTKI("stored them all: $%08lX $%08lX $%08lX \n", vmembase, size, - guiregbase); - return 0; - - mach64_invalid: - phys_vmembase[m64_num] = 0; - return -1; -} -#endif /* CONFIG_ATARI */ - /* * Blank the display. */ @@ -2756,6 +2717,48 @@ return 0; } +static void __devexit atyfb_remove(struct fb_info *info) +{ + struct atyfb_par *par = (struct atyfb_par *) info->par; + + /* restore video mode */ + aty_set_crtc(par, &saved_crtc); + par->pll_ops->set_pll(info, &saved_pll); + + unregister_framebuffer(info); + +#ifdef CONFIG_MTRR + if (par->mtrr_reg >= 0) { + mtrr_del(par->mtrr_reg, 0, 0); + par->mtrr_reg = -1; + } + if (par->mtrr_aper >= 0) { + mtrr_del(par->mtrr_aper, 0, 0); + par->mtrr_aper = -1; + } +#endif +#ifndef __sparc__ + if (par->ati_regbase) + iounmap(par->ati_regbase); + if (info->screen_base) + iounmap(info->screen_base); +#ifdef __BIG_ENDIAN + if (info->sprite.addr) + iounmap(info->sprite.addr); +#endif +#endif +#ifdef __sparc__ + kfree(par->mmap_map); +#endif + if (par->aux_start) + release_mem_region(par->aux_start, par->aux_size); + + if (par->res_start) + release_mem_region(par->res_start, par->res_size); + + framebuffer_release(info); +} + #ifdef CONFIG_PCI #ifdef __sparc__ @@ -3437,49 +3440,115 @@ return rc; } +static void __devexit atyfb_pci_remove(struct pci_dev *pdev) +{ + struct fb_info *info = pci_get_drvdata(pdev); + + atyfb_remove(info); +} + +/* + * This driver uses its own matching table. That will be more difficult + * to fix, so for now, we just match against any ATI ID and let the + * probe() function find out what's up. That also mean we don't have + * a module ID table though. + */ +static struct pci_device_id atyfb_pci_tbl[] = { + { PCI_VENDOR_ID_ATI, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, + PCI_BASE_CLASS_DISPLAY << 16, 0xff0000, 0 }, + { 0, } +}; + +static struct pci_driver atyfb_driver = { + .name = "atyfb", + .id_table = atyfb_pci_tbl, + .probe = atyfb_pci_probe, + .remove = __devexit_p(atyfb_pci_remove), +#ifdef CONFIG_PM + .suspend = atyfb_pci_suspend, + .resume = atyfb_pci_resume, +#endif /* CONFIG_PM */ +}; + #endif /* CONFIG_PCI */ #ifdef CONFIG_ATARI -static int __devinit atyfb_atari_probe(void) +static struct mach64_device* __init store_video_par(char *video_str, unsigned char m64_num) { - struct aty_par *par; + unsigned long vmembase, size, guiregbase; + struct platform_device *atyfb_device; + struct mach64_device *device; + struct resource io[2]; + char *p; + + PRINTKI("store_video_par() '%s' \n", video_str); + + if (!(p = strsep(&video_str, ";")) || !*p) + goto mach64_invalid; + vmembase = simple_strtoul(p, NULL, 0); + if (!(p = strsep(&video_str, ";")) || !*p) + goto mach64_invalid; + size = simple_strtoul(p, NULL, 0); + if (!(p = strsep(&video_str, ";")) || !*p) + goto mach64_invalid; + guiregbase = simple_strtoul(p, NULL, 0); + + io[0] = request_mem_region(vmembase, size, "atyfb"); + if (!io[0]) + return NULL; + io[1] = request_mem_region(guiregbase, 0x10000, "atyfb"); + if (!io[1]) { + release_resource(io[0]); + return NULL; + } + + atyfb_device = platform_device_register_simple("atyfb", m64_num, io, 2); + if (IS_ERR(atyfb_device)) + return NULL; + + device = kmalloc(sizeof(struct mach64_device), GFP_KERNEL); + PRINTKI("stored them all: $%08lX $%08lX $%08lX \n", vmembase, size, guiregbase); + return device; +mach64_invalid: + return NULL; +} + +static int __init atyfb_atari_probe(struct device *device) +{ + struct platform_device *dev = to_platform_device(device); + struct atyfb_par *par; struct fb_info *info; - int m64_num; + int size = 0; u32 clock_r; - for (m64_num = 0; m64_num < mach64_count; m64_num++) { - if (!phys_vmembase[m64_num] || !phys_size[m64_num] || - !phys_guiregbase[m64_num]) { - PRINTKI("phys_*[%d] parameters not set => returning early. \n", m64_num); - continue; - } - - info = framebuffer_alloc(sizeof(struct atyfb_par), NULL); - if (!info) { - PRINTKE("atyfb_atari_probe() can't alloc fb_info\n"); - return -ENOMEM; - } - par = info->par; + info = framebuffer_alloc(sizeof(struct atyfb_par), &dev->dev); + if (!info) { + PRINTKE("atyfb_atari_probe() can't alloc fb_info\n"); + return -ENOMEM; + } + par = info->par; - info->fix = atyfb_fix; + info->fix = atyfb_fix; - par->irq = (unsigned int) -1; /* something invalid */ + par->irq = (unsigned int) -1; /* something invalid */ - /* - * Map the video memory (physical address given) to somewhere in the - * kernel address space. - */ - info->screen_base = ioremap(phys_vmembase[m64_num], phys_size[m64_num]); - info->fix.smem_start = (unsigned long)info->screen_base; /* Fake! */ - par->ati_regbase = ioremap(phys_guiregbase[m64_num], 0x10000) + - 0xFC00ul; - info->fix.mmio_start = (unsigned long)par->ati_regbase; /* Fake! */ + /* + * Map the video memory (physical address given) to somewhere in the + * kernel address space. + */ + size = dev->resource[0].start - dev->resource[0].end + 1; + info->fix.smem_start = dev->resource[0].start; + info->screen_base = ioremap(dev->resource[0].start, size); + + size = 0x10000; + info->fix.mmio_start = dev->resource[1].start + 0xFC00ul; + par->ati_regbase = ioremap(dev->resource[1].start, size) + 0xFC00ul; - aty_st_le32(CLOCK_CNTL, 0x12345678, par); - clock_r = aty_ld_le32(CLOCK_CNTL, par); + aty_st_le32(CLOCK_CNTL, 0x12345678, par); + clock_r = aty_ld_le32(CLOCK_CNTL, par); - switch (clock_r & 0x003F) { + switch (clock_r & 0x003F) { case 0x12: par->clk_wr_offset = 3; /* */ break; @@ -3493,92 +3562,34 @@ par->clk_wr_offset = 0; /* Panther 1 ISA Adapter (Gerald) */ break; } - - if (aty_init(info, "ISA bus")) { - framebuffer_release(info); - /* This is insufficient! kernel_map has added two large chunks!! */ - return -ENXIO; - } } -} - -#endif /* CONFIG_ATARI */ - -static void __devexit atyfb_remove(struct fb_info *info) -{ - struct atyfb_par *par = (struct atyfb_par *) info->par; - /* restore video mode */ - aty_set_crtc(par, &saved_crtc); - par->pll_ops->set_pll(info, &saved_pll); - - unregister_framebuffer(info); + //FIXME + //rc = correct_chipset(par); -#ifdef CONFIG_MTRR - if (par->mtrr_reg >= 0) { - mtrr_del(par->mtrr_reg, 0, 0); - par->mtrr_reg = -1; - } - if (par->mtrr_aper >= 0) { - mtrr_del(par->mtrr_aper, 0, 0); - par->mtrr_aper = -1; + if (aty_init(info, "ISA bus")) { + framebuffer_release(info); + /* This is insufficient! kernel_map has added two large chunks!! */ + return -ENXIO; } -#endif -#ifndef __sparc__ - if (par->ati_regbase) - iounmap(par->ati_regbase); - if (info->screen_base) - iounmap(info->screen_base); -#ifdef __BIG_ENDIAN - if (info->sprite.addr) - iounmap(info->sprite.addr); -#endif -#endif -#ifdef __sparc__ - kfree(par->mmap_map); -#endif - if (par->aux_start) - release_mem_region(par->aux_start, par->aux_size); - - if (par->res_start) - release_mem_region(par->res_start, par->res_size); - - framebuffer_release(info); + return 0; } -#ifdef CONFIG_PCI - -static void __devexit atyfb_pci_remove(struct pci_dev *pdev) +static void __devexit atyfb_atari_remove(struct device *dev) { - struct fb_info *info = pci_get_drvdata(pdev); + struct fb_info *info = dev_get_drvdata(dev); atyfb_remove(info); } -/* - * This driver uses its own matching table. That will be more difficult - * to fix, so for now, we just match against any ATI ID and let the - * probe() function find out what's up. That also mean we don't have - * a module ID table though. - */ -static struct pci_device_id atyfb_pci_tbl[] = { - { PCI_VENDOR_ID_ATI, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, - PCI_BASE_CLASS_DISPLAY << 16, 0xff0000, 0 }, - { 0, } -}; - -static struct pci_driver atyfb_driver = { +static struct device_driver atyfb_driver = { .name = "atyfb", - .id_table = atyfb_pci_tbl, - .probe = atyfb_pci_probe, - .remove = __devexit_p(atyfb_pci_remove), -#ifdef CONFIG_PM - .suspend = atyfb_pci_suspend, - .resume = atyfb_pci_resume, -#endif /* CONFIG_PM */ + .bus = &platform_bus_type, + .probe = atyfb_atari_probe, + .remove = __devexit_p(atyfb_atari_remove), }; -#endif /* CONFIG_PCI */ +#endif /* CONFIG_ATARI */ #ifndef MODULE static int __init atyfb_setup(char *options) @@ -3635,15 +3646,15 @@ * Why do we need this silly Mach64 argument? * We are already here because of mach64= so its redundant. */ - else if (MACH_IS_ATARI - && (!strncmp(this_opt, "Mach64:", 7))) { - static unsigned char m64_num; - static char mach64_str[80]; + else if (MACH_IS_ATARI && (!strncmp(this_opt, "Mach64:", 7))) { + struct mach64_device *dev; + unsigned char m64_num = 0; + char mach64_str[80]; + strlcpy(mach64_str, this_opt + 7, sizeof(mach64_str)); - if (!store_video_par(mach64_str, m64_num)) { - m64_num++; - mach64_count = m64_num; - } + dev = store_video_par(mach64_str, m64_num++); + if (dev != NULL) + list_add_tail(&dev->node, &mach64_list); } #endif else @@ -3655,6 +3666,8 @@ static int __init atyfb_init(void) { + int retval = 0; + #ifndef MODULE char *option = NULL; @@ -3664,16 +3677,38 @@ #endif #ifdef CONFIG_PCI - pci_register_driver(&atyfb_driver); + retval = pci_register_driver(&atyfb_driver); #endif #ifdef CONFIG_ATARI - atyfb_atari_probe(); + retval = driver_register(&atyfb_driver); + if (retval < 0) { + struct mach64_device *device; + struct list_head *p, *q; + + list_for_each_safe(p, q, &mach64_list) { + device = list_entry(p, struct mach64_device, node); + platform_device_register(device->dev); + kfree(device); + } + } #endif - return 0; + return retval; } static void __exit atyfb_exit(void) { +#ifdef CONFIG_ATARI + struct mach64_device *device; + struct list_head *p, *q; + + list_for_each_safe(p, q, &mach64_list) { + device = list_entry(p, struct mach64_device, node); + platform_device_unregister(device->dev); + kfree(device); + } + driver_unregister(&atyfb_driver); +#endif + #ifdef CONFIG_PCI pci_unregister_driver(&atyfb_driver); #endif @@ -3703,3 +3738,4 @@ module_param(nomtrr, bool, 0); MODULE_PARM_DESC(nomtrr, "bool: disable use of MTRR registers"); #endif + |
From: James Simmons <jsimmons@in...> - 2005-10-24 23:13:48
|
Yeap. Your right. I will send a patch with the correct spelling. On Tue, 25 Oct 2005, Ville [iso-8859-1] Syrj=E4l=E4 wrote: > On Mon, Oct 24, 2005 at 09:42:42PM +0100, James Simmons wrote: > >=20 > > Just code merger. First you had the M64_HAS test then test for=20 > > pll_ref_div. I combined the two test into one test. > > Its not needed tho so I broke it into 2 again. I think it is time to se= nd=20 > > this to Andrew. >=20 > He probably meant that you've mistyped pll_ref_div as pll_ref_dev. >=20 > --=20 > Ville Syrj=E4l=E4 > syrjala@... > http://www.sci.fi/~syrjala/ >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by the JBoss Inc. > Get Certified Today * Register for a JBoss Training Course > Free Certification Exam for All Training Attendees Through End of 2005 > Visit http://www.jboss.com/services/certification for more information > _______________________________________________ > Linux-fbdev-devel mailing list > Linux-fbdev-devel@... > https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel >=20 |
From: Ville <syrjala@sc...> - 2005-10-24 21:58:30
|
On Mon, Oct 24, 2005 at 09:42:42PM +0100, James Simmons wrote: >=20 > Just code merger. First you had the M64_HAS test then test for=20 > pll_ref_div. I combined the two test into one test. > Its not needed tho so I broke it into 2 again. I think it is time to se= nd=20 > this to Andrew. He probably meant that you've mistyped pll_ref_div as pll_ref_dev. --=20 Ville Syrj=E4l=E4 syrjala@... http://www.sci.fi/~syrjala/ |
From: James Simmons <jsimmons@in...> - 2005-10-24 20:48:48
|
This patch makes the mach64 chip on atari machines a platform device so it can be used via sysfs. Please apply. diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/aty/atyfb_base.c fbdev-2.6/drivers/video/aty/atyfb_base.c --- linus-2.6/drivers/video/aty/atyfb_base.c 2005-09-13 14:01:40.000000000 -0700 +++ fbdev-2.6/drivers/video/aty/atyfb_base.c 2005-10-24 13:41:35.000000000 -0700 @@ -244,9 +244,6 @@ */ static int aty_init(struct fb_info *info, const char *name); -#ifdef CONFIG_ATARI -static int store_video_par(char *videopar, unsigned char m64_num); -#endif static struct crtc saved_crtc; static union aty_pll saved_pll; @@ -321,10 +318,8 @@ #endif #ifdef CONFIG_ATARI -static unsigned int mach64_count __initdata = 0; -static unsigned long phys_vmembase[FB_MAX] __initdata = { 0, }; -static unsigned long phys_size[FB_MAX] __initdata = { 0, }; -static unsigned long phys_guiregbase[FB_MAX] __initdata = { 0, }; +static struct mach64_device* __init store_video_par(char *video_str, unsigned char m64_num); +static LIST_HEAD(mach64_list); #endif /* top -> down is an evolution of mach64 chipset, any corrections? */ @@ -2155,15 +2150,12 @@ * Initialisation */ -static struct fb_info *fb_list = NULL; - static int __init aty_init(struct fb_info *info, const char *name) { struct atyfb_par *par = (struct atyfb_par *) info->par; const char *ramname = NULL, *xtal; - int gtb_memsize; struct fb_var_screeninfo var; - u8 pll_ref_div; + int gtb_memsize; u32 i; #if defined(CONFIG_PPC) int sense; @@ -2276,18 +2268,20 @@ par->pll_limits.mclk = 63; } - if (M64_HAS(GTB_DSP) - && (pll_ref_div = aty_ld_pll_ct(PLL_REF_DIV, par))) { - int diff1, diff2; - diff1 = 510 * 14 / pll_ref_div - par->pll_limits.pll_max; - diff2 = 510 * 29 / pll_ref_div - par->pll_limits.pll_max; - if (diff1 < 0) - diff1 = -diff1; - if (diff2 < 0) - diff2 = -diff2; - if (diff2 < diff1) { - par->ref_clk_per = 1000000000000ULL / 29498928; - xtal = "29.498928"; + if (M64_HAS(GTB_DSP)) { + u8 pll_ref_div = aty_ld_pll_ct(PLL_REF_DIV, par); + if (pll_ref_dev) { + int diff1, diff2; + diff1 = 510 * 14 / pll_ref_div - par->pll_limits.pll_max; + diff2 = 510 * 29 / pll_ref_div - par->pll_limits.pll_max; + if (diff1 < 0) + diff1 = -diff1; + if (diff2 < 0) + diff2 = -diff2; + if (diff2 < diff1) { + par->ref_clk_per = 1000000000000ULL / 29498928; + xtal = "29.498928"; + } } } #endif /* CONFIG_FB_ATY_CT */ @@ -2547,8 +2541,6 @@ if (register_framebuffer(info) < 0) goto aty_init_exit; - fb_list = info; - PRINTKI("fb%d: %s frame buffer device on %s\n", info->node, info->fix.id, name); return 0; @@ -2571,37 +2563,6 @@ return -1; } -#ifdef CONFIG_ATARI -static int __init store_video_par(char *video_str, unsigned char m64_num) -{ - char *p; - unsigned long vmembase, size, guiregbase; - - PRINTKI("store_video_par() '%s' \n", video_str); - - if (!(p = strsep(&video_str, ";")) || !*p) - goto mach64_invalid; - vmembase = simple_strtoul(p, NULL, 0); - if (!(p = strsep(&video_str, ";")) || !*p) - goto mach64_invalid; - size = simple_strtoul(p, NULL, 0); - if (!(p = strsep(&video_str, ";")) || !*p) - goto mach64_invalid; - guiregbase = simple_strtoul(p, NULL, 0); - - phys_vmembase[m64_num] = vmembase; - phys_size[m64_num] = size; - phys_guiregbase[m64_num] = guiregbase; - PRINTKI("stored them all: $%08lX $%08lX $%08lX \n", vmembase, size, - guiregbase); - return 0; - - mach64_invalid: - phys_vmembase[m64_num] = 0; - return -1; -} -#endif /* CONFIG_ATARI */ - /* * Blank the display. */ @@ -2756,6 +2717,48 @@ return 0; } +static void __devexit atyfb_remove(struct fb_info *info) +{ + struct atyfb_par *par = (struct atyfb_par *) info->par; + + /* restore video mode */ + aty_set_crtc(par, &saved_crtc); + par->pll_ops->set_pll(info, &saved_pll); + + unregister_framebuffer(info); + +#ifdef CONFIG_MTRR + if (par->mtrr_reg >= 0) { + mtrr_del(par->mtrr_reg, 0, 0); + par->mtrr_reg = -1; + } + if (par->mtrr_aper >= 0) { + mtrr_del(par->mtrr_aper, 0, 0); + par->mtrr_aper = -1; + } +#endif +#ifndef __sparc__ + if (par->ati_regbase) + iounmap(par->ati_regbase); + if (info->screen_base) + iounmap(info->screen_base); +#ifdef __BIG_ENDIAN + if (info->sprite.addr) + iounmap(info->sprite.addr); +#endif +#endif +#ifdef __sparc__ + kfree(par->mmap_map); +#endif + if (par->aux_start) + release_mem_region(par->aux_start, par->aux_size); + + if (par->res_start) + release_mem_region(par->res_start, par->res_size); + + framebuffer_release(info); +} + #ifdef CONFIG_PCI #ifdef __sparc__ @@ -3437,49 +3440,115 @@ return rc; } +static void __devexit atyfb_pci_remove(struct pci_dev *pdev) +{ + struct fb_info *info = pci_get_drvdata(pdev); + + atyfb_remove(info); +} + +/* + * This driver uses its own matching table. That will be more difficult + * to fix, so for now, we just match against any ATI ID and let the + * probe() function find out what's up. That also mean we don't have + * a module ID table though. + */ +static struct pci_device_id atyfb_pci_tbl[] = { + { PCI_VENDOR_ID_ATI, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, + PCI_BASE_CLASS_DISPLAY << 16, 0xff0000, 0 }, + { 0, } +}; + +static struct pci_driver atyfb_driver = { + .name = "atyfb", + .id_table = atyfb_pci_tbl, + .probe = atyfb_pci_probe, + .remove = __devexit_p(atyfb_pci_remove), +#ifdef CONFIG_PM + .suspend = atyfb_pci_suspend, + .resume = atyfb_pci_resume, +#endif /* CONFIG_PM */ +}; + #endif /* CONFIG_PCI */ #ifdef CONFIG_ATARI -static int __devinit atyfb_atari_probe(void) +static struct mach64_device* __init store_video_par(char *video_str, unsigned char m64_num) { - struct aty_par *par; + unsigned long vmembase, size, guiregbase; + struct platform_device *atyfb_device; + struct mach64_device *device; + struct resource io[2]; + char *p; + + PRINTKI("store_video_par() '%s' \n", video_str); + + if (!(p = strsep(&video_str, ";")) || !*p) + goto mach64_invalid; + vmembase = simple_strtoul(p, NULL, 0); + if (!(p = strsep(&video_str, ";")) || !*p) + goto mach64_invalid; + size = simple_strtoul(p, NULL, 0); + if (!(p = strsep(&video_str, ";")) || !*p) + goto mach64_invalid; + guiregbase = simple_strtoul(p, NULL, 0); + + io[0] = request_mem_region(vmembase, size, "atyfb"); + if (!io[0]) + return NULL; + io[1] = request_mem_region(guiregbase, 0x10000, "atyfb"); + if (!io[1]) { + release_resource(io[0]); + return NULL; + } + + atyfb_device = platform_device_register_simple("atyfb", m64_num, io, 2); + if (IS_ERR(atyfb_device)) + return NULL; + + device = kmalloc(sizeof(struct mach64_device), GFP_KERNEL); + PRINTKI("stored them all: $%08lX $%08lX $%08lX \n", vmembase, size, guiregbase); + return device; +mach64_invalid: + return NULL; +} + +static int __init atyfb_atari_probe(struct device *device) +{ + struct platform_device *dev = to_platform_device(device); + struct atyfb_par *par; struct fb_info *info; - int m64_num; + int size = 0; u32 clock_r; - for (m64_num = 0; m64_num < mach64_count; m64_num++) { - if (!phys_vmembase[m64_num] || !phys_size[m64_num] || - !phys_guiregbase[m64_num]) { - PRINTKI("phys_*[%d] parameters not set => returning early. \n", m64_num); - continue; - } - - info = framebuffer_alloc(sizeof(struct atyfb_par), NULL); - if (!info) { - PRINTKE("atyfb_atari_probe() can't alloc fb_info\n"); - return -ENOMEM; - } - par = info->par; + info = framebuffer_alloc(sizeof(struct atyfb_par), &dev->dev); + if (!info) { + PRINTKE("atyfb_atari_probe() can't alloc fb_info\n"); + return -ENOMEM; + } + par = info->par; - info->fix = atyfb_fix; + info->fix = atyfb_fix; - par->irq = (unsigned int) -1; /* something invalid */ + par->irq = (unsigned int) -1; /* something invalid */ - /* - * Map the video memory (physical address given) to somewhere in the - * kernel address space. - */ - info->screen_base = ioremap(phys_vmembase[m64_num], phys_size[m64_num]); - info->fix.smem_start = (unsigned long)info->screen_base; /* Fake! */ - par->ati_regbase = ioremap(phys_guiregbase[m64_num], 0x10000) + - 0xFC00ul; - info->fix.mmio_start = (unsigned long)par->ati_regbase; /* Fake! */ + /* + * Map the video memory (physical address given) to somewhere in the + * kernel address space. + */ + size = dev->resource[0].start - dev->resource[0].end + 1; + info->fix.smem_start = dev->resource[0].start; + info->screen_base = ioremap(dev->resource[0].start, size); + + size = 0x10000; + info->fix.mmio_start = dev->resource[1].start + 0xFC00ul; + par->ati_regbase = ioremap(dev->resource[1].start, size) + 0xFC00ul; - aty_st_le32(CLOCK_CNTL, 0x12345678, par); - clock_r = aty_ld_le32(CLOCK_CNTL, par); + aty_st_le32(CLOCK_CNTL, 0x12345678, par); + clock_r = aty_ld_le32(CLOCK_CNTL, par); - switch (clock_r & 0x003F) { + switch (clock_r & 0x003F) { case 0x12: par->clk_wr_offset = 3; /* */ break; @@ -3493,92 +3562,34 @@ par->clk_wr_offset = 0; /* Panther 1 ISA Adapter (Gerald) */ break; } - - if (aty_init(info, "ISA bus")) { - framebuffer_release(info); - /* This is insufficient! kernel_map has added two large chunks!! */ - return -ENXIO; - } } -} - -#endif /* CONFIG_ATARI */ - -static void __devexit atyfb_remove(struct fb_info *info) -{ - struct atyfb_par *par = (struct atyfb_par *) info->par; - /* restore video mode */ - aty_set_crtc(par, &saved_crtc); - par->pll_ops->set_pll(info, &saved_pll); - - unregister_framebuffer(info); + //FIXME + //rc = correct_chipset(par); -#ifdef CONFIG_MTRR - if (par->mtrr_reg >= 0) { - mtrr_del(par->mtrr_reg, 0, 0); - par->mtrr_reg = -1; - } - if (par->mtrr_aper >= 0) { - mtrr_del(par->mtrr_aper, 0, 0); - par->mtrr_aper = -1; + if (aty_init(info, "ISA bus")) { + framebuffer_release(info); + /* This is insufficient! kernel_map has added two large chunks!! */ + return -ENXIO; } -#endif -#ifndef __sparc__ - if (par->ati_regbase) - iounmap(par->ati_regbase); - if (info->screen_base) - iounmap(info->screen_base); -#ifdef __BIG_ENDIAN - if (info->sprite.addr) - iounmap(info->sprite.addr); -#endif -#endif -#ifdef __sparc__ - kfree(par->mmap_map); -#endif - if (par->aux_start) - release_mem_region(par->aux_start, par->aux_size); - - if (par->res_start) - release_mem_region(par->res_start, par->res_size); - - framebuffer_release(info); + return 0; } -#ifdef CONFIG_PCI - -static void __devexit atyfb_pci_remove(struct pci_dev *pdev) +static void __devexit atyfb_atari_remove(struct device *dev) { - struct fb_info *info = pci_get_drvdata(pdev); + struct fb_info *info = dev_get_drvdata(dev); atyfb_remove(info); } -/* - * This driver uses its own matching table. That will be more difficult - * to fix, so for now, we just match against any ATI ID and let the - * probe() function find out what's up. That also mean we don't have - * a module ID table though. - */ -static struct pci_device_id atyfb_pci_tbl[] = { - { PCI_VENDOR_ID_ATI, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, - PCI_BASE_CLASS_DISPLAY << 16, 0xff0000, 0 }, - { 0, } -}; - -static struct pci_driver atyfb_driver = { +static struct device_driver atyfb_driver = { .name = "atyfb", - .id_table = atyfb_pci_tbl, - .probe = atyfb_pci_probe, - .remove = __devexit_p(atyfb_pci_remove), -#ifdef CONFIG_PM - .suspend = atyfb_pci_suspend, - .resume = atyfb_pci_resume, -#endif /* CONFIG_PM */ + .bus = &platform_bus_type, + .probe = atyfb_atari_probe, + .remove = __devexit_p(atyfb_atari_remove), }; -#endif /* CONFIG_PCI */ +#endif /* CONFIG_ATARI */ #ifndef MODULE static int __init atyfb_setup(char *options) @@ -3635,15 +3646,15 @@ * Why do we need this silly Mach64 argument? * We are already here because of mach64= so its redundant. */ - else if (MACH_IS_ATARI - && (!strncmp(this_opt, "Mach64:", 7))) { - static unsigned char m64_num; - static char mach64_str[80]; + else if (MACH_IS_ATARI && (!strncmp(this_opt, "Mach64:", 7))) { + struct mach64_device *dev; + unsigned char m64_num = 0; + char mach64_str[80]; + strlcpy(mach64_str, this_opt + 7, sizeof(mach64_str)); - if (!store_video_par(mach64_str, m64_num)) { - m64_num++; - mach64_count = m64_num; - } + dev = store_video_par(mach64_str, m64_num++); + if (dev != NULL) + list_add_tail(&dev->node, &mach64_list); } #endif else @@ -3655,6 +3666,8 @@ static int __init atyfb_init(void) { + int retval = 0; + #ifndef MODULE char *option = NULL; @@ -3664,16 +3677,38 @@ #endif #ifdef CONFIG_PCI - pci_register_driver(&atyfb_driver); + retval = pci_register_driver(&atyfb_driver); #endif #ifdef CONFIG_ATARI - atyfb_atari_probe(); + retval = driver_register(&atyfb_driver); + if (retval < 0) { + struct mach64_device *device; + struct list_head *p, *q; + + list_for_each_safe(p, q, &mach64_list) { + device = list_entry(p, struct mach64_device, node); + platform_device_register(device->dev); + kfree(device); + } + } #endif - return 0; + return retval; } static void __exit atyfb_exit(void) { +#ifdef CONFIG_ATARI + struct mach64_device *device; + struct list_head *p, *q; + + list_for_each_safe(p, q, &mach64_list) { + device = list_entry(p, struct mach64_device, node); + platform_device_unregister(device->dev); + kfree(device); + } + driver_unregister(&atyfb_driver); +#endif + #ifdef CONFIG_PCI pci_unregister_driver(&atyfb_driver); #endif @@ -3703,3 +3738,4 @@ module_param(nomtrr, bool, 0); MODULE_PARM_DESC(nomtrr, "bool: disable use of MTRR registers"); #endif + diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/aty/atyfb.h fbdev-2.6/drivers/video/aty/atyfb.h --- linus-2.6/drivers/video/aty/atyfb.h 2005-07-11 10:07:21.000000000 -0700 +++ fbdev-2.6/drivers/video/aty/atyfb.h 2005-10-24 13:34:07.000000000 -0700 @@ -187,6 +187,13 @@ #endif }; +#ifdef CONFIG_ATARI +struct mach64_device { + struct list_head node; + struct platform_device *dev; +}; +#endif + /* * ATI Mach64 features */ |
From: James Simmons <jsimmons@in...> - 2005-10-24 20:46:27
|
This small patch returns the stride/line length of the framebuffer via sysfs. Please apply. Signed-off-by: James Simmons <jsimmons@...> --- linus-2.6/drivers/video/fbsysfs.c 2005-07-31 15:45:22.000000000 -0700 +++ fbdev-2.6/drivers/video/fbsysfs.c 2005-09-21 13:54:02.000000000 -0700 @@ -242,6 +242,13 @@ fb_info->var.yres_virtual); } +static ssize_t show_stride(struct class_device *class_device, char *buf) +{ + struct fb_info *fb_info = + (struct fb_info *)class_get_devdata(class_device); + return snprintf(buf, PAGE_SIZE, "%d\n", fb_info->fix.line_length); +} + /* Format for cmap is "%02x%c%4x%4x%4x\n" */ /* %02x entry %c transp %4x red %4x blue %4x green \n */ /* 256 rows at 16 chars equals 4096, the normal page size */ @@ -432,6 +439,7 @@ __ATTR(pan, S_IRUGO|S_IWUSR, show_pan, store_pan), __ATTR(virtual_size, S_IRUGO|S_IWUSR, show_virtual, store_virtual), __ATTR(name, S_IRUGO, show_name, NULL), + __ATTR(stride, S_IRUGO, show_stride, NULL), }; int fb_init_class_device(struct fb_info *fb_info) |
From: James Simmons <jsimmons@in...> - 2005-10-24 20:42:53
|
Just code merger. First you had the M64_HAS test then test for pll_ref_div. I combined the two test into one test. Its not needed tho so I broke it into 2 again. I think it is time to send this to Andrew. > Random code review (see below). > > On Sep 22, 2005, at 7:15 AM, Geert Uytterhoeven wrote: > > > ---------- Forwarded message ---------- > > Date: Wed, 21 Sep 2005 22:07:01 +0100 (BST) > > From: James Simmons <jsimmons@...> > > To: Geert Uytterhoeven <geert@...> > > Cc: Linux Fbdev development list <linux-fbdev- > > devel@...> > > Subject: Atari mach64 support > > > > > > It's back. Please give this a try. It does compile but I can't test > > it. > > > > diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/aty/ > > atyfb_base.c fbdev-2.6/drivers/video/aty/atyfb_base.c > > --- linus-2.6/drivers/video/aty/atyfb_base.c 2005-09-13 > > 14:01:40.000000000 -0700 > > +++ fbdev-2.6/drivers/video/aty/atyfb_base.c 2005-09-21 > > 13:54:02.000000000 -0700 > > [...] > > @@ -2276,18 +2268,20 @@ > > par->pll_limits.mclk = 63; > > } > > > > - if (M64_HAS(GTB_DSP) > > - && (pll_ref_div = aty_ld_pll_ct(PLL_REF_DIV, par))) { > > - int diff1, diff2; > > - diff1 = 510 * 14 / pll_ref_div - par->pll_limits.pll_max; > > - diff2 = 510 * 29 / pll_ref_div - par->pll_limits.pll_max; > > - if (diff1 < 0) > > - diff1 = -diff1; > > - if (diff2 < 0) > > - diff2 = -diff2; > > - if (diff2 < diff1) { > > - par->ref_clk_per = 1000000000000ULL / 29498928; > > - xtal = "29.498928"; > > + if (M64_HAS(GTB_DSP)) { > > + u8 pll_ref_div = aty_ld_pll_ct(PLL_REF_DIV, par); > > + if (pll_ref_dev) { > > + int diff1, diff2; > > + diff1 = 510 * 14 / pll_ref_div - par->pll_limits.pll_max; > > + diff2 = 510 * 29 / pll_ref_div - par->pll_limits.pll_max; > > + if (diff1 < 0) > > + diff1 = -diff1; > > + if (diff2 < 0) > > + diff2 = -diff2; > > + if (diff2 < diff1) { > > + par->ref_clk_per = 1000000000000ULL / 29498928; > > + xtal = "29.498928"; > > + } > > } > > } > > #endif /* CONFIG_FB_ATY_CT */ > > Should "if (pll_ref_dev) {" be "if (pll_ref_div) {" to keep the logic > the same as the old code, or was this a bug fix? |
From: Zack Smith <fbui@co...> - 2005-10-24 18:33:10
|
> *How to display a string or a character in Frame buffer in C language? You can use my FBUI for that. See fbui.org. > *What is the library file used to do all I/O function manipulations like printing, reading, opening in a file and display that file in frame buffer...? That would be libfbui. Zack Smith |
From: Andrey Volkov <avolkov@va...> - 2005-10-24 12:52:28
|
Hi Rolf, Rolf Offermanns wrote: > Hi Andrey, > I have seen your thread about endian issues with the linux framebuffer system > and your SMI501 driver. > > I am currently writing a driver for a SMI712 on a PCI card in a big endian > system (PPC440EP). > > While 8bpp modes works quite well, I have wrong color in 16bpp truecolor > visual. > > I guess this could be the same thing, you saw. > > Did you solve the problem? No I defer solution of this problem :(, since 16 bpp doesn't critical for me in nearest 2 months. > If yes, would you be so kind to share your findings > with me? I tried lots of things like changing the offsets of the length > fields, but I was not successfull. For me, was helpful offsets changing (I get right colors), but in this case pixels are shifted :(. Try something like this dirty hack: --- fb.h.old 2005-10-24 16:46:34.000000000 +0400 +++ fb.h 2005-10-24 16:47:42.000000000 +0400 @@ -778,7 +778,7 @@ #define fb_writeq sbus_writeq #define fb_memset sbus_memset_io -#elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) || defined(__hppa__) || (defined(__sh__) && !defined(__SH5__)) || defined(__powerpc__) +#elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) || defined(__hppa__) || (defined(__sh__) && !defined(__SH5__)) #define fb_readb __raw_readb #define fb_readw __raw_readw @@ -790,6 +790,16 @@ #define fb_writeq __raw_writeq #define fb_memset memset_io +#else if defined(__powerpc__) +#define fb_readb readb +#define fb_readw readw +#define fb_readl readl +#define fb_readq readq +#define fb_writeb writeb +#define fb_writew writew +#define fb_writel writel +#define fb_writeq writeq +#define fb_memset memset_io #else #define fb_readb(addr) (*(volatile u8 *) (addr)) > > Thanks, > Rolf > > -- Regards Andrey Volkov |