diff options
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/Kconfig | 3 | ||||
-rw-r--r-- | drivers/video/aty/atyfb_base.c | 2 | ||||
-rw-r--r-- | drivers/video/aty/radeon_base.c | 4 | ||||
-rw-r--r-- | drivers/video/cirrusfb.c | 6 | ||||
-rw-r--r-- | drivers/video/console/fbcon.c | 4 | ||||
-rw-r--r-- | drivers/video/fsl-diu-fb.c | 33 | ||||
-rw-r--r-- | drivers/video/hgafb.c | 26 | ||||
-rw-r--r-- | drivers/video/leo.c | 58 | ||||
-rw-r--r-- | drivers/video/matrox/matroxfb_base.h | 2 | ||||
-rw-r--r-- | drivers/video/modedb.c | 2 | ||||
-rw-r--r-- | drivers/video/pxafb.c | 59 | ||||
-rw-r--r-- | drivers/video/s3c2410fb.c | 130 | ||||
-rw-r--r-- | drivers/video/s3c2410fb.h | 20 | ||||
-rw-r--r-- | drivers/video/sis/sis_main.c | 2 | ||||
-rw-r--r-- | drivers/video/sm501fb.c | 8 | ||||
-rw-r--r-- | drivers/video/w100fb.c | 1 |
16 files changed, 159 insertions, 201 deletions
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 002b61b4f0f6..e0c5f96b273d 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig | |||
@@ -1825,12 +1825,13 @@ config FB_FSL_DIU | |||
1825 | 1825 | ||
1826 | config FB_W100 | 1826 | config FB_W100 |
1827 | tristate "W100 frame buffer support" | 1827 | tristate "W100 frame buffer support" |
1828 | depends on FB && PXA_SHARPSL | 1828 | depends on FB && ARCH_PXA |
1829 | select FB_CFB_FILLRECT | 1829 | select FB_CFB_FILLRECT |
1830 | select FB_CFB_COPYAREA | 1830 | select FB_CFB_COPYAREA |
1831 | select FB_CFB_IMAGEBLIT | 1831 | select FB_CFB_IMAGEBLIT |
1832 | ---help--- | 1832 | ---help--- |
1833 | Frame buffer driver for the w100 as found on the Sharp SL-Cxx series. | 1833 | Frame buffer driver for the w100 as found on the Sharp SL-Cxx series. |
1834 | It can also drive the w3220 chip found on iPAQ hx4700. | ||
1834 | 1835 | ||
1835 | This driver is also available as a module ( = code which can be | 1836 | This driver is also available as a module ( = code which can be |
1836 | inserted and removed from the running kernel whenever you want). The | 1837 | inserted and removed from the running kernel whenever you want). The |
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c index e4bcf5376a99..bd4ac0bafecb 100644 --- a/drivers/video/aty/atyfb_base.c +++ b/drivers/video/aty/atyfb_base.c | |||
@@ -3356,7 +3356,7 @@ static int __devinit atyfb_setup_generic(struct pci_dev *pdev, struct fb_info *i | |||
3356 | 3356 | ||
3357 | info->fix.mmio_start = raddr; | 3357 | info->fix.mmio_start = raddr; |
3358 | par->ati_regbase = ioremap(info->fix.mmio_start, 0x1000); | 3358 | par->ati_regbase = ioremap(info->fix.mmio_start, 0x1000); |
3359 | if (par->ati_regbase == 0) | 3359 | if (par->ati_regbase == NULL) |
3360 | return -ENOMEM; | 3360 | return -ENOMEM; |
3361 | 3361 | ||
3362 | info->fix.mmio_start += par->aux_start ? 0x400 : 0xc00; | 3362 | info->fix.mmio_start += par->aux_start ? 0x400 : 0xc00; |
diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c index 72cd0d2f14ec..400e9264e456 100644 --- a/drivers/video/aty/radeon_base.c +++ b/drivers/video/aty/radeon_base.c | |||
@@ -2277,8 +2277,8 @@ static int __devinit radeonfb_pci_register (struct pci_dev *pdev, | |||
2277 | do { | 2277 | do { |
2278 | rinfo->fb_base = ioremap (rinfo->fb_base_phys, | 2278 | rinfo->fb_base = ioremap (rinfo->fb_base_phys, |
2279 | rinfo->mapped_vram); | 2279 | rinfo->mapped_vram); |
2280 | } while ( rinfo->fb_base == 0 && | 2280 | } while (rinfo->fb_base == NULL && |
2281 | ((rinfo->mapped_vram /=2) >= MIN_MAPPED_VRAM) ); | 2281 | ((rinfo->mapped_vram /= 2) >= MIN_MAPPED_VRAM)); |
2282 | 2282 | ||
2283 | if (rinfo->fb_base == NULL) { | 2283 | if (rinfo->fb_base == NULL) { |
2284 | printk (KERN_ERR "radeonfb (%s): cannot map FB\n", | 2284 | printk (KERN_ERR "radeonfb (%s): cannot map FB\n", |
diff --git a/drivers/video/cirrusfb.c b/drivers/video/cirrusfb.c index 35ac9d956b3d..c14b2435d23e 100644 --- a/drivers/video/cirrusfb.c +++ b/drivers/video/cirrusfb.c | |||
@@ -2432,9 +2432,9 @@ static int cirrusfb_pci_register(struct pci_dev *pdev, | |||
2432 | info->screen_size = board_size; | 2432 | info->screen_size = board_size; |
2433 | cinfo->unmap = cirrusfb_pci_unmap; | 2433 | cinfo->unmap = cirrusfb_pci_unmap; |
2434 | 2434 | ||
2435 | printk(KERN_INFO " RAM (%lu kB) at 0xx%lx, ", | 2435 | printk(KERN_INFO "RAM (%lu kB) at 0x%lx, Cirrus " |
2436 | info->screen_size >> 10, board_addr); | 2436 | "Logic chipset on PCI bus\n", |
2437 | printk(KERN_INFO "Cirrus Logic chipset on PCI bus\n"); | 2437 | info->screen_size >> 10, board_addr); |
2438 | pci_set_drvdata(pdev, info); | 2438 | pci_set_drvdata(pdev, info); |
2439 | 2439 | ||
2440 | ret = cirrusfb_register(info); | 2440 | ret = cirrusfb_register(info); |
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index 5fa8b76673cb..97aff8db10bf 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c | |||
@@ -2275,9 +2275,7 @@ static int fbcon_switch(struct vc_data *vc) | |||
2275 | * in fb_set_var() | 2275 | * in fb_set_var() |
2276 | */ | 2276 | */ |
2277 | info->var.activate = var.activate; | 2277 | info->var.activate = var.activate; |
2278 | var.yoffset = info->var.yoffset; | 2278 | var.vmode |= info->var.vmode & ~FB_VMODE_MASK; |
2279 | var.xoffset = info->var.xoffset; | ||
2280 | var.vmode = info->var.vmode; | ||
2281 | fb_set_var(info, &var); | 2279 | fb_set_var(info, &var); |
2282 | ops->var = info->var; | 2280 | ops->var = info->var; |
2283 | 2281 | ||
diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c index b50bb03cb5ab..712dabc6269f 100644 --- a/drivers/video/fsl-diu-fb.c +++ b/drivers/video/fsl-diu-fb.c | |||
@@ -286,7 +286,7 @@ static struct diu_pool pool; | |||
286 | * rheap and make the furture large allocation fail. | 286 | * rheap and make the furture large allocation fail. |
287 | */ | 287 | */ |
288 | 288 | ||
289 | void *fsl_diu_alloc(unsigned long size, phys_addr_t *phys) | 289 | static void *fsl_diu_alloc(unsigned long size, phys_addr_t *phys) |
290 | { | 290 | { |
291 | void *virt; | 291 | void *virt; |
292 | 292 | ||
@@ -311,12 +311,12 @@ void *fsl_diu_alloc(unsigned long size, phys_addr_t *phys) | |||
311 | memset(virt, 0, size); | 311 | memset(virt, 0, size); |
312 | } | 312 | } |
313 | 313 | ||
314 | pr_debug("rh virt=%p phys=%lx\n", virt, *phys); | 314 | pr_debug("rh virt=%p phys=%llx\n", virt, (unsigned long long)*phys); |
315 | 315 | ||
316 | return virt; | 316 | return virt; |
317 | } | 317 | } |
318 | 318 | ||
319 | void fsl_diu_free(void *p, unsigned long size) | 319 | static void fsl_diu_free(void *p, unsigned long size) |
320 | { | 320 | { |
321 | pr_debug("p=%p size=%lu\n", p, size); | 321 | pr_debug("p=%p size=%lu\n", p, size); |
322 | 322 | ||
@@ -770,7 +770,7 @@ static int map_video_memory(struct fb_info *info) | |||
770 | info->fix.smem_len = info->fix.line_length * info->var.yres_virtual; | 770 | info->fix.smem_len = info->fix.line_length * info->var.yres_virtual; |
771 | pr_debug("MAP_VIDEO_MEMORY: smem_len = %d\n", info->fix.smem_len); | 771 | pr_debug("MAP_VIDEO_MEMORY: smem_len = %d\n", info->fix.smem_len); |
772 | info->screen_base = fsl_diu_alloc(info->fix.smem_len, &phys); | 772 | info->screen_base = fsl_diu_alloc(info->fix.smem_len, &phys); |
773 | if (info->screen_base == 0) { | 773 | if (info->screen_base == NULL) { |
774 | printk(KERN_ERR "Unable to allocate fb memory\n"); | 774 | printk(KERN_ERR "Unable to allocate fb memory\n"); |
775 | return -ENOMEM; | 775 | return -ENOMEM; |
776 | } | 776 | } |
@@ -788,7 +788,7 @@ static int map_video_memory(struct fb_info *info) | |||
788 | static void unmap_video_memory(struct fb_info *info) | 788 | static void unmap_video_memory(struct fb_info *info) |
789 | { | 789 | { |
790 | fsl_diu_free(info->screen_base, info->fix.smem_len); | 790 | fsl_diu_free(info->screen_base, info->fix.smem_len); |
791 | info->screen_base = 0; | 791 | info->screen_base = NULL; |
792 | info->fix.smem_start = 0; | 792 | info->fix.smem_start = 0; |
793 | info->fix.smem_len = 0; | 793 | info->fix.smem_len = 0; |
794 | } | 794 | } |
@@ -1158,7 +1158,7 @@ static int init_fbinfo(struct fb_info *info) | |||
1158 | return 0; | 1158 | return 0; |
1159 | } | 1159 | } |
1160 | 1160 | ||
1161 | static int install_fb(struct fb_info *info) | 1161 | static int __devinit install_fb(struct fb_info *info) |
1162 | { | 1162 | { |
1163 | int rc; | 1163 | int rc; |
1164 | struct mfb_info *mfbi = info->par; | 1164 | struct mfb_info *mfbi = info->par; |
@@ -1233,7 +1233,7 @@ static int install_fb(struct fb_info *info) | |||
1233 | return 0; | 1233 | return 0; |
1234 | } | 1234 | } |
1235 | 1235 | ||
1236 | static void __exit uninstall_fb(struct fb_info *info) | 1236 | static void uninstall_fb(struct fb_info *info) |
1237 | { | 1237 | { |
1238 | struct mfb_info *mfbi = info->par; | 1238 | struct mfb_info *mfbi = info->par; |
1239 | 1239 | ||
@@ -1287,7 +1287,7 @@ static int request_irq_local(int irq) | |||
1287 | /* Read to clear the status */ | 1287 | /* Read to clear the status */ |
1288 | status = in_be32(&hw->int_status); | 1288 | status = in_be32(&hw->int_status); |
1289 | 1289 | ||
1290 | ret = request_irq(irq, fsl_diu_isr, 0, "diu", 0); | 1290 | ret = request_irq(irq, fsl_diu_isr, 0, "diu", NULL); |
1291 | if (ret) | 1291 | if (ret) |
1292 | pr_info("Request diu IRQ failed.\n"); | 1292 | pr_info("Request diu IRQ failed.\n"); |
1293 | else { | 1293 | else { |
@@ -1312,7 +1312,7 @@ static void free_irq_local(int irq) | |||
1312 | /* Disable all LCDC interrupt */ | 1312 | /* Disable all LCDC interrupt */ |
1313 | out_be32(&hw->int_mask, 0x1f); | 1313 | out_be32(&hw->int_mask, 0x1f); |
1314 | 1314 | ||
1315 | free_irq(irq, 0); | 1315 | free_irq(irq, NULL); |
1316 | } | 1316 | } |
1317 | 1317 | ||
1318 | #ifdef CONFIG_PM | 1318 | #ifdef CONFIG_PM |
@@ -1320,21 +1320,21 @@ static void free_irq_local(int irq) | |||
1320 | * Power management hooks. Note that we won't be called from IRQ context, | 1320 | * Power management hooks. Note that we won't be called from IRQ context, |
1321 | * unlike the blank functions above, so we may sleep. | 1321 | * unlike the blank functions above, so we may sleep. |
1322 | */ | 1322 | */ |
1323 | static int fsl_diu_suspend(struct of_device *dev, pm_message_t state) | 1323 | static int fsl_diu_suspend(struct of_device *ofdev, pm_message_t state) |
1324 | { | 1324 | { |
1325 | struct fsl_diu_data *machine_data; | 1325 | struct fsl_diu_data *machine_data; |
1326 | 1326 | ||
1327 | machine_data = dev_get_drvdata(&ofdev->dev); | 1327 | machine_data = dev_get_drvdata(&dev->dev); |
1328 | disable_lcdc(machine_data->fsl_diu_info[0]); | 1328 | disable_lcdc(machine_data->fsl_diu_info[0]); |
1329 | 1329 | ||
1330 | return 0; | 1330 | return 0; |
1331 | } | 1331 | } |
1332 | 1332 | ||
1333 | static int fsl_diu_resume(struct of_device *dev) | 1333 | static int fsl_diu_resume(struct of_device *ofdev) |
1334 | { | 1334 | { |
1335 | struct fsl_diu_data *machine_data; | 1335 | struct fsl_diu_data *machine_data; |
1336 | 1336 | ||
1337 | machine_data = dev_get_drvdata(&ofdev->dev); | 1337 | machine_data = dev_get_drvdata(&dev->dev); |
1338 | enable_lcdc(machine_data->fsl_diu_info[0]); | 1338 | enable_lcdc(machine_data->fsl_diu_info[0]); |
1339 | 1339 | ||
1340 | return 0; | 1340 | return 0; |
@@ -1353,7 +1353,8 @@ static int allocate_buf(struct diu_addr *buf, u32 size, u32 bytes_align) | |||
1353 | dma_addr_t paddr = 0; | 1353 | dma_addr_t paddr = 0; |
1354 | 1354 | ||
1355 | ssize = size + bytes_align; | 1355 | ssize = size + bytes_align; |
1356 | buf->vaddr = dma_alloc_coherent(0, ssize, &paddr, GFP_DMA | __GFP_ZERO); | 1356 | buf->vaddr = dma_alloc_coherent(NULL, ssize, &paddr, GFP_DMA | |
1357 | __GFP_ZERO); | ||
1357 | if (!buf->vaddr) | 1358 | if (!buf->vaddr) |
1358 | return -ENOMEM; | 1359 | return -ENOMEM; |
1359 | 1360 | ||
@@ -1371,7 +1372,7 @@ static int allocate_buf(struct diu_addr *buf, u32 size, u32 bytes_align) | |||
1371 | 1372 | ||
1372 | static void free_buf(struct diu_addr *buf, u32 size, u32 bytes_align) | 1373 | static void free_buf(struct diu_addr *buf, u32 size, u32 bytes_align) |
1373 | { | 1374 | { |
1374 | dma_free_coherent(0, size + bytes_align, | 1375 | dma_free_coherent(NULL, size + bytes_align, |
1375 | buf->vaddr, (buf->paddr - buf->offset)); | 1376 | buf->vaddr, (buf->paddr - buf->offset)); |
1376 | return; | 1377 | return; |
1377 | } | 1378 | } |
@@ -1411,7 +1412,7 @@ static ssize_t show_monitor(struct device *device, | |||
1411 | return diu_ops.show_monitor_port(machine_data->monitor_port, buf); | 1412 | return diu_ops.show_monitor_port(machine_data->monitor_port, buf); |
1412 | } | 1413 | } |
1413 | 1414 | ||
1414 | static int fsl_diu_probe(struct of_device *ofdev, | 1415 | static int __devinit fsl_diu_probe(struct of_device *ofdev, |
1415 | const struct of_device_id *match) | 1416 | const struct of_device_id *match) |
1416 | { | 1417 | { |
1417 | struct device_node *np = ofdev->node; | 1418 | struct device_node *np = ofdev->node; |
diff --git a/drivers/video/hgafb.c b/drivers/video/hgafb.c index fb9e67228543..c18880d9db1f 100644 --- a/drivers/video/hgafb.c +++ b/drivers/video/hgafb.c | |||
@@ -279,7 +279,7 @@ static void hga_blank(int blank_mode) | |||
279 | 279 | ||
280 | static int __init hga_card_detect(void) | 280 | static int __init hga_card_detect(void) |
281 | { | 281 | { |
282 | int count=0; | 282 | int count = 0; |
283 | void __iomem *p, *q; | 283 | void __iomem *p, *q; |
284 | unsigned short p_save, q_save; | 284 | unsigned short p_save, q_save; |
285 | 285 | ||
@@ -303,20 +303,18 @@ static int __init hga_card_detect(void) | |||
303 | writew(0x55aa, p); if (readw(p) == 0x55aa) count++; | 303 | writew(0x55aa, p); if (readw(p) == 0x55aa) count++; |
304 | writew(p_save, p); | 304 | writew(p_save, p); |
305 | 305 | ||
306 | if (count != 2) { | 306 | if (count != 2) |
307 | return 0; | 307 | goto error; |
308 | } | ||
309 | 308 | ||
310 | /* Ok, there is definitely a card registering at the correct | 309 | /* Ok, there is definitely a card registering at the correct |
311 | * memory location, so now we do an I/O port test. | 310 | * memory location, so now we do an I/O port test. |
312 | */ | 311 | */ |
313 | 312 | ||
314 | if (!test_hga_b(0x66, 0x0f)) { /* cursor low register */ | 313 | if (!test_hga_b(0x66, 0x0f)) /* cursor low register */ |
315 | return 0; | 314 | goto error; |
316 | } | 315 | |
317 | if (!test_hga_b(0x99, 0x0f)) { /* cursor low register */ | 316 | if (!test_hga_b(0x99, 0x0f)) /* cursor low register */ |
318 | return 0; | 317 | goto error; |
319 | } | ||
320 | 318 | ||
321 | /* See if the card is a Hercules, by checking whether the vsync | 319 | /* See if the card is a Hercules, by checking whether the vsync |
322 | * bit of the status register is changing. This test lasts for | 320 | * bit of the status register is changing. This test lasts for |
@@ -331,7 +329,7 @@ static int __init hga_card_detect(void) | |||
331 | } | 329 | } |
332 | 330 | ||
333 | if (p_save == q_save) | 331 | if (p_save == q_save) |
334 | return 0; | 332 | goto error; |
335 | 333 | ||
336 | switch (inb_p(HGA_STATUS_PORT) & 0x70) { | 334 | switch (inb_p(HGA_STATUS_PORT) & 0x70) { |
337 | case 0x10: | 335 | case 0x10: |
@@ -348,6 +346,12 @@ static int __init hga_card_detect(void) | |||
348 | break; | 346 | break; |
349 | } | 347 | } |
350 | return 1; | 348 | return 1; |
349 | error: | ||
350 | if (release_io_ports) | ||
351 | release_region(0x3b0, 12); | ||
352 | if (release_io_port) | ||
353 | release_region(0x3bf, 1); | ||
354 | return 0; | ||
351 | } | 355 | } |
352 | 356 | ||
353 | /** | 357 | /** |
diff --git a/drivers/video/leo.c b/drivers/video/leo.c index 8bc46e930340..13fea61d6ae4 100644 --- a/drivers/video/leo.c +++ b/drivers/video/leo.c | |||
@@ -17,8 +17,8 @@ | |||
17 | #include <linux/fb.h> | 17 | #include <linux/fb.h> |
18 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
19 | #include <linux/of_device.h> | 19 | #include <linux/of_device.h> |
20 | #include <linux/io.h> | ||
20 | 21 | ||
21 | #include <asm/io.h> | ||
22 | #include <asm/fbio.h> | 22 | #include <asm/fbio.h> |
23 | 23 | ||
24 | #include "sbuslib.h" | 24 | #include "sbuslib.h" |
@@ -33,7 +33,6 @@ static int leo_blank(int, struct fb_info *); | |||
33 | 33 | ||
34 | static int leo_mmap(struct fb_info *, struct vm_area_struct *); | 34 | static int leo_mmap(struct fb_info *, struct vm_area_struct *); |
35 | static int leo_ioctl(struct fb_info *, unsigned int, unsigned long); | 35 | static int leo_ioctl(struct fb_info *, unsigned int, unsigned long); |
36 | static int leo_pan_display(struct fb_var_screeninfo *, struct fb_info *); | ||
37 | 36 | ||
38 | /* | 37 | /* |
39 | * Frame buffer operations | 38 | * Frame buffer operations |
@@ -43,7 +42,6 @@ static struct fb_ops leo_ops = { | |||
43 | .owner = THIS_MODULE, | 42 | .owner = THIS_MODULE, |
44 | .fb_setcolreg = leo_setcolreg, | 43 | .fb_setcolreg = leo_setcolreg, |
45 | .fb_blank = leo_blank, | 44 | .fb_blank = leo_blank, |
46 | .fb_pan_display = leo_pan_display, | ||
47 | .fb_fillrect = cfb_fillrect, | 45 | .fb_fillrect = cfb_fillrect, |
48 | .fb_copyarea = cfb_copyarea, | 46 | .fb_copyarea = cfb_copyarea, |
49 | .fb_imageblit = cfb_imageblit, | 47 | .fb_imageblit = cfb_imageblit, |
@@ -78,7 +76,7 @@ static struct fb_ops leo_ops = { | |||
78 | #define LEO_CUR_TYPE_CMAP 0x00000050 | 76 | #define LEO_CUR_TYPE_CMAP 0x00000050 |
79 | 77 | ||
80 | struct leo_cursor { | 78 | struct leo_cursor { |
81 | u8 xxx0[16]; | 79 | u8 xxx0[16]; |
82 | u32 cur_type; | 80 | u32 cur_type; |
83 | u32 cur_misc; | 81 | u32 cur_misc; |
84 | u32 cur_cursxy; | 82 | u32 cur_cursxy; |
@@ -105,7 +103,7 @@ struct leo_lx_krn { | |||
105 | 103 | ||
106 | struct leo_lc_ss0_krn { | 104 | struct leo_lc_ss0_krn { |
107 | u32 misc; | 105 | u32 misc; |
108 | u8 xxx0[0x800-4]; | 106 | u8 xxx0[0x800-4]; |
109 | u32 rev; | 107 | u32 rev; |
110 | }; | 108 | }; |
111 | 109 | ||
@@ -116,7 +114,7 @@ struct leo_lc_ss0_usr { | |||
116 | u32 fontt; | 114 | u32 fontt; |
117 | u32 extent; | 115 | u32 extent; |
118 | u32 src; | 116 | u32 src; |
119 | u32 dst; | 117 | u32 dst; |
120 | u32 copy; | 118 | u32 copy; |
121 | u32 fill; | 119 | u32 fill; |
122 | }; | 120 | }; |
@@ -129,8 +127,8 @@ struct leo_lc_ss1_usr { | |||
129 | u8 unknown; | 127 | u8 unknown; |
130 | }; | 128 | }; |
131 | 129 | ||
132 | struct leo_ld { | 130 | struct leo_ld_ss0 { |
133 | u8 xxx0[0xe00]; | 131 | u8 xxx0[0xe00]; |
134 | u32 csr; | 132 | u32 csr; |
135 | u32 wid; | 133 | u32 wid; |
136 | u32 wmask; | 134 | u32 wmask; |
@@ -144,13 +142,13 @@ struct leo_ld { | |||
144 | u32 src; /* Copy/Scroll (SS0 only) */ | 142 | u32 src; /* Copy/Scroll (SS0 only) */ |
145 | u32 dst; /* Copy/Scroll/Fill (SS0 only) */ | 143 | u32 dst; /* Copy/Scroll/Fill (SS0 only) */ |
146 | u32 extent; /* Copy/Scroll/Fill size (SS0 only) */ | 144 | u32 extent; /* Copy/Scroll/Fill size (SS0 only) */ |
147 | u32 xxx1[3]; | 145 | u32 xxx1[3]; |
148 | u32 setsem; /* SS1 only */ | 146 | u32 setsem; /* SS1 only */ |
149 | u32 clrsem; /* SS1 only */ | 147 | u32 clrsem; /* SS1 only */ |
150 | u32 clrpick; /* SS1 only */ | 148 | u32 clrpick; /* SS1 only */ |
151 | u32 clrdat; /* SS1 only */ | 149 | u32 clrdat; /* SS1 only */ |
152 | u32 alpha; /* SS1 only */ | 150 | u32 alpha; /* SS1 only */ |
153 | u8 xxx2[0x2c]; | 151 | u8 xxx2[0x2c]; |
154 | u32 winbg; | 152 | u32 winbg; |
155 | u32 planemask; | 153 | u32 planemask; |
156 | u32 rop; | 154 | u32 rop; |
@@ -199,11 +197,12 @@ struct leo_par { | |||
199 | static void leo_wait(struct leo_lx_krn __iomem *lx_krn) | 197 | static void leo_wait(struct leo_lx_krn __iomem *lx_krn) |
200 | { | 198 | { |
201 | int i; | 199 | int i; |
202 | 200 | ||
203 | for (i = 0; | 201 | for (i = 0; |
204 | (sbus_readl(&lx_krn->krn_csr) & LEO_KRN_CSR_PROGRESS) && i < 300000; | 202 | (sbus_readl(&lx_krn->krn_csr) & LEO_KRN_CSR_PROGRESS) && |
203 | i < 300000; | ||
205 | i++) | 204 | i++) |
206 | udelay (1); /* Busy wait at most 0.3 sec */ | 205 | udelay(1); /* Busy wait at most 0.3 sec */ |
207 | return; | 206 | return; |
208 | } | 207 | } |
209 | 208 | ||
@@ -221,7 +220,7 @@ static int leo_setcolreg(unsigned regno, | |||
221 | unsigned transp, struct fb_info *info) | 220 | unsigned transp, struct fb_info *info) |
222 | { | 221 | { |
223 | struct leo_par *par = (struct leo_par *) info->par; | 222 | struct leo_par *par = (struct leo_par *) info->par; |
224 | struct leo_lx_krn __iomem *lx_krn = par->lx_krn; | 223 | struct leo_lx_krn __iomem *lx_krn = par->lx_krn; |
225 | unsigned long flags; | 224 | unsigned long flags; |
226 | u32 val; | 225 | u32 val; |
227 | int i; | 226 | int i; |
@@ -408,7 +407,7 @@ static void leo_wid_put(struct fb_info *info, struct fb_wid_list *wl) | |||
408 | leo_wait(lx_krn); | 407 | leo_wait(lx_krn); |
409 | 408 | ||
410 | for (i = 0, wi = wl->wl_list; i < wl->wl_count; i++, wi++) { | 409 | for (i = 0, wi = wl->wl_list; i < wl->wl_count; i++, wi++) { |
411 | switch(wi->wi_type) { | 410 | switch (wi->wi_type) { |
412 | case FB_WID_DBL_8: | 411 | case FB_WID_DBL_8: |
413 | j = (wi->wi_index & 0xf) + 0x40; | 412 | j = (wi->wi_index & 0xf) + 0x40; |
414 | break; | 413 | break; |
@@ -453,13 +452,12 @@ static void leo_init_wids(struct fb_info *info) | |||
453 | wi.wi_index = 1; | 452 | wi.wi_index = 1; |
454 | wi.wi_values [0] = 0x30; | 453 | wi.wi_values [0] = 0x30; |
455 | leo_wid_put(info, &wl); | 454 | leo_wid_put(info, &wl); |
456 | |||
457 | } | 455 | } |
458 | 456 | ||
459 | static void leo_switch_from_graph(struct fb_info *info) | 457 | static void leo_switch_from_graph(struct fb_info *info) |
460 | { | 458 | { |
461 | struct leo_par *par = (struct leo_par *) info->par; | 459 | struct leo_par *par = (struct leo_par *) info->par; |
462 | struct leo_ld __iomem *ss = (struct leo_ld __iomem *) par->ld_ss0; | 460 | struct leo_ld_ss0 __iomem *ss = par->ld_ss0; |
463 | unsigned long flags; | 461 | unsigned long flags; |
464 | u32 val; | 462 | u32 val; |
465 | 463 | ||
@@ -485,19 +483,13 @@ static void leo_switch_from_graph(struct fb_info *info) | |||
485 | val = sbus_readl(&par->lc_ss0_usr->csr); | 483 | val = sbus_readl(&par->lc_ss0_usr->csr); |
486 | } while (val & 0x20000000); | 484 | } while (val & 0x20000000); |
487 | 485 | ||
488 | spin_unlock_irqrestore(&par->lock, flags); | 486 | /* setup screen buffer for cfb_* functions */ |
489 | } | 487 | sbus_writel(1, &ss->wid); |
490 | 488 | sbus_writel(0x00ffffff, &ss->planemask); | |
491 | static int leo_pan_display(struct fb_var_screeninfo *var, struct fb_info *info) | 489 | sbus_writel(0x310b90, &ss->rop); |
492 | { | 490 | sbus_writel(0, &par->lc_ss0_usr->addrspace); |
493 | /* We just use this to catch switches out of | ||
494 | * graphics mode. | ||
495 | */ | ||
496 | leo_switch_from_graph(info); | ||
497 | 491 | ||
498 | if (var->xoffset || var->yoffset || var->vmode) | 492 | spin_unlock_irqrestore(&par->lock, flags); |
499 | return -EINVAL; | ||
500 | return 0; | ||
501 | } | 493 | } |
502 | 494 | ||
503 | static void leo_init_hw(struct fb_info *info) | 495 | static void leo_init_hw(struct fb_info *info) |
@@ -542,7 +534,8 @@ static void leo_unmap_regs(struct of_device *op, struct fb_info *info, | |||
542 | of_iounmap(&op->resource[0], info->screen_base, 0x800000); | 534 | of_iounmap(&op->resource[0], info->screen_base, 0x800000); |
543 | } | 535 | } |
544 | 536 | ||
545 | static int __devinit leo_probe(struct of_device *op, const struct of_device_id *match) | 537 | static int __devinit leo_probe(struct of_device *op, |
538 | const struct of_device_id *match) | ||
546 | { | 539 | { |
547 | struct device_node *dp = op->node; | 540 | struct device_node *dp = op->node; |
548 | struct fb_info *info; | 541 | struct fb_info *info; |
@@ -594,8 +587,9 @@ static int __devinit leo_probe(struct of_device *op, const struct of_device_id * | |||
594 | !info->screen_base) | 587 | !info->screen_base) |
595 | goto out_unmap_regs; | 588 | goto out_unmap_regs; |
596 | 589 | ||
597 | info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN; | 590 | info->flags = FBINFO_DEFAULT; |
598 | info->fbops = &leo_ops; | 591 | info->fbops = &leo_ops; |
592 | info->pseudo_palette = par->clut_data; | ||
599 | 593 | ||
600 | leo_init_wids(info); | 594 | leo_init_wids(info); |
601 | leo_init_hw(info); | 595 | leo_init_hw(info); |
@@ -649,7 +643,7 @@ static int __devexit leo_remove(struct of_device *op) | |||
649 | 643 | ||
650 | static struct of_device_id leo_match[] = { | 644 | static struct of_device_id leo_match[] = { |
651 | { | 645 | { |
652 | .name = "leo", | 646 | .name = "SUNW,leo", |
653 | }, | 647 | }, |
654 | {}, | 648 | {}, |
655 | }; | 649 | }; |
diff --git a/drivers/video/matrox/matroxfb_base.h b/drivers/video/matrox/matroxfb_base.h index f3107ad7e545..95883236c0cd 100644 --- a/drivers/video/matrox/matroxfb_base.h +++ b/drivers/video/matrox/matroxfb_base.h | |||
@@ -200,7 +200,7 @@ static inline int mga_ioremap(unsigned long phys, unsigned long size, int flags, | |||
200 | virt->vaddr = ioremap_nocache(phys, size); | 200 | virt->vaddr = ioremap_nocache(phys, size); |
201 | else | 201 | else |
202 | virt->vaddr = ioremap(phys, size); | 202 | virt->vaddr = ioremap(phys, size); |
203 | return (virt->vaddr == 0); /* 0, !0... 0, error_code in future */ | 203 | return (virt->vaddr == NULL); /* 0, !0... 0, error_code in future */ |
204 | } | 204 | } |
205 | 205 | ||
206 | static inline void mga_iounmap(vaddr_t va) { | 206 | static inline void mga_iounmap(vaddr_t va) { |
diff --git a/drivers/video/modedb.c b/drivers/video/modedb.c index 473562191586..d3c3af53a290 100644 --- a/drivers/video/modedb.c +++ b/drivers/video/modedb.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #endif | 28 | #endif |
29 | 29 | ||
30 | const char *fb_mode_option; | 30 | const char *fb_mode_option; |
31 | EXPORT_SYMBOL_GPL(fb_mode_option); | ||
31 | 32 | ||
32 | /* | 33 | /* |
33 | * Standard video mode definitions (taken from XFree86) | 34 | * Standard video mode definitions (taken from XFree86) |
@@ -590,6 +591,7 @@ done: | |||
590 | "", (margins) ? " with margins" : "", (interlace) ? | 591 | "", (margins) ? " with margins" : "", (interlace) ? |
591 | " interlaced" : ""); | 592 | " interlaced" : ""); |
592 | 593 | ||
594 | memset(&cvt_mode, 0, sizeof(cvt_mode)); | ||
593 | cvt_mode.xres = xres; | 595 | cvt_mode.xres = xres; |
594 | cvt_mode.yres = yres; | 596 | cvt_mode.yres = yres; |
595 | cvt_mode.refresh = (refresh) ? refresh : 60; | 597 | cvt_mode.refresh = (refresh) ? refresh : 60; |
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c index 3ee314beacc1..fafe7db20d6d 100644 --- a/drivers/video/pxafb.c +++ b/drivers/video/pxafb.c | |||
@@ -573,8 +573,8 @@ static int setup_frame_dma(struct pxafb_info *fbi, int dma, int pal, | |||
573 | dma_desc->fdadr = fbi->dma_buff_phys + dma_desc_off; | 573 | dma_desc->fdadr = fbi->dma_buff_phys + dma_desc_off; |
574 | fbi->fdadr[dma] = fbi->dma_buff_phys + dma_desc_off; | 574 | fbi->fdadr[dma] = fbi->dma_buff_phys + dma_desc_off; |
575 | } else { | 575 | } else { |
576 | pal_desc = &fbi->dma_buff->pal_desc[dma]; | 576 | pal_desc = &fbi->dma_buff->pal_desc[pal]; |
577 | pal_desc_off = offsetof(struct pxafb_dma_buff, dma_desc[pal]); | 577 | pal_desc_off = offsetof(struct pxafb_dma_buff, pal_desc[pal]); |
578 | 578 | ||
579 | pal_desc->fsadr = fbi->dma_buff_phys + pal * PALETTE_SIZE; | 579 | pal_desc->fsadr = fbi->dma_buff_phys + pal * PALETTE_SIZE; |
580 | pal_desc->fidr = 0; | 580 | pal_desc->fidr = 0; |
@@ -1246,7 +1246,7 @@ static int pxafb_resume(struct platform_device *dev) | |||
1246 | * cache. Once this area is remapped, all virtual memory | 1246 | * cache. Once this area is remapped, all virtual memory |
1247 | * access to the video memory should occur at the new region. | 1247 | * access to the video memory should occur at the new region. |
1248 | */ | 1248 | */ |
1249 | static int __init pxafb_map_video_memory(struct pxafb_info *fbi) | 1249 | static int __devinit pxafb_map_video_memory(struct pxafb_info *fbi) |
1250 | { | 1250 | { |
1251 | /* | 1251 | /* |
1252 | * We reserve one page for the palette, plus the size | 1252 | * We reserve one page for the palette, plus the size |
@@ -1276,6 +1276,8 @@ static int __init pxafb_map_video_memory(struct pxafb_info *fbi) | |||
1276 | fbi->dma_buff_phys = fbi->map_dma; | 1276 | fbi->dma_buff_phys = fbi->map_dma; |
1277 | fbi->palette_cpu = (u16 *) fbi->dma_buff->palette; | 1277 | fbi->palette_cpu = (u16 *) fbi->dma_buff->palette; |
1278 | 1278 | ||
1279 | pr_debug("pxafb: palette_mem_size = 0x%08lx\n", fbi->palette_size*sizeof(u16)); | ||
1280 | |||
1279 | #ifdef CONFIG_FB_PXA_SMARTPANEL | 1281 | #ifdef CONFIG_FB_PXA_SMARTPANEL |
1280 | fbi->smart_cmds = (uint16_t *) fbi->dma_buff->cmd_buff; | 1282 | fbi->smart_cmds = (uint16_t *) fbi->dma_buff->cmd_buff; |
1281 | fbi->n_smart_cmds = 0; | 1283 | fbi->n_smart_cmds = 0; |
@@ -1346,12 +1348,11 @@ decode_mode: | |||
1346 | pxafb_decode_mode_info(fbi, inf->modes, inf->num_modes); | 1348 | pxafb_decode_mode_info(fbi, inf->modes, inf->num_modes); |
1347 | } | 1349 | } |
1348 | 1350 | ||
1349 | static struct pxafb_info * __init pxafb_init_fbinfo(struct device *dev) | 1351 | static struct pxafb_info * __devinit pxafb_init_fbinfo(struct device *dev) |
1350 | { | 1352 | { |
1351 | struct pxafb_info *fbi; | 1353 | struct pxafb_info *fbi; |
1352 | void *addr; | 1354 | void *addr; |
1353 | struct pxafb_mach_info *inf = dev->platform_data; | 1355 | struct pxafb_mach_info *inf = dev->platform_data; |
1354 | struct pxafb_mode_info *mode = inf->modes; | ||
1355 | 1356 | ||
1356 | /* Alloc the pxafb_info and pseudo_palette in one step */ | 1357 | /* Alloc the pxafb_info and pseudo_palette in one step */ |
1357 | fbi = kmalloc(sizeof(struct pxafb_info) + sizeof(u32) * 16, GFP_KERNEL); | 1358 | fbi = kmalloc(sizeof(struct pxafb_info) + sizeof(u32) * 16, GFP_KERNEL); |
@@ -1409,7 +1410,7 @@ static struct pxafb_info * __init pxafb_init_fbinfo(struct device *dev) | |||
1409 | } | 1410 | } |
1410 | 1411 | ||
1411 | #ifdef CONFIG_FB_PXA_PARAMETERS | 1412 | #ifdef CONFIG_FB_PXA_PARAMETERS |
1412 | static int __init parse_opt_mode(struct device *dev, const char *this_opt) | 1413 | static int __devinit parse_opt_mode(struct device *dev, const char *this_opt) |
1413 | { | 1414 | { |
1414 | struct pxafb_mach_info *inf = dev->platform_data; | 1415 | struct pxafb_mach_info *inf = dev->platform_data; |
1415 | 1416 | ||
@@ -1468,7 +1469,7 @@ done: | |||
1468 | return 0; | 1469 | return 0; |
1469 | } | 1470 | } |
1470 | 1471 | ||
1471 | static int __init parse_opt(struct device *dev, char *this_opt) | 1472 | static int __devinit parse_opt(struct device *dev, char *this_opt) |
1472 | { | 1473 | { |
1473 | struct pxafb_mach_info *inf = dev->platform_data; | 1474 | struct pxafb_mach_info *inf = dev->platform_data; |
1474 | struct pxafb_mode_info *mode = &inf->modes[0]; | 1475 | struct pxafb_mode_info *mode = &inf->modes[0]; |
@@ -1566,7 +1567,7 @@ static int __init parse_opt(struct device *dev, char *this_opt) | |||
1566 | return 0; | 1567 | return 0; |
1567 | } | 1568 | } |
1568 | 1569 | ||
1569 | static int __init pxafb_parse_options(struct device *dev, char *options) | 1570 | static int __devinit pxafb_parse_options(struct device *dev, char *options) |
1570 | { | 1571 | { |
1571 | char *this_opt; | 1572 | char *this_opt; |
1572 | int ret; | 1573 | int ret; |
@@ -1587,8 +1588,8 @@ static int __init pxafb_parse_options(struct device *dev, char *options) | |||
1587 | 1588 | ||
1588 | static char g_options[256] __devinitdata = ""; | 1589 | static char g_options[256] __devinitdata = ""; |
1589 | 1590 | ||
1590 | #ifndef CONFIG_MODULES | 1591 | #ifndef MODULE |
1591 | static int __devinit pxafb_setup_options(void) | 1592 | static int __init pxafb_setup_options(void) |
1592 | { | 1593 | { |
1593 | char *options = NULL; | 1594 | char *options = NULL; |
1594 | 1595 | ||
@@ -1612,7 +1613,7 @@ MODULE_PARM_DESC(options, "LCD parameters (see Documentation/fb/pxafb.txt)"); | |||
1612 | #define pxafb_setup_options() (0) | 1613 | #define pxafb_setup_options() (0) |
1613 | #endif | 1614 | #endif |
1614 | 1615 | ||
1615 | static int __init pxafb_probe(struct platform_device *dev) | 1616 | static int __devinit pxafb_probe(struct platform_device *dev) |
1616 | { | 1617 | { |
1617 | struct pxafb_info *fbi; | 1618 | struct pxafb_info *fbi; |
1618 | struct pxafb_mach_info *inf; | 1619 | struct pxafb_mach_info *inf; |
@@ -1684,14 +1685,14 @@ static int __init pxafb_probe(struct platform_device *dev) | |||
1684 | if (r == NULL) { | 1685 | if (r == NULL) { |
1685 | dev_err(&dev->dev, "no I/O memory resource defined\n"); | 1686 | dev_err(&dev->dev, "no I/O memory resource defined\n"); |
1686 | ret = -ENODEV; | 1687 | ret = -ENODEV; |
1687 | goto failed; | 1688 | goto failed_fbi; |
1688 | } | 1689 | } |
1689 | 1690 | ||
1690 | r = request_mem_region(r->start, r->end - r->start + 1, dev->name); | 1691 | r = request_mem_region(r->start, r->end - r->start + 1, dev->name); |
1691 | if (r == NULL) { | 1692 | if (r == NULL) { |
1692 | dev_err(&dev->dev, "failed to request I/O memory\n"); | 1693 | dev_err(&dev->dev, "failed to request I/O memory\n"); |
1693 | ret = -EBUSY; | 1694 | ret = -EBUSY; |
1694 | goto failed; | 1695 | goto failed_fbi; |
1695 | } | 1696 | } |
1696 | 1697 | ||
1697 | fbi->mmio_base = ioremap(r->start, r->end - r->start + 1); | 1698 | fbi->mmio_base = ioremap(r->start, r->end - r->start + 1); |
@@ -1734,8 +1735,17 @@ static int __init pxafb_probe(struct platform_device *dev) | |||
1734 | * This makes sure that our colour bitfield | 1735 | * This makes sure that our colour bitfield |
1735 | * descriptors are correctly initialised. | 1736 | * descriptors are correctly initialised. |
1736 | */ | 1737 | */ |
1737 | pxafb_check_var(&fbi->fb.var, &fbi->fb); | 1738 | ret = pxafb_check_var(&fbi->fb.var, &fbi->fb); |
1738 | pxafb_set_par(&fbi->fb); | 1739 | if (ret) { |
1740 | dev_err(&dev->dev, "failed to get suitable mode\n"); | ||
1741 | goto failed_free_irq; | ||
1742 | } | ||
1743 | |||
1744 | ret = pxafb_set_par(&fbi->fb); | ||
1745 | if (ret) { | ||
1746 | dev_err(&dev->dev, "Failed to set parameters\n"); | ||
1747 | goto failed_free_irq; | ||
1748 | } | ||
1739 | 1749 | ||
1740 | platform_set_drvdata(dev, fbi); | 1750 | platform_set_drvdata(dev, fbi); |
1741 | 1751 | ||
@@ -1743,7 +1753,7 @@ static int __init pxafb_probe(struct platform_device *dev) | |||
1743 | if (ret < 0) { | 1753 | if (ret < 0) { |
1744 | dev_err(&dev->dev, | 1754 | dev_err(&dev->dev, |
1745 | "Failed to register framebuffer device: %d\n", ret); | 1755 | "Failed to register framebuffer device: %d\n", ret); |
1746 | goto failed_free_irq; | 1756 | goto failed_free_cmap; |
1747 | } | 1757 | } |
1748 | 1758 | ||
1749 | #ifdef CONFIG_CPU_FREQ | 1759 | #ifdef CONFIG_CPU_FREQ |
@@ -1762,18 +1772,23 @@ static int __init pxafb_probe(struct platform_device *dev) | |||
1762 | 1772 | ||
1763 | return 0; | 1773 | return 0; |
1764 | 1774 | ||
1775 | failed_free_cmap: | ||
1776 | if (fbi->fb.cmap.len) | ||
1777 | fb_dealloc_cmap(&fbi->fb.cmap); | ||
1765 | failed_free_irq: | 1778 | failed_free_irq: |
1766 | free_irq(irq, fbi); | 1779 | free_irq(irq, fbi); |
1767 | failed_free_res: | ||
1768 | release_mem_region(r->start, r->end - r->start + 1); | ||
1769 | failed_free_io: | ||
1770 | iounmap(fbi->mmio_base); | ||
1771 | failed_free_mem: | 1780 | failed_free_mem: |
1772 | dma_free_writecombine(&dev->dev, fbi->map_size, | 1781 | dma_free_writecombine(&dev->dev, fbi->map_size, |
1773 | fbi->map_cpu, fbi->map_dma); | 1782 | fbi->map_cpu, fbi->map_dma); |
1774 | failed: | 1783 | failed_free_io: |
1784 | iounmap(fbi->mmio_base); | ||
1785 | failed_free_res: | ||
1786 | release_mem_region(r->start, r->end - r->start + 1); | ||
1787 | failed_fbi: | ||
1788 | clk_put(fbi->clk); | ||
1775 | platform_set_drvdata(dev, NULL); | 1789 | platform_set_drvdata(dev, NULL); |
1776 | kfree(fbi); | 1790 | kfree(fbi); |
1791 | failed: | ||
1777 | return ret; | 1792 | return ret; |
1778 | } | 1793 | } |
1779 | 1794 | ||
@@ -1786,7 +1801,7 @@ static struct platform_driver pxafb_driver = { | |||
1786 | }, | 1801 | }, |
1787 | }; | 1802 | }; |
1788 | 1803 | ||
1789 | static int __devinit pxafb_init(void) | 1804 | static int __init pxafb_init(void) |
1790 | { | 1805 | { |
1791 | if (pxafb_setup_options()) | 1806 | if (pxafb_setup_options()) |
1792 | return -EINVAL; | 1807 | return -EINVAL; |
diff --git a/drivers/video/s3c2410fb.c b/drivers/video/s3c2410fb.c index 13b38cbbe4cf..f0598961c6b0 100644 --- a/drivers/video/s3c2410fb.c +++ b/drivers/video/s3c2410fb.c | |||
@@ -1,75 +1,15 @@ | |||
1 | /* | 1 | /* linux/drivers/video/s3c2410fb.c |
2 | * linux/drivers/video/s3c2410fb.c | 2 | * Copyright (c) 2004,2005 Arnaud Patard |
3 | * Copyright (c) Arnaud Patard, Ben Dooks | 3 | * Copyright (c) 2004-2008 Ben Dooks |
4 | * | ||
5 | * S3C2410 LCD Framebuffer Driver | ||
4 | * | 6 | * |
5 | * This file is subject to the terms and conditions of the GNU General Public | 7 | * This file is subject to the terms and conditions of the GNU General Public |
6 | * License. See the file COPYING in the main directory of this archive for | 8 | * License. See the file COPYING in the main directory of this archive for |
7 | * more details. | 9 | * more details. |
8 | * | 10 | * |
9 | * S3C2410 LCD Controller Frame Buffer Driver | 11 | * Driver based on skeletonfb.c, sa1100fb.c and others. |
10 | * based on skeletonfb.c, sa1100fb.c and others | 12 | */ |
11 | * | ||
12 | * ChangeLog | ||
13 | * 2005-04-07: Arnaud Patard <arnaud.patard@rtp-net.org> | ||
14 | * - u32 state -> pm_message_t state | ||
15 | * - S3C2410_{VA,SZ}_LCD -> S3C24XX | ||
16 | * | ||
17 | * 2005-03-15: Arnaud Patard <arnaud.patard@rtp-net.org> | ||
18 | * - Removed the ioctl | ||
19 | * - use readl/writel instead of __raw_writel/__raw_readl | ||
20 | * | ||
21 | * 2004-12-04: Arnaud Patard <arnaud.patard@rtp-net.org> | ||
22 | * - Added the possibility to set on or off the | ||
23 | * debugging messages | ||
24 | * - Replaced 0 and 1 by on or off when reading the | ||
25 | * /sys files | ||
26 | * | ||
27 | * 2005-03-23: Ben Dooks <ben-linux@fluff.org> | ||
28 | * - added non 16bpp modes | ||
29 | * - updated platform information for range of x/y/bpp | ||
30 | * - add code to ensure palette is written correctly | ||
31 | * - add pixel clock divisor control | ||
32 | * | ||
33 | * 2004-11-11: Arnaud Patard <arnaud.patard@rtp-net.org> | ||
34 | * - Removed the use of currcon as it no more exists | ||
35 | * - Added LCD power sysfs interface | ||
36 | * | ||
37 | * 2004-11-03: Ben Dooks <ben-linux@fluff.org> | ||
38 | * - minor cleanups | ||
39 | * - add suspend/resume support | ||
40 | * - s3c2410fb_setcolreg() not valid in >8bpp modes | ||
41 | * - removed last CONFIG_FB_S3C2410_FIXED | ||
42 | * - ensure lcd controller stopped before cleanup | ||
43 | * - added sysfs interface for backlight power | ||
44 | * - added mask for gpio configuration | ||
45 | * - ensured IRQs disabled during GPIO configuration | ||
46 | * - disable TPAL before enabling video | ||
47 | * | ||
48 | * 2004-09-20: Arnaud Patard <arnaud.patard@rtp-net.org> | ||
49 | * - Suppress command line options | ||
50 | * | ||
51 | * 2004-09-15: Arnaud Patard <arnaud.patard@rtp-net.org> | ||
52 | * - code cleanup | ||
53 | * | ||
54 | * 2004-09-07: Arnaud Patard <arnaud.patard@rtp-net.org> | ||
55 | * - Renamed from h1940fb.c to s3c2410fb.c | ||
56 | * - Add support for different devices | ||
57 | * - Backlight support | ||
58 | * | ||
59 | * 2004-09-05: Herbert Pötzl <herbert@13thfloor.at> | ||
60 | * - added clock (de-)allocation code | ||
61 | * - added fixem fbmem option | ||
62 | * | ||
63 | * 2004-07-27: Arnaud Patard <arnaud.patard@rtp-net.org> | ||
64 | * - code cleanup | ||
65 | * - added a forgotten return in h1940fb_init | ||
66 | * | ||
67 | * 2004-07-19: Herbert Pötzl <herbert@13thfloor.at> | ||
68 | * - code cleanup and extended debugging | ||
69 | * | ||
70 | * 2004-07-15: Arnaud Patard <arnaud.patard@rtp-net.org> | ||
71 | * - First version | ||
72 | */ | ||
73 | 13 | ||
74 | #include <linux/module.h> | 14 | #include <linux/module.h> |
75 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
@@ -580,6 +520,27 @@ static int s3c2410fb_setcolreg(unsigned regno, | |||
580 | return 0; | 520 | return 0; |
581 | } | 521 | } |
582 | 522 | ||
523 | /* s3c2410fb_lcd_enable | ||
524 | * | ||
525 | * shutdown the lcd controller | ||
526 | */ | ||
527 | static void s3c2410fb_lcd_enable(struct s3c2410fb_info *fbi, int enable) | ||
528 | { | ||
529 | unsigned long flags; | ||
530 | |||
531 | local_irq_save(flags); | ||
532 | |||
533 | if (enable) | ||
534 | fbi->regs.lcdcon1 |= S3C2410_LCDCON1_ENVID; | ||
535 | else | ||
536 | fbi->regs.lcdcon1 &= ~S3C2410_LCDCON1_ENVID; | ||
537 | |||
538 | writel(fbi->regs.lcdcon1, fbi->io + S3C2410_LCDCON1); | ||
539 | |||
540 | local_irq_restore(flags); | ||
541 | } | ||
542 | |||
543 | |||
583 | /* | 544 | /* |
584 | * s3c2410fb_blank | 545 | * s3c2410fb_blank |
585 | * @blank_mode: the blank mode we want. | 546 | * @blank_mode: the blank mode we want. |
@@ -589,9 +550,6 @@ static int s3c2410fb_setcolreg(unsigned regno, | |||
589 | * blanking succeeded, != 0 if un-/blanking failed due to e.g. a | 550 | * blanking succeeded, != 0 if un-/blanking failed due to e.g. a |
590 | * video mode which doesn't support it. Implements VESA suspend | 551 | * video mode which doesn't support it. Implements VESA suspend |
591 | * and powerdown modes on hardware that supports disabling hsync/vsync: | 552 | * and powerdown modes on hardware that supports disabling hsync/vsync: |
592 | * blank_mode == 2: suspend vsync | ||
593 | * blank_mode == 3: suspend hsync | ||
594 | * blank_mode == 4: powerdown | ||
595 | * | 553 | * |
596 | * Returns negative errno on error, or zero on success. | 554 | * Returns negative errno on error, or zero on success. |
597 | * | 555 | * |
@@ -605,6 +563,12 @@ static int s3c2410fb_blank(int blank_mode, struct fb_info *info) | |||
605 | 563 | ||
606 | tpal_reg += is_s3c2412(fbi) ? S3C2412_TPAL : S3C2410_TPAL; | 564 | tpal_reg += is_s3c2412(fbi) ? S3C2412_TPAL : S3C2410_TPAL; |
607 | 565 | ||
566 | if (blank_mode == FB_BLANK_POWERDOWN) { | ||
567 | s3c2410fb_lcd_enable(fbi, 0); | ||
568 | } else { | ||
569 | s3c2410fb_lcd_enable(fbi, 1); | ||
570 | } | ||
571 | |||
608 | if (blank_mode == FB_BLANK_UNBLANK) | 572 | if (blank_mode == FB_BLANK_UNBLANK) |
609 | writel(0x0, tpal_reg); | 573 | writel(0x0, tpal_reg); |
610 | else { | 574 | else { |
@@ -948,7 +912,10 @@ static int __init s3c24xxfb_probe(struct platform_device *pdev, | |||
948 | } | 912 | } |
949 | 913 | ||
950 | /* create device files */ | 914 | /* create device files */ |
951 | device_create_file(&pdev->dev, &dev_attr_debug); | 915 | ret = device_create_file(&pdev->dev, &dev_attr_debug); |
916 | if (ret) { | ||
917 | printk(KERN_ERR "failed to add debug attribute\n"); | ||
918 | } | ||
952 | 919 | ||
953 | printk(KERN_INFO "fb%d: %s frame buffer device\n", | 920 | printk(KERN_INFO "fb%d: %s frame buffer device\n", |
954 | fbinfo->node, fbinfo->fix.id); | 921 | fbinfo->node, fbinfo->fix.id); |
@@ -983,21 +950,6 @@ static int __init s3c2412fb_probe(struct platform_device *pdev) | |||
983 | return s3c24xxfb_probe(pdev, DRV_S3C2412); | 950 | return s3c24xxfb_probe(pdev, DRV_S3C2412); |
984 | } | 951 | } |
985 | 952 | ||
986 | /* s3c2410fb_stop_lcd | ||
987 | * | ||
988 | * shutdown the lcd controller | ||
989 | */ | ||
990 | static void s3c2410fb_stop_lcd(struct s3c2410fb_info *fbi) | ||
991 | { | ||
992 | unsigned long flags; | ||
993 | |||
994 | local_irq_save(flags); | ||
995 | |||
996 | fbi->regs.lcdcon1 &= ~S3C2410_LCDCON1_ENVID; | ||
997 | writel(fbi->regs.lcdcon1, fbi->io + S3C2410_LCDCON1); | ||
998 | |||
999 | local_irq_restore(flags); | ||
1000 | } | ||
1001 | 953 | ||
1002 | /* | 954 | /* |
1003 | * Cleanup | 955 | * Cleanup |
@@ -1010,7 +962,7 @@ static int s3c2410fb_remove(struct platform_device *pdev) | |||
1010 | 962 | ||
1011 | unregister_framebuffer(fbinfo); | 963 | unregister_framebuffer(fbinfo); |
1012 | 964 | ||
1013 | s3c2410fb_stop_lcd(info); | 965 | s3c2410fb_lcd_enable(info, 0); |
1014 | msleep(1); | 966 | msleep(1); |
1015 | 967 | ||
1016 | s3c2410fb_unmap_video_memory(fbinfo); | 968 | s3c2410fb_unmap_video_memory(fbinfo); |
@@ -1043,7 +995,7 @@ static int s3c2410fb_suspend(struct platform_device *dev, pm_message_t state) | |||
1043 | struct fb_info *fbinfo = platform_get_drvdata(dev); | 995 | struct fb_info *fbinfo = platform_get_drvdata(dev); |
1044 | struct s3c2410fb_info *info = fbinfo->par; | 996 | struct s3c2410fb_info *info = fbinfo->par; |
1045 | 997 | ||
1046 | s3c2410fb_stop_lcd(info); | 998 | s3c2410fb_lcd_enable(info, 0); |
1047 | 999 | ||
1048 | /* sleep before disabling the clock, we need to ensure | 1000 | /* sleep before disabling the clock, we need to ensure |
1049 | * the LCD DMA engine is not going to get back on the bus | 1001 | * the LCD DMA engine is not going to get back on the bus |
@@ -1118,3 +1070,5 @@ MODULE_AUTHOR("Arnaud Patard <arnaud.patard@rtp-net.org>, " | |||
1118 | "Ben Dooks <ben-linux@fluff.org>"); | 1070 | "Ben Dooks <ben-linux@fluff.org>"); |
1119 | MODULE_DESCRIPTION("Framebuffer driver for the s3c2410"); | 1071 | MODULE_DESCRIPTION("Framebuffer driver for the s3c2410"); |
1120 | MODULE_LICENSE("GPL"); | 1072 | MODULE_LICENSE("GPL"); |
1073 | MODULE_ALIAS("platform:s3c2410-lcd"); | ||
1074 | MODULE_ALIAS("platform:s3c2412-lcd"); | ||
diff --git a/drivers/video/s3c2410fb.h b/drivers/video/s3c2410fb.h index dbb73b95e2ef..9a6ba3e9d1b8 100644 --- a/drivers/video/s3c2410fb.h +++ b/drivers/video/s3c2410fb.h | |||
@@ -1,26 +1,14 @@ | |||
1 | /* | 1 | /* |
2 | * linux/drivers/video/s3c2410fb.h | 2 | * linux/drivers/video/s3c2410fb.h |
3 | * Copyright (c) Arnaud Patard | 3 | * Copyright (c) 2004 Arnaud Patard |
4 | * | ||
5 | * S3C2410 LCD Framebuffer Driver | ||
4 | * | 6 | * |
5 | * This file is subject to the terms and conditions of the GNU General Public | 7 | * This file is subject to the terms and conditions of the GNU General Public |
6 | * License. See the file COPYING in the main directory of this archive for | 8 | * License. See the file COPYING in the main directory of this archive for |
7 | * more details. | 9 | * more details. |
8 | * | 10 | * |
9 | * S3C2410 LCD Controller Frame Buffer Driver | 11 | */ |
10 | * based on skeletonfb.c, sa1100fb.h | ||
11 | * | ||
12 | * ChangeLog | ||
13 | * | ||
14 | * 2004-12-04: Arnaud Patard <arnaud.patard@rtp-net.org> | ||
15 | * - Moved dprintk to s3c2410fb.c | ||
16 | * | ||
17 | * 2004-09-07: Arnaud Patard <arnaud.patard@rtp-net.org> | ||
18 | * - Renamed from h1940fb.h to s3c2410fb.h | ||
19 | * - Changed h1940 to s3c2410 | ||
20 | * | ||
21 | * 2004-07-15: Arnaud Patard <arnaud.patard@rtp-net.org> | ||
22 | * - First version | ||
23 | */ | ||
24 | 12 | ||
25 | #ifndef __S3C2410FB_H | 13 | #ifndef __S3C2410FB_H |
26 | #define __S3C2410FB_H | 14 | #define __S3C2410FB_H |
diff --git a/drivers/video/sis/sis_main.c b/drivers/video/sis/sis_main.c index 73803624c131..b9343844cd1f 100644 --- a/drivers/video/sis/sis_main.c +++ b/drivers/video/sis/sis_main.c | |||
@@ -5787,7 +5787,7 @@ sisfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
5787 | } else { | 5787 | } else { |
5788 | struct sis_video_info *countvideo = card_list; | 5788 | struct sis_video_info *countvideo = card_list; |
5789 | ivideo->cardnumber = 1; | 5789 | ivideo->cardnumber = 1; |
5790 | while((countvideo = countvideo->next) != 0) | 5790 | while((countvideo = countvideo->next) != NULL) |
5791 | ivideo->cardnumber++; | 5791 | ivideo->cardnumber++; |
5792 | } | 5792 | } |
5793 | 5793 | ||
diff --git a/drivers/video/sm501fb.c b/drivers/video/sm501fb.c index 742b5c656d66..15d4a768b1f6 100644 --- a/drivers/video/sm501fb.c +++ b/drivers/video/sm501fb.c | |||
@@ -663,14 +663,14 @@ static void sm501fb_panel_power(struct sm501fb_info *fbi, int to) | |||
663 | sm501fb_sync_regs(fbi); | 663 | sm501fb_sync_regs(fbi); |
664 | mdelay(10); | 664 | mdelay(10); |
665 | 665 | ||
666 | if (pd->flags & SM501FB_FLAG_PANEL_USE_VBIASEN) { | 666 | if (!(pd->flags & SM501FB_FLAG_PANEL_NO_VBIASEN)) { |
667 | control |= SM501_DC_PANEL_CONTROL_BIAS; /* VBIASEN */ | 667 | control |= SM501_DC_PANEL_CONTROL_BIAS; /* VBIASEN */ |
668 | writel(control, ctrl_reg); | 668 | writel(control, ctrl_reg); |
669 | sm501fb_sync_regs(fbi); | 669 | sm501fb_sync_regs(fbi); |
670 | mdelay(10); | 670 | mdelay(10); |
671 | } | 671 | } |
672 | 672 | ||
673 | if (pd->flags & SM501FB_FLAG_PANEL_USE_FPEN) { | 673 | if (!(pd->flags & SM501FB_FLAG_PANEL_NO_FPEN)) { |
674 | control |= SM501_DC_PANEL_CONTROL_FPEN; | 674 | control |= SM501_DC_PANEL_CONTROL_FPEN; |
675 | writel(control, ctrl_reg); | 675 | writel(control, ctrl_reg); |
676 | sm501fb_sync_regs(fbi); | 676 | sm501fb_sync_regs(fbi); |
@@ -678,14 +678,14 @@ static void sm501fb_panel_power(struct sm501fb_info *fbi, int to) | |||
678 | } | 678 | } |
679 | } else if (!to && (control & SM501_DC_PANEL_CONTROL_VDD) != 0) { | 679 | } else if (!to && (control & SM501_DC_PANEL_CONTROL_VDD) != 0) { |
680 | /* disable panel power */ | 680 | /* disable panel power */ |
681 | if (pd->flags & SM501FB_FLAG_PANEL_USE_FPEN) { | 681 | if (!(pd->flags & SM501FB_FLAG_PANEL_NO_FPEN)) { |
682 | control &= ~SM501_DC_PANEL_CONTROL_FPEN; | 682 | control &= ~SM501_DC_PANEL_CONTROL_FPEN; |
683 | writel(control, ctrl_reg); | 683 | writel(control, ctrl_reg); |
684 | sm501fb_sync_regs(fbi); | 684 | sm501fb_sync_regs(fbi); |
685 | mdelay(10); | 685 | mdelay(10); |
686 | } | 686 | } |
687 | 687 | ||
688 | if (pd->flags & SM501FB_FLAG_PANEL_USE_VBIASEN) { | 688 | if (!(pd->flags & SM501FB_FLAG_PANEL_NO_VBIASEN)) { |
689 | control &= ~SM501_DC_PANEL_CONTROL_BIAS; | 689 | control &= ~SM501_DC_PANEL_CONTROL_BIAS; |
690 | writel(control, ctrl_reg); | 690 | writel(control, ctrl_reg); |
691 | sm501fb_sync_regs(fbi); | 691 | sm501fb_sync_regs(fbi); |
diff --git a/drivers/video/w100fb.c b/drivers/video/w100fb.c index 30469bf906e5..d0674f1e3f10 100644 --- a/drivers/video/w100fb.c +++ b/drivers/video/w100fb.c | |||
@@ -1003,6 +1003,7 @@ static struct w100_pll_info xtal_14318000[] = { | |||
1003 | static struct w100_pll_info xtal_16000000[] = { | 1003 | static struct w100_pll_info xtal_16000000[] = { |
1004 | /*freq M N_int N_fac tfgoal lock_time */ | 1004 | /*freq M N_int N_fac tfgoal lock_time */ |
1005 | { 72, 1, 8, 0, 0xe0, 48}, /* tfgoal guessed */ | 1005 | { 72, 1, 8, 0, 0xe0, 48}, /* tfgoal guessed */ |
1006 | { 80, 1, 9, 0, 0xe0, 13}, /* tfgoal guessed */ | ||
1006 | { 95, 1, 10, 7, 0xe0, 38}, /* tfgoal guessed */ | 1007 | { 95, 1, 10, 7, 0xe0, 38}, /* tfgoal guessed */ |
1007 | { 96, 1, 11, 0, 0xe0, 36}, /* tfgoal guessed */ | 1008 | { 96, 1, 11, 0, 0xe0, 36}, /* tfgoal guessed */ |
1008 | { 0, 0, 0, 0, 0, 0}, | 1009 | { 0, 0, 0, 0, 0, 0}, |