summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMagnus Damm <damm@igel.co.jp>2008-08-11 15:26:00 +0900
committerPaul Mundt <lethal@linux-sh.org>2008-08-11 20:17:55 +0900
commitce9c008c8bea25a974d9027b7c6602d535639899 (patch)
tree48fbeaad5e94498386b2bab96aef2130c28c5f4a /arch
parent0c13bf1e7c98668ce69eaedd215ec32f9e1361ae (diff)
downloadop-kernel-dev-ce9c008c8bea25a974d9027b7c6602d535639899.zip
op-kernel-dev-ce9c008c8bea25a974d9027b7c6602d535639899.tar.gz
video: export sh_mobile_lcdc panel size
Export the LCD panel size for sh_mobile_lcdc boards. This allows us to perform dpi and screen aspect ratio calculations in user space. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/sh/boards/board-ap325rxa.c4
-rw-r--r--arch/sh/boards/mach-migor/setup.c8
-rw-r--r--arch/sh/include/asm/sh_mobile_lcdc.h6
3 files changed, 18 insertions, 0 deletions
diff --git a/arch/sh/boards/board-ap325rxa.c b/arch/sh/boards/board-ap325rxa.c
index 025d4fe..fd16125 100644
--- a/arch/sh/boards/board-ap325rxa.c
+++ b/arch/sh/boards/board-ap325rxa.c
@@ -140,6 +140,10 @@ static struct sh_mobile_lcdc_info lcdc_info = {
.vsync_len = 1,
.sync = 0, /* hsync and vsync are active low */
},
+ .lcd_size_cfg = { /* 7.0 inch */
+ .width = 152,
+ .height = 91,
+ },
.board_cfg = {
.display_on = ap320_wvga_power_on,
},
diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c
index e499ee3..714dce9 100644
--- a/arch/sh/boards/mach-migor/setup.c
+++ b/arch/sh/boards/mach-migor/setup.c
@@ -224,6 +224,10 @@ static struct sh_mobile_lcdc_info sh_mobile_lcdc_info = {
.vsync_len = 2,
.sync = 0,
},
+ .lcd_size_cfg = { /* 7.0 inch */
+ .width = 152,
+ .height = 91,
+ },
}
#endif
#ifdef CONFIG_SH_MIGOR_QVGA
@@ -245,6 +249,10 @@ static struct sh_mobile_lcdc_info sh_mobile_lcdc_info = {
.vsync_len = 2,
.sync = FB_SYNC_HOR_HIGH_ACT,
},
+ .lcd_size_cfg = { /* 2.4 inch */
+ .width = 49,
+ .height = 37,
+ },
.board_cfg = {
.setup_sys = migor_lcd_qvga_setup,
},
diff --git a/arch/sh/include/asm/sh_mobile_lcdc.h b/arch/sh/include/asm/sh_mobile_lcdc.h
index 27677727..130102f 100644
--- a/arch/sh/include/asm/sh_mobile_lcdc.h
+++ b/arch/sh/include/asm/sh_mobile_lcdc.h
@@ -47,12 +47,18 @@ struct sh_mobile_lcdc_board_cfg {
void (*display_off)(void *board_data);
};
+struct sh_mobile_lcdc_lcd_size_cfg { /* width and height of panel in mm */
+ unsigned long width;
+ unsigned long height;
+};
+
struct sh_mobile_lcdc_chan_cfg {
int chan;
int bpp;
int interface_type; /* selects RGBn or SYSn I/F, see above */
int clock_divider;
struct fb_videomode lcd_cfg;
+ struct sh_mobile_lcdc_lcd_size_cfg lcd_size_cfg;
struct sh_mobile_lcdc_board_cfg board_cfg;
struct sh_mobile_lcdc_sys_bus_cfg sys_bus_cfg; /* only for SYSn I/F */
};
OpenPOWER on IntegriCloud