diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-11-15 11:42:07 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-11-15 11:42:07 -0500 |
commit | 70231669596fdd76dddfc2a4f53415d3dd84377e (patch) | |
tree | fead4ba8df3af3461038d1e319cfeefd7c970e78 /drivers | |
parent | 58e89c274f202d7fd59694b7b74fa676018435a2 (diff) | |
parent | dce1431cb36338bda1167591689ab1f77ccf8934 (diff) |
Merge branch 'fbdev-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6
* 'fbdev-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6:
fsl-diu-fb: drop dead ioctl define
MAINTAINERS: Add an fbdev git tree entry.
OMAP: DSS: Fix documentation regarding 'vram' kernel parameter
OMAP: VRAM: Fix boot-time memory allocation
OMAP: VRAM: improve VRAM error prints
sisfb: limit POST memory test according to PCI resource length
fbdev: sh_mobile_lcdc: use correct number of modes, when using the default
fbdev: sh_mobile_lcdc: use the standard CEA-861 720p timing
fbdev: sh_mobile_hdmi: properly clean up modedb on monitor unplug
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/omap2/vram.c | 17 | ||||
-rw-r--r-- | drivers/video/sh_mobile_hdmi.c | 5 | ||||
-rw-r--r-- | drivers/video/sh_mobile_lcdcfb.c | 21 | ||||
-rw-r--r-- | drivers/video/sis/sis_main.c | 8 |
4 files changed, 35 insertions, 16 deletions
diff --git a/drivers/video/omap2/vram.c b/drivers/video/omap2/vram.c index fed2a72bc6b6..2fd7e5271be9 100644 --- a/drivers/video/omap2/vram.c +++ b/drivers/video/omap2/vram.c | |||
@@ -554,9 +554,15 @@ void __init omap_vram_reserve_sdram_memblock(void) | |||
554 | size = PAGE_ALIGN(size); | 554 | size = PAGE_ALIGN(size); |
555 | 555 | ||
556 | if (paddr) { | 556 | if (paddr) { |
557 | if ((paddr & ~PAGE_MASK) || | 557 | if (paddr & ~PAGE_MASK) { |
558 | !memblock_is_region_memory(paddr, size)) { | 558 | pr_err("VRAM start address 0x%08x not page aligned\n", |
559 | pr_err("Illegal SDRAM region for VRAM\n"); | 559 | paddr); |
560 | return; | ||
561 | } | ||
562 | |||
563 | if (!memblock_is_region_memory(paddr, size)) { | ||
564 | pr_err("Illegal SDRAM region 0x%08x..0x%08x for VRAM\n", | ||
565 | paddr, paddr + size - 1); | ||
560 | return; | 566 | return; |
561 | } | 567 | } |
562 | 568 | ||
@@ -570,9 +576,12 @@ void __init omap_vram_reserve_sdram_memblock(void) | |||
570 | return; | 576 | return; |
571 | } | 577 | } |
572 | } else { | 578 | } else { |
573 | paddr = memblock_alloc_base(size, PAGE_SIZE, MEMBLOCK_REAL_LIMIT); | 579 | paddr = memblock_alloc(size, PAGE_SIZE); |
574 | } | 580 | } |
575 | 581 | ||
582 | memblock_free(paddr, size); | ||
583 | memblock_remove(paddr, size); | ||
584 | |||
576 | omap_vram_add_region(paddr, size); | 585 | omap_vram_add_region(paddr, size); |
577 | 586 | ||
578 | pr_info("Reserving %u bytes SDRAM for VRAM\n", size); | 587 | pr_info("Reserving %u bytes SDRAM for VRAM\n", size); |
diff --git a/drivers/video/sh_mobile_hdmi.c b/drivers/video/sh_mobile_hdmi.c index 55b3077ff6ff..d7df10315d8d 100644 --- a/drivers/video/sh_mobile_hdmi.c +++ b/drivers/video/sh_mobile_hdmi.c | |||
@@ -1071,6 +1071,10 @@ static void sh_hdmi_edid_work_fn(struct work_struct *work) | |||
1071 | if (!hdmi->info) | 1071 | if (!hdmi->info) |
1072 | goto out; | 1072 | goto out; |
1073 | 1073 | ||
1074 | hdmi->monspec.modedb_len = 0; | ||
1075 | fb_destroy_modedb(hdmi->monspec.modedb); | ||
1076 | hdmi->monspec.modedb = NULL; | ||
1077 | |||
1074 | acquire_console_sem(); | 1078 | acquire_console_sem(); |
1075 | 1079 | ||
1076 | /* HDMI disconnect */ | 1080 | /* HDMI disconnect */ |
@@ -1078,7 +1082,6 @@ static void sh_hdmi_edid_work_fn(struct work_struct *work) | |||
1078 | 1082 | ||
1079 | release_console_sem(); | 1083 | release_console_sem(); |
1080 | pm_runtime_put(hdmi->dev); | 1084 | pm_runtime_put(hdmi->dev); |
1081 | fb_destroy_modedb(hdmi->monspec.modedb); | ||
1082 | } | 1085 | } |
1083 | 1086 | ||
1084 | out: | 1087 | out: |
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c index 50963739a409..9b1364723c65 100644 --- a/drivers/video/sh_mobile_lcdcfb.c +++ b/drivers/video/sh_mobile_lcdcfb.c | |||
@@ -115,15 +115,16 @@ static const struct fb_videomode default_720p = { | |||
115 | .xres = 1280, | 115 | .xres = 1280, |
116 | .yres = 720, | 116 | .yres = 720, |
117 | 117 | ||
118 | .left_margin = 200, | 118 | .left_margin = 220, |
119 | .right_margin = 88, | 119 | .right_margin = 110, |
120 | .hsync_len = 48, | 120 | .hsync_len = 40, |
121 | 121 | ||
122 | .upper_margin = 20, | 122 | .upper_margin = 20, |
123 | .lower_margin = 5, | 123 | .lower_margin = 5, |
124 | .vsync_len = 5, | 124 | .vsync_len = 5, |
125 | 125 | ||
126 | .pixclock = 13468, | 126 | .pixclock = 13468, |
127 | .refresh = 60, | ||
127 | .sync = FB_SYNC_VERT_HIGH_ACT | FB_SYNC_HOR_HIGH_ACT, | 128 | .sync = FB_SYNC_VERT_HIGH_ACT | FB_SYNC_HOR_HIGH_ACT, |
128 | }; | 129 | }; |
129 | 130 | ||
@@ -1197,6 +1198,7 @@ static int __devinit sh_mobile_lcdc_probe(struct platform_device *pdev) | |||
1197 | const struct fb_videomode *mode = cfg->lcd_cfg; | 1198 | const struct fb_videomode *mode = cfg->lcd_cfg; |
1198 | unsigned long max_size = 0; | 1199 | unsigned long max_size = 0; |
1199 | int k; | 1200 | int k; |
1201 | int num_cfg; | ||
1200 | 1202 | ||
1201 | ch->info = framebuffer_alloc(0, &pdev->dev); | 1203 | ch->info = framebuffer_alloc(0, &pdev->dev); |
1202 | if (!ch->info) { | 1204 | if (!ch->info) { |
@@ -1232,8 +1234,14 @@ static int __devinit sh_mobile_lcdc_probe(struct platform_device *pdev) | |||
1232 | info->fix = sh_mobile_lcdc_fix; | 1234 | info->fix = sh_mobile_lcdc_fix; |
1233 | info->fix.smem_len = max_size * (cfg->bpp / 8) * 2; | 1235 | info->fix.smem_len = max_size * (cfg->bpp / 8) * 2; |
1234 | 1236 | ||
1235 | if (!mode) | 1237 | if (!mode) { |
1236 | mode = &default_720p; | 1238 | mode = &default_720p; |
1239 | num_cfg = 1; | ||
1240 | } else { | ||
1241 | num_cfg = ch->cfg.num_cfg; | ||
1242 | } | ||
1243 | |||
1244 | fb_videomode_to_modelist(mode, num_cfg, &info->modelist); | ||
1237 | 1245 | ||
1238 | fb_videomode_to_var(var, mode); | 1246 | fb_videomode_to_var(var, mode); |
1239 | /* Default Y virtual resolution is 2x panel size */ | 1247 | /* Default Y virtual resolution is 2x panel size */ |
@@ -1281,10 +1289,6 @@ static int __devinit sh_mobile_lcdc_probe(struct platform_device *pdev) | |||
1281 | 1289 | ||
1282 | for (i = 0; i < j; i++) { | 1290 | for (i = 0; i < j; i++) { |
1283 | struct sh_mobile_lcdc_chan *ch = priv->ch + i; | 1291 | struct sh_mobile_lcdc_chan *ch = priv->ch + i; |
1284 | const struct fb_videomode *mode = ch->cfg.lcd_cfg; | ||
1285 | |||
1286 | if (!mode) | ||
1287 | mode = &default_720p; | ||
1288 | 1292 | ||
1289 | info = ch->info; | 1293 | info = ch->info; |
1290 | 1294 | ||
@@ -1297,7 +1301,6 @@ static int __devinit sh_mobile_lcdc_probe(struct platform_device *pdev) | |||
1297 | } | 1301 | } |
1298 | } | 1302 | } |
1299 | 1303 | ||
1300 | fb_videomode_to_modelist(mode, ch->cfg.num_cfg, &info->modelist); | ||
1301 | error = register_framebuffer(info); | 1304 | error = register_framebuffer(info); |
1302 | if (error < 0) | 1305 | if (error < 0) |
1303 | goto err1; | 1306 | goto err1; |
diff --git a/drivers/video/sis/sis_main.c b/drivers/video/sis/sis_main.c index b52f8e4ef1fd..3dde12b0ab06 100644 --- a/drivers/video/sis/sis_main.c +++ b/drivers/video/sis/sis_main.c | |||
@@ -4181,6 +4181,9 @@ static void __devinit | |||
4181 | sisfb_post_map_vram(struct sis_video_info *ivideo, unsigned int *mapsize, | 4181 | sisfb_post_map_vram(struct sis_video_info *ivideo, unsigned int *mapsize, |
4182 | unsigned int min) | 4182 | unsigned int min) |
4183 | { | 4183 | { |
4184 | if (*mapsize < (min << 20)) | ||
4185 | return; | ||
4186 | |||
4184 | ivideo->video_vbase = ioremap(ivideo->video_base, (*mapsize)); | 4187 | ivideo->video_vbase = ioremap(ivideo->video_base, (*mapsize)); |
4185 | 4188 | ||
4186 | if(!ivideo->video_vbase) { | 4189 | if(!ivideo->video_vbase) { |
@@ -4514,7 +4517,7 @@ sisfb_post_sis300(struct pci_dev *pdev) | |||
4514 | } else { | 4517 | } else { |
4515 | #endif | 4518 | #endif |
4516 | /* Need to map max FB size for finding out about RAM size */ | 4519 | /* Need to map max FB size for finding out about RAM size */ |
4517 | mapsize = 64 << 20; | 4520 | mapsize = ivideo->video_size; |
4518 | sisfb_post_map_vram(ivideo, &mapsize, 4); | 4521 | sisfb_post_map_vram(ivideo, &mapsize, 4); |
4519 | 4522 | ||
4520 | if(ivideo->video_vbase) { | 4523 | if(ivideo->video_vbase) { |
@@ -4680,7 +4683,7 @@ sisfb_post_xgi_ramsize(struct sis_video_info *ivideo) | |||
4680 | orSISIDXREG(SISSR, 0x20, (0x80 | 0x04)); | 4683 | orSISIDXREG(SISSR, 0x20, (0x80 | 0x04)); |
4681 | 4684 | ||
4682 | /* Need to map max FB size for finding out about RAM size */ | 4685 | /* Need to map max FB size for finding out about RAM size */ |
4683 | mapsize = 256 << 20; | 4686 | mapsize = ivideo->video_size; |
4684 | sisfb_post_map_vram(ivideo, &mapsize, 32); | 4687 | sisfb_post_map_vram(ivideo, &mapsize, 32); |
4685 | 4688 | ||
4686 | if(!ivideo->video_vbase) { | 4689 | if(!ivideo->video_vbase) { |
@@ -5936,6 +5939,7 @@ sisfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
5936 | } | 5939 | } |
5937 | 5940 | ||
5938 | ivideo->video_base = pci_resource_start(pdev, 0); | 5941 | ivideo->video_base = pci_resource_start(pdev, 0); |
5942 | ivideo->video_size = pci_resource_len(pdev, 0); | ||
5939 | ivideo->mmio_base = pci_resource_start(pdev, 1); | 5943 | ivideo->mmio_base = pci_resource_start(pdev, 1); |
5940 | ivideo->mmio_size = pci_resource_len(pdev, 1); | 5944 | ivideo->mmio_size = pci_resource_len(pdev, 1); |
5941 | ivideo->SiS_Pr.RelIO = pci_resource_start(pdev, 2) + 0x30; | 5945 | ivideo->SiS_Pr.RelIO = pci_resource_start(pdev, 2) + 0x30; |