From: James Simmons <hidden> Date: 2004-02-16 22:27:22
Hi!
I broke up the cursor patch. This patch creates a seperate cursor
image drawing region and regular drawing region. It does not break any
drivers to my knowledge. I posted it anyways for people to test it. The
patch is against 2.6.3-rc3. Please try.
diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/console/fbcon.c fbdev-2.6/drivers/video/console/fbcon.c
@@ -468,10 +468,10 @@*weneedtolockthissectionsincefb_cursor*mayusefb_imageblit()*/-u32fb_get_buffer_offset(structfb_info*info,u32size)+char*fb_get_buffer_offset(structfb_info*info,structfb_pixmap*buf,u32size){-structfb_pixmap*buf=&info->pixmap;u32align=buf->buf_align-1,offset;+char*addr=buf->addr;/* If IO mapped, we need to sync before access, no sharing of*thepixmapisdone
@@ -479,7 +479,7 @@if(buf->flags&FB_PIXMAP_IO){if(info->fbops->fb_sync&&(buf->flags&FB_PIXMAP_SYNC))info->fbops->fb_sync(info);-return0;+returnaddr;}/* See if we fit in the remaining pixmap space */
@@ -371,16 +371,16 @@#define FB_PIXMAP_SYNC 256 /* set if GPU can DMA */structfb_pixmap{-u8*addr;/* pointer to memory */-u32size;/* size of buffer in bytes */-u32offset;/* current offset to buffer */-u32buf_align;/* byte alignment of each bitmap */-u32scan_align;/* alignment per scanline */-u32access_align;/* alignment per read/write */-u32flags;/* see FB_PIXMAP_* */-/* access methods */-void(*outbuf)(u8*dst,u8*addr,unsignedintsize);-u8(*inbuf)(u8*addr);+u8*addr;/* pointer to memory */+u32size;/* size of buffer in bytes */+u32offset;/* current offset to buffer */+u32buf_align;/* byte alignment of each bitmap */+u32scan_align;/* alignment per scanline */+u32access_align;/* alignment per read/write */+u32flags;/* see FB_PIXMAP_* */+/* access methods */+void(*outbuf)(structfb_info*info,u8*addr,u8*src,unsignedintsize);+u8(*inbuf)(structfb_info*info,u8*addr);};/*
@@ -388,64 +388,53 @@*/structfb_ops{-/* open/release and usage marking */-structmodule*owner;-int(*fb_open)(structfb_info*info,intuser);-int(*fb_release)(structfb_info*info,intuser);--/* For framebuffers with strange non linear layouts */-ssize_t(*fb_read)(structfile*file,char*buf,size_tcount,-loff_t*ppos);-ssize_t(*fb_write)(structfile*file,constchar*buf,-size_tcount,loff_t*ppos);+/* open/release and usage marking */+structmodule*owner;+int(*fb_open)(structfb_info*info,intuser);+int(*fb_release)(structfb_info*info,intuser);++/* For framebuffers with strange non linear layouts */+ssize_t(*fb_read)(structfile*file,char*buf,size_tcount,loff_t*ppos);+ssize_t(*fb_write)(structfile*file,constchar*buf,size_tcount,loff_t*ppos);/* checks var and eventually tweaks it to something supported,*DONOTMODIFYPAR*/-int(*fb_check_var)(structfb_var_screeninfo*var,-structfb_info*info);+int(*fb_check_var)(structfb_var_screeninfo*var,structfb_info*info);/* set the video mode according to info->var */-int(*fb_set_par)(structfb_info*info);+int(*fb_set_par)(structfb_info*info);-/* set color register */-int(*fb_setcolreg)(unsignedregno,unsignedred,unsignedgreen,-unsignedblue,unsignedtransp,-structfb_info*info);--/* blank display */-int(*fb_blank)(intblank,structfb_info*info);--/* pan display */-int(*fb_pan_display)(structfb_var_screeninfo*var,-structfb_info*info);--/* draws a rectangle */-void(*fb_fillrect)(structfb_info*info,-conststructfb_fillrect*rect);-/* Copy data from area to another */-void(*fb_copyarea)(structfb_info*info,-conststructfb_copyarea*region);-/* Draws a image to the display */-void(*fb_imageblit)(structfb_info*info,-conststructfb_image*image);--/* Draws cursor */-int(*fb_cursor)(structfb_info*info,-structfb_cursor*cursor);--/* Rotates the display */-void(*fb_rotate)(structfb_info*info,intangle);--/* wait for blit idle, optional */-int(*fb_sync)(structfb_info*info);--/* perform fb specific ioctl (optional) */-int(*fb_ioctl)(structinode*inode,structfile*file,-unsignedintcmd,unsignedlongarg,-structfb_info*info);--/* perform fb specific mmap */-int(*fb_mmap)(structfb_info*info,structfile*file,-structvm_area_struct*vma);+/* set color register */+int(*fb_setcolreg)(unsignedregno,unsignedred,unsignedgreen,+unsignedblue,unsignedtransp,structfb_info*info);++/* blank display */+int(*fb_blank)(intblank,structfb_info*info);++/* pan display */+int(*fb_pan_display)(structfb_var_screeninfo*var,structfb_info*info);++/* Draws a rectangle */+void(*fb_fillrect)(structfb_info*info,conststructfb_fillrect*rect);+/* Copy data from area to another */+void(*fb_copyarea)(structfb_info*info,conststructfb_copyarea*region);+/* Draws a image to the display */+void(*fb_imageblit)(structfb_info*info,conststructfb_image*image);++/* Draws cursor */+int(*fb_cursor)(structfb_info*info,structfb_cursor*cursor);++/* Rotates the display */+void(*fb_rotate)(structfb_info*info,intangle);++/* wait for blit idle, optional */+int(*fb_sync)(structfb_info*info);++/* perform fb specific ioctl (optional) */+int(*fb_ioctl)(structinode*inode,structfile*file,unsignedintcmd,+unsignedlongarg,structfb_info*info);++/* perform fb specific mmap */+int(*fb_mmap)(structfb_info*info,structfile*file,structvm_area_struct*vma);};structfb_info{
From: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: 2004-02-16 23:36:13
On Tue, 2004-02-17 at 09:26, James Simmons wrote:
Hi!
I broke up the cursor patch. This patch creates a seperate cursor
image drawing region and regular drawing region. It does not break any
drivers to my knowledge. I posted it anyways for people to test it. The
patch is against 2.6.3-rc3. Please try.
Andrew, that one seem to work fine for me, been hammered for some time
in the fbdev tree. It should go to -mm for a while imho so we get more
broader testing, and eventually in 2.6.4
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
From: James Simmons <hidden> Date: 2004-02-16 23:41:49
Andrew, that one seem to work fine for me, been hammered for some time
in the fbdev tree. It should go to -mm for a while imho so we get more
broader testing, and eventually in 2.6.4
Please do.
-------------------------------------------------------
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
From: Alexander Kern <hidden> Date: 2004-02-22 21:13:52
Am Dienstag, 17. Februar 2004 00:41 schrieb James Simmons:
quoted
Andrew, that one seem to work fine for me, been hammered for some time
in the fbdev tree. It should go to -mm for a while imho so we get more
broader testing, and eventually in 2.6.4
Please do.
Hi,
James, would you do part 2 of cursor patch? I convert here
mach64 driver to pci_table solution, it works ok on my notebook. Base is 2.6.3
+ fix_double_console_init + cursor_part 1, but cursor is broken. On console
it is invisible, in mc it looks correct.
The difference to todays aty driver in mainline is too big, and it can broke
old errata rich chip versions, which I'm not own. Should it be submitted as
aty_new? Just like a radeon driver did it?
Regards Alex
P.S. I have trouble to merge your patches from mailing-list. Have you they
somewhere in internet? Or send they as attachment ;-)
-------------------------------------------------------
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
From: James Simmons <hidden> Date: 2004-02-22 22:44:39
quoted
quoted
Andrew, that one seem to work fine for me, been hammered for some time
in the fbdev tree. It should go to -mm for a while imho so we get more
broader testing, and eventually in 2.6.4
Please do.
Hi,
James, would you do part 2 of cursor patch? I convert here
mach64 driver to pci_table solution, it works ok on my notebook. Base is 2.6.3
+ fix_double_console_init + cursor_part 1, but cursor is broken. On console
it is invisible, in mc it looks correct.
The difference to todays aty driver in mainline is too big, and it can broke
old errata rich chip versions, which I'm not own. Should it be submitted as
aty_new? Just like a radeon driver did it?
Regards Alex
P.S. I have trouble to merge your patches from mailing-list. Have you they
somewhere in internet? Or send they as attachment ;-)
I plan to submit the latets mach64 driver from BK to linus as soon as the
first part of the cursor patch goes in. It gives enough of the new
cursor api to do a dump of all the drivers in the 2.5 fbdev tree. Could you
make your patch against the fbdev-2.5 bk tree? Try my patch
http://phoenix.infradead.org/~jsimmons/fbdev.diff.gz
If it doesn't work I will put a new one you there.
-------------------------------------------------------
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
From: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: 2004-02-23 00:50:32
ment ;-)
I plan to submit the latets mach64 driver from BK to linus as soon as the
first part of the cursor patch goes in. It gives enough of the new
cursor api to do a dump of all the drivers in the 2.5 fbdev tree. Could you
make your patch against the fbdev-2.5 bk tree? Try my patch
http://phoenix.infradead.org/~jsimmons/fbdev.diff.gz
If it doesn't work I will put a new one you there.
Note that I'm having some troubles with James current mach64 bk on a
wallstreet PowerBook (mach64 LT-G). There is an endian bug in the
imageblt implementation, I don't know if the chip can be instructed
to do the endian flip, so I modified the function storing to the
fifo, that appear to work, at least with 8 bits mode ;)
But I'm having lockups, very regular. I haven't been able to figure
out why though. Adding a wait_for_idle() at the end of both fillrect
and copyarea() seem to make them disappear (well, almost, I had _one_
still once). It's weird as those shouldn't be necessary.
Maybe we should add a timeout on the wait_* functions with an engine
reset, that would be sub-optimal, but at least we wouldn't lockup the
box (if that is possible of course).
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
On Mon, 23 Feb 2004, Benjamin Herrenschmidt wrote:
quoted
ment ;-)
I plan to submit the latets mach64 driver from BK to linus as soon as the
first part of the cursor patch goes in. It gives enough of the new
cursor api to do a dump of all the drivers in the 2.5 fbdev tree. Could you
make your patch against the fbdev-2.5 bk tree? Try my patch
http://phoenix.infradead.org/~jsimmons/fbdev.diff.gz
If it doesn't work I will put a new one you there.
Note that I'm having some troubles with James current mach64 bk on a
wallstreet PowerBook (mach64 LT-G). There is an endian bug in the
imageblt implementation, I don't know if the chip can be instructed
to do the endian flip, so I modified the function storing to the
fifo, that appear to work, at least with 8 bits mode ;)
But I'm having lockups, very regular. I haven't been able to figure
out why though. Adding a wait_for_idle() at the end of both fillrect
and copyarea() seem to make them disappear (well, almost, I had _one_
still once). It's weird as those shouldn't be necessary.
Maybe we should add a timeout on the wait_* functions with an engine
reset, that would be sub-optimal, but at least we wouldn't lockup the
box (if that is possible of course).
IIRC, there's a big difference between the number of commands you can queue up
in the RAGE PRO and earlier chip. Perhaps the queue check always assumes a RAGE
PRO?
Hope this helps... (No, I didn't look at the code)
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=1356&alloc_id=3438&op=click
From: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: 2004-02-23 11:14:42
IIRC, there's a big difference between the number of commands you can queue up
in the RAGE PRO and earlier chip. Perhaps the queue check always assumes a RAGE
PRO?
Hope this helps... (No, I didn't look at the code)
The queue check looks for how many entries are free in the queue
by reading the appropriate register in the chip, I should double
check the specs to see if that's done correctly though (or compare
with X, though I do see some artifacts in X here or there, small
but small drawing errors that let me think that X driver isn't
perfect neither. At least it doesn't lockup).
Here's the code in atyfb:
static inline void wait_for_fifo(u16 entries, const struct atyfb_par *par)
{
while ((aty_ld_le32(FIFO_STAT, par) & 0xffff) >
((u32) (0x8000 >> entries)));
}
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
On Mon, 23 Feb 2004, Benjamin Herrenschmidt wrote:
quoted
IIRC, there's a big difference between the number of commands you can queue up
in the RAGE PRO and earlier chip. Perhaps the queue check always assumes a RAGE
PRO?
Hope this helps... (No, I didn't look at the code)
The queue check looks for how many entries are free in the queue
by reading the appropriate register in the chip, I should double
check the specs to see if that's done correctly though (or compare
with X, though I do see some artifacts in X here or there, small
but small drawing errors that let me think that X driver isn't
perfect neither. At least it doesn't lockup).
Here's the code in atyfb:
static inline void wait_for_fifo(u16 entries, const struct atyfb_par *par)
{
while ((aty_ld_le32(FIFO_STAT, par) & 0xffff) >
((u32) (0x8000 >> entries)));
}
That's OK, as long as entries <= 15.
Using this register you cannot check for more than 15. There's another register
for that, and the difference between PRO and older is in that second register.
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=1356&alloc_id=3438&op=click
From: Ville Syrjälä <syrjala@sci.fi> Date: 2004-02-23 13:29:50
On Mon, Feb 23, 2004 at 01:44:34PM +0100, Geert Uytterhoeven wrote:
On Mon, 23 Feb 2004, Benjamin Herrenschmidt wrote:
quoted
Here's the code in atyfb:
static inline void wait_for_fifo(u16 entries, const struct atyfb_par *par)
{
while ((aty_ld_le32(FIFO_STAT, par) & 0xffff) >
((u32) (0x8000 >> entries)));
}
That's OK, as long as entries <= 15.
It's actually entries <= 16 since 0x0000 means all last 16 FIFO entries
are free. I didn't see any place where this would be broken or too many
register writes were done after wait_for_fifo().
Using this register you cannot check for more than 15. There's another register
for that, and the difference between PRO and older is in that second register.
BTW would it be possible to add a new accelerator type for Pro chips. I'd
like to identify Pro chips in my DirectFB driver because there are a few
important differences between Pro and older models. Othwerwise I'm going
to have to the same thing I did with matrox cards and use /proc/bus/pci :(
--
Ville Syrjälä
syrjala@sci.fi
http://www.sci.fi/~syrjala/
-------------------------------------------------------
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_id56&alloc_id438&op=click
On Mon, 23 Feb 2004, Ville [iso-8859-1] Syrjälä wrote:
BTW would it be possible to add a new accelerator type for Pro chips. I'd
like to identify Pro chips in my DirectFB driver because there are a few
important differences between Pro and older models. Othwerwise I'm going
to have to the same thing I did with matrox cards and use /proc/bus/pci :(
Can't you just check CONFIG_CHIP_ID in your DirectFB driver?
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_id56&alloc_id438&op=click
From: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: 2004-02-23 23:09:03
That's OK, as long as entries <= 15.
Using this register you cannot check for more than 15. There's another register
for that, and the difference between PRO and older is in that second register.
Ok. But we never wait for more than 15. when filling the HOST_DATA, we wait
for 1 for each long word (maybe that is wrong, it's definitely sub optimal),
and we wait for at most 6 afiak when setting 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
From: Ville Syrjälä <syrjala@sci.fi> Date: 2004-02-24 01:03:20
On Mon, Feb 23, 2004 at 02:51:07PM +0100, Geert Uytterhoeven wrote:
On Mon, 23 Feb 2004, Ville [iso-8859-1] Syrjälä wrote:
quoted
BTW would it be possible to add a new accelerator type for Pro chips. I'd
like to identify Pro chips in my DirectFB driver because there are a few
important differences between Pro and older models. Othwerwise I'm going
to have to the same thing I did with matrox cards and use /proc/bus/pci :(
Can't you just check CONFIG_CHIP_ID in your DirectFB driver?
Yes I can ;) I didn't realize the chip kept the device id in it's own
register. Thanks.
--
Ville Syrjälä
syrjala@sci.fi
http://www.sci.fi/~syrjala/
-------------------------------------------------------
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_id56&alloc_id438&op=click
From: Alexander Kern <hidden> Date: 2004-03-05 09:18:26
Am Sonntag, 22. Februar 2004 23:37 schrieb James Simmons:
quoted
quoted
quoted
Andrew, that one seem to work fine for me, been hammered for some
time in the fbdev tree. It should go to -mm for a while imho so we
get more broader testing, and eventually in 2.6.4
Please do.
Hi,
James, would you do part 2 of cursor patch? I convert here
mach64 driver to pci_table solution, it works ok on my notebook. Base is
2.6.3 + fix_double_console_init + cursor_part 1, but cursor is broken. On
console it is invisible, in mc it looks correct.
The difference to todays aty driver in mainline is too big, and it can
broke old errata rich chip versions, which I'm not own. Should it be
submitted as aty_new? Just like a radeon driver did it?
Regards Alex
P.S. I have trouble to merge your patches from mailing-list. Have you
they somewhere in internet? Or send they as attachment ;-)
I plan to submit the latets mach64 driver from BK to linus as soon as the
first part of the cursor patch goes in. It gives enough of the new
cursor api to do a dump of all the drivers in the 2.5 fbdev tree. Could you
make your patch against the fbdev-2.5 bk tree? Try my patch
http://phoenix.infradead.org/~jsimmons/fbdev.diff.gz
If it doesn't work I will put a new one you there.
looks good, but does not compile
make[1]: `arch/i386/kernel/asm-offsets.s' is up to date.
CHK include/linux/compile.h
GEN .version
CHK include/linux/compile.h
UPD include/linux/compile.h
CC init/version.o
LD init/built-in.o
LD .tmp_vmlinux1
drivers/built-in.o(.text+0x9d9bf): In function `register_framebuffer':
drivers/video/fbmem.c:1286: undefined reference to `fb_add_class_device'
drivers/built-in.o(.init.text+0x51d8): In function `fbmem_init':
drivers/video/fbmem.c:1415: undefined reference to `fb_class'
make: *** [.tmp_vmlinux1] Error 1
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
From: James Simmons <hidden> Date: 2004-03-10 18:07:18
Sorry about the delay. I have been bug bashing other code in fbdev. Here
is your latest driver against the vanillia tree. It works because I have
tested on my laptop. I even did some repairs on the software cursor. It
now behaves better, except it doesn't like none 8 bit wide fonts.
http://phoenix.infradead.org/~jsimmons/mach64.diff.gz
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
From: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: 2004-03-11 05:27:46
On Thu, 2004-03-11 at 04:49, James Simmons wrote:
Sorry about the delay. I have been bug bashing other code in fbdev. Here
is your latest driver against the vanillia tree. It works because I have
tested on my laptop. I even did some repairs on the software cursor. It
now behaves better, except it doesn't like none 8 bit wide fonts.
http://phoenix.infradead.org/~jsimmons/mach64.diff.gz
this is a patch against what ? Linus ? I've had some problems with
mach64 lately and hacked various things, so please, let me run
through this before commiting upstream
Ben.
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
this is a patch against what ? Linus ? I've had some problems with
mach64 lately and hacked various things, so please, let me run
through this before commiting upstream
Its against linus current tree (2.6.4). I posted it so Alex can merege his
current work with that code. It is meant for a sync up. We still have a
ways to go yet for the cursor code.
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click