diff options
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/Kconfig | 1 | ||||
-rw-r--r-- | drivers/video/aty/xlinit.c | 5 | ||||
-rw-r--r-- | drivers/video/backlight/corgi_bl.c | 9 | ||||
-rw-r--r-- | drivers/video/console/vgacon.c | 4 | ||||
-rw-r--r-- | drivers/video/fbcvt.c | 8 | ||||
-rw-r--r-- | drivers/video/imxfb.c | 2 | ||||
-rw-r--r-- | drivers/video/nvidia/nv_i2c.c | 11 | ||||
-rw-r--r-- | drivers/video/nvidia/nvidia.c | 5 | ||||
-rw-r--r-- | drivers/video/savage/savagefb-i2c.c | 11 | ||||
-rw-r--r-- | drivers/video/savage/savagefb.h | 4 | ||||
-rw-r--r-- | drivers/video/savage/savagefb_driver.c | 11 |
11 files changed, 41 insertions, 30 deletions
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 31ee13eef7af..773ae11b4a19 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig | |||
@@ -650,6 +650,7 @@ config FB_NVIDIA | |||
650 | select FB_CFB_FILLRECT | 650 | select FB_CFB_FILLRECT |
651 | select FB_CFB_COPYAREA | 651 | select FB_CFB_COPYAREA |
652 | select FB_CFB_IMAGEBLIT | 652 | select FB_CFB_IMAGEBLIT |
653 | select FB_SOFT_CURSOR | ||
653 | help | 654 | help |
654 | This driver supports graphics boards with the nVidia chips, TNT | 655 | This driver supports graphics boards with the nVidia chips, TNT |
655 | and newer. For very old chipsets, such as the RIVA128, then use | 656 | and newer. For very old chipsets, such as the RIVA128, then use |
diff --git a/drivers/video/aty/xlinit.c b/drivers/video/aty/xlinit.c index 92643af12581..0bea0d8d7821 100644 --- a/drivers/video/aty/xlinit.c +++ b/drivers/video/aty/xlinit.c | |||
@@ -174,7 +174,7 @@ int atyfb_xl_init(struct fb_info *info) | |||
174 | const struct xl_card_cfg_t * card = &card_cfg[xl_card]; | 174 | const struct xl_card_cfg_t * card = &card_cfg[xl_card]; |
175 | struct atyfb_par *par = (struct atyfb_par *) info->par; | 175 | struct atyfb_par *par = (struct atyfb_par *) info->par; |
176 | union aty_pll pll; | 176 | union aty_pll pll; |
177 | int i, err; | 177 | int err; |
178 | u32 temp; | 178 | u32 temp; |
179 | 179 | ||
180 | aty_st_8(CONFIG_STAT0, 0x85, par); | 180 | aty_st_8(CONFIG_STAT0, 0x85, par); |
@@ -252,9 +252,12 @@ int atyfb_xl_init(struct fb_info *info) | |||
252 | aty_st_le32(0xEC, 0x00000000, par); | 252 | aty_st_le32(0xEC, 0x00000000, par); |
253 | aty_st_le32(0xFC, 0x00000000, par); | 253 | aty_st_le32(0xFC, 0x00000000, par); |
254 | 254 | ||
255 | #if defined (CONFIG_FB_ATY_GENERIC_LCD) | ||
256 | int i; | ||
255 | for (i=0; i<sizeof(lcd_tbl)/sizeof(lcd_tbl_t); i++) { | 257 | for (i=0; i<sizeof(lcd_tbl)/sizeof(lcd_tbl_t); i++) { |
256 | aty_st_lcd(lcd_tbl[i].lcd_reg, lcd_tbl[i].val, par); | 258 | aty_st_lcd(lcd_tbl[i].lcd_reg, lcd_tbl[i].val, par); |
257 | } | 259 | } |
260 | #endif | ||
258 | 261 | ||
259 | aty_st_le16(CONFIG_STAT0, 0x00A4, par); | 262 | aty_st_le16(CONFIG_STAT0, 0x00A4, par); |
260 | mdelay(10); | 263 | mdelay(10); |
diff --git a/drivers/video/backlight/corgi_bl.c b/drivers/video/backlight/corgi_bl.c index a32817678552..630f2dfa9699 100644 --- a/drivers/video/backlight/corgi_bl.c +++ b/drivers/video/backlight/corgi_bl.c | |||
@@ -19,17 +19,18 @@ | |||
19 | #include <linux/fb.h> | 19 | #include <linux/fb.h> |
20 | #include <linux/backlight.h> | 20 | #include <linux/backlight.h> |
21 | 21 | ||
22 | #include <asm/arch-pxa/corgi.h> | 22 | #include <asm/mach-types.h> |
23 | #include <asm/hardware/scoop.h> | 23 | #include <asm/arch/sharpsl.h> |
24 | 24 | ||
25 | #define CORGI_MAX_INTENSITY 0x3e | ||
26 | #define CORGI_DEFAULT_INTENSITY 0x1f | 25 | #define CORGI_DEFAULT_INTENSITY 0x1f |
27 | #define CORGI_LIMIT_MASK 0x0b | 26 | #define CORGI_LIMIT_MASK 0x0b |
28 | 27 | ||
29 | static int corgibl_powermode = FB_BLANK_UNBLANK; | 28 | static int corgibl_powermode = FB_BLANK_UNBLANK; |
30 | static int current_intensity = 0; | 29 | static int current_intensity = 0; |
31 | static int corgibl_limit = 0; | 30 | static int corgibl_limit = 0; |
31 | static void (*corgibl_mach_set_intensity)(int intensity); | ||
32 | static spinlock_t bl_lock = SPIN_LOCK_UNLOCKED; | 32 | static spinlock_t bl_lock = SPIN_LOCK_UNLOCKED; |
33 | static struct backlight_properties corgibl_data; | ||
33 | 34 | ||
34 | static void corgibl_send_intensity(int intensity) | 35 | static void corgibl_send_intensity(int intensity) |
35 | { | 36 | { |
diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c index 0705cd741411..6ef6f7760e47 100644 --- a/drivers/video/console/vgacon.c +++ b/drivers/video/console/vgacon.c | |||
@@ -1020,7 +1020,9 @@ static int vgacon_font_get(struct vc_data *c, struct console_font *font) | |||
1020 | static int vgacon_resize(struct vc_data *c, unsigned int width, | 1020 | static int vgacon_resize(struct vc_data *c, unsigned int width, |
1021 | unsigned int height) | 1021 | unsigned int height) |
1022 | { | 1022 | { |
1023 | if (width % 2 || width > ORIG_VIDEO_COLS || height > ORIG_VIDEO_LINES) | 1023 | if (width % 2 || width > ORIG_VIDEO_COLS || |
1024 | height > (ORIG_VIDEO_LINES * vga_default_font_height)/ | ||
1025 | c->vc_font.height) | ||
1024 | return -EINVAL; | 1026 | return -EINVAL; |
1025 | 1027 | ||
1026 | if (CON_IS_VISIBLE(c) && !vga_is_gfx) /* who knows */ | 1028 | if (CON_IS_VISIBLE(c) && !vga_is_gfx) /* who knows */ |
diff --git a/drivers/video/fbcvt.c b/drivers/video/fbcvt.c index cfa61b512de0..0b6af00d197e 100644 --- a/drivers/video/fbcvt.c +++ b/drivers/video/fbcvt.c | |||
@@ -272,11 +272,11 @@ static void fb_cvt_convert_to_mode(struct fb_cvt_data *cvt, | |||
272 | { | 272 | { |
273 | mode->refresh = cvt->f_refresh; | 273 | mode->refresh = cvt->f_refresh; |
274 | mode->pixclock = KHZ2PICOS(cvt->pixclock/1000); | 274 | mode->pixclock = KHZ2PICOS(cvt->pixclock/1000); |
275 | mode->left_margin = cvt->h_front_porch; | 275 | mode->left_margin = cvt->h_back_porch; |
276 | mode->right_margin = cvt->h_back_porch; | 276 | mode->right_margin = cvt->h_front_porch; |
277 | mode->hsync_len = cvt->hsync; | 277 | mode->hsync_len = cvt->hsync; |
278 | mode->upper_margin = cvt->v_front_porch; | 278 | mode->upper_margin = cvt->v_back_porch; |
279 | mode->lower_margin = cvt->v_back_porch; | 279 | mode->lower_margin = cvt->v_front_porch; |
280 | mode->vsync_len = cvt->vsync; | 280 | mode->vsync_len = cvt->vsync; |
281 | 281 | ||
282 | mode->sync &= ~(FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT); | 282 | mode->sync &= ~(FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT); |
diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c index cabd53cec991..6c2244cf0e74 100644 --- a/drivers/video/imxfb.c +++ b/drivers/video/imxfb.c | |||
@@ -425,7 +425,7 @@ static void imxfb_setup_gpio(struct imxfb_info *fbi) | |||
425 | * Power management hooks. Note that we won't be called from IRQ context, | 425 | * Power management hooks. Note that we won't be called from IRQ context, |
426 | * unlike the blank functions above, so we may sleep. | 426 | * unlike the blank functions above, so we may sleep. |
427 | */ | 427 | */ |
428 | static int imxfb_suspend(struct device *dev, u32 state, u32 level) | 428 | static int imxfb_suspend(struct device *dev, pm_message_t state, u32 level) |
429 | { | 429 | { |
430 | struct imxfb_info *fbi = dev_get_drvdata(dev); | 430 | struct imxfb_info *fbi = dev_get_drvdata(dev); |
431 | pr_debug("%s\n",__FUNCTION__); | 431 | pr_debug("%s\n",__FUNCTION__); |
diff --git a/drivers/video/nvidia/nv_i2c.c b/drivers/video/nvidia/nv_i2c.c index ace484fa61ce..12f2884d3f0b 100644 --- a/drivers/video/nvidia/nv_i2c.c +++ b/drivers/video/nvidia/nv_i2c.c | |||
@@ -209,10 +209,13 @@ int nvidia_probe_i2c_connector(struct fb_info *info, int conn, u8 **out_edid) | |||
209 | 209 | ||
210 | if (!edid && conn == 1) { | 210 | if (!edid && conn == 1) { |
211 | /* try to get from firmware */ | 211 | /* try to get from firmware */ |
212 | edid = kmalloc(EDID_LENGTH, GFP_KERNEL); | 212 | const u8 *e = fb_firmware_edid(info->device); |
213 | if (edid) | 213 | |
214 | memcpy(edid, fb_firmware_edid(info->device), | 214 | if (e != NULL) { |
215 | EDID_LENGTH); | 215 | edid = kmalloc(EDID_LENGTH, GFP_KERNEL); |
216 | if (edid) | ||
217 | memcpy(edid, e, EDID_LENGTH); | ||
218 | } | ||
216 | } | 219 | } |
217 | 220 | ||
218 | if (out_edid) | 221 | if (out_edid) |
diff --git a/drivers/video/nvidia/nvidia.c b/drivers/video/nvidia/nvidia.c index 3620de0f252e..a7f020ada630 100644 --- a/drivers/video/nvidia/nvidia.c +++ b/drivers/video/nvidia/nvidia.c | |||
@@ -893,7 +893,7 @@ static int nvidiafb_cursor(struct fb_info *info, struct fb_cursor *cursor) | |||
893 | int i, set = cursor->set; | 893 | int i, set = cursor->set; |
894 | u16 fg, bg; | 894 | u16 fg, bg; |
895 | 895 | ||
896 | if (!hwcur || cursor->image.width > MAX_CURS || cursor->image.height > MAX_CURS) | 896 | if (cursor->image.width > MAX_CURS || cursor->image.height > MAX_CURS) |
897 | return -ENXIO; | 897 | return -ENXIO; |
898 | 898 | ||
899 | NVShowHideCursor(par, 0); | 899 | NVShowHideCursor(par, 0); |
@@ -1356,6 +1356,9 @@ static int __devinit nvidia_set_fbinfo(struct fb_info *info) | |||
1356 | info->pixmap.size = 8 * 1024; | 1356 | info->pixmap.size = 8 * 1024; |
1357 | info->pixmap.flags = FB_PIXMAP_SYSTEM; | 1357 | info->pixmap.flags = FB_PIXMAP_SYSTEM; |
1358 | 1358 | ||
1359 | if (!hwcur) | ||
1360 | info->fbops->fb_cursor = soft_cursor; | ||
1361 | |||
1359 | info->var.accel_flags = (!noaccel); | 1362 | info->var.accel_flags = (!noaccel); |
1360 | 1363 | ||
1361 | switch (par->Architecture) { | 1364 | switch (par->Architecture) { |
diff --git a/drivers/video/savage/savagefb-i2c.c b/drivers/video/savage/savagefb-i2c.c index 959404ad68f4..3c98457783c4 100644 --- a/drivers/video/savage/savagefb-i2c.c +++ b/drivers/video/savage/savagefb-i2c.c | |||
@@ -274,10 +274,13 @@ int savagefb_probe_i2c_connector(struct fb_info *info, u8 **out_edid) | |||
274 | 274 | ||
275 | if (!edid) { | 275 | if (!edid) { |
276 | /* try to get from firmware */ | 276 | /* try to get from firmware */ |
277 | edid = kmalloc(EDID_LENGTH, GFP_KERNEL); | 277 | const u8 *e = fb_firmware_edid(info->device); |
278 | if (edid) | 278 | |
279 | memcpy(edid, fb_firmware_edid(info->device), | 279 | if (e) { |
280 | EDID_LENGTH); | 280 | edid = kmalloc(EDID_LENGTH, GFP_KERNEL); |
281 | if (edid) | ||
282 | memcpy(edid, e, EDID_LENGTH); | ||
283 | } | ||
281 | } | 284 | } |
282 | 285 | ||
283 | if (out_edid) | 286 | if (out_edid) |
diff --git a/drivers/video/savage/savagefb.h b/drivers/video/savage/savagefb.h index d6f94742c9f2..ea17f7e0482c 100644 --- a/drivers/video/savage/savagefb.h +++ b/drivers/video/savage/savagefb.h | |||
@@ -60,8 +60,6 @@ | |||
60 | 60 | ||
61 | #define S3_SAVAGE_SERIES(chip) ((chip>=S3_SAVAGE3D) && (chip<=S3_SAVAGE2000)) | 61 | #define S3_SAVAGE_SERIES(chip) ((chip>=S3_SAVAGE3D) && (chip<=S3_SAVAGE2000)) |
62 | 62 | ||
63 | #define S3_MOBILE_TWISTER_SERIES(chip) ((chip==S3_TWISTER) || (chip == S3_PROSAVAGEDDR)) | ||
64 | |||
65 | /* Chip tags. These are used to group the adapters into | 63 | /* Chip tags. These are used to group the adapters into |
66 | * related families. | 64 | * related families. |
67 | */ | 65 | */ |
@@ -74,8 +72,6 @@ typedef enum { | |||
74 | S3_PROSAVAGE, | 72 | S3_PROSAVAGE, |
75 | S3_SUPERSAVAGE, | 73 | S3_SUPERSAVAGE, |
76 | S3_SAVAGE2000, | 74 | S3_SAVAGE2000, |
77 | S3_PROSAVAGEDDR, | ||
78 | S3_TWISTER, | ||
79 | S3_LAST | 75 | S3_LAST |
80 | } savage_chipset; | 76 | } savage_chipset; |
81 | 77 | ||
diff --git a/drivers/video/savage/savagefb_driver.c b/drivers/video/savage/savagefb_driver.c index b5ca3ef8271f..7c285455c924 100644 --- a/drivers/video/savage/savagefb_driver.c +++ b/drivers/video/savage/savagefb_driver.c | |||
@@ -1773,8 +1773,7 @@ static int __devinit savage_init_hw (struct savagefb_par *par) | |||
1773 | } | 1773 | } |
1774 | } | 1774 | } |
1775 | 1775 | ||
1776 | if (S3_SAVAGE_MOBILE_SERIES(par->chip) || | 1776 | if (S3_SAVAGE_MOBILE_SERIES(par->chip) && !par->crtonly) |
1777 | (S3_MOBILE_TWISTER_SERIES(par->chip) && !par->crtonly)) | ||
1778 | par->display_type = DISP_LCD; | 1777 | par->display_type = DISP_LCD; |
1779 | else if (dvi || (par->chip == S3_SAVAGE4 && par->dvi)) | 1778 | else if (dvi || (par->chip == S3_SAVAGE4 && par->dvi)) |
1780 | par->display_type = DISP_DFP; | 1779 | par->display_type = DISP_DFP; |
@@ -1783,7 +1782,7 @@ static int __devinit savage_init_hw (struct savagefb_par *par) | |||
1783 | 1782 | ||
1784 | /* Check LCD panel parrmation */ | 1783 | /* Check LCD panel parrmation */ |
1785 | 1784 | ||
1786 | if (par->chip == S3_SAVAGE_MX) { | 1785 | if (par->display_type == DISP_LCD) { |
1787 | unsigned char cr6b = VGArCR( 0x6b ); | 1786 | unsigned char cr6b = VGArCR( 0x6b ); |
1788 | 1787 | ||
1789 | int panelX = (VGArSEQ (0x61) + | 1788 | int panelX = (VGArSEQ (0x61) + |
@@ -1922,15 +1921,15 @@ static int __devinit savage_init_fb_info (struct fb_info *info, | |||
1922 | snprintf (info->fix.id, 16, "ProSavageKM"); | 1921 | snprintf (info->fix.id, 16, "ProSavageKM"); |
1923 | break; | 1922 | break; |
1924 | case FB_ACCEL_S3TWISTER_P: | 1923 | case FB_ACCEL_S3TWISTER_P: |
1925 | par->chip = S3_TWISTER; | 1924 | par->chip = S3_PROSAVAGE; |
1926 | snprintf (info->fix.id, 16, "TwisterP"); | 1925 | snprintf (info->fix.id, 16, "TwisterP"); |
1927 | break; | 1926 | break; |
1928 | case FB_ACCEL_S3TWISTER_K: | 1927 | case FB_ACCEL_S3TWISTER_K: |
1929 | par->chip = S3_TWISTER; | 1928 | par->chip = S3_PROSAVAGE; |
1930 | snprintf (info->fix.id, 16, "TwisterK"); | 1929 | snprintf (info->fix.id, 16, "TwisterK"); |
1931 | break; | 1930 | break; |
1932 | case FB_ACCEL_PROSAVAGE_DDR: | 1931 | case FB_ACCEL_PROSAVAGE_DDR: |
1933 | par->chip = S3_PROSAVAGEDDR; | 1932 | par->chip = S3_PROSAVAGE; |
1934 | snprintf (info->fix.id, 16, "ProSavageDDR"); | 1933 | snprintf (info->fix.id, 16, "ProSavageDDR"); |
1935 | break; | 1934 | break; |
1936 | case FB_ACCEL_PROSAVAGE_DDRK: | 1935 | case FB_ACCEL_PROSAVAGE_DDRK: |