aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/riva/fbdev.c44
-rw-r--r--drivers/video/riva/rivafb-i2c.c8
2 files changed, 26 insertions, 26 deletions
diff --git a/drivers/video/riva/fbdev.c b/drivers/video/riva/fbdev.c
index 3e9f96e9237d..dd7b2cc88825 100644
--- a/drivers/video/riva/fbdev.c
+++ b/drivers/video/riva/fbdev.c
@@ -630,7 +630,7 @@ static void riva_load_video_mode(struct fb_info *info)
630 int bpp, width, hDisplaySize, hDisplay, hStart, 630 int bpp, width, hDisplaySize, hDisplay, hStart,
631 hEnd, hTotal, height, vDisplay, vStart, vEnd, vTotal, dotClock; 631 hEnd, hTotal, height, vDisplay, vStart, vEnd, vTotal, dotClock;
632 int hBlankStart, hBlankEnd, vBlankStart, vBlankEnd; 632 int hBlankStart, hBlankEnd, vBlankStart, vBlankEnd;
633 struct riva_par *par = (struct riva_par *) info->par; 633 struct riva_par *par = info->par;
634 struct riva_regs newmode; 634 struct riva_regs newmode;
635 635
636 NVTRACE_ENTER(); 636 NVTRACE_ENTER();
@@ -925,7 +925,7 @@ riva_set_rop_solid(struct riva_par *par, int rop)
925 925
926static void riva_setup_accel(struct fb_info *info) 926static void riva_setup_accel(struct fb_info *info)
927{ 927{
928 struct riva_par *par = (struct riva_par *) info->par; 928 struct riva_par *par = info->par;
929 929
930 RIVA_FIFO_FREE(par->riva, Clip, 2); 930 RIVA_FIFO_FREE(par->riva, Clip, 2);
931 NV_WR32(&par->riva.Clip->TopLeft, 0, 0x0); 931 NV_WR32(&par->riva.Clip->TopLeft, 0, 0x0);
@@ -979,7 +979,7 @@ static int riva_get_cmap_len(const struct fb_var_screeninfo *var)
979#ifdef CONFIG_PMAC_BACKLIGHT 979#ifdef CONFIG_PMAC_BACKLIGHT
980static int riva_set_backlight_enable(int on, int level, void *data) 980static int riva_set_backlight_enable(int on, int level, void *data)
981{ 981{
982 struct riva_par *par = (struct riva_par *)data; 982 struct riva_par *par = data;
983 U032 tmp_pcrt, tmp_pmc; 983 U032 tmp_pcrt, tmp_pmc;
984 984
985 tmp_pmc = par->riva.PMC[0x10F0/4] & 0x0000FFFF; 985 tmp_pmc = par->riva.PMC[0x10F0/4] & 0x0000FFFF;
@@ -1008,7 +1008,7 @@ static int riva_set_backlight_level(int level, void *data)
1008 1008
1009static int rivafb_open(struct fb_info *info, int user) 1009static int rivafb_open(struct fb_info *info, int user)
1010{ 1010{
1011 struct riva_par *par = (struct riva_par *) info->par; 1011 struct riva_par *par = info->par;
1012 int cnt = atomic_read(&par->ref_count); 1012 int cnt = atomic_read(&par->ref_count);
1013 1013
1014 NVTRACE_ENTER(); 1014 NVTRACE_ENTER();
@@ -1034,7 +1034,7 @@ static int rivafb_open(struct fb_info *info, int user)
1034 1034
1035static int rivafb_release(struct fb_info *info, int user) 1035static int rivafb_release(struct fb_info *info, int user)
1036{ 1036{
1037 struct riva_par *par = (struct riva_par *) info->par; 1037 struct riva_par *par = info->par;
1038 int cnt = atomic_read(&par->ref_count); 1038 int cnt = atomic_read(&par->ref_count);
1039 1039
1040 NVTRACE_ENTER(); 1040 NVTRACE_ENTER();
@@ -1057,7 +1057,7 @@ static int rivafb_release(struct fb_info *info, int user)
1057static int rivafb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) 1057static int rivafb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
1058{ 1058{
1059 struct fb_videomode *mode; 1059 struct fb_videomode *mode;
1060 struct riva_par *par = (struct riva_par *) info->par; 1060 struct riva_par *par = info->par;
1061 int nom, den; /* translating from pixels->bytes */ 1061 int nom, den; /* translating from pixels->bytes */
1062 int mode_valid = 0; 1062 int mode_valid = 0;
1063 1063
@@ -1166,7 +1166,7 @@ static int rivafb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
1166 1166
1167static int rivafb_set_par(struct fb_info *info) 1167static int rivafb_set_par(struct fb_info *info)
1168{ 1168{
1169 struct riva_par *par = (struct riva_par *) info->par; 1169 struct riva_par *par = info->par;
1170 1170
1171 NVTRACE_ENTER(); 1171 NVTRACE_ENTER();
1172 /* vgaHWunlock() + riva unlock (0x7F) */ 1172 /* vgaHWunlock() + riva unlock (0x7F) */
@@ -1205,7 +1205,7 @@ static int rivafb_set_par(struct fb_info *info)
1205static int rivafb_pan_display(struct fb_var_screeninfo *var, 1205static int rivafb_pan_display(struct fb_var_screeninfo *var,
1206 struct fb_info *info) 1206 struct fb_info *info)
1207{ 1207{
1208 struct riva_par *par = (struct riva_par *)info->par; 1208 struct riva_par *par = info->par;
1209 unsigned int base; 1209 unsigned int base;
1210 1210
1211 NVTRACE_ENTER(); 1211 NVTRACE_ENTER();
@@ -1241,7 +1241,7 @@ static int rivafb_pan_display(struct fb_var_screeninfo *var,
1241 1241
1242static int rivafb_blank(int blank, struct fb_info *info) 1242static int rivafb_blank(int blank, struct fb_info *info)
1243{ 1243{
1244 struct riva_par *par= (struct riva_par *)info->par; 1244 struct riva_par *par= info->par;
1245 unsigned char tmp, vesa; 1245 unsigned char tmp, vesa;
1246 1246
1247 tmp = SEQin(par, 0x01) & ~0x20; /* screen on/off */ 1247 tmp = SEQin(par, 0x01) & ~0x20; /* screen on/off */
@@ -1304,7 +1304,7 @@ static int rivafb_setcolreg(unsigned regno, unsigned red, unsigned green,
1304 unsigned blue, unsigned transp, 1304 unsigned blue, unsigned transp,
1305 struct fb_info *info) 1305 struct fb_info *info)
1306{ 1306{
1307 struct riva_par *par = (struct riva_par *)info->par; 1307 struct riva_par *par = info->par;
1308 RIVA_HW_INST *chip = &par->riva; 1308 RIVA_HW_INST *chip = &par->riva;
1309 int i; 1309 int i;
1310 1310
@@ -1393,7 +1393,7 @@ static int rivafb_setcolreg(unsigned regno, unsigned red, unsigned green,
1393 */ 1393 */
1394static void rivafb_fillrect(struct fb_info *info, const struct fb_fillrect *rect) 1394static void rivafb_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
1395{ 1395{
1396 struct riva_par *par = (struct riva_par *) info->par; 1396 struct riva_par *par = info->par;
1397 u_int color, rop = 0; 1397 u_int color, rop = 0;
1398 1398
1399 if ((info->flags & FBINFO_HWACCEL_DISABLED)) { 1399 if ((info->flags & FBINFO_HWACCEL_DISABLED)) {
@@ -1449,7 +1449,7 @@ static void rivafb_fillrect(struct fb_info *info, const struct fb_fillrect *rect
1449 */ 1449 */
1450static void rivafb_copyarea(struct fb_info *info, const struct fb_copyarea *region) 1450static void rivafb_copyarea(struct fb_info *info, const struct fb_copyarea *region)
1451{ 1451{
1452 struct riva_par *par = (struct riva_par *) info->par; 1452 struct riva_par *par = info->par;
1453 1453
1454 if ((info->flags & FBINFO_HWACCEL_DISABLED)) { 1454 if ((info->flags & FBINFO_HWACCEL_DISABLED)) {
1455 cfb_copyarea(info, region); 1455 cfb_copyarea(info, region);
@@ -1495,7 +1495,7 @@ static inline void convert_bgcolor_16(u32 *col)
1495static void rivafb_imageblit(struct fb_info *info, 1495static void rivafb_imageblit(struct fb_info *info,
1496 const struct fb_image *image) 1496 const struct fb_image *image)
1497{ 1497{
1498 struct riva_par *par = (struct riva_par *) info->par; 1498 struct riva_par *par = info->par;
1499 u32 fgx = 0, bgx = 0, width, tmp; 1499 u32 fgx = 0, bgx = 0, width, tmp;
1500 u8 *cdat = (u8 *) image->data; 1500 u8 *cdat = (u8 *) image->data;
1501 volatile u32 __iomem *d; 1501 volatile u32 __iomem *d;
@@ -1580,7 +1580,7 @@ static void rivafb_imageblit(struct fb_info *info,
1580 */ 1580 */
1581static int rivafb_cursor(struct fb_info *info, struct fb_cursor *cursor) 1581static int rivafb_cursor(struct fb_info *info, struct fb_cursor *cursor)
1582{ 1582{
1583 struct riva_par *par = (struct riva_par *) info->par; 1583 struct riva_par *par = info->par;
1584 u8 data[MAX_CURS * MAX_CURS/8]; 1584 u8 data[MAX_CURS * MAX_CURS/8];
1585 int i, set = cursor->set; 1585 int i, set = cursor->set;
1586 u16 fg, bg; 1586 u16 fg, bg;
@@ -1664,7 +1664,7 @@ static int rivafb_cursor(struct fb_info *info, struct fb_cursor *cursor)
1664 1664
1665static int rivafb_sync(struct fb_info *info) 1665static int rivafb_sync(struct fb_info *info)
1666{ 1666{
1667 struct riva_par *par = (struct riva_par *)info->par; 1667 struct riva_par *par = info->par;
1668 1668
1669 wait_for_idle(par); 1669 wait_for_idle(par);
1670 return 0; 1670 return 0;
@@ -1696,7 +1696,7 @@ static struct fb_ops riva_fb_ops = {
1696static int __devinit riva_set_fbinfo(struct fb_info *info) 1696static int __devinit riva_set_fbinfo(struct fb_info *info)
1697{ 1697{
1698 unsigned int cmap_len; 1698 unsigned int cmap_len;
1699 struct riva_par *par = (struct riva_par *) info->par; 1699 struct riva_par *par = info->par;
1700 1700
1701 NVTRACE_ENTER(); 1701 NVTRACE_ENTER();
1702 info->flags = FBINFO_DEFAULT 1702 info->flags = FBINFO_DEFAULT
@@ -1733,7 +1733,7 @@ static int __devinit riva_set_fbinfo(struct fb_info *info)
1733#ifdef CONFIG_PPC_OF 1733#ifdef CONFIG_PPC_OF
1734static int __devinit riva_get_EDID_OF(struct fb_info *info, struct pci_dev *pd) 1734static int __devinit riva_get_EDID_OF(struct fb_info *info, struct pci_dev *pd)
1735{ 1735{
1736 struct riva_par *par = (struct riva_par *) info->par; 1736 struct riva_par *par = info->par;
1737 struct device_node *dp; 1737 struct device_node *dp;
1738 unsigned char *pedid = NULL; 1738 unsigned char *pedid = NULL;
1739 unsigned char *disptype = NULL; 1739 unsigned char *disptype = NULL;
@@ -1767,7 +1767,7 @@ static int __devinit riva_get_EDID_OF(struct fb_info *info, struct pci_dev *pd)
1767#if defined(CONFIG_FB_RIVA_I2C) && !defined(CONFIG_PPC_OF) 1767#if defined(CONFIG_FB_RIVA_I2C) && !defined(CONFIG_PPC_OF)
1768static int __devinit riva_get_EDID_i2c(struct fb_info *info) 1768static int __devinit riva_get_EDID_i2c(struct fb_info *info)
1769{ 1769{
1770 struct riva_par *par = (struct riva_par *) info->par; 1770 struct riva_par *par = info->par;
1771 struct fb_var_screeninfo var; 1771 struct fb_var_screeninfo var;
1772 int i; 1772 int i;
1773 1773
@@ -1837,7 +1837,7 @@ static void __devinit riva_get_EDID(struct fb_info *info, struct pci_dev *pdev)
1837static void __devinit riva_get_edidinfo(struct fb_info *info) 1837static void __devinit riva_get_edidinfo(struct fb_info *info)
1838{ 1838{
1839 struct fb_var_screeninfo *var = &rivafb_default_var; 1839 struct fb_var_screeninfo *var = &rivafb_default_var;
1840 struct riva_par *par = (struct riva_par *) info->par; 1840 struct riva_par *par = info->par;
1841 1841
1842 fb_edid_to_monspecs(par->EDID, &info->monspecs); 1842 fb_edid_to_monspecs(par->EDID, &info->monspecs);
1843 fb_videomode_to_modelist(info->monspecs.modedb, info->monspecs.modedb_len, 1843 fb_videomode_to_modelist(info->monspecs.modedb, info->monspecs.modedb_len,
@@ -1909,7 +1909,7 @@ static int __devinit rivafb_probe(struct pci_dev *pd,
1909 ret = -ENOMEM; 1909 ret = -ENOMEM;
1910 goto err_ret; 1910 goto err_ret;
1911 } 1911 }
1912 default_par = (struct riva_par *) info->par; 1912 default_par = info->par;
1913 default_par->pdev = pd; 1913 default_par->pdev = pd;
1914 1914
1915 info->pixmap.addr = kmalloc(8 * 1024, GFP_KERNEL); 1915 info->pixmap.addr = kmalloc(8 * 1024, GFP_KERNEL);
@@ -2070,7 +2070,7 @@ static int __devinit rivafb_probe(struct pci_dev *pd,
2070 2070
2071err_iounmap_screen_base: 2071err_iounmap_screen_base:
2072#ifdef CONFIG_FB_RIVA_I2C 2072#ifdef CONFIG_FB_RIVA_I2C
2073 riva_delete_i2c_busses((struct riva_par *) info->par); 2073 riva_delete_i2c_busses(info->par);
2074#endif 2074#endif
2075 iounmap(info->screen_base); 2075 iounmap(info->screen_base);
2076err_iounmap_pramin: 2076err_iounmap_pramin:
@@ -2093,7 +2093,7 @@ err_ret:
2093static void __exit rivafb_remove(struct pci_dev *pd) 2093static void __exit rivafb_remove(struct pci_dev *pd)
2094{ 2094{
2095 struct fb_info *info = pci_get_drvdata(pd); 2095 struct fb_info *info = pci_get_drvdata(pd);
2096 struct riva_par *par = (struct riva_par *) info->par; 2096 struct riva_par *par = info->par;
2097 2097
2098 NVTRACE_ENTER(); 2098 NVTRACE_ENTER();
2099 if (!info) 2099 if (!info)
diff --git a/drivers/video/riva/rivafb-i2c.c b/drivers/video/riva/rivafb-i2c.c
index 77151d8e0766..8b1967fc116a 100644
--- a/drivers/video/riva/rivafb-i2c.c
+++ b/drivers/video/riva/rivafb-i2c.c
@@ -30,7 +30,7 @@
30 30
31static void riva_gpio_setscl(void* data, int state) 31static void riva_gpio_setscl(void* data, int state)
32{ 32{
33 struct riva_i2c_chan *chan = (struct riva_i2c_chan *)data; 33 struct riva_i2c_chan *chan = data;
34 struct riva_par *par = chan->par; 34 struct riva_par *par = chan->par;
35 u32 val; 35 u32 val;
36 36
@@ -48,7 +48,7 @@ static void riva_gpio_setscl(void* data, int state)
48 48
49static void riva_gpio_setsda(void* data, int state) 49static void riva_gpio_setsda(void* data, int state)
50{ 50{
51 struct riva_i2c_chan *chan = (struct riva_i2c_chan *)data; 51 struct riva_i2c_chan *chan = data;
52 struct riva_par *par = chan->par; 52 struct riva_par *par = chan->par;
53 u32 val; 53 u32 val;
54 54
@@ -66,7 +66,7 @@ static void riva_gpio_setsda(void* data, int state)
66 66
67static int riva_gpio_getscl(void* data) 67static int riva_gpio_getscl(void* data)
68{ 68{
69 struct riva_i2c_chan *chan = (struct riva_i2c_chan *)data; 69 struct riva_i2c_chan *chan = data;
70 struct riva_par *par = chan->par; 70 struct riva_par *par = chan->par;
71 u32 val = 0; 71 u32 val = 0;
72 72
@@ -81,7 +81,7 @@ static int riva_gpio_getscl(void* data)
81 81
82static int riva_gpio_getsda(void* data) 82static int riva_gpio_getsda(void* data)
83{ 83{
84 struct riva_i2c_chan *chan = (struct riva_i2c_chan *)data; 84 struct riva_i2c_chan *chan = data;
85 struct riva_par *par = chan->par; 85 struct riva_par *par = chan->par;
86 u32 val = 0; 86 u32 val = 0;
87 87