[PATCh} FBDev: rivafb port
Attached is a patch against 2.5.49 + James Simmons' latest fbdev.diff.
1. Added full hardware acceleration (should be 3 - 4x faster thant 2.4 version with the putcs optimization.)
2. Added hardware cursor support
3. Fixed wrong color at depths > 8bpp, at least for the Riva128.
Tony
drivers/video/riva/Makefile +1 -1
@@ -4,6 +4,6 @@ obj-$(CONFIG_FB_RIVA) += rivafb.o -rivafb-objs := fbdev.o riva_hw.o accel.o +rivafb-objs := fbdev.o riva_hw.o include $(TOPDIR)/Rules.make
drivers/video/riva/fbdev.c +502 -324
996 lines not on this page · raw message
drivers/video/riva/rivafb.h +8 -2
@@ -3,7 +3,6 @@#include <linux/config.h> #include <linux/fb.h> -#include <video/fbcon.h> #include "riva_hw.h" /* GGI compatibility macros */
@@ -23,6 +22,10 @@RIVA_HW_STATE ext; }; +typedef struct { +unsigned char red, green, blue, transp; +}riva_cfb8_cmap_t ; +struct riva_par {RIVA_HW_INST riva;/* interface to riva_hw.c */
@@ -32,7 +35,10 @@struct riva_regs initial_state;/* initial startup video mode */ struct riva_regs current_state; -struct riva_cursor *cursor; +riva_cfb8_cmap_t cmap[256 ];/* VGA DAC palette cache */ +u32 riva_palette[16 ]; +u32 cursor_data[32 *32 /4 ]; +int cursor_reset;#ifdef CONFIG_MTRR struct {int vram;int vram_valid; } mtrr;#endif
Quoted 5 lines
1. Added full hardware acceleration (should be 3 - 4x faster thant 2.4 version with the putcs optimization.)
2. Added hardware cursor support
3. Fixed wrong color at depths > 8bpp, at least for the Riva128.
Applied but not tested. I can tets it out tonight when I get home.