aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/neofb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/neofb.c')
-rw-r--r--drivers/video/neofb.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/video/neofb.c b/drivers/video/neofb.c
index 8486e77872dc..e18c9f98a401 100644
--- a/drivers/video/neofb.c
+++ b/drivers/video/neofb.c
@@ -485,7 +485,7 @@ static void vgaHWRestore(const struct fb_info *info,
485 */ 485 */
486static inline int neo2200_sync(struct fb_info *info) 486static inline int neo2200_sync(struct fb_info *info)
487{ 487{
488 struct neofb_par *par = (struct neofb_par *) info->par; 488 struct neofb_par *par = info->par;
489 int waitcycles; 489 int waitcycles;
490 490
491 while (readl(&par->neo2200->bltStat) & 1) 491 while (readl(&par->neo2200->bltStat) & 1)
@@ -525,7 +525,7 @@ static inline void neo2200_wait_fifo(struct fb_info *info,
525static inline void neo2200_accel_init(struct fb_info *info, 525static inline void neo2200_accel_init(struct fb_info *info,
526 struct fb_var_screeninfo *var) 526 struct fb_var_screeninfo *var)
527{ 527{
528 struct neofb_par *par = (struct neofb_par *) info->par; 528 struct neofb_par *par = info->par;
529 Neo2200 __iomem *neo2200 = par->neo2200; 529 Neo2200 __iomem *neo2200 = par->neo2200;
530 u32 bltMod, pitch; 530 u32 bltMod, pitch;
531 531
@@ -560,7 +560,7 @@ static inline void neo2200_accel_init(struct fb_info *info,
560static int 560static int
561neofb_open(struct fb_info *info, int user) 561neofb_open(struct fb_info *info, int user)
562{ 562{
563 struct neofb_par *par = (struct neofb_par *) info->par; 563 struct neofb_par *par = info->par;
564 int cnt = atomic_read(&par->ref_count); 564 int cnt = atomic_read(&par->ref_count);
565 565
566 if (!cnt) { 566 if (!cnt) {
@@ -575,7 +575,7 @@ neofb_open(struct fb_info *info, int user)
575static int 575static int
576neofb_release(struct fb_info *info, int user) 576neofb_release(struct fb_info *info, int user)
577{ 577{
578 struct neofb_par *par = (struct neofb_par *) info->par; 578 struct neofb_par *par = info->par;
579 int cnt = atomic_read(&par->ref_count); 579 int cnt = atomic_read(&par->ref_count);
580 580
581 if (!cnt) 581 if (!cnt)
@@ -590,7 +590,7 @@ neofb_release(struct fb_info *info, int user)
590static int 590static int
591neofb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) 591neofb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
592{ 592{
593 struct neofb_par *par = (struct neofb_par *) info->par; 593 struct neofb_par *par = info->par;
594 unsigned int pixclock = var->pixclock; 594 unsigned int pixclock = var->pixclock;
595 struct xtimings timings; 595 struct xtimings timings;
596 int memlen, vramlen; 596 int memlen, vramlen;
@@ -757,7 +757,7 @@ neofb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
757 757
758static int neofb_set_par(struct fb_info *info) 758static int neofb_set_par(struct fb_info *info)
759{ 759{
760 struct neofb_par *par = (struct neofb_par *) info->par; 760 struct neofb_par *par = info->par;
761 struct xtimings timings; 761 struct xtimings timings;
762 unsigned char temp; 762 unsigned char temp;
763 int i, clock_hi = 0; 763 int i, clock_hi = 0;
@@ -1216,7 +1216,7 @@ static int neofb_set_par(struct fb_info *info)
1216static void neofb_update_start(struct fb_info *info, 1216static void neofb_update_start(struct fb_info *info,
1217 struct fb_var_screeninfo *var) 1217 struct fb_var_screeninfo *var)
1218{ 1218{
1219 struct neofb_par *par = (struct neofb_par *) info->par; 1219 struct neofb_par *par = info->par;
1220 struct vgastate *state = &par->state; 1220 struct vgastate *state = &par->state;
1221 int oldExtCRTDispAddr; 1221 int oldExtCRTDispAddr;
1222 int Base; 1222 int Base;
@@ -1331,7 +1331,7 @@ static int neofb_blank(int blank_mode, struct fb_info *info)
1331 * wms...Enable VESA DPMS compatible powerdown mode 1331 * wms...Enable VESA DPMS compatible powerdown mode
1332 * run "setterm -powersave powerdown" to take advantage 1332 * run "setterm -powersave powerdown" to take advantage
1333 */ 1333 */
1334 struct neofb_par *par = (struct neofb_par *)info->par; 1334 struct neofb_par *par = info->par;
1335 int seqflags, lcdflags, dpmsflags, reg; 1335 int seqflags, lcdflags, dpmsflags, reg;
1336 1336
1337 switch (blank_mode) { 1337 switch (blank_mode) {
@@ -1404,7 +1404,7 @@ static int neofb_blank(int blank_mode, struct fb_info *info)
1404static void 1404static void
1405neo2200_fillrect(struct fb_info *info, const struct fb_fillrect *rect) 1405neo2200_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
1406{ 1406{
1407 struct neofb_par *par = (struct neofb_par *) info->par; 1407 struct neofb_par *par = info->par;
1408 u_long dst, rop; 1408 u_long dst, rop;
1409 1409
1410 dst = rect->dx + rect->dy * info->var.xres_virtual; 1410 dst = rect->dx + rect->dy * info->var.xres_virtual;
@@ -1440,7 +1440,7 @@ static void
1440neo2200_copyarea(struct fb_info *info, const struct fb_copyarea *area) 1440neo2200_copyarea(struct fb_info *info, const struct fb_copyarea *area)
1441{ 1441{
1442 u32 sx = area->sx, sy = area->sy, dx = area->dx, dy = area->dy; 1442 u32 sx = area->sx, sy = area->sy, dx = area->dx, dy = area->dy;
1443 struct neofb_par *par = (struct neofb_par *) info->par; 1443 struct neofb_par *par = info->par;
1444 u_long src, dst, bltCntl; 1444 u_long src, dst, bltCntl;
1445 1445
1446 bltCntl = NEO_BC3_FIFO_EN | NEO_BC3_SKIP_MAPPING | 0x0C0000; 1446 bltCntl = NEO_BC3_FIFO_EN | NEO_BC3_SKIP_MAPPING | 0x0C0000;
@@ -1472,7 +1472,7 @@ neo2200_copyarea(struct fb_info *info, const struct fb_copyarea *area)
1472static void 1472static void
1473neo2200_imageblit(struct fb_info *info, const struct fb_image *image) 1473neo2200_imageblit(struct fb_info *info, const struct fb_image *image)
1474{ 1474{
1475 struct neofb_par *par = (struct neofb_par *) info->par; 1475 struct neofb_par *par = info->par;
1476 int s_pitch = (image->width * image->depth + 7) >> 3; 1476 int s_pitch = (image->width * image->depth + 7) >> 3;
1477 int scan_align = info->pixmap.scan_align - 1; 1477 int scan_align = info->pixmap.scan_align - 1;
1478 int buf_align = info->pixmap.buf_align - 1; 1478 int buf_align = info->pixmap.buf_align - 1;
@@ -1686,7 +1686,7 @@ static struct fb_videomode __devinitdata mode800x480 = {
1686static int __devinit neo_map_mmio(struct fb_info *info, 1686static int __devinit neo_map_mmio(struct fb_info *info,
1687 struct pci_dev *dev) 1687 struct pci_dev *dev)
1688{ 1688{
1689 struct neofb_par *par = (struct neofb_par *) info->par; 1689 struct neofb_par *par = info->par;
1690 1690
1691 DBG("neo_map_mmio"); 1691 DBG("neo_map_mmio");
1692 1692
@@ -1733,7 +1733,7 @@ static int __devinit neo_map_mmio(struct fb_info *info,
1733 1733
1734static void neo_unmap_mmio(struct fb_info *info) 1734static void neo_unmap_mmio(struct fb_info *info)
1735{ 1735{
1736 struct neofb_par *par = (struct neofb_par *) info->par; 1736 struct neofb_par *par = info->par;
1737 1737
1738 DBG("neo_unmap_mmio"); 1738 DBG("neo_unmap_mmio");
1739 1739
@@ -1796,7 +1796,7 @@ static void neo_unmap_video(struct fb_info *info)
1796 1796
1797#ifdef CONFIG_MTRR 1797#ifdef CONFIG_MTRR
1798 { 1798 {
1799 struct neofb_par *par = (struct neofb_par *) info->par; 1799 struct neofb_par *par = info->par;
1800 1800
1801 mtrr_del(par->mtrr, info->fix.smem_start, 1801 mtrr_del(par->mtrr, info->fix.smem_start,
1802 info->fix.smem_len); 1802 info->fix.smem_len);
@@ -1811,7 +1811,7 @@ static void neo_unmap_video(struct fb_info *info)
1811 1811
1812static int __devinit neo_scan_monitor(struct fb_info *info) 1812static int __devinit neo_scan_monitor(struct fb_info *info)
1813{ 1813{
1814 struct neofb_par *par = (struct neofb_par *) info->par; 1814 struct neofb_par *par = info->par;
1815 unsigned char type, display; 1815 unsigned char type, display;
1816 int w; 1816 int w;
1817 1817
@@ -1890,7 +1890,7 @@ static int __devinit neo_scan_monitor(struct fb_info *info)
1890 1890
1891static int __devinit neo_init_hw(struct fb_info *info) 1891static int __devinit neo_init_hw(struct fb_info *info)
1892{ 1892{
1893 struct neofb_par *par = (struct neofb_par *) info->par; 1893 struct neofb_par *par = info->par;
1894 int videoRam = 896; 1894 int videoRam = 896;
1895 int maxClock = 65000; 1895 int maxClock = 65000;
1896 int CursorMem = 1024; 1896 int CursorMem = 1024;
@@ -2014,7 +2014,7 @@ static struct fb_info *__devinit neo_alloc_fb_info(struct pci_dev *dev, const st
2014 struct fb_info *info; 2014 struct fb_info *info;
2015 struct neofb_par *par; 2015 struct neofb_par *par;
2016 2016
2017 info = framebuffer_alloc(sizeof(struct neofb_par) + sizeof(u32) * 256, &dev->dev); 2017 info = framebuffer_alloc(sizeof(struct neofb_par), &dev->dev);
2018 2018
2019 if (!info) 2019 if (!info)
2020 return NULL; 2020 return NULL;
@@ -2081,7 +2081,7 @@ static struct fb_info *__devinit neo_alloc_fb_info(struct pci_dev *dev, const st
2081 info->fix.accel = id->driver_data; 2081 info->fix.accel = id->driver_data;
2082 2082
2083 info->fbops = &neofb_ops; 2083 info->fbops = &neofb_ops;
2084 info->pseudo_palette = (void *) (par + 1); 2084 info->pseudo_palette = par->palette;
2085 return info; 2085 return info;
2086} 2086}
2087 2087