aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2011-09-20 07:27:44 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2012-02-23 02:39:18 -0500
commit80277566d0d85b3430548ba87ad28b0585ef06a6 (patch)
tree88a5295393e09d0203d264e49103908ba1ea8e43
parent1e434f9318efc3dddc0c0b8d2071712668154c2b (diff)
OMAPFB: remove mem info from platform_data
omapfb driver used platform_data to get fb memory areas and formats defined by the board file. This patch removes omapfb's (both old and new omapfb) use of the memory data in platform_data, because: - No board uses them currently - It's not board file's job to define things like amount of default framebuffer memory. These should come from the bootloader via command line parameters. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r--drivers/video/omap/omapfb_main.c5
-rw-r--r--drivers/video/omap2/omapfb/omapfb-main.c43
-rw-r--r--include/linux/omapfb.h1
3 files changed, 0 insertions, 49 deletions
diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c
index aaf0990162cc..3d2e14798210 100644
--- a/drivers/video/omap/omapfb_main.c
+++ b/drivers/video/omap/omapfb_main.c
@@ -157,11 +157,6 @@ static int ctrl_init(struct omapfb_device *fbdev)
157 fbdev->mem_desc.region[i].size = 157 fbdev->mem_desc.region[i].size =
158 PAGE_ALIGN(def_vram[i]); 158 PAGE_ALIGN(def_vram[i]);
159 fbdev->mem_desc.region_cnt = i; 159 fbdev->mem_desc.region_cnt = i;
160 } else {
161 struct omapfb_platform_data *conf;
162
163 conf = fbdev->dev->platform_data;
164 fbdev->mem_desc = conf->mem_desc;
165 } 160 }
166 161
167 if (!fbdev->mem_desc.region_cnt) { 162 if (!fbdev->mem_desc.region_cnt) {
diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
index 17e7320b48d5..4c28d57e34df 100644
--- a/drivers/video/omap2/omapfb/omapfb-main.c
+++ b/drivers/video/omap2/omapfb/omapfb-main.c
@@ -1614,23 +1614,6 @@ static int omapfb_allocate_all_fbs(struct omapfb2_device *fbdev)
1614 memset(&vram_paddrs, 0, sizeof(vram_paddrs)); 1614 memset(&vram_paddrs, 0, sizeof(vram_paddrs));
1615 } 1615 }
1616 1616
1617 if (fbdev->dev->platform_data) {
1618 struct omapfb_platform_data *opd;
1619 opd = fbdev->dev->platform_data;
1620 for (i = 0; i < opd->mem_desc.region_cnt; ++i) {
1621 if (!vram_sizes[i]) {
1622 unsigned long size;
1623 unsigned long paddr;
1624
1625 size = opd->mem_desc.region[i].size;
1626 paddr = opd->mem_desc.region[i].paddr;
1627
1628 vram_sizes[i] = size;
1629 vram_paddrs[i] = paddr;
1630 }
1631 }
1632 }
1633
1634 for (i = 0; i < fbdev->num_fbs; i++) { 1617 for (i = 0; i < fbdev->num_fbs; i++) {
1635 /* allocate memory automatically only for fb0, or if 1618 /* allocate memory automatically only for fb0, or if
1636 * excplicitly defined with vram or plat data option */ 1619 * excplicitly defined with vram or plat data option */
@@ -1828,32 +1811,6 @@ static int omapfb_fb_init(struct omapfb2_device *fbdev, struct fb_info *fbi)
1828 1811
1829 var->rotate = def_rotate; 1812 var->rotate = def_rotate;
1830 1813
1831 /*
1832 * Check if there is a default color format set in the board file,
1833 * and use this format instead the default deducted from the
1834 * display bpp.
1835 */
1836 if (fbdev->dev->platform_data) {
1837 struct omapfb_platform_data *opd;
1838 int id = ofbi->id;
1839
1840 opd = fbdev->dev->platform_data;
1841 if (opd->mem_desc.region[id].format_used) {
1842 enum omap_color_mode mode;
1843 enum omapfb_color_format format;
1844
1845 format = opd->mem_desc.region[id].format;
1846 mode = fb_format_to_dss_mode(format);
1847 if (mode < 0) {
1848 r = mode;
1849 goto err;
1850 }
1851 r = dss_mode_to_fb_mode(mode, var);
1852 if (r < 0)
1853 goto err;
1854 }
1855 }
1856
1857 if (display) { 1814 if (display) {
1858 u16 w, h; 1815 u16 w, h;
1859 int rotation = (var->rotate + ofbi->rotation[0]) % 4; 1816 int rotation = (var->rotate + ofbi->rotation[0]) % 4;
diff --git a/include/linux/omapfb.h b/include/linux/omapfb.h
index 7ab9cebf9164..03f52555ce63 100644
--- a/include/linux/omapfb.h
+++ b/include/linux/omapfb.h
@@ -249,7 +249,6 @@ struct omapfb_mem_desc {
249 249
250struct omapfb_platform_data { 250struct omapfb_platform_data {
251 struct omap_lcd_config lcd; 251 struct omap_lcd_config lcd;
252 struct omapfb_mem_desc mem_desc;
253}; 252};
254 253
255/* in arch/arm/plat-omap/fb.c */ 254/* in arch/arm/plat-omap/fb.c */