Commit e11ae61c authored by Adrian Bunk's avatar Adrian Bunk Committed by Linus Torvalds

[PATCH] video drivers: remove unused functions

The patch below removes some unused function from drivers/video/
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent f6646b83
...@@ -64,7 +64,6 @@ static unsigned int mda_gfx_port; /* Graphics control port */ ...@@ -64,7 +64,6 @@ static unsigned int mda_gfx_port; /* Graphics control port */
/* current hardware state */ /* current hardware state */
static int mda_origin_loc=-1;
static int mda_cursor_loc=-1; static int mda_cursor_loc=-1;
static int mda_cursor_size_from=-1; static int mda_cursor_size_from=-1;
static int mda_cursor_size_to=-1; static int mda_cursor_size_to=-1;
...@@ -148,16 +147,6 @@ static int test_mda_b(unsigned char val, unsigned char reg) ...@@ -148,16 +147,6 @@ static int test_mda_b(unsigned char val, unsigned char reg)
} }
#endif #endif
static inline void mda_set_origin(unsigned int location)
{
if (mda_origin_loc == location)
return;
write_mda_w(location >> 1, 0x0c);
mda_origin_loc = location;
}
static inline void mda_set_cursor(unsigned int location) static inline void mda_set_cursor(unsigned int location)
{ {
if (mda_cursor_loc == location) if (mda_cursor_loc == location)
......
...@@ -252,49 +252,6 @@ static inline void mono_src_copy_imm_blit(int dwidth, int dheight, int dpitch, ...@@ -252,49 +252,6 @@ static inline void mono_src_copy_imm_blit(int dwidth, int dheight, int dpitch,
end_iring(par); end_iring(par);
} }
/**
* mono_src_copy_blit - color expand from video memory to framebuffer
* @dwidth: width of destination
* @dheight: height of destination
* @dpitch: pixels per line of the buffer
* @qsize: size of bitmap in quad words
* @dest: address of first byte of pixel;
* @rop: raster operation
* @blit_bpp: pixelformat to use which can be different from the
* framebuffer's pixelformat
* @src: address of image data
* @bg: backgound color
* @fg: forground color
* @par: pointer to i810fb_par structure
*
* DESCRIPTION:
* A color expand operation where the source data is in video memory.
* Useful for drawing text.
*
* REQUIREMENT:
* The end of a scanline must be padded to the next word.
*/
static inline void mono_src_copy_blit(int dwidth, int dheight, int dpitch,
int qsize, int blit_bpp, int rop,
int dest, int src, int bg,
int fg, struct fb_info *info)
{
struct i810fb_par *par = (struct i810fb_par *) info->par;
if (begin_iring(info, 32 + IRING_PAD)) return;
PUT_RING(BLIT | MONO_SOURCE_COPY_BLIT | 6);
PUT_RING(DYN_COLOR_EN | blit_bpp | rop << 16 | dpitch | 1 << 27);
PUT_RING(dheight << 16 | dwidth);
PUT_RING(dest);
PUT_RING(qsize - 1);
PUT_RING(src);
PUT_RING(bg);
PUT_RING(fg);
end_iring(par);
}
static inline void load_front(int offset, struct fb_info *info) static inline void load_front(int offset, struct fb_info *info)
{ {
struct i810fb_par *par = (struct i810fb_par *) info->par; struct i810fb_par *par = (struct i810fb_par *) info->par;
......
...@@ -152,11 +152,6 @@ static biosMode bios32[] = { ...@@ -152,11 +152,6 @@ static biosMode bios32[] = {
}; };
#endif #endif
static inline u32 read_le32(int regindex, const struct neofb_par *par)
{
return readl(par->neo2200 + par->cursorOff + regindex);
}
static inline void write_le32(int regindex, u32 val, const struct neofb_par *par) static inline void write_le32(int regindex, u32 val, const struct neofb_par *par)
{ {
writel(val, par->neo2200 + par->cursorOff + regindex); writel(val, par->neo2200 + par->cursorOff + regindex);
......
...@@ -190,13 +190,6 @@ inline static void pm2_RDAC_WR(struct pm2fb_par* p, s32 idx, u32 v) ...@@ -190,13 +190,6 @@ inline static void pm2_RDAC_WR(struct pm2fb_par* p, s32 idx, u32 v)
pm2_WR(p, index, v); pm2_WR(p, index, v);
} }
inline static u32 pm2v_RDAC_RD(struct pm2fb_par* p, s32 idx)
{
pm2_WR(p, PM2VR_RD_INDEX_LOW, idx & 0xff);
mb();
return pm2_RD(p, PM2VR_RD_INDEXED_DATA);
}
inline static void pm2v_RDAC_WR(struct pm2fb_par* p, s32 idx, u32 v) inline static void pm2v_RDAC_WR(struct pm2fb_par* p, s32 idx, u32 v)
{ {
pm2_WR(p, PM2VR_RD_INDEX_LOW, idx & 0xff); pm2_WR(p, PM2VR_RD_INDEX_LOW, idx & 0xff);
......
...@@ -621,30 +621,6 @@ static void _radeon_engine_reset(struct radeonfb_info *rinfo) ...@@ -621,30 +621,6 @@ static void _radeon_engine_reset(struct radeonfb_info *rinfo)
#define radeon_engine_reset() _radeon_engine_reset(rinfo) #define radeon_engine_reset() _radeon_engine_reset(rinfo)
static __inline__ u8 radeon_get_post_div_bitval(int post_div)
{
switch (post_div) {
case 1:
return 0x00;
case 2:
return 0x01;
case 3:
return 0x04;
case 4:
return 0x02;
case 6:
return 0x06;
case 8:
return 0x03;
case 12:
return 0x07;
default:
return 0x02;
}
}
static __inline__ int round_div(int num, int den) static __inline__ int round_div(int num, int den)
{ {
return (num + (den / 2)) / den; return (num + (den / 2)) / den;
......
...@@ -210,41 +210,21 @@ static char *mode_option __initdata = NULL; ...@@ -210,41 +210,21 @@ static char *mode_option __initdata = NULL;
#ifdef VGA_REG_IO #ifdef VGA_REG_IO
static inline u8 vga_inb(struct tdfx_par *par, u32 reg) { return inb(reg); } static inline u8 vga_inb(struct tdfx_par *par, u32 reg) { return inb(reg); }
static inline u16 vga_inw(struct tdfx_par *par, u32 reg) { return inw(reg); }
static inline u16 vga_inl(struct tdfx_par *par, u32 reg) { return inl(reg); }
static inline void vga_outb(struct tdfx_par *par, u32 reg, u8 val) { outb(val, reg); } static inline void vga_outb(struct tdfx_par *par, u32 reg, u8 val) { outb(val, reg); }
static inline void vga_outw(struct tdfx_par *par, u32 reg, u16 val) { outw(val, reg); }
static inline void vga_outl(struct tdfx_par *par, u32 reg, u32 val) { outl(val, reg); }
#else #else
static inline u8 vga_inb(struct tdfx_par *par, u32 reg) { static inline u8 vga_inb(struct tdfx_par *par, u32 reg) {
return inb(par->iobase + reg - 0x300); return inb(par->iobase + reg - 0x300);
} }
static inline u16 vga_inw(struct tdfx_par *par, u32 reg) {
return inw(par->iobase + reg - 0x300);
}
static inline u16 vga_inl(struct tdfx_par *par, u32 reg) {
return inl(par->iobase + reg - 0x300);
}
static inline void vga_outb(struct tdfx_par *par, u32 reg, u8 val) { static inline void vga_outb(struct tdfx_par *par, u32 reg, u8 val) {
outb(val, par->iobase + reg - 0x300); outb(val, par->iobase + reg - 0x300);
} }
static inline void vga_outw(struct tdfx_par *par, u32 reg, u16 val) {
outw(val, par->iobase + reg - 0x300);
}
static inline void vga_outl(struct tdfx_par *par, u32 reg, u32 val) {
outl(val, par->iobase + reg - 0x300);
}
#endif #endif
static inline void gra_outb(struct tdfx_par *par, u32 idx, u8 val) { static inline void gra_outb(struct tdfx_par *par, u32 idx, u8 val) {
vga_outb(par, GRA_I, idx); vga_outb(par, GRA_D, val); vga_outb(par, GRA_I, idx); vga_outb(par, GRA_D, val);
} }
static inline u8 gra_inb(struct tdfx_par *par, u32 idx) {
vga_outb(par, GRA_I, idx); return vga_inb(par, GRA_D);
}
static inline void seq_outb(struct tdfx_par *par, u32 idx, u8 val) { static inline void seq_outb(struct tdfx_par *par, u32 idx, u8 val) {
vga_outb(par, SEQ_I, idx); vga_outb(par, SEQ_D, val); vga_outb(par, SEQ_I, idx); vga_outb(par, SEQ_D, val);
} }
...@@ -270,15 +250,6 @@ static inline void att_outb(struct tdfx_par *par, u32 idx, u8 val) ...@@ -270,15 +250,6 @@ static inline void att_outb(struct tdfx_par *par, u32 idx, u8 val)
vga_outb(par, ATT_IW, val); vga_outb(par, ATT_IW, val);
} }
static inline u8 att_inb(struct tdfx_par *par, u32 idx)
{
unsigned char tmp;
tmp = vga_inb(par, IS1_R);
vga_outb(par, ATT_IW, idx);
return vga_inb(par, ATT_IW);
}
static inline void vga_disable_video(struct tdfx_par *par) static inline void vga_disable_video(struct tdfx_par *par)
{ {
unsigned char s; unsigned char s;
...@@ -299,12 +270,6 @@ static inline void vga_enable_video(struct tdfx_par *par) ...@@ -299,12 +270,6 @@ static inline void vga_enable_video(struct tdfx_par *par)
seq_outb(par, 0x00, 0x03); seq_outb(par, 0x00, 0x03);
} }
static inline void vga_disable_palette(struct tdfx_par *par)
{
vga_inb(par, IS1_R);
vga_outb(par, ATT_IW, 0x00);
}
static inline void vga_enable_palette(struct tdfx_par *par) static inline void vga_enable_palette(struct tdfx_par *par)
{ {
vga_inb(par, IS1_R); vga_inb(par, IS1_R);
......
...@@ -523,13 +523,6 @@ static inline void writeAttr(int reg, unsigned char val) ...@@ -523,13 +523,6 @@ static inline void writeAttr(int reg, unsigned char val)
t_outb(val, 0x3C0); t_outb(val, 0x3C0);
} }
static inline unsigned char readAttr(int reg)
{
readb(((struct tridentfb_par *)fb_info.par)->io_virt + CRT + 0x0A); //flip-flop to index
t_outb(reg, 0x3C0);
return t_inb(0x3C1);
}
static inline void write3CE(int reg, unsigned char val) static inline void write3CE(int reg, unsigned char val)
{ {
t_outb(reg, 0x3CE); t_outb(reg, 0x3CE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment