Skip to content

Commit

Permalink
Staging: xgifb: Remove unused code
Browse files Browse the repository at this point in the history
Remove code that was removed using #if 0

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Bill Pemberton authored and Greg Kroah-Hartman committed Jun 22, 2010
1 parent fc3678a commit 490ce81
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 452 deletions.
90 changes: 0 additions & 90 deletions drivers/staging/xgifb/XGI_accel.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,102 +97,12 @@ static const unsigned char myrops[] = {
};

/* 300 series */
#if 0
static void
XGI300Sync(void)
{
XGI300Idle
}
#endif
static void
XGI310Sync(void)
{
XGI310Idle
}
#if 0
static void
XGI300SetupForScreenToScreenCopy(int xdir, int ydir, int rop,
unsigned int planemask, int trans_color)
{
XGI300SetupDSTColorDepth(xgi_video_info.DstColor);
XGI300SetupSRCPitch(xgi_video_info.video_linelength)
XGI300SetupDSTRect(xgi_video_info.video_linelength, 0xFFF)

if(trans_color != -1) {
XGI300SetupROP(0x0A)
XGI300SetupSRCTrans(trans_color)
XGI300SetupCMDFlag(TRANSPARENT_BITBLT)
} else {
XGI300SetupROP(XGIALUConv[rop])
}
if(xdir > 0) {
XGI300SetupCMDFlag(X_INC)
}
if(ydir > 0) {
XGI300SetupCMDFlag(Y_INC)
}
}

static void
XGI300SubsequentScreenToScreenCopy(int src_x, int src_y, int dst_x, int dst_y,
int width, int height)
{
long srcbase, dstbase;

srcbase = dstbase = 0;
if (src_y >= 2048) {
srcbase = xgi_video_info.video_linelength * src_y;
src_y = 0;
}
if (dst_y >= 2048) {
dstbase = xgi_video_info.video_linelength * dst_y;
dst_y = 0;
}

XGI300SetupSRCBase(srcbase);
XGI300SetupDSTBase(dstbase);

if(!(xgi_video_info.CommandReg & X_INC)) {
src_x += width-1;
dst_x += width-1;
}
if(!(xgi_video_info.CommandReg & Y_INC)) {
src_y += height-1;
dst_y += height-1;
}
XGI300SetupRect(width, height)
XGI300SetupSRCXY(src_x, src_y)
XGI300SetupDSTXY(dst_x, dst_y)
XGI300DoCMD
}

static void
XGI300SetupForSolidFill(int color, int rop, unsigned int planemask)
{
XGI300SetupPATFG(color)
XGI300SetupDSTRect(xgi_video_info.video_linelength, 0xFFF)
XGI300SetupDSTColorDepth(xgi_video_info.DstColor);
XGI300SetupROP(XGIPatALUConv[rop])
XGI300SetupCMDFlag(PATFG)
}

static void
XGI300SubsequentSolidFillRect(int x, int y, int w, int h)
{
long dstbase;

dstbase = 0;
if(y >= 2048) {
dstbase = xgi_video_info.video_linelength * y;
y = 0;
}
XGI300SetupDSTBase(dstbase)
XGI300SetupDSTXY(x,y)
XGI300SetupRect(w,h)
XGI300SetupCMDFlag(X_INC | Y_INC | BITBLT)
XGI300DoCMD
}
#endif
/* 310/325 series ------------------------------------------------ */

static void
Expand Down
4 changes: 0 additions & 4 deletions drivers/staging/xgifb/XGI_main.h
Original file line number Diff line number Diff line change
Expand Up @@ -805,10 +805,6 @@ extern void fbcon_XGI_fillrect(struct fb_info *info,
const struct fb_fillrect *rect);
extern void fbcon_XGI_copyarea(struct fb_info *info,
const struct fb_copyarea *area);
#if 0
extern void cfb_imageblit(struct fb_info *info,
const struct fb_image *image);
#endif
extern int fbcon_XGI_sync(struct fb_info *info);

static int XGIfb_ioctl(struct fb_info *info, unsigned int cmd,
Expand Down
83 changes: 0 additions & 83 deletions drivers/staging/xgifb/XGI_main_26.c
Original file line number Diff line number Diff line change
Expand Up @@ -371,18 +371,6 @@ XGIfb_mode_rate_to_ddata(VB_DEVICE_INFO *XGI_Pr, PXGI_HW_DEVICE_INFO HwDeviceExt
}
}

#if 0 /* That's bullshit, only the resolution needs to be shifted */
if((*vmode & FB_VMODE_MASK) == FB_VMODE_INTERLACED) {
*upper_margin <<= 1;
*lower_margin <<= 1;
*vsync_len <<= 1;
} else if((*vmode & FB_VMODE_MASK) == FB_VMODE_DOUBLE) {
*upper_margin >>= 1;
*lower_margin >>= 1;
*vsync_len >>= 1;
}
#endif

return 1;
}

Expand Down Expand Up @@ -1537,58 +1525,7 @@ static int XGIfb_pan_display( struct fb_var_screeninfo *var,
}
#endif

#if 0
static int XGIfb_mmap(struct fb_info *info, struct file *file,
struct vm_area_struct *vma)
{
unsigned long start;
unsigned long off;
u32 len, mmio_off;

DEBUGPRN("inside mmap");
if(vma->vm_pgoff > (~0UL >> PAGE_SHIFT)) return -EINVAL;

off = vma->vm_pgoff << PAGE_SHIFT;

start = (unsigned long) xgi_video_info.video_base;
len = PAGE_ALIGN((start & ~PAGE_MASK) + xgi_video_info.video_size);
start &= PAGE_MASK;
#if 0
if (off >= len) {
off -= len;
#endif
/* By Jake Page: Treat mmap request with offset beyond heapstart
* as request for mapping the mmio area
*/
#if 1
mmio_off = PAGE_ALIGN((start & ~PAGE_MASK) + xgi_video_info.heapstart);
if(off >= mmio_off) {
off -= mmio_off;
if(info->var.accel_flags) return -EINVAL;

start = (unsigned long) xgi_video_info.mmio_base;
len = PAGE_ALIGN((start & ~PAGE_MASK) + XGIfb_mmio_size);
}
start &= PAGE_MASK;
#endif
if((vma->vm_end - vma->vm_start + off) > len) return -EINVAL;

off += start;
vma->vm_pgoff = off >> PAGE_SHIFT;
vma->vm_flags |= VM_IO; /* by Jake Page; is that really needed? */

#if defined(__i386__) || defined(__x86_64__)
if (boot_cpu_data.x86 > 3)
pgprot_val(vma->vm_page_prot) |= _PAGE_PCD;
#endif
if (io_remap_pfn_range(vma, vma->vm_start, off >> PAGE_SHIFT, vma->vm_end - vma->vm_start,
vma->vm_page_prot))
return -EAGAIN;

DEBUGPRN("end of mmap");
return 0;
}
#endif
static int XGIfb_blank(int blank, struct fb_info *info)
{
u8 reg;
Expand Down Expand Up @@ -2652,12 +2589,6 @@ static void XGIfb_post_setmode(void)
{
u8 reg;
BOOLEAN doit = 1;
#if 0 /* TW: Wrong: Is not in MMIO space, but in RAM */
/* Backup mode number to MMIO space */
if(xgi_video_info.mmio_vbase) {
*(volatile u8 *)(((u8*)xgi_video_info.mmio_vbase) + 0x449) = (unsigned char)XGIfb_mode_no;
}
#endif
/* outXGIIDXREG(XGISR,IND_XGI_PASSWORD,XGI_PASSWORD);
outXGIIDXREG(XGICR,0x13,0x00);
setXGIIDXREG(XGISR,0x0E,0xF0,0x01);
Expand Down Expand Up @@ -3445,20 +3376,6 @@ int __devinit xgifb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)

}


#if 0
#ifdef XGIFB_PAN
if(XGIfb_ypan) {
default_var.yres_virtual =
xgi_video_info.heapstart / (default_var.xres * (default_var.bits_per_pixel >> 3));
if(default_var.yres_virtual <= default_var.yres) {
default_var.yres_virtual = default_var.yres;
}
}
#endif
#endif


xgi_video_info.accel = 0;
if(XGIfb_accel) {
xgi_video_info.accel = -1;
Expand Down
Loading

0 comments on commit 490ce81

Please sign in to comment.