* atyfb expert needed
@ 2004-02-11 22:10 Benjamin Herrenschmidt
2004-02-11 22:29 ` James Simmons
2004-02-12 9:29 ` Geert Uytterhoeven
0 siblings, 2 replies; 10+ messages in thread
From: Benjamin Herrenschmidt @ 2004-02-11 22:10 UTC (permalink / raw)
To: Linux Fbdev development list
Hi ! I'm calling again for an atyfb expert ;)
The current driver in James tree (with generic lcd support) breaks
the display on the LT-G chip of the powerbook wallstreet. I don't
have time at the moment to dig into every change (there's a lot).
The "effect" is that the screen appears to be cut in vertical bands,
each of them displaying a slightly offseted version of what should be
there with some noise near the right edge.
If that symptom rings any bell about what registers can be wrong,
that would help me a lot figuring out what's up.
Ben.
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: atyfb expert needed
2004-02-11 22:10 atyfb expert needed Benjamin Herrenschmidt
@ 2004-02-11 22:29 ` James Simmons
2004-02-12 9:29 ` Geert Uytterhoeven
1 sibling, 0 replies; 10+ messages in thread
From: James Simmons @ 2004-02-11 22:29 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: Linux Fbdev development list, alex.kern
On Thu, 12 Feb 2004, Benjamin Herrenschmidt wrote:
> Hi ! I'm calling again for an atyfb expert ;)
>
> The current driver in James tree (with generic lcd support) breaks
> the display on the LT-G chip of the powerbook wallstreet. I don't
> have time at the moment to dig into every change (there's a lot).
>
> The "effect" is that the screen appears to be cut in vertical bands,
> each of them displaying a slightly offseted version of what should be
> there with some noise near the right edge.
>
> If that symptom rings any bell about what registers can be wrong,
> that would help me a lot figuring out what's up.
>
> Ben.
The main guy is Alex kern. There is a DEBUG flag in atyfb_base.c. Set it
to #define an send the results to Alex. I CC him.
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: atyfb expert needed
2004-02-11 22:10 atyfb expert needed Benjamin Herrenschmidt
2004-02-11 22:29 ` James Simmons
@ 2004-02-12 9:29 ` Geert Uytterhoeven
2004-02-12 9:45 ` Daniël Mantione
2004-02-13 15:41 ` Alexander Kern
1 sibling, 2 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2004-02-12 9:29 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Daniël Mantione; +Cc: Linux Fbdev development list
On Thu, 12 Feb 2004, Benjamin Herrenschmidt wrote:
> The current driver in James tree (with generic lcd support) breaks
> the display on the LT-G chip of the powerbook wallstreet. I don't
> have time at the moment to dig into every change (there's a lot).
>
> The "effect" is that the screen appears to be cut in vertical bands,
> each of them displaying a slightly offseted version of what should be
> there with some noise near the right edge.
>
> If that symptom rings any bell about what registers can be wrong,
> that would help me a lot figuring out what's up.
Sounds like a problem with DSP_CONFIG and DSP_ON_OFF.
Check aty_dsp_gt(), either the value of fifo_size or the dsp_* values.
BTW, according to Daniël Mantione the DSP calculations in atyfb have always
been wrong (but apparently worked on most machines due to sheer luck ;-), so
you may want to compare with aty_dsp_gt() in current 2.4.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&op=click
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: atyfb expert needed
2004-02-12 9:29 ` Geert Uytterhoeven
@ 2004-02-12 9:45 ` Daniël Mantione
2004-02-12 9:55 ` Geert Uytterhoeven
2004-02-13 15:41 ` Alexander Kern
1 sibling, 1 reply; 10+ messages in thread
From: Daniël Mantione @ 2004-02-12 9:45 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Benjamin Herrenschmidt, Linux Fbdev development list
On Thu, 12 Feb 2004, Geert Uytterhoeven wrote:
> On Thu, 12 Feb 2004, Benjamin Herrenschmidt wrote:
> > The current driver in James tree (with generic lcd support) breaks
> > the display on the LT-G chip of the powerbook wallstreet. I don't
> > have time at the moment to dig into every change (there's a lot).
> >
> > The "effect" is that the screen appears to be cut in vertical bands,
> > each of them displaying a slightly offseted version of what should be
> > there with some noise near the right edge.
> >
> > If that symptom rings any bell about what registers can be wrong,
> > that would help me a lot figuring out what's up.
>
> Sounds like a problem with DSP_CONFIG and DSP_ON_OFF.
>
> Check aty_dsp_gt(), either the value of fifo_size or the dsp_* values.
Please take a look at the fifo size in the table of chips in atyfb_base.c.
That value was set incorrectly in 2.4 too.
> BTW, according to Daniël Mantione the DSP calculations in atyfb have always
> been wrong (but apparently worked on most machines due to sheer luck ;-), so
> you may want to compare with aty_dsp_gt() in current 2.4.
Well, wrong in the sense that the calculations they make are very
different from both Ati's example code and XFree86 code. The original author
(unknown to me at this time) might have had reasons to code it like this,
but it looks realistic that he simply tried to modify it till it worked
for him.
The code in 2.4 is a slightly size optimized version of the XFree86
code from Marc Aurele la France.
Daniël
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&op=click
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: atyfb expert needed
2004-02-12 9:45 ` Daniël Mantione
@ 2004-02-12 9:55 ` Geert Uytterhoeven
0 siblings, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2004-02-12 9:55 UTC (permalink / raw)
To: Daniël Mantione; +Cc: Benjamin Herrenschmidt, Linux Fbdev development list
On Thu, 12 Feb 2004, [ISO-8859-1] Daniël Mantione wrote:
> On Thu, 12 Feb 2004, Geert Uytterhoeven wrote:
> > BTW, according to Daniël Mantione the DSP calculations in atyfb have always
> > been wrong (but apparently worked on most machines due to sheer luck ;-), so
> > you may want to compare with aty_dsp_gt() in current 2.4.
>
> Well, wrong in the sense that the calculations they make are very
> different from both Ati's example code and XFree86 code. The original author
> (unknown to me at this time) might have had reasons to code it like this,
> but it looks realistic that he simply tried to modify it till it worked
> for him.
I remember starting from ATI sample code, but that didn't work well, and
modifying that based on info from the XFree86 code, until it worked.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&op=click
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: atyfb expert needed
2004-02-12 9:29 ` Geert Uytterhoeven
2004-02-12 9:45 ` Daniël Mantione
@ 2004-02-13 15:41 ` Alexander Kern
2004-02-13 23:20 ` Benjamin Herrenschmidt
1 sibling, 1 reply; 10+ messages in thread
From: Alexander Kern @ 2004-02-13 15:41 UTC (permalink / raw)
To: linux-fbdev-devel
Am Donnerstag, 12. Februar 2004 10:29 schrieb Geert Uytterhoeven:
> On Thu, 12 Feb 2004, Benjamin Herrenschmidt wrote:
> > The current driver in James tree (with generic lcd support) breaks
> > the display on the LT-G chip of the powerbook wallstreet. I don't
> > have time at the moment to dig into every change (there's a lot).
> >
> > The "effect" is that the screen appears to be cut in vertical bands,
> > each of them displaying a slightly offseted version of what should be
> > there with some noise near the right edge.
> >
> > If that symptom rings any bell about what registers can be wrong,
> > that would help me a lot figuring out what's up.
>
> Sounds like a problem with DSP_CONFIG and DSP_ON_OFF.
>
> Check aty_dsp_gt(), either the value of fifo_size or the dsp_* values.
>
> BTW, according to Daniël Mantione the DSP calculations in atyfb have always
> been wrong (but apparently worked on most machines due to sheer luck ;-),
> so you may want to compare with aty_dsp_gt() in current 2.4.
>
> Gr{oetje,eeting}s,
>
> Geert
>
Hi,
mach64_ct.c(where aty_dsp_gt is) from James tree should be identical with
Daniel'S 2.4 tree. If not, please send me the diff.
Regards Alex
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&op=click
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: atyfb expert needed
2004-02-13 15:41 ` Alexander Kern
@ 2004-02-13 23:20 ` Benjamin Herrenschmidt
2004-02-14 15:26 ` Alexander Kern
0 siblings, 1 reply; 10+ messages in thread
From: Benjamin Herrenschmidt @ 2004-02-13 23:20 UTC (permalink / raw)
To: Alexander Kern; +Cc: Linux Fbdev development list
> Hi,
> mach64_ct.c(where aty_dsp_gt is) from James tree should be identical with
> Daniel'S 2.4 tree. If not, please send me the diff.
Is Daniel's latest version in current 2.4 or is there another source
for his patches ?
Ben.
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: atyfb expert needed
2004-02-13 23:20 ` Benjamin Herrenschmidt
@ 2004-02-14 15:26 ` Alexander Kern
2004-02-17 6:00 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 10+ messages in thread
From: Alexander Kern @ 2004-02-14 15:26 UTC (permalink / raw)
To: linux-fbdev-devel
Am Samstag, 14. Februar 2004 00:20 schrieb Benjamin Herrenschmidt:
> > Hi,
> > mach64_ct.c(where aty_dsp_gt is) from James tree should be identical with
> > Daniel'S 2.4 tree. If not, please send me the diff.
>
> Is Daniel's latest version in current 2.4 or is there another source
> for his patches ?
>
> Ben.
>
>
>
>
> -------------------------------------------------------
> SF.Net is sponsored by: Speed Start Your Linux Apps Now.
> Build and deploy apps & Web services for Linux with
> a free DVD software kit from IBM. Click Now!
> http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
> _______________________________________________
> Linux-fbdev-devel mailing list
> Linux-fbdev-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel
I sync mach64_ct.c with Daniel sometime. It can be, that I'm yet out
of sync, sorry.
Regards Alex
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: atyfb expert needed
2004-02-14 15:26 ` Alexander Kern
@ 2004-02-17 6:00 ` Benjamin Herrenschmidt
2004-02-17 6:41 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 10+ messages in thread
From: Benjamin Herrenschmidt @ 2004-02-17 6:00 UTC (permalink / raw)
To: Alexander Kern; +Cc: Linux Fbdev development list
On Sun, 2004-02-15 at 02:26, Alexander Kern wrote:
> Am Samstag, 14. Februar 2004 00:20 schrieb Benjamin Herrenschmidt:
> > > Hi,
> > > mach64_ct.c(where aty_dsp_gt is) from James tree should be identical with
> > > Daniel'S 2.4 tree. If not, please send me the diff.
> >
> > Is Daniel's latest version in current 2.4 or is there another source
> > for his patches ?
Ok. Comparing 2.4.24 & 2.6.3/fbdev to XFree driver, it seems that
2.6.3/fbdev matches XFree more closely.... Except that we are missing
the FIFO_24 attribute for the LT-G chip.
Fixing that leads to slightly less crapy display, but still unreadable... until
I figured out that acceleration (imageblit more precisely) has broken endianness...
This kludge fixes it for me (maybe incorrect, just a quick fix) :
@@ -419,9 +425,9 @@
}
} else {
u32 *pbitmap;
- for(pbitmap = (u32*)(image->data); dwords; dwords--, pbitmap++) {
- wait_for_fifo(1, par);
- aty_st_le32(HOST_DATA0, *pbitmap, par);
+ for (pbitmap = (u32*)(image->data); dwords; dwords--, pbitmap++) {
+ wait_for_fifo(2, par);
+ aty_st_le32(HOST_DATA0, le32_to_cpup(pbitmap), par);
}
_BUT_ then, I get a lockup when reaching the end of the screen... Apparently,
it locks up when drawin the last line, not sure if it did a scroll yet or not.
I'm playing with the accel fifo a bit, but that's definitely a regression.
Ben.
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: atyfb expert needed
2004-02-17 6:00 ` Benjamin Herrenschmidt
@ 2004-02-17 6:41 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 10+ messages in thread
From: Benjamin Herrenschmidt @ 2004-02-17 6:41 UTC (permalink / raw)
To: Alexander Kern; +Cc: Linux Fbdev development list, James Simmons
Ok, that patch makes it back working for me based on the version
in James fbdev tree.
I don't know _WHY_, but I couldn't get it to not lockup without
adding the to wait_for_idle after the fillrect & copyarea.
James, please apply.
Ben.
===== drivers/video/aty/mach64_accel.c 1.12 vs edited =====
--- 1.12/drivers/video/aty/mach64_accel.c Mon Feb 9 18:10:12 2004
+++ edited/drivers/video/aty/mach64_accel.c Tue Feb 17 17:38:29 2004
@@ -186,7 +186,7 @@
wait_for_fifo(2, par);
aty_st_le32(DST_Y_X, (x << 16) | y, par);
aty_st_le32(DST_HEIGHT_WIDTH, (width << 16) | height, par);
- par->blitter_may_be_busy = 1;
+ par->blitter_may_be_busy = 1;
}
void atyfb_copyarea(struct fb_info *info, const struct fb_copyarea *area)
@@ -236,6 +236,8 @@
aty_st_le32(SRC_HEIGHT1_WIDTH1, (width << 16) | area->height, par);
aty_st_le32(DST_CNTL, direction | rotation, par);
draw_rect(dx, dy, width, area->height, par);
+
+ wait_for_idle(par);
}
void atyfb_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
@@ -274,6 +276,8 @@
DST_LAST_PEL | DST_Y_TOP_TO_BOTTOM |
DST_X_LEFT_TO_RIGHT | rotation, par);
draw_rect(dx, rect->dy, width, rect->height, par);
+
+ wait_for_idle(par);
}
void atyfb_imageblit(struct fb_info *info, const struct fb_image *image)
@@ -419,9 +423,9 @@
}
} else {
u32 *pbitmap;
- for(pbitmap = (u32*)(image->data); dwords; dwords--, pbitmap++) {
+ for (pbitmap = (u32*)(image->data); dwords; dwords--, pbitmap++) {
wait_for_fifo(1, par);
- aty_st_le32(HOST_DATA0, *pbitmap, par);
+ aty_st_le32(HOST_DATA0, le32_to_cpup(pbitmap), par);
}
}
@@ -430,4 +434,6 @@
/* restore pix_width */
wait_for_fifo(1, par);
aty_st_le32(DP_PIX_WIDTH, pix_width_save, par);
+
+ wait_for_idle(par);
}
===== drivers/video/aty/atyfb_base.c 1.39 vs edited =====
--- 1.39/drivers/video/aty/atyfb_base.c Mon Feb 9 18:10:12 2004
+++ edited/drivers/video/aty/atyfb_base.c Tue Feb 17 15:21:05 2004
@@ -343,7 +343,7 @@
/* Mach64 LT */
{ 0x4c54, 0x4c54, 0x00, 0x00, m64n_lt, 135, 63, 63, M64F_GT | M64F_INTEGRATED | M64F_GTB_DSP },
- { 0x4c47, 0x4c47, 0x00, 0x00, m64n_ltg, 230, 63, 63, M64F_GT | M64F_INTEGRATED | M64F_GTB_DSP | M64F_SDRAM_MAGIC_PLL | M64F_EXTRA_BRIGHT | M64F_LT_SLEEP | M64F_G3_PB_1024x768 },
+ { 0x4c47, 0x4c47, 0x00, 0x00, m64n_ltg, 230, 63, 63, M64F_GT | M64F_INTEGRATED | M64F_GTB_DSP | M64F_SDRAM_MAGIC_PLL | M64F_FIFO_24 | M64F_EXTRA_BRIGHT | M64F_LT_SLEEP | M64F_G3_PB_1024x768 },
/* Mach64 GTC (3D RAGE PRO) */
{ 0x4742, 0x4742, 0x00, 0x00, m64n_gtc_ba, 230, 100, 100, M64F_GT | M64F_INTEGRATED | M64F_RESET_3D | M64F_GTB_DSP | M64F_SDRAM_MAGIC_PLL | M64F_EXTRA_BRIGHT },
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2004-02-17 6:46 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-11 22:10 atyfb expert needed Benjamin Herrenschmidt
2004-02-11 22:29 ` James Simmons
2004-02-12 9:29 ` Geert Uytterhoeven
2004-02-12 9:45 ` Daniël Mantione
2004-02-12 9:55 ` Geert Uytterhoeven
2004-02-13 15:41 ` Alexander Kern
2004-02-13 23:20 ` Benjamin Herrenschmidt
2004-02-14 15:26 ` Alexander Kern
2004-02-17 6:00 ` Benjamin Herrenschmidt
2004-02-17 6:41 ` Benjamin Herrenschmidt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).