* [PATCH v3 0/4] video: s3c-fb: Rearrange the elements in platform data
@ 2012-03-24 16:40 Thomas Abraham
2012-03-24 16:40 ` [PATCH v3 1/4] video: s3c-fb: move video interface timing out of window setup data Thomas Abraham
` (4 more replies)
0 siblings, 5 replies; 8+ messages in thread
From: Thomas Abraham @ 2012-03-24 16:40 UTC (permalink / raw)
To: linux-arm-kernel
Changes since v2:
- Patch 3/4 is a new patch in this series. The real6410 and mini6410 boards
use the display controllers window configuration data to represent video
timing of two different lcd panels. Since the window configuration data
should be not be used to specify timing of two different panels, this has
been reworked in such a way that two instance of display controller's
platform data is setup for the two supported lcd panels. Depending on the
lcd panel specified using boot parameters, the corresponding platform data
is registered. This maintains backward compatibility with existing
functionality of supporting multiple lcd panels at runtime.
Changes since v1:
- Includes all changes suggested by Jingoo Han.
- Reworked s3c-fb platform data in all Samsung SoC based board files.
This patchset rearranges the elements in the platform data of the s3c-fb
driver with the intent of adding device tree support to the driver in
subsequent patches.
The first patch moves the video timing information from the individual window
setup data into the platform specific configuration section in the platform
data. The video timing is independent of the window setup. The resolution of
the window could be smaller than that of the lcd panel attached. So the video
timing data is removed from window configuration data.
The second patch removes the need for the 'default_win' element in the
platform data. This element was used to decide whether the video data
output from the controller should be enabled or disabled when the window
specified by 'default_win' is enabled or disabled. With the first patch
removing the need for atleast one window to be of the same resolution as
that of the lcd panel, it is now possible to decide when to enable/disable
the video data output based on the state of each window. If any of the
window is active, the lcd data output is enabled. Otherwise, the lcd data
output is disabled. Hence, the 'default_win' parameter from the platform
data can be removed, which anyways cannot be specified when using
device tree.
The third patch reworks the display controller's platform data that was
used to supply video timing information for two different panels on the
mini6410 and real6410 boards. That was not the correct usage of the window
data and hence reworks the runtime handling of two different lcd panels.
For all the Samsung SoC based boards, the forth patch reworks the platform
data of the display controller based on the changes introduced in the first
two patches.
This patch series is based on
http://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git [for-next]
with all patches merged from
https://github.com/schandinat/linux-2.6.git [fbdev-next]
and tested one Exynos4210 based Origen board (only compile tested for
other boards)
Thomas Abraham (4):
video: s3c-fb: move video interface timing out of window setup data
video: s3c-fb: remove 'default_win' element from platform data
ARM: s3c64xx: Decouple lcd type from display controller window data
ARM: Samsung: Rework platform data of s3c-fb driver
arch/arm/mach-exynos/mach-nuri.c | 26 +++---
arch/arm/mach-exynos/mach-origen.c | 24 +++--
arch/arm/mach-exynos/mach-smdkv310.c | 28 ++++---
arch/arm/mach-exynos/mach-universal_c210.c | 26 +++---
arch/arm/mach-s3c24xx/mach-smdk2416.c | 27 +++---
arch/arm/mach-s3c64xx/mach-anw6410.c | 25 +++---
arch/arm/mach-s3c64xx/mach-crag6410.c | 25 +++---
arch/arm/mach-s3c64xx/mach-hmt.c | 24 +++--
arch/arm/mach-s3c64xx/mach-mini6410.c | 92 +++++++++++--------
arch/arm/mach-s3c64xx/mach-real6410.c | 90 +++++++++++--------
arch/arm/mach-s3c64xx/mach-smartq5.c | 26 +++---
arch/arm/mach-s3c64xx/mach-smartq7.c | 26 +++---
arch/arm/mach-s3c64xx/mach-smdk6410.c | 25 +++---
arch/arm/mach-s5p64x0/mach-smdk6440.c | 24 +++--
arch/arm/mach-s5p64x0/mach-smdk6450.c | 24 +++--
arch/arm/mach-s5pc100/mach-smdkc100.c | 27 +++---
arch/arm/mach-s5pv210/mach-aquila.c | 36 ++++----
arch/arm/mach-s5pv210/mach-goni.c | 26 +++---
arch/arm/mach-s5pv210/mach-smdkv210.c | 24 +++--
arch/arm/plat-samsung/include/plat/fb.h | 11 ++-
drivers/video/s3c-fb.c | 135 +++++++++++++--------------
21 files changed, 426 insertions(+), 345 deletions(-)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v3 1/4] video: s3c-fb: move video interface timing out of window setup data
2012-03-24 16:40 [PATCH v3 0/4] video: s3c-fb: Rearrange the elements in platform data Thomas Abraham
@ 2012-03-24 16:40 ` Thomas Abraham
2012-03-24 16:40 ` [PATCH v3 2/4] video: s3c-fb: remove 'default_win' element from platform data Thomas Abraham
` (3 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Thomas Abraham @ 2012-03-24 16:40 UTC (permalink / raw)
To: linux-arm-kernel
The video interface timing is independent of the window setup data.
The resolution of the window can be smaller than that of the lcd
panel to which the video data is output.
So move the video timing data from the per-window setup data to the
platform specific section in the platform data. This also removes
the restriction that atleast one window should have the same
resolution as that of the panel attached.
Cc: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Acked-by: Jingoo Han <jg1.han@samsung.com>
---
arch/arm/plat-samsung/include/plat/fb.h | 9 ++-
drivers/video/s3c-fb.c | 112 +++++++++++++++++--------------
2 files changed, 67 insertions(+), 54 deletions(-)
diff --git a/arch/arm/plat-samsung/include/plat/fb.h b/arch/arm/plat-samsung/include/plat/fb.h
index 0fedf47..39d6bd7 100644
--- a/arch/arm/plat-samsung/include/plat/fb.h
+++ b/arch/arm/plat-samsung/include/plat/fb.h
@@ -24,15 +24,16 @@
/**
* struct s3c_fb_pd_win - per window setup data
- * @win_mode: The display parameters to initialise (not for window 0)
+ * @xres : The window X size.
+ * @yres : The window Y size.
* @virtual_x: The virtual X size.
* @virtual_y: The virtual Y size.
*/
struct s3c_fb_pd_win {
- struct fb_videomode win_mode;
-
unsigned short default_bpp;
unsigned short max_bpp;
+ unsigned short xres;
+ unsigned short yres;
unsigned short virtual_x;
unsigned short virtual_y;
};
@@ -45,6 +46,7 @@ struct s3c_fb_pd_win {
* @default_win: default window layer number to be used for UI layer.
* @vidcon0: The base vidcon0 values to control the panel data format.
* @vidcon1: The base vidcon1 values to control the panel data output.
+ * @vtiming: Video timing when connected to a RGB type panel.
* @win: The setup data for each hardware window, or NULL for unused.
* @display_mode: The LCD output display mode.
*
@@ -58,6 +60,7 @@ struct s3c_fb_platdata {
void (*setup_gpio)(void);
struct s3c_fb_pd_win *win[S3C_FB_MAX_WIN];
+ struct fb_videomode *vtiming;
u32 default_win;
diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
index f310516..c94f40d 100644
--- a/drivers/video/s3c-fb.c
+++ b/drivers/video/s3c-fb.c
@@ -495,7 +495,6 @@ static int s3c_fb_set_par(struct fb_info *info)
u32 alpha = 0;
u32 data;
u32 pagewidth;
- int clkdiv;
dev_dbg(sfb->dev, "setting framebuffer parameters\n");
@@ -532,48 +531,9 @@ static int s3c_fb_set_par(struct fb_info *info)
/* disable the window whilst we update it */
writel(0, regs + WINCON(win_no));
- /* use platform specified window as the basis for the lcd timings */
-
- if (win_no = sfb->pdata->default_win) {
- clkdiv = s3c_fb_calc_pixclk(sfb, var->pixclock);
-
- data = sfb->pdata->vidcon0;
- data &= ~(VIDCON0_CLKVAL_F_MASK | VIDCON0_CLKDIR);
-
- if (clkdiv > 1)
- data |= VIDCON0_CLKVAL_F(clkdiv-1) | VIDCON0_CLKDIR;
- else
- data &= ~VIDCON0_CLKDIR; /* 1:1 clock */
-
- /* write the timing data to the panel */
-
- if (sfb->variant.is_2443)
- data |= (1 << 5);
-
- writel(data, regs + VIDCON0);
-
+ if (win_no = sfb->pdata->default_win)
s3c_fb_enable(sfb, 1);
- data = VIDTCON0_VBPD(var->upper_margin - 1) |
- VIDTCON0_VFPD(var->lower_margin - 1) |
- VIDTCON0_VSPW(var->vsync_len - 1);
-
- writel(data, regs + sfb->variant.vidtcon);
-
- data = VIDTCON1_HBPD(var->left_margin - 1) |
- VIDTCON1_HFPD(var->right_margin - 1) |
- VIDTCON1_HSPW(var->hsync_len - 1);
-
- /* VIDTCON1 */
- writel(data, regs + sfb->variant.vidtcon + 4);
-
- data = VIDTCON2_LINEVAL(var->yres - 1) |
- VIDTCON2_HOZVAL(var->xres - 1) |
- VIDTCON2_LINEVAL_E(var->yres - 1) |
- VIDTCON2_HOZVAL_E(var->xres - 1);
- writel(data, regs + sfb->variant.vidtcon + 8);
- }
-
/* write the buffer address */
/* start and end registers stride is 8 */
@@ -1144,11 +1104,11 @@ static int __devinit s3c_fb_alloc_memory(struct s3c_fb *sfb,
dev_dbg(sfb->dev, "allocating memory for display\n");
- real_size = windata->win_mode.xres * windata->win_mode.yres;
+ real_size = windata->xres * windata->yres;
virt_size = windata->virtual_x * windata->virtual_y;
dev_dbg(sfb->dev, "real_size=%u (%u.%u), virt_size=%u (%u.%u)\n",
- real_size, windata->win_mode.xres, windata->win_mode.yres,
+ real_size, windata->xres, windata->yres,
virt_size, windata->virtual_x, windata->virtual_y);
size = (real_size > virt_size) ? real_size : virt_size;
@@ -1230,7 +1190,7 @@ static int __devinit s3c_fb_probe_win(struct s3c_fb *sfb, unsigned int win_no,
struct s3c_fb_win **res)
{
struct fb_var_screeninfo *var;
- struct fb_videomode *initmode;
+ struct fb_videomode initmode;
struct s3c_fb_pd_win *windata;
struct s3c_fb_win *win;
struct fb_info *fbinfo;
@@ -1251,11 +1211,11 @@ static int __devinit s3c_fb_probe_win(struct s3c_fb *sfb, unsigned int win_no,
}
windata = sfb->pdata->win[win_no];
- initmode = &windata->win_mode;
+ initmode = *sfb->pdata->vtiming;
WARN_ON(windata->max_bpp = 0);
- WARN_ON(windata->win_mode.xres = 0);
- WARN_ON(windata->win_mode.yres = 0);
+ WARN_ON(windata->xres = 0);
+ WARN_ON(windata->yres = 0);
win = fbinfo->par;
*res = win;
@@ -1294,7 +1254,9 @@ static int __devinit s3c_fb_probe_win(struct s3c_fb *sfb, unsigned int win_no,
}
/* setup the initial video mode from the window */
- fb_videomode_to_var(&fbinfo->var, initmode);
+ initmode.xres = windata->xres;
+ initmode.yres = windata->yres;
+ fb_videomode_to_var(&fbinfo->var, &initmode);
fbinfo->fix.type = FB_TYPE_PACKED_PIXELS;
fbinfo->fix.accel = FB_ACCEL_NONE;
@@ -1339,6 +1301,53 @@ static int __devinit s3c_fb_probe_win(struct s3c_fb *sfb, unsigned int win_no,
}
/**
+ * s3c_fb_set_rgb_timing() - set video timing for rgb interface.
+ * @sfb: The base resources for the hardware.
+ *
+ * Set horizontal and vertical lcd rgb interface timing.
+ */
+static void s3c_fb_set_rgb_timing(struct s3c_fb *sfb)
+{
+ struct fb_videomode *vmode = sfb->pdata->vtiming;
+ void __iomem *regs = sfb->regs;
+ int clkdiv;
+ u32 data;
+
+ if (!vmode->pixclock)
+ s3c_fb_missing_pixclock(vmode);
+
+ clkdiv = s3c_fb_calc_pixclk(sfb, vmode->pixclock);
+
+ data = sfb->pdata->vidcon0;
+ data &= ~(VIDCON0_CLKVAL_F_MASK | VIDCON0_CLKDIR);
+
+ if (clkdiv > 1)
+ data |= VIDCON0_CLKVAL_F(clkdiv-1) | VIDCON0_CLKDIR;
+ else
+ data &= ~VIDCON0_CLKDIR; /* 1:1 clock */
+
+ if (sfb->variant.is_2443)
+ data |= (1 << 5);
+ writel(data, regs + VIDCON0);
+
+ data = VIDTCON0_VBPD(vmode->upper_margin - 1) |
+ VIDTCON0_VFPD(vmode->lower_margin - 1) |
+ VIDTCON0_VSPW(vmode->vsync_len - 1);
+ writel(data, regs + sfb->variant.vidtcon);
+
+ data = VIDTCON1_HBPD(vmode->left_margin - 1) |
+ VIDTCON1_HFPD(vmode->right_margin - 1) |
+ VIDTCON1_HSPW(vmode->hsync_len - 1);
+ writel(data, regs + sfb->variant.vidtcon + 4);
+
+ data = VIDTCON2_LINEVAL(vmode->yres - 1) |
+ VIDTCON2_HOZVAL(vmode->xres - 1) |
+ VIDTCON2_LINEVAL_E(vmode->yres - 1) |
+ VIDTCON2_HOZVAL_E(vmode->xres - 1);
+ writel(data, regs + sfb->variant.vidtcon + 8);
+}
+
+/**
* s3c_fb_clear_win() - clear hardware window registers.
* @sfb: The base resources for the hardware.
* @win: The window to process.
@@ -1481,15 +1490,14 @@ static int __devinit s3c_fb_probe(struct platform_device *pdev)
writel(0xffffff, regs + WKEYCON1);
}
+ s3c_fb_set_rgb_timing(sfb);
+
/* we have the register setup, start allocating framebuffers */
for (win = 0; win < fbdrv->variant.nr_windows; win++) {
if (!pd->win[win])
continue;
- if (!pd->win[win]->win_mode.pixclock)
- s3c_fb_missing_pixclock(&pd->win[win]->win_mode);
-
ret = s3c_fb_probe_win(sfb, win, fbdrv->win[win],
&sfb->windows[win]);
if (ret < 0) {
@@ -1623,6 +1631,8 @@ static int s3c_fb_resume(struct device *dev)
shadow_protect_win(win, 0);
}
+ s3c_fb_set_rgb_timing(sfb);
+
/* restore framebuffers */
for (win_no = 0; win_no < S3C_FB_MAX_WIN; win_no++) {
win = sfb->windows[win_no];
--
1.6.6.rc2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v3 2/4] video: s3c-fb: remove 'default_win' element from platform data
2012-03-24 16:40 [PATCH v3 0/4] video: s3c-fb: Rearrange the elements in platform data Thomas Abraham
2012-03-24 16:40 ` [PATCH v3 1/4] video: s3c-fb: move video interface timing out of window setup data Thomas Abraham
@ 2012-03-24 16:40 ` Thomas Abraham
2012-03-24 16:40 ` [PATCH v3 3/4] ARM: s3c64xx: Decouple lcd type from display controller window data Thomas Abraham
` (2 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Thomas Abraham @ 2012-03-24 16:40 UTC (permalink / raw)
To: linux-arm-kernel
The decision to enable or disable the data output to the lcd panel from
the controller need not be based on the value of 'default_win' element
in the platform data. Instead, the data output to the panel is enabled
if any of the windows are active, else data output is disabled.
Cc: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
---
arch/arm/plat-samsung/include/plat/fb.h | 2 --
drivers/video/s3c-fb.c | 25 +++++--------------------
2 files changed, 5 insertions(+), 22 deletions(-)
diff --git a/arch/arm/plat-samsung/include/plat/fb.h b/arch/arm/plat-samsung/include/plat/fb.h
index 39d6bd7..536002f 100644
--- a/arch/arm/plat-samsung/include/plat/fb.h
+++ b/arch/arm/plat-samsung/include/plat/fb.h
@@ -62,8 +62,6 @@ struct s3c_fb_platdata {
struct s3c_fb_pd_win *win[S3C_FB_MAX_WIN];
struct fb_videomode *vtiming;
- u32 default_win;
-
u32 vidcon0;
u32 vidcon1;
};
diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
index c94f40d..18c84b8 100644
--- a/drivers/video/s3c-fb.c
+++ b/drivers/video/s3c-fb.c
@@ -531,7 +531,7 @@ static int s3c_fb_set_par(struct fb_info *info)
/* disable the window whilst we update it */
writel(0, regs + WINCON(win_no));
- if (win_no = sfb->pdata->default_win)
+ if (!sfb->output_on)
s3c_fb_enable(sfb, 1);
/* write the buffer address */
@@ -799,6 +799,7 @@ static int s3c_fb_blank(int blank_mode, struct fb_info *info)
struct s3c_fb *sfb = win->parent;
unsigned int index = win->index;
u32 wincon;
+ u32 output_on = sfb->output_on;
dev_dbg(sfb->dev, "blank mode %d\n", blank_mode);
@@ -837,34 +838,18 @@ static int s3c_fb_blank(int blank_mode, struct fb_info *info)
shadow_protect_win(win, 1);
writel(wincon, sfb->regs + sfb->variant.wincon + (index * 4));
- shadow_protect_win(win, 0);
/* Check the enabled state to see if we need to be running the
* main LCD interface, as if there are no active windows then
* it is highly likely that we also do not need to output
* anything.
*/
-
- /* We could do something like the following code, but the current
- * system of using framebuffer events means that we cannot make
- * the distinction between just window 0 being inactive and all
- * the windows being down.
- *
- * s3c_fb_enable(sfb, sfb->enabled ? 1 : 0);
- */
-
- /* we're stuck with this until we can do something about overriding
- * the power control using the blanking event for a single fb.
- */
- if (index = sfb->pdata->default_win) {
- shadow_protect_win(win, 1);
- s3c_fb_enable(sfb, blank_mode != FB_BLANK_POWERDOWN ? 1 : 0);
- shadow_protect_win(win, 0);
- }
+ s3c_fb_enable(sfb, sfb->enabled ? 1 : 0);
+ shadow_protect_win(win, 0);
pm_runtime_put_sync(sfb->dev);
- return 0;
+ return output_on = sfb->output_on;
}
/**
--
1.6.6.rc2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v3 3/4] ARM: s3c64xx: Decouple lcd type from display controller window data
2012-03-24 16:40 [PATCH v3 0/4] video: s3c-fb: Rearrange the elements in platform data Thomas Abraham
2012-03-24 16:40 ` [PATCH v3 1/4] video: s3c-fb: move video interface timing out of window setup data Thomas Abraham
2012-03-24 16:40 ` [PATCH v3 2/4] video: s3c-fb: remove 'default_win' element from platform data Thomas Abraham
@ 2012-03-24 16:40 ` Thomas Abraham
2012-03-28 10:07 ` Jingoo Han
2012-03-24 16:40 ` [PATCH v3 4/4] ARM: Samsung: Rework platform data of s3c-fb driver Thomas Abraham
2012-04-12 2:20 ` [PATCH v3 0/4] video: s3c-fb: Rearrange the elements in platform data Florian Tobias Schandinat
4 siblings, 1 reply; 8+ messages in thread
From: Thomas Abraham @ 2012-03-24 16:40 UTC (permalink / raw)
To: linux-arm-kernel
The display controller window data should contain window configuration data
for only one type of lcd panel. So, for real6410 and mini6410 boards, split
the existing display controller window data, which contains window
configuration data for two different types of lcd panels, into two seperate
instances and register one of them depending on the type of the lcd panel
detected at runtime.
This is a prerequisite change for a subsequent commit that reorders the
platform data of display controller by moving video interface timing out
of window setup data.
Cc: Darius Augulis <augulis.darius@gmail.com>
Cc: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
---
arch/arm/mach-s3c64xx/mach-mini6410.c | 82 +++++++++++++++++---------------
arch/arm/mach-s3c64xx/mach-real6410.c | 82 +++++++++++++++++---------------
2 files changed, 88 insertions(+), 76 deletions(-)
diff --git a/arch/arm/mach-s3c64xx/mach-mini6410.c b/arch/arm/mach-s3c64xx/mach-mini6410.c
index c34c2ab..34f5195 100644
--- a/arch/arm/mach-s3c64xx/mach-mini6410.c
+++ b/arch/arm/mach-s3c64xx/mach-mini6410.c
@@ -151,41 +151,49 @@ static struct s3c2410_platform_nand mini6410_nand_info = {
.sets = mini6410_nand_sets,
};
-static struct s3c_fb_pd_win mini6410_fb_win[] = {
- {
- .win_mode = { /* 4.3" 480x272 */
- .left_margin = 3,
- .right_margin = 2,
- .upper_margin = 1,
- .lower_margin = 1,
- .hsync_len = 40,
- .vsync_len = 1,
- .xres = 480,
- .yres = 272,
- },
- .max_bpp = 32,
- .default_bpp = 16,
- }, {
- .win_mode = { /* 7.0" 800x480 */
- .left_margin = 8,
- .right_margin = 13,
- .upper_margin = 7,
- .lower_margin = 5,
- .hsync_len = 3,
- .vsync_len = 1,
- .xres = 800,
- .yres = 480,
- },
- .max_bpp = 32,
- .default_bpp = 16,
+static struct s3c_fb_pd_win mini6410_lcd_type0_fb_win = {
+ .win_mode = { /* 4.3" 480x272 */
+ .left_margin = 3,
+ .right_margin = 2,
+ .upper_margin = 1,
+ .lower_margin = 1,
+ .hsync_len = 40,
+ .vsync_len = 1,
+ .xres = 480,
+ .yres = 272,
},
+ .max_bpp = 32,
+ .default_bpp = 16,
};
-static struct s3c_fb_platdata mini6410_lcd_pdata __initdata = {
- .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
- .win[0] = &mini6410_fb_win[0],
- .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
- .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
+static struct s3c_fb_pd_win mini6410_lcd_type1_fb_win = {
+ .win_mode = { /* 7.0" 800x480 */
+ .left_margin = 8,
+ .right_margin = 13,
+ .upper_margin = 7,
+ .lower_margin = 5,
+ .hsync_len = 3,
+ .vsync_len = 1,
+ .xres = 800,
+ .yres = 480,
+ },
+ .max_bpp = 32,
+ .default_bpp = 16,
+};
+
+static struct s3c_fb_platdata mini6410_lcd_pdata[] __initdata = {
+ {
+ .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
+ .win[0] = &mini6410_lcd_type0_fb_win,
+ .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
+ .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
+ }, {
+ .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
+ .win[0] = &mini6410_lcd_type1_fb_win,
+ .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
+ .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
+ },
+ { },
};
static void mini6410_lcd_power_set(struct plat_lcd_data *pd,
@@ -283,7 +291,7 @@ static void mini6410_parse_features(
"screen type already set\n", f);
} else {
int li = f - '0';
- if (li >= ARRAY_SIZE(mini6410_fb_win))
+ if (li >= ARRAY_SIZE(mini6410_lcd_pdata))
printk(KERN_INFO "MINI6410: '%c' out "
"of range LCD mode\n", f);
else {
@@ -307,14 +315,12 @@ static void __init mini6410_machine_init(void)
/* Parse the feature string */
mini6410_parse_features(&features, mini6410_features_str);
- mini6410_lcd_pdata.win[0] = &mini6410_fb_win[features.lcd_index];
-
printk(KERN_INFO "MINI6410: selected LCD display is %dx%d\n",
- mini6410_lcd_pdata.win[0]->win_mode.xres,
- mini6410_lcd_pdata.win[0]->win_mode.yres);
+ mini6410_lcd_pdata[features.lcd_index].win[0]->win_mode.xres,
+ mini6410_lcd_pdata[features.lcd_index].win[0]->win_mode.yres);
s3c_nand_set_platdata(&mini6410_nand_info);
- s3c_fb_set_platdata(&mini6410_lcd_pdata);
+ s3c_fb_set_platdata(&mini6410_lcd_pdata[features.lcd_index]);
s3c24xx_ts_set_platdata(NULL);
/* configure nCS1 width to 16 bits */
diff --git a/arch/arm/mach-s3c64xx/mach-real6410.c b/arch/arm/mach-s3c64xx/mach-real6410.c
index be2a9a2..21f91e5 100644
--- a/arch/arm/mach-s3c64xx/mach-real6410.c
+++ b/arch/arm/mach-s3c64xx/mach-real6410.c
@@ -117,41 +117,49 @@ static struct platform_device real6410_device_eth = {
},
};
-static struct s3c_fb_pd_win real6410_fb_win[] = {
- {
- .win_mode = { /* 4.3" 480x272 */
- .left_margin = 3,
- .right_margin = 2,
- .upper_margin = 1,
- .lower_margin = 1,
- .hsync_len = 40,
- .vsync_len = 1,
- .xres = 480,
- .yres = 272,
- },
- .max_bpp = 32,
- .default_bpp = 16,
- }, {
- .win_mode = { /* 7.0" 800x480 */
- .left_margin = 8,
- .right_margin = 13,
- .upper_margin = 7,
- .lower_margin = 5,
- .hsync_len = 3,
- .vsync_len = 1,
- .xres = 800,
- .yres = 480,
- },
- .max_bpp = 32,
- .default_bpp = 16,
+static struct s3c_fb_pd_win real6410_lcd_type0_fb_win = {
+ .win_mode = { /* 4.3" 480x272 */
+ .left_margin = 3,
+ .right_margin = 2,
+ .upper_margin = 1,
+ .lower_margin = 1,
+ .hsync_len = 40,
+ .vsync_len = 1,
+ .xres = 480,
+ .yres = 272,
},
+ .max_bpp = 32,
+ .default_bpp = 16,
};
-static struct s3c_fb_platdata real6410_lcd_pdata __initdata = {
- .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
- .win[0] = &real6410_fb_win[0],
- .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
- .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
+static struct s3c_fb_pd_win real6410_lcd_type1_fb_win = {
+ .win_mode = { /* 7.0" 800x480 */
+ .left_margin = 8,
+ .right_margin = 13,
+ .upper_margin = 7,
+ .lower_margin = 5,
+ .hsync_len = 3,
+ .vsync_len = 1,
+ .xres = 800,
+ .yres = 480,
+ },
+ .max_bpp = 32,
+ .default_bpp = 16,
+};
+
+static struct s3c_fb_platdata real6410_lcd_pdata[] __initdata = {
+ {
+ .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
+ .win[0] = &real6410_lcd_type0_fb_win,
+ .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
+ .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
+ }, {
+ .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
+ .win[0] = &real6410_lcd_type1_fb_win,
+ .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
+ .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
+ },
+ { },
};
static struct mtd_partition real6410_nand_part[] = {
@@ -264,7 +272,7 @@ static void real6410_parse_features(
"screen type already set\n", f);
} else {
int li = f - '0';
- if (li >= ARRAY_SIZE(real6410_fb_win))
+ if (li >= ARRAY_SIZE(real6410_lcd_pdata))
printk(KERN_INFO "REAL6410: '%c' out "
"of range LCD mode\n", f);
else {
@@ -288,13 +296,11 @@ static void __init real6410_machine_init(void)
/* Parse the feature string */
real6410_parse_features(&features, real6410_features_str);
- real6410_lcd_pdata.win[0] = &real6410_fb_win[features.lcd_index];
-
printk(KERN_INFO "REAL6410: selected LCD display is %dx%d\n",
- real6410_lcd_pdata.win[0]->win_mode.xres,
- real6410_lcd_pdata.win[0]->win_mode.yres);
+ real6410_lcd_pdata[features.lcd_index].win[0]->win_mode.xres,
+ real6410_lcd_pdata[features.lcd_index].win[0]->win_mode.yres);
- s3c_fb_set_platdata(&real6410_lcd_pdata);
+ s3c_fb_set_platdata(&real6410_lcd_pdata[features.lcd_index]);
s3c_nand_set_platdata(&real6410_nand_info);
s3c24xx_ts_set_platdata(NULL);
--
1.6.6.rc2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v3 4/4] ARM: Samsung: Rework platform data of s3c-fb driver
2012-03-24 16:40 [PATCH v3 0/4] video: s3c-fb: Rearrange the elements in platform data Thomas Abraham
` (2 preceding siblings ...)
2012-03-24 16:40 ` [PATCH v3 3/4] ARM: s3c64xx: Decouple lcd type from display controller window data Thomas Abraham
@ 2012-03-24 16:40 ` Thomas Abraham
2012-03-28 10:07 ` Jingoo Han
2012-04-12 2:20 ` [PATCH v3 0/4] video: s3c-fb: Rearrange the elements in platform data Florian Tobias Schandinat
4 siblings, 1 reply; 8+ messages in thread
From: Thomas Abraham @ 2012-03-24 16:40 UTC (permalink / raw)
To: linux-arm-kernel
For all the Samsung SoC based boards which have the platform data for
s3c-fb driver, the 'default_win' element in the platform data is removed
and the lcd panel video timing values are moved out of individual window
configuration data.
Cc: Jingoo Han <jg1.han@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: JeongHyeon Kim <jhkim@insignal.co.kr>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Kwangwoo Lee <kwangwoo.lee@gmail.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Peter Korsgaard <jacmet@sunsite.dk>
Cc: Darius Augulis <augulis.darius@gmail.com>
Cc: Maurus Cuelenaere <mcuelenaere@gmail.com>
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
---
arch/arm/mach-exynos/mach-nuri.c | 26 ++++++++------
arch/arm/mach-exynos/mach-origen.c | 24 +++++++-----
arch/arm/mach-exynos/mach-smdkv310.c | 28 ++++++++------
arch/arm/mach-exynos/mach-universal_c210.c | 26 ++++++++------
arch/arm/mach-s3c24xx/mach-smdk2416.c | 27 ++++++++------
arch/arm/mach-s3c64xx/mach-anw6410.c | 25 +++++++------
arch/arm/mach-s3c64xx/mach-crag6410.c | 25 +++++++------
arch/arm/mach-s3c64xx/mach-hmt.c | 24 +++++++-----
arch/arm/mach-s3c64xx/mach-mini6410.c | 54 ++++++++++++++++-----------
arch/arm/mach-s3c64xx/mach-real6410.c | 52 +++++++++++++++-----------
arch/arm/mach-s3c64xx/mach-smartq5.c | 26 ++++++++------
arch/arm/mach-s3c64xx/mach-smartq7.c | 26 ++++++++------
arch/arm/mach-s3c64xx/mach-smdk6410.c | 25 +++++++------
arch/arm/mach-s5p64x0/mach-smdk6440.c | 24 +++++++-----
arch/arm/mach-s5p64x0/mach-smdk6450.c | 24 +++++++-----
arch/arm/mach-s5pc100/mach-smdkc100.c | 27 ++++++++------
arch/arm/mach-s5pv210/mach-aquila.c | 36 ++++++++----------
arch/arm/mach-s5pv210/mach-goni.c | 26 ++++++++------
arch/arm/mach-s5pv210/mach-smdkv210.c | 24 +++++++-----
19 files changed, 311 insertions(+), 238 deletions(-)
diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-nuri.c
index 7ac81ce..a7e6731 100644
--- a/arch/arm/mach-exynos/mach-nuri.c
+++ b/arch/arm/mach-exynos/mach-nuri.c
@@ -212,25 +212,29 @@ static struct platform_device nuri_gpio_keys = {
/* Frame Buffer */
static struct s3c_fb_pd_win nuri_fb_win0 = {
- .win_mode = {
- .left_margin = 64,
- .right_margin = 16,
- .upper_margin = 64,
- .lower_margin = 1,
- .hsync_len = 48,
- .vsync_len = 3,
- .xres = 1024,
- .yres = 600,
- .refresh = 60,
- },
.max_bpp = 24,
.default_bpp = 16,
+ .xres = 1024,
+ .yres = 600,
.virtual_x = 1024,
.virtual_y = 2 * 600,
};
+static struct fb_videomode nuri_lcd_timing = {
+ .left_margin = 64,
+ .right_margin = 16,
+ .upper_margin = 64,
+ .lower_margin = 1,
+ .hsync_len = 48,
+ .vsync_len = 3,
+ .xres = 1024,
+ .yres = 600,
+ .refresh = 60,
+};
+
static struct s3c_fb_platdata nuri_fb_pdata __initdata = {
.win[0] = &nuri_fb_win0,
+ .vtiming = &nuri_lcd_timing,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB |
VIDCON0_CLKSEL_LCD,
.vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c
index 25c9b46..de71237 100644
--- a/arch/arm/mach-exynos/mach-origen.c
+++ b/arch/arm/mach-exynos/mach-origen.c
@@ -583,22 +583,26 @@ static struct platform_device origen_lcd_hv070wsa = {
};
static struct s3c_fb_pd_win origen_fb_win0 = {
- .win_mode = {
- .left_margin = 64,
- .right_margin = 16,
- .upper_margin = 64,
- .lower_margin = 16,
- .hsync_len = 48,
- .vsync_len = 3,
- .xres = 1024,
- .yres = 600,
- },
+ .xres = 1024,
+ .yres = 600,
.max_bpp = 32,
.default_bpp = 24,
};
+static struct fb_videomode origen_lcd_timing = {
+ .left_margin = 64,
+ .right_margin = 16,
+ .upper_margin = 64,
+ .lower_margin = 16,
+ .hsync_len = 48,
+ .vsync_len = 3,
+ .xres = 1024,
+ .yres = 600,
+};
+
static struct s3c_fb_platdata origen_lcd_pdata __initdata = {
.win[0] = &origen_fb_win0,
+ .vtiming = &origen_lcd_timing,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
.vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC |
VIDCON1_INV_VCLK,
diff --git a/arch/arm/mach-exynos/mach-smdkv310.c b/arch/arm/mach-exynos/mach-smdkv310.c
index f08529f..6c00fa6 100644
--- a/arch/arm/mach-exynos/mach-smdkv310.c
+++ b/arch/arm/mach-exynos/mach-smdkv310.c
@@ -157,22 +157,26 @@ static struct platform_device smdkv310_lcd_lte480wv = {
};
static struct s3c_fb_pd_win smdkv310_fb_win0 = {
- .win_mode = {
- .left_margin = 13,
- .right_margin = 8,
- .upper_margin = 7,
- .lower_margin = 5,
- .hsync_len = 3,
- .vsync_len = 1,
- .xres = 800,
- .yres = 480,
- },
- .max_bpp = 32,
- .default_bpp = 24,
+ .max_bpp = 32,
+ .default_bpp = 24,
+ .xres = 800,
+ .yres = 480,
+};
+
+static struct fb_videomode smdkv310_lcd_timing = {
+ .left_margin = 13,
+ .right_margin = 8,
+ .upper_margin = 7,
+ .lower_margin = 5,
+ .hsync_len = 3,
+ .vsync_len = 1,
+ .xres = 800,
+ .yres = 480,
};
static struct s3c_fb_platdata smdkv310_lcd0_pdata __initdata = {
.win[0] = &smdkv310_fb_win0,
+ .vtiming = &smdkv310_lcd_timing,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
.vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
.setup_gpio = exynos4_fimd0_gpio_setup_24bpp,
diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach-exynos/mach-universal_c210.c
index 57e4418..67a9547 100644
--- a/arch/arm/mach-exynos/mach-universal_c210.c
+++ b/arch/arm/mach-exynos/mach-universal_c210.c
@@ -813,25 +813,29 @@ static struct i2c_board_info i2c1_devs[] __initdata = {
/* Frame Buffer */
static struct s3c_fb_pd_win universal_fb_win0 = {
- .win_mode = {
- .left_margin = 16,
- .right_margin = 16,
- .upper_margin = 2,
- .lower_margin = 28,
- .hsync_len = 2,
- .vsync_len = 1,
- .xres = 480,
- .yres = 800,
- .refresh = 55,
- },
.max_bpp = 32,
.default_bpp = 16,
+ .xres = 480,
+ .yres = 800,
.virtual_x = 480,
.virtual_y = 2 * 800,
};
+static struct fb_videomode universal_lcd_timing = {
+ .left_margin = 16,
+ .right_margin = 16,
+ .upper_margin = 2,
+ .lower_margin = 28,
+ .hsync_len = 2,
+ .vsync_len = 1,
+ .xres = 480,
+ .yres = 800,
+ .refresh = 55,
+};
+
static struct s3c_fb_platdata universal_lcd_pdata __initdata = {
.win[0] = &universal_fb_win0,
+ .vtiming = &universal_lcd_timing,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB |
VIDCON0_CLKSEL_LCD,
.vidcon1 = VIDCON1_INV_VCLK | VIDCON1_INV_VDEN
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2416.c b/arch/arm/mach-s3c24xx/mach-smdk2416.c
index 30a44f8..c3100a0 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2416.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2416.c
@@ -148,23 +148,25 @@ static struct s3c24xx_hsudc_platdata smdk2416_hsudc_platdata = {
static struct s3c_fb_pd_win smdk2416_fb_win[] = {
[0] = {
- /* think this is the same as the smdk6410 */
- .win_mode = {
- .pixclock = 41094,
- .left_margin = 8,
- .right_margin = 13,
- .upper_margin = 7,
- .lower_margin = 5,
- .hsync_len = 3,
- .vsync_len = 1,
- .xres = 800,
- .yres = 480,
- },
.default_bpp = 16,
.max_bpp = 32,
+ .xres = 800,
+ .yres = 480,
},
};
+static struct fb_videomode smdk2416_lcd_timing = {
+ .pixclock = 41094,
+ .left_margin = 8,
+ .right_margin = 13,
+ .upper_margin = 7,
+ .lower_margin = 5,
+ .hsync_len = 3,
+ .vsync_len = 1,
+ .xres = 800,
+ .yres = 480,
+};
+
static void s3c2416_fb_gpio_setup_24bpp(void)
{
unsigned int gpio;
@@ -187,6 +189,7 @@ static void s3c2416_fb_gpio_setup_24bpp(void)
static struct s3c_fb_platdata smdk2416_fb_platdata = {
.win[0] = &smdk2416_fb_win[0],
+ .vtiming = &smdk2416_lcd_timing,
.setup_gpio = s3c2416_fb_gpio_setup_24bpp,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
.vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
diff --git a/arch/arm/mach-s3c64xx/mach-anw6410.c b/arch/arm/mach-s3c64xx/mach-anw6410.c
index b86f277..58fd0e3 100644
--- a/arch/arm/mach-s3c64xx/mach-anw6410.c
+++ b/arch/arm/mach-s3c64xx/mach-anw6410.c
@@ -134,24 +134,27 @@ static struct platform_device anw6410_lcd_powerdev = {
};
static struct s3c_fb_pd_win anw6410_fb_win0 = {
- /* this is to ensure we use win0 */
- .win_mode = {
- .left_margin = 8,
- .right_margin = 13,
- .upper_margin = 7,
- .lower_margin = 5,
- .hsync_len = 3,
- .vsync_len = 1,
- .xres = 800,
- .yres = 480,
- },
.max_bpp = 32,
.default_bpp = 16,
+ .xres = 800,
+ .yres = 480,
+};
+
+static struct fb_videomode anw6410_lcd_timing = {
+ .left_margin = 8,
+ .right_margin = 13,
+ .upper_margin = 7,
+ .lower_margin = 5,
+ .hsync_len = 3,
+ .vsync_len = 1,
+ .xres = 800,
+ .yres = 480,
};
/* 405566 clocks per frame => 60Hz refresh requires 24333960Hz clock */
static struct s3c_fb_platdata anw6410_lcd_pdata __initdata = {
.setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
+ .vtiming = &anw6410_lcd_timing,
.win[0] = &anw6410_fb_win0,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
.vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c
index e20bf58..c1ef57e 100644
--- a/arch/arm/mach-s3c64xx/mach-crag6410.c
+++ b/arch/arm/mach-s3c64xx/mach-crag6410.c
@@ -151,26 +151,29 @@ static struct platform_device crag6410_lcd_powerdev = {
/* 640x480 URT */
static struct s3c_fb_pd_win crag6410_fb_win0 = {
- /* this is to ensure we use win0 */
- .win_mode = {
- .left_margin = 150,
- .right_margin = 80,
- .upper_margin = 40,
- .lower_margin = 5,
- .hsync_len = 40,
- .vsync_len = 5,
- .xres = 640,
- .yres = 480,
- },
.max_bpp = 32,
.default_bpp = 16,
+ .xres = 640,
+ .yres = 480,
.virtual_y = 480 * 2,
.virtual_x = 640,
};
+static struct fb_videomode crag6410_lcd_timing = {
+ .left_margin = 150,
+ .right_margin = 80,
+ .upper_margin = 40,
+ .lower_margin = 5,
+ .hsync_len = 40,
+ .vsync_len = 5,
+ .xres = 640,
+ .yres = 480,
+};
+
/* 405566 clocks per frame => 60Hz refresh requires 24333960Hz clock */
static struct s3c_fb_platdata crag6410_lcd_pdata __initdata = {
.setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
+ .vtiming = &crag6410_lcd_timing,
.win[0] = &crag6410_fb_win0,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
.vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
diff --git a/arch/arm/mach-s3c64xx/mach-hmt.c b/arch/arm/mach-s3c64xx/mach-hmt.c
index 521e07b..4e9b1ac 100644
--- a/arch/arm/mach-s3c64xx/mach-hmt.c
+++ b/arch/arm/mach-s3c64xx/mach-hmt.c
@@ -129,23 +129,27 @@ static struct platform_device hmt_backlight_device = {
};
static struct s3c_fb_pd_win hmt_fb_win0 = {
- .win_mode = {
- .left_margin = 8,
- .right_margin = 13,
- .upper_margin = 7,
- .lower_margin = 5,
- .hsync_len = 3,
- .vsync_len = 1,
- .xres = 800,
- .yres = 480,
- },
.max_bpp = 32,
.default_bpp = 16,
+ .xres = 800,
+ .yres = 480,
+};
+
+static struct fb_videomode hmt_lcd_timing = {
+ .left_margin = 8,
+ .right_margin = 13,
+ .upper_margin = 7,
+ .lower_margin = 5,
+ .hsync_len = 3,
+ .vsync_len = 1,
+ .xres = 800,
+ .yres = 480,
};
/* 405566 clocks per frame => 60Hz refresh requires 24333960Hz clock */
static struct s3c_fb_platdata hmt_lcd_pdata __initdata = {
.setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
+ .vtiming = &hmt_lcd_timing,
.win[0] = &hmt_fb_win0,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
.vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
diff --git a/arch/arm/mach-s3c64xx/mach-mini6410.c b/arch/arm/mach-s3c64xx/mach-mini6410.c
index 34f5195..2f425d5 100644
--- a/arch/arm/mach-s3c64xx/mach-mini6410.c
+++ b/arch/arm/mach-s3c64xx/mach-mini6410.c
@@ -152,43 +152,53 @@ static struct s3c2410_platform_nand mini6410_nand_info = {
};
static struct s3c_fb_pd_win mini6410_lcd_type0_fb_win = {
- .win_mode = { /* 4.3" 480x272 */
- .left_margin = 3,
- .right_margin = 2,
- .upper_margin = 1,
- .lower_margin = 1,
- .hsync_len = 40,
- .vsync_len = 1,
- .xres = 480,
- .yres = 272,
- },
.max_bpp = 32,
.default_bpp = 16,
+ .xres = 480,
+ .yres = 272,
+};
+
+static struct fb_videomode mini6410_lcd_type0_timing = {
+ /* 4.3" 480x272 */
+ .left_margin = 3,
+ .right_margin = 2,
+ .upper_margin = 1,
+ .lower_margin = 1,
+ .hsync_len = 40,
+ .vsync_len = 1,
+ .xres = 480,
+ .yres = 272,
};
static struct s3c_fb_pd_win mini6410_lcd_type1_fb_win = {
- .win_mode = { /* 7.0" 800x480 */
- .left_margin = 8,
- .right_margin = 13,
- .upper_margin = 7,
- .lower_margin = 5,
- .hsync_len = 3,
- .vsync_len = 1,
- .xres = 800,
- .yres = 480,
- },
.max_bpp = 32,
.default_bpp = 16,
+ .xres = 800,
+ .yres = 480,
+};
+
+static struct fb_videomode mini6410_lcd_type1_timing = {
+ /* 7.0" 800x480 */
+ .left_margin = 8,
+ .right_margin = 13,
+ .upper_margin = 7,
+ .lower_margin = 5,
+ .hsync_len = 3,
+ .vsync_len = 1,
+ .xres = 800,
+ .yres = 480,
};
static struct s3c_fb_platdata mini6410_lcd_pdata[] __initdata = {
{
.setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
+ .vtiming = &mini6410_lcd_type0_timing,
.win[0] = &mini6410_lcd_type0_fb_win,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
.vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
}, {
.setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
+ .vtiming = &mini6410_lcd_type1_timing,
.win[0] = &mini6410_lcd_type1_fb_win,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
.vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
@@ -316,8 +326,8 @@ static void __init mini6410_machine_init(void)
mini6410_parse_features(&features, mini6410_features_str);
printk(KERN_INFO "MINI6410: selected LCD display is %dx%d\n",
- mini6410_lcd_pdata[features.lcd_index].win[0]->win_mode.xres,
- mini6410_lcd_pdata[features.lcd_index].win[0]->win_mode.yres);
+ mini6410_lcd_pdata[features.lcd_index].win[0]->xres,
+ mini6410_lcd_pdata[features.lcd_index].win[0]->yres);
s3c_nand_set_platdata(&mini6410_nand_info);
s3c_fb_set_platdata(&mini6410_lcd_pdata[features.lcd_index]);
diff --git a/arch/arm/mach-s3c64xx/mach-real6410.c b/arch/arm/mach-s3c64xx/mach-real6410.c
index 21f91e5..0fbd32c 100644
--- a/arch/arm/mach-s3c64xx/mach-real6410.c
+++ b/arch/arm/mach-s3c64xx/mach-real6410.c
@@ -118,43 +118,51 @@ static struct platform_device real6410_device_eth = {
};
static struct s3c_fb_pd_win real6410_lcd_type0_fb_win = {
- .win_mode = { /* 4.3" 480x272 */
- .left_margin = 3,
- .right_margin = 2,
- .upper_margin = 1,
- .lower_margin = 1,
- .hsync_len = 40,
- .vsync_len = 1,
- .xres = 480,
- .yres = 272,
- },
.max_bpp = 32,
.default_bpp = 16,
+ .xres = 480,
+ .yres = 272,
+};
+
+static struct fb_videomode real6410_lcd_type0_timing = {
+ /* 4.3" 480x272 */
+ .left_margin = 3,
+ .right_margin = 2,
+ .upper_margin = 1,
+ .lower_margin = 1,
+ .hsync_len = 40,
+ .vsync_len = 1,
};
static struct s3c_fb_pd_win real6410_lcd_type1_fb_win = {
- .win_mode = { /* 7.0" 800x480 */
- .left_margin = 8,
- .right_margin = 13,
- .upper_margin = 7,
- .lower_margin = 5,
- .hsync_len = 3,
- .vsync_len = 1,
- .xres = 800,
- .yres = 480,
- },
.max_bpp = 32,
.default_bpp = 16,
+ .xres = 800,
+ .yres = 480,
+};
+
+static struct fb_videomode real6410_lcd_type1_timing = {
+ /* 7.0" 800x480 */
+ .left_margin = 8,
+ .right_margin = 13,
+ .upper_margin = 7,
+ .lower_margin = 5,
+ .hsync_len = 3,
+ .vsync_len = 1,
+ .xres = 800,
+ .yres = 480,
};
static struct s3c_fb_platdata real6410_lcd_pdata[] __initdata = {
{
.setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
+ .vtiming = &real6410_lcd_type0_timing,
.win[0] = &real6410_lcd_type0_fb_win,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
.vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
}, {
.setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
+ .vtiming = &real6410_lcd_type1_timing,
.win[0] = &real6410_lcd_type1_fb_win,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
.vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
@@ -297,8 +305,8 @@ static void __init real6410_machine_init(void)
real6410_parse_features(&features, real6410_features_str);
printk(KERN_INFO "REAL6410: selected LCD display is %dx%d\n",
- real6410_lcd_pdata[features.lcd_index].win[0]->win_mode.xres,
- real6410_lcd_pdata[features.lcd_index].win[0]->win_mode.yres);
+ real6410_lcd_pdata[features.lcd_index].win[0]->xres,
+ real6410_lcd_pdata[features.lcd_index].win[0]->yres);
s3c_fb_set_platdata(&real6410_lcd_pdata[features.lcd_index]);
s3c_nand_set_platdata(&real6410_nand_info);
diff --git a/arch/arm/mach-s3c64xx/mach-smartq5.c b/arch/arm/mach-s3c64xx/mach-smartq5.c
index 3f42431..03a2f88 100644
--- a/arch/arm/mach-s3c64xx/mach-smartq5.c
+++ b/arch/arm/mach-s3c64xx/mach-smartq5.c
@@ -108,23 +108,27 @@ static struct platform_device smartq5_buttons_device = {
};
static struct s3c_fb_pd_win smartq5_fb_win0 = {
- .win_mode = {
- .left_margin = 216,
- .right_margin = 40,
- .upper_margin = 35,
- .lower_margin = 10,
- .hsync_len = 1,
- .vsync_len = 1,
- .xres = 800,
- .yres = 480,
- .refresh = 80,
- },
.max_bpp = 32,
.default_bpp = 16,
+ .xres = 800,
+ .yres = 480,
+};
+
+static struct fb_videomode smartq5_lcd_timing = {
+ .left_margin = 216,
+ .right_margin = 40,
+ .upper_margin = 35,
+ .lower_margin = 10,
+ .hsync_len = 1,
+ .vsync_len = 1,
+ .xres = 800,
+ .yres = 480,
+ .refresh = 80,
};
static struct s3c_fb_platdata smartq5_lcd_pdata __initdata = {
.setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
+ .vtiming = &smartq5_lcd_timing,
.win[0] = &smartq5_fb_win0,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
.vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC |
diff --git a/arch/arm/mach-s3c64xx/mach-smartq7.c b/arch/arm/mach-s3c64xx/mach-smartq7.c
index e5c09b6..4e3b038 100644
--- a/arch/arm/mach-s3c64xx/mach-smartq7.c
+++ b/arch/arm/mach-s3c64xx/mach-smartq7.c
@@ -124,23 +124,27 @@ static struct platform_device smartq7_buttons_device = {
};
static struct s3c_fb_pd_win smartq7_fb_win0 = {
- .win_mode = {
- .left_margin = 3,
- .right_margin = 5,
- .upper_margin = 1,
- .lower_margin = 20,
- .hsync_len = 10,
- .vsync_len = 3,
- .xres = 800,
- .yres = 480,
- .refresh = 80,
- },
.max_bpp = 32,
.default_bpp = 16,
+ .xres = 800,
+ .yres = 480,
+};
+
+static struct fb_videomode smartq7_lcd_timing = {
+ .left_margin = 3,
+ .right_margin = 5,
+ .upper_margin = 1,
+ .lower_margin = 20,
+ .hsync_len = 10,
+ .vsync_len = 3,
+ .xres = 800,
+ .yres = 480,
+ .refresh = 80,
};
static struct s3c_fb_platdata smartq7_lcd_pdata __initdata = {
.setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
+ .vtiming = &smartq7_lcd_timing,
.win[0] = &smartq7_fb_win0,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
.vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC |
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c
index d55bc96..3cfc90f 100644
--- a/arch/arm/mach-s3c64xx/mach-smdk6410.c
+++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c
@@ -146,26 +146,29 @@ static struct platform_device smdk6410_lcd_powerdev = {
};
static struct s3c_fb_pd_win smdk6410_fb_win0 = {
- /* this is to ensure we use win0 */
- .win_mode = {
- .left_margin = 8,
- .right_margin = 13,
- .upper_margin = 7,
- .lower_margin = 5,
- .hsync_len = 3,
- .vsync_len = 1,
- .xres = 800,
- .yres = 480,
- },
.max_bpp = 32,
.default_bpp = 16,
+ .xres = 800,
+ .yres = 480,
.virtual_y = 480 * 2,
.virtual_x = 800,
};
+static struct fb_videomode smdk6410_lcd_timing = {
+ .left_margin = 8,
+ .right_margin = 13,
+ .upper_margin = 7,
+ .lower_margin = 5,
+ .hsync_len = 3,
+ .vsync_len = 1,
+ .xres = 800,
+ .yres = 480,
+};
+
/* 405566 clocks per frame => 60Hz refresh requires 24333960Hz clock */
static struct s3c_fb_platdata smdk6410_lcd_pdata __initdata = {
.setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
+ .vtiming = &smdk6410_lcd_timing,
.win[0] = &smdk6410_fb_win0,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
.vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
diff --git a/arch/arm/mach-s5p64x0/mach-smdk6440.c b/arch/arm/mach-s5p64x0/mach-smdk6440.c
index a40e325..92fefad 100644
--- a/arch/arm/mach-s5p64x0/mach-smdk6440.c
+++ b/arch/arm/mach-s5p64x0/mach-smdk6440.c
@@ -103,22 +103,26 @@ static struct s3c2410_uartcfg smdk6440_uartcfgs[] __initdata = {
/* Frame Buffer */
static struct s3c_fb_pd_win smdk6440_fb_win0 = {
- .win_mode = {
- .left_margin = 8,
- .right_margin = 13,
- .upper_margin = 7,
- .lower_margin = 5,
- .hsync_len = 3,
- .vsync_len = 1,
- .xres = 800,
- .yres = 480,
- },
.max_bpp = 32,
.default_bpp = 24,
+ .xres = 800,
+ .yres = 480,
+};
+
+static struct fb_videomode smdk6440_lcd_timing = {
+ .left_margin = 8,
+ .right_margin = 13,
+ .upper_margin = 7,
+ .lower_margin = 5,
+ .hsync_len = 3,
+ .vsync_len = 1,
+ .xres = 800,
+ .yres = 480,
};
static struct s3c_fb_platdata smdk6440_lcd_pdata __initdata = {
.win[0] = &smdk6440_fb_win0,
+ .vtiming = &smdk6440_lcd_timing,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
.vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
.setup_gpio = s5p64x0_fb_gpio_setup_24bpp,
diff --git a/arch/arm/mach-s5p64x0/mach-smdk6450.c b/arch/arm/mach-s5p64x0/mach-smdk6450.c
index efb69e2..e2335ec 100644
--- a/arch/arm/mach-s5p64x0/mach-smdk6450.c
+++ b/arch/arm/mach-s5p64x0/mach-smdk6450.c
@@ -121,22 +121,26 @@ static struct s3c2410_uartcfg smdk6450_uartcfgs[] __initdata = {
/* Frame Buffer */
static struct s3c_fb_pd_win smdk6450_fb_win0 = {
- .win_mode = {
- .left_margin = 8,
- .right_margin = 13,
- .upper_margin = 7,
- .lower_margin = 5,
- .hsync_len = 3,
- .vsync_len = 1,
- .xres = 800,
- .yres = 480,
- },
.max_bpp = 32,
.default_bpp = 24,
+ .xres = 800,
+ .yres = 480,
+};
+
+static struct fb_videomode smdk6450_lcd_timing = {
+ .left_margin = 8,
+ .right_margin = 13,
+ .upper_margin = 7,
+ .lower_margin = 5,
+ .hsync_len = 3,
+ .vsync_len = 1,
+ .xres = 800,
+ .yres = 480,
};
static struct s3c_fb_platdata smdk6450_lcd_pdata __initdata = {
.win[0] = &smdk6450_fb_win0,
+ .vtiming = &smdk6450_lcd_timing,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
.vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
.setup_gpio = s5p64x0_fb_gpio_setup_24bpp,
diff --git a/arch/arm/mach-s5pc100/mach-smdkc100.c b/arch/arm/mach-s5pc100/mach-smdkc100.c
index 674d229..0c3ae38 100644
--- a/arch/arm/mach-s5pc100/mach-smdkc100.c
+++ b/arch/arm/mach-s5pc100/mach-smdkc100.c
@@ -136,24 +136,27 @@ static struct platform_device smdkc100_lcd_powerdev = {
/* Frame Buffer */
static struct s3c_fb_pd_win smdkc100_fb_win0 = {
- /* this is to ensure we use win0 */
- .win_mode = {
- .left_margin = 8,
- .right_margin = 13,
- .upper_margin = 7,
- .lower_margin = 5,
- .hsync_len = 3,
- .vsync_len = 1,
- .xres = 800,
- .yres = 480,
- .refresh = 80,
- },
.max_bpp = 32,
.default_bpp = 16,
+ .xres = 800,
+ .yres = 480,
+};
+
+static struct fb_videomode smdkc100_lcd_timing = {
+ .left_margin = 8,
+ .right_margin = 13,
+ .upper_margin = 7,
+ .lower_margin = 5,
+ .hsync_len = 3,
+ .vsync_len = 1,
+ .xres = 800,
+ .yres = 480,
+ .refresh = 80,
};
static struct s3c_fb_platdata smdkc100_lcd_pdata __initdata = {
.win[0] = &smdkc100_fb_win0,
+ .vtiming = &smdkc100_lcd_timing,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
.vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
.setup_gpio = s5pc100_fb_gpio_setup_24bpp,
diff --git a/arch/arm/mach-s5pv210/mach-aquila.c b/arch/arm/mach-s5pv210/mach-aquila.c
index a9ea64e..7b91bbf 100644
--- a/arch/arm/mach-s5pv210/mach-aquila.c
+++ b/arch/arm/mach-s5pv210/mach-aquila.c
@@ -96,38 +96,34 @@ static struct s3c2410_uartcfg aquila_uartcfgs[] __initdata = {
/* Frame Buffer */
static struct s3c_fb_pd_win aquila_fb_win0 = {
- .win_mode = {
- .left_margin = 16,
- .right_margin = 16,
- .upper_margin = 3,
- .lower_margin = 28,
- .hsync_len = 2,
- .vsync_len = 2,
- .xres = 480,
- .yres = 800,
- },
.max_bpp = 32,
.default_bpp = 16,
+ .xres = 480,
+ .yres = 800,
};
static struct s3c_fb_pd_win aquila_fb_win1 = {
- .win_mode = {
- .left_margin = 16,
- .right_margin = 16,
- .upper_margin = 3,
- .lower_margin = 28,
- .hsync_len = 2,
- .vsync_len = 2,
- .xres = 480,
- .yres = 800,
- },
.max_bpp = 32,
.default_bpp = 16,
+ .xres = 480,
+ .yres = 800,
+};
+
+static struct fb_videomode aquila_lcd_timing = {
+ .left_margin = 16,
+ .right_margin = 16,
+ .upper_margin = 3,
+ .lower_margin = 28,
+ .hsync_len = 2,
+ .vsync_len = 2,
+ .xres = 480,
+ .yres = 800,
};
static struct s3c_fb_platdata aquila_lcd_pdata __initdata = {
.win[0] = &aquila_fb_win0,
.win[1] = &aquila_fb_win1,
+ .vtiming = &aquila_lcd_timing,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
.vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC |
VIDCON1_INV_VCLK | VIDCON1_INV_VDEN,
diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c
index 2cf5ed7..07a840d 100644
--- a/arch/arm/mach-s5pv210/mach-goni.c
+++ b/arch/arm/mach-s5pv210/mach-goni.c
@@ -105,25 +105,29 @@ static struct s3c2410_uartcfg goni_uartcfgs[] __initdata = {
/* Frame Buffer */
static struct s3c_fb_pd_win goni_fb_win0 = {
- .win_mode = {
- .left_margin = 16,
- .right_margin = 16,
- .upper_margin = 2,
- .lower_margin = 28,
- .hsync_len = 2,
- .vsync_len = 1,
- .xres = 480,
- .yres = 800,
- .refresh = 55,
- },
.max_bpp = 32,
.default_bpp = 16,
+ .xres = 480,
+ .yres = 800,
.virtual_x = 480,
.virtual_y = 2 * 800,
};
+static struct fb_videomode goni_lcd_timing = {
+ .left_margin = 16,
+ .right_margin = 16,
+ .upper_margin = 2,
+ .lower_margin = 28,
+ .hsync_len = 2,
+ .vsync_len = 1,
+ .xres = 480,
+ .yres = 800,
+ .refresh = 55,
+};
+
static struct s3c_fb_platdata goni_lcd_pdata __initdata = {
.win[0] = &goni_fb_win0,
+ .vtiming = &goni_lcd_timing,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB |
VIDCON0_CLKSEL_LCD,
.vidcon1 = VIDCON1_INV_VCLK | VIDCON1_INV_VDEN
diff --git a/arch/arm/mach-s5pv210/mach-smdkv210.c b/arch/arm/mach-s5pv210/mach-smdkv210.c
index 91d4ad8..5e0c955 100644
--- a/arch/arm/mach-s5pv210/mach-smdkv210.c
+++ b/arch/arm/mach-s5pv210/mach-smdkv210.c
@@ -189,22 +189,26 @@ static struct platform_device smdkv210_lcd_lte480wv = {
};
static struct s3c_fb_pd_win smdkv210_fb_win0 = {
- .win_mode = {
- .left_margin = 13,
- .right_margin = 8,
- .upper_margin = 7,
- .lower_margin = 5,
- .hsync_len = 3,
- .vsync_len = 1,
- .xres = 800,
- .yres = 480,
- },
.max_bpp = 32,
.default_bpp = 24,
+ .xres = 800,
+ .yres = 480,
+};
+
+static struct fb_videomode smdkv210_lcd_timing = {
+ .left_margin = 13,
+ .right_margin = 8,
+ .upper_margin = 7,
+ .lower_margin = 5,
+ .hsync_len = 3,
+ .vsync_len = 1,
+ .xres = 800,
+ .yres = 480,
};
static struct s3c_fb_platdata smdkv210_lcd0_pdata __initdata = {
.win[0] = &smdkv210_fb_win0,
+ .vtiming = &smdkv210_lcd_timing,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
.vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
.setup_gpio = s5pv210_fb_gpio_setup_24bpp,
--
1.6.6.rc2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* RE: [PATCH v3 4/4] ARM: Samsung: Rework platform data of s3c-fb driver
2012-03-24 16:40 ` [PATCH v3 4/4] ARM: Samsung: Rework platform data of s3c-fb driver Thomas Abraham
@ 2012-03-28 10:07 ` Jingoo Han
0 siblings, 0 replies; 8+ messages in thread
From: Jingoo Han @ 2012-03-28 10:07 UTC (permalink / raw)
To: linux-arm-kernel
On 25 March 2012 01:29, Thomas Abraham < thomas.abraham@linaro.org> wrote:
> Subject: [PATCH v3 4/4] ARM: Samsung: Rework platform data of s3c-fb driver
>
> For all the Samsung SoC based boards which have the platform data for
> s3c-fb driver, the 'default_win' element in the platform data is removed
> and the lcd panel video timing values are moved out of individual window
> configuration data.
>
> Cc: Jingoo Han <jg1.han@samsung.com>
It looks good for SMDK boards.
Acked-by: Jingoo Han <jg1.han@samsung.com>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: JeongHyeon Kim <jhkim@insignal.co.kr>
> Cc: Kukjin Kim <kgene.kim@samsung.com>
> Cc: Heiko Stuebner <heiko@sntech.de>
> Cc: Ben Dooks <ben-linux@fluff.org>
> Cc: Kwangwoo Lee <kwangwoo.lee@gmail.com>
> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
> Cc: Peter Korsgaard <jacmet@sunsite.dk>
> Cc: Darius Augulis <augulis.darius@gmail.com>
> Cc: Maurus Cuelenaere <mcuelenaere@gmail.com>
> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
> ---
> arch/arm/mach-exynos/mach-nuri.c | 26 ++++++++------
> arch/arm/mach-exynos/mach-origen.c | 24 +++++++-----
> arch/arm/mach-exynos/mach-smdkv310.c | 28 ++++++++------
> arch/arm/mach-exynos/mach-universal_c210.c | 26 ++++++++------
> arch/arm/mach-s3c24xx/mach-smdk2416.c | 27 ++++++++------
> arch/arm/mach-s3c64xx/mach-anw6410.c | 25 +++++++------
> arch/arm/mach-s3c64xx/mach-crag6410.c | 25 +++++++------
> arch/arm/mach-s3c64xx/mach-hmt.c | 24 +++++++-----
> arch/arm/mach-s3c64xx/mach-mini6410.c | 54 ++++++++++++++++-----------
> arch/arm/mach-s3c64xx/mach-real6410.c | 52 +++++++++++++++-----------
> arch/arm/mach-s3c64xx/mach-smartq5.c | 26 ++++++++------
> arch/arm/mach-s3c64xx/mach-smartq7.c | 26 ++++++++------
> arch/arm/mach-s3c64xx/mach-smdk6410.c | 25 +++++++------
> arch/arm/mach-s5p64x0/mach-smdk6440.c | 24 +++++++-----
> arch/arm/mach-s5p64x0/mach-smdk6450.c | 24 +++++++-----
> arch/arm/mach-s5pc100/mach-smdkc100.c | 27 ++++++++------
> arch/arm/mach-s5pv210/mach-aquila.c | 36 ++++++++----------
> arch/arm/mach-s5pv210/mach-goni.c | 26 ++++++++------
> arch/arm/mach-s5pv210/mach-smdkv210.c | 24 +++++++-----
> 19 files changed, 311 insertions(+), 238 deletions(-)
>
> diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-nuri.c
> index 7ac81ce..a7e6731 100644
> --- a/arch/arm/mach-exynos/mach-nuri.c
> +++ b/arch/arm/mach-exynos/mach-nuri.c
> @@ -212,25 +212,29 @@ static struct platform_device nuri_gpio_keys = {
>
> /* Frame Buffer */
> static struct s3c_fb_pd_win nuri_fb_win0 = {
> - .win_mode = {
> - .left_margin = 64,
> - .right_margin = 16,
> - .upper_margin = 64,
> - .lower_margin = 1,
> - .hsync_len = 48,
> - .vsync_len = 3,
> - .xres = 1024,
> - .yres = 600,
> - .refresh = 60,
> - },
> .max_bpp = 24,
> .default_bpp = 16,
> + .xres = 1024,
> + .yres = 600,
> .virtual_x = 1024,
> .virtual_y = 2 * 600,
> };
>
> +static struct fb_videomode nuri_lcd_timing = {
> + .left_margin = 64,
> + .right_margin = 16,
> + .upper_margin = 64,
> + .lower_margin = 1,
> + .hsync_len = 48,
> + .vsync_len = 3,
> + .xres = 1024,
> + .yres = 600,
> + .refresh = 60,
> +};
> +
> static struct s3c_fb_platdata nuri_fb_pdata __initdata = {
> .win[0] = &nuri_fb_win0,
> + .vtiming = &nuri_lcd_timing,
> .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB |
> VIDCON0_CLKSEL_LCD,
> .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
> diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c
> index 25c9b46..de71237 100644
> --- a/arch/arm/mach-exynos/mach-origen.c
> +++ b/arch/arm/mach-exynos/mach-origen.c
> @@ -583,22 +583,26 @@ static struct platform_device origen_lcd_hv070wsa = {
> };
>
> static struct s3c_fb_pd_win origen_fb_win0 = {
> - .win_mode = {
> - .left_margin = 64,
> - .right_margin = 16,
> - .upper_margin = 64,
> - .lower_margin = 16,
> - .hsync_len = 48,
> - .vsync_len = 3,
> - .xres = 1024,
> - .yres = 600,
> - },
> + .xres = 1024,
> + .yres = 600,
> .max_bpp = 32,
> .default_bpp = 24,
> };
>
> +static struct fb_videomode origen_lcd_timing = {
> + .left_margin = 64,
> + .right_margin = 16,
> + .upper_margin = 64,
> + .lower_margin = 16,
> + .hsync_len = 48,
> + .vsync_len = 3,
> + .xres = 1024,
> + .yres = 600,
> +};
> +
> static struct s3c_fb_platdata origen_lcd_pdata __initdata = {
> .win[0] = &origen_fb_win0,
> + .vtiming = &origen_lcd_timing,
> .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC |
> VIDCON1_INV_VCLK,
> diff --git a/arch/arm/mach-exynos/mach-smdkv310.c b/arch/arm/mach-exynos/mach-smdkv310.c
> index f08529f..6c00fa6 100644
> --- a/arch/arm/mach-exynos/mach-smdkv310.c
> +++ b/arch/arm/mach-exynos/mach-smdkv310.c
> @@ -157,22 +157,26 @@ static struct platform_device smdkv310_lcd_lte480wv = {
> };
>
> static struct s3c_fb_pd_win smdkv310_fb_win0 = {
> - .win_mode = {
> - .left_margin = 13,
> - .right_margin = 8,
> - .upper_margin = 7,
> - .lower_margin = 5,
> - .hsync_len = 3,
> - .vsync_len = 1,
> - .xres = 800,
> - .yres = 480,
> - },
> - .max_bpp = 32,
> - .default_bpp = 24,
> + .max_bpp = 32,
> + .default_bpp = 24,
> + .xres = 800,
> + .yres = 480,
> +};
> +
> +static struct fb_videomode smdkv310_lcd_timing = {
> + .left_margin = 13,
> + .right_margin = 8,
> + .upper_margin = 7,
> + .lower_margin = 5,
> + .hsync_len = 3,
> + .vsync_len = 1,
> + .xres = 800,
> + .yres = 480,
> };
>
> static struct s3c_fb_platdata smdkv310_lcd0_pdata __initdata = {
> .win[0] = &smdkv310_fb_win0,
> + .vtiming = &smdkv310_lcd_timing,
> .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
> .setup_gpio = exynos4_fimd0_gpio_setup_24bpp,
> diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach-exynos/mach-universal_c210.c
> index 57e4418..67a9547 100644
> --- a/arch/arm/mach-exynos/mach-universal_c210.c
> +++ b/arch/arm/mach-exynos/mach-universal_c210.c
> @@ -813,25 +813,29 @@ static struct i2c_board_info i2c1_devs[] __initdata = {
>
> /* Frame Buffer */
> static struct s3c_fb_pd_win universal_fb_win0 = {
> - .win_mode = {
> - .left_margin = 16,
> - .right_margin = 16,
> - .upper_margin = 2,
> - .lower_margin = 28,
> - .hsync_len = 2,
> - .vsync_len = 1,
> - .xres = 480,
> - .yres = 800,
> - .refresh = 55,
> - },
> .max_bpp = 32,
> .default_bpp = 16,
> + .xres = 480,
> + .yres = 800,
> .virtual_x = 480,
> .virtual_y = 2 * 800,
> };
>
> +static struct fb_videomode universal_lcd_timing = {
> + .left_margin = 16,
> + .right_margin = 16,
> + .upper_margin = 2,
> + .lower_margin = 28,
> + .hsync_len = 2,
> + .vsync_len = 1,
> + .xres = 480,
> + .yres = 800,
> + .refresh = 55,
> +};
> +
> static struct s3c_fb_platdata universal_lcd_pdata __initdata = {
> .win[0] = &universal_fb_win0,
> + .vtiming = &universal_lcd_timing,
> .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB |
> VIDCON0_CLKSEL_LCD,
> .vidcon1 = VIDCON1_INV_VCLK | VIDCON1_INV_VDEN
> diff --git a/arch/arm/mach-s3c24xx/mach-smdk2416.c b/arch/arm/mach-s3c24xx/mach-smdk2416.c
> index 30a44f8..c3100a0 100644
> --- a/arch/arm/mach-s3c24xx/mach-smdk2416.c
> +++ b/arch/arm/mach-s3c24xx/mach-smdk2416.c
> @@ -148,23 +148,25 @@ static struct s3c24xx_hsudc_platdata smdk2416_hsudc_platdata = {
>
> static struct s3c_fb_pd_win smdk2416_fb_win[] = {
> [0] = {
> - /* think this is the same as the smdk6410 */
> - .win_mode = {
> - .pixclock = 41094,
> - .left_margin = 8,
> - .right_margin = 13,
> - .upper_margin = 7,
> - .lower_margin = 5,
> - .hsync_len = 3,
> - .vsync_len = 1,
> - .xres = 800,
> - .yres = 480,
> - },
> .default_bpp = 16,
> .max_bpp = 32,
> + .xres = 800,
> + .yres = 480,
> },
> };
>
> +static struct fb_videomode smdk2416_lcd_timing = {
> + .pixclock = 41094,
> + .left_margin = 8,
> + .right_margin = 13,
> + .upper_margin = 7,
> + .lower_margin = 5,
> + .hsync_len = 3,
> + .vsync_len = 1,
> + .xres = 800,
> + .yres = 480,
> +};
> +
> static void s3c2416_fb_gpio_setup_24bpp(void)
> {
> unsigned int gpio;
> @@ -187,6 +189,7 @@ static void s3c2416_fb_gpio_setup_24bpp(void)
>
> static struct s3c_fb_platdata smdk2416_fb_platdata = {
> .win[0] = &smdk2416_fb_win[0],
> + .vtiming = &smdk2416_lcd_timing,
> .setup_gpio = s3c2416_fb_gpio_setup_24bpp,
> .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
> diff --git a/arch/arm/mach-s3c64xx/mach-anw6410.c b/arch/arm/mach-s3c64xx/mach-anw6410.c
> index b86f277..58fd0e3 100644
> --- a/arch/arm/mach-s3c64xx/mach-anw6410.c
> +++ b/arch/arm/mach-s3c64xx/mach-anw6410.c
> @@ -134,24 +134,27 @@ static struct platform_device anw6410_lcd_powerdev = {
> };
>
> static struct s3c_fb_pd_win anw6410_fb_win0 = {
> - /* this is to ensure we use win0 */
> - .win_mode = {
> - .left_margin = 8,
> - .right_margin = 13,
> - .upper_margin = 7,
> - .lower_margin = 5,
> - .hsync_len = 3,
> - .vsync_len = 1,
> - .xres = 800,
> - .yres = 480,
> - },
> .max_bpp = 32,
> .default_bpp = 16,
> + .xres = 800,
> + .yres = 480,
> +};
> +
> +static struct fb_videomode anw6410_lcd_timing = {
> + .left_margin = 8,
> + .right_margin = 13,
> + .upper_margin = 7,
> + .lower_margin = 5,
> + .hsync_len = 3,
> + .vsync_len = 1,
> + .xres = 800,
> + .yres = 480,
> };
>
> /* 405566 clocks per frame => 60Hz refresh requires 24333960Hz clock */
> static struct s3c_fb_platdata anw6410_lcd_pdata __initdata = {
> .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
> + .vtiming = &anw6410_lcd_timing,
> .win[0] = &anw6410_fb_win0,
> .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
> diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c
> index e20bf58..c1ef57e 100644
> --- a/arch/arm/mach-s3c64xx/mach-crag6410.c
> +++ b/arch/arm/mach-s3c64xx/mach-crag6410.c
> @@ -151,26 +151,29 @@ static struct platform_device crag6410_lcd_powerdev = {
>
> /* 640x480 URT */
> static struct s3c_fb_pd_win crag6410_fb_win0 = {
> - /* this is to ensure we use win0 */
> - .win_mode = {
> - .left_margin = 150,
> - .right_margin = 80,
> - .upper_margin = 40,
> - .lower_margin = 5,
> - .hsync_len = 40,
> - .vsync_len = 5,
> - .xres = 640,
> - .yres = 480,
> - },
> .max_bpp = 32,
> .default_bpp = 16,
> + .xres = 640,
> + .yres = 480,
> .virtual_y = 480 * 2,
> .virtual_x = 640,
> };
>
> +static struct fb_videomode crag6410_lcd_timing = {
> + .left_margin = 150,
> + .right_margin = 80,
> + .upper_margin = 40,
> + .lower_margin = 5,
> + .hsync_len = 40,
> + .vsync_len = 5,
> + .xres = 640,
> + .yres = 480,
> +};
> +
> /* 405566 clocks per frame => 60Hz refresh requires 24333960Hz clock */
> static struct s3c_fb_platdata crag6410_lcd_pdata __initdata = {
> .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
> + .vtiming = &crag6410_lcd_timing,
> .win[0] = &crag6410_fb_win0,
> .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
> diff --git a/arch/arm/mach-s3c64xx/mach-hmt.c b/arch/arm/mach-s3c64xx/mach-hmt.c
> index 521e07b..4e9b1ac 100644
> --- a/arch/arm/mach-s3c64xx/mach-hmt.c
> +++ b/arch/arm/mach-s3c64xx/mach-hmt.c
> @@ -129,23 +129,27 @@ static struct platform_device hmt_backlight_device = {
> };
>
> static struct s3c_fb_pd_win hmt_fb_win0 = {
> - .win_mode = {
> - .left_margin = 8,
> - .right_margin = 13,
> - .upper_margin = 7,
> - .lower_margin = 5,
> - .hsync_len = 3,
> - .vsync_len = 1,
> - .xres = 800,
> - .yres = 480,
> - },
> .max_bpp = 32,
> .default_bpp = 16,
> + .xres = 800,
> + .yres = 480,
> +};
> +
> +static struct fb_videomode hmt_lcd_timing = {
> + .left_margin = 8,
> + .right_margin = 13,
> + .upper_margin = 7,
> + .lower_margin = 5,
> + .hsync_len = 3,
> + .vsync_len = 1,
> + .xres = 800,
> + .yres = 480,
> };
>
> /* 405566 clocks per frame => 60Hz refresh requires 24333960Hz clock */
> static struct s3c_fb_platdata hmt_lcd_pdata __initdata = {
> .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
> + .vtiming = &hmt_lcd_timing,
> .win[0] = &hmt_fb_win0,
> .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
> diff --git a/arch/arm/mach-s3c64xx/mach-mini6410.c b/arch/arm/mach-s3c64xx/mach-mini6410.c
> index 34f5195..2f425d5 100644
> --- a/arch/arm/mach-s3c64xx/mach-mini6410.c
> +++ b/arch/arm/mach-s3c64xx/mach-mini6410.c
> @@ -152,43 +152,53 @@ static struct s3c2410_platform_nand mini6410_nand_info = {
> };
>
> static struct s3c_fb_pd_win mini6410_lcd_type0_fb_win = {
> - .win_mode = { /* 4.3" 480x272 */
> - .left_margin = 3,
> - .right_margin = 2,
> - .upper_margin = 1,
> - .lower_margin = 1,
> - .hsync_len = 40,
> - .vsync_len = 1,
> - .xres = 480,
> - .yres = 272,
> - },
> .max_bpp = 32,
> .default_bpp = 16,
> + .xres = 480,
> + .yres = 272,
> +};
> +
> +static struct fb_videomode mini6410_lcd_type0_timing = {
> + /* 4.3" 480x272 */
> + .left_margin = 3,
> + .right_margin = 2,
> + .upper_margin = 1,
> + .lower_margin = 1,
> + .hsync_len = 40,
> + .vsync_len = 1,
> + .xres = 480,
> + .yres = 272,
> };
>
> static struct s3c_fb_pd_win mini6410_lcd_type1_fb_win = {
> - .win_mode = { /* 7.0" 800x480 */
> - .left_margin = 8,
> - .right_margin = 13,
> - .upper_margin = 7,
> - .lower_margin = 5,
> - .hsync_len = 3,
> - .vsync_len = 1,
> - .xres = 800,
> - .yres = 480,
> - },
> .max_bpp = 32,
> .default_bpp = 16,
> + .xres = 800,
> + .yres = 480,
> +};
> +
> +static struct fb_videomode mini6410_lcd_type1_timing = {
> + /* 7.0" 800x480 */
> + .left_margin = 8,
> + .right_margin = 13,
> + .upper_margin = 7,
> + .lower_margin = 5,
> + .hsync_len = 3,
> + .vsync_len = 1,
> + .xres = 800,
> + .yres = 480,
> };
>
> static struct s3c_fb_platdata mini6410_lcd_pdata[] __initdata = {
> {
> .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
> + .vtiming = &mini6410_lcd_type0_timing,
> .win[0] = &mini6410_lcd_type0_fb_win,
> .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
> }, {
> .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
> + .vtiming = &mini6410_lcd_type1_timing,
> .win[0] = &mini6410_lcd_type1_fb_win,
> .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
> @@ -316,8 +326,8 @@ static void __init mini6410_machine_init(void)
> mini6410_parse_features(&features, mini6410_features_str);
>
> printk(KERN_INFO "MINI6410: selected LCD display is %dx%d\n",
> - mini6410_lcd_pdata[features.lcd_index].win[0]->win_mode.xres,
> - mini6410_lcd_pdata[features.lcd_index].win[0]->win_mode.yres);
> + mini6410_lcd_pdata[features.lcd_index].win[0]->xres,
> + mini6410_lcd_pdata[features.lcd_index].win[0]->yres);
>
> s3c_nand_set_platdata(&mini6410_nand_info);
> s3c_fb_set_platdata(&mini6410_lcd_pdata[features.lcd_index]);
> diff --git a/arch/arm/mach-s3c64xx/mach-real6410.c b/arch/arm/mach-s3c64xx/mach-real6410.c
> index 21f91e5..0fbd32c 100644
> --- a/arch/arm/mach-s3c64xx/mach-real6410.c
> +++ b/arch/arm/mach-s3c64xx/mach-real6410.c
> @@ -118,43 +118,51 @@ static struct platform_device real6410_device_eth = {
> };
>
> static struct s3c_fb_pd_win real6410_lcd_type0_fb_win = {
> - .win_mode = { /* 4.3" 480x272 */
> - .left_margin = 3,
> - .right_margin = 2,
> - .upper_margin = 1,
> - .lower_margin = 1,
> - .hsync_len = 40,
> - .vsync_len = 1,
> - .xres = 480,
> - .yres = 272,
> - },
> .max_bpp = 32,
> .default_bpp = 16,
> + .xres = 480,
> + .yres = 272,
> +};
> +
> +static struct fb_videomode real6410_lcd_type0_timing = {
> + /* 4.3" 480x272 */
> + .left_margin = 3,
> + .right_margin = 2,
> + .upper_margin = 1,
> + .lower_margin = 1,
> + .hsync_len = 40,
> + .vsync_len = 1,
> };
>
> static struct s3c_fb_pd_win real6410_lcd_type1_fb_win = {
> - .win_mode = { /* 7.0" 800x480 */
> - .left_margin = 8,
> - .right_margin = 13,
> - .upper_margin = 7,
> - .lower_margin = 5,
> - .hsync_len = 3,
> - .vsync_len = 1,
> - .xres = 800,
> - .yres = 480,
> - },
> .max_bpp = 32,
> .default_bpp = 16,
> + .xres = 800,
> + .yres = 480,
> +};
> +
> +static struct fb_videomode real6410_lcd_type1_timing = {
> + /* 7.0" 800x480 */
> + .left_margin = 8,
> + .right_margin = 13,
> + .upper_margin = 7,
> + .lower_margin = 5,
> + .hsync_len = 3,
> + .vsync_len = 1,
> + .xres = 800,
> + .yres = 480,
> };
>
> static struct s3c_fb_platdata real6410_lcd_pdata[] __initdata = {
> {
> .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
> + .vtiming = &real6410_lcd_type0_timing,
> .win[0] = &real6410_lcd_type0_fb_win,
> .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
> }, {
> .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
> + .vtiming = &real6410_lcd_type1_timing,
> .win[0] = &real6410_lcd_type1_fb_win,
> .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
> @@ -297,8 +305,8 @@ static void __init real6410_machine_init(void)
> real6410_parse_features(&features, real6410_features_str);
>
> printk(KERN_INFO "REAL6410: selected LCD display is %dx%d\n",
> - real6410_lcd_pdata[features.lcd_index].win[0]->win_mode.xres,
> - real6410_lcd_pdata[features.lcd_index].win[0]->win_mode.yres);
> + real6410_lcd_pdata[features.lcd_index].win[0]->xres,
> + real6410_lcd_pdata[features.lcd_index].win[0]->yres);
>
> s3c_fb_set_platdata(&real6410_lcd_pdata[features.lcd_index]);
> s3c_nand_set_platdata(&real6410_nand_info);
> diff --git a/arch/arm/mach-s3c64xx/mach-smartq5.c b/arch/arm/mach-s3c64xx/mach-smartq5.c
> index 3f42431..03a2f88 100644
> --- a/arch/arm/mach-s3c64xx/mach-smartq5.c
> +++ b/arch/arm/mach-s3c64xx/mach-smartq5.c
> @@ -108,23 +108,27 @@ static struct platform_device smartq5_buttons_device = {
> };
>
> static struct s3c_fb_pd_win smartq5_fb_win0 = {
> - .win_mode = {
> - .left_margin = 216,
> - .right_margin = 40,
> - .upper_margin = 35,
> - .lower_margin = 10,
> - .hsync_len = 1,
> - .vsync_len = 1,
> - .xres = 800,
> - .yres = 480,
> - .refresh = 80,
> - },
> .max_bpp = 32,
> .default_bpp = 16,
> + .xres = 800,
> + .yres = 480,
> +};
> +
> +static struct fb_videomode smartq5_lcd_timing = {
> + .left_margin = 216,
> + .right_margin = 40,
> + .upper_margin = 35,
> + .lower_margin = 10,
> + .hsync_len = 1,
> + .vsync_len = 1,
> + .xres = 800,
> + .yres = 480,
> + .refresh = 80,
> };
>
> static struct s3c_fb_platdata smartq5_lcd_pdata __initdata = {
> .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
> + .vtiming = &smartq5_lcd_timing,
> .win[0] = &smartq5_fb_win0,
> .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC |
> diff --git a/arch/arm/mach-s3c64xx/mach-smartq7.c b/arch/arm/mach-s3c64xx/mach-smartq7.c
> index e5c09b6..4e3b038 100644
> --- a/arch/arm/mach-s3c64xx/mach-smartq7.c
> +++ b/arch/arm/mach-s3c64xx/mach-smartq7.c
> @@ -124,23 +124,27 @@ static struct platform_device smartq7_buttons_device = {
> };
>
> static struct s3c_fb_pd_win smartq7_fb_win0 = {
> - .win_mode = {
> - .left_margin = 3,
> - .right_margin = 5,
> - .upper_margin = 1,
> - .lower_margin = 20,
> - .hsync_len = 10,
> - .vsync_len = 3,
> - .xres = 800,
> - .yres = 480,
> - .refresh = 80,
> - },
> .max_bpp = 32,
> .default_bpp = 16,
> + .xres = 800,
> + .yres = 480,
> +};
> +
> +static struct fb_videomode smartq7_lcd_timing = {
> + .left_margin = 3,
> + .right_margin = 5,
> + .upper_margin = 1,
> + .lower_margin = 20,
> + .hsync_len = 10,
> + .vsync_len = 3,
> + .xres = 800,
> + .yres = 480,
> + .refresh = 80,
> };
>
> static struct s3c_fb_platdata smartq7_lcd_pdata __initdata = {
> .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
> + .vtiming = &smartq7_lcd_timing,
> .win[0] = &smartq7_fb_win0,
> .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC |
> diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c
> index d55bc96..3cfc90f 100644
> --- a/arch/arm/mach-s3c64xx/mach-smdk6410.c
> +++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c
> @@ -146,26 +146,29 @@ static struct platform_device smdk6410_lcd_powerdev = {
> };
>
> static struct s3c_fb_pd_win smdk6410_fb_win0 = {
> - /* this is to ensure we use win0 */
> - .win_mode = {
> - .left_margin = 8,
> - .right_margin = 13,
> - .upper_margin = 7,
> - .lower_margin = 5,
> - .hsync_len = 3,
> - .vsync_len = 1,
> - .xres = 800,
> - .yres = 480,
> - },
> .max_bpp = 32,
> .default_bpp = 16,
> + .xres = 800,
> + .yres = 480,
> .virtual_y = 480 * 2,
> .virtual_x = 800,
> };
>
> +static struct fb_videomode smdk6410_lcd_timing = {
> + .left_margin = 8,
> + .right_margin = 13,
> + .upper_margin = 7,
> + .lower_margin = 5,
> + .hsync_len = 3,
> + .vsync_len = 1,
> + .xres = 800,
> + .yres = 480,
> +};
> +
> /* 405566 clocks per frame => 60Hz refresh requires 24333960Hz clock */
> static struct s3c_fb_platdata smdk6410_lcd_pdata __initdata = {
> .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
> + .vtiming = &smdk6410_lcd_timing,
> .win[0] = &smdk6410_fb_win0,
> .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
> diff --git a/arch/arm/mach-s5p64x0/mach-smdk6440.c b/arch/arm/mach-s5p64x0/mach-smdk6440.c
> index a40e325..92fefad 100644
> --- a/arch/arm/mach-s5p64x0/mach-smdk6440.c
> +++ b/arch/arm/mach-s5p64x0/mach-smdk6440.c
> @@ -103,22 +103,26 @@ static struct s3c2410_uartcfg smdk6440_uartcfgs[] __initdata = {
>
> /* Frame Buffer */
> static struct s3c_fb_pd_win smdk6440_fb_win0 = {
> - .win_mode = {
> - .left_margin = 8,
> - .right_margin = 13,
> - .upper_margin = 7,
> - .lower_margin = 5,
> - .hsync_len = 3,
> - .vsync_len = 1,
> - .xres = 800,
> - .yres = 480,
> - },
> .max_bpp = 32,
> .default_bpp = 24,
> + .xres = 800,
> + .yres = 480,
> +};
> +
> +static struct fb_videomode smdk6440_lcd_timing = {
> + .left_margin = 8,
> + .right_margin = 13,
> + .upper_margin = 7,
> + .lower_margin = 5,
> + .hsync_len = 3,
> + .vsync_len = 1,
> + .xres = 800,
> + .yres = 480,
> };
>
> static struct s3c_fb_platdata smdk6440_lcd_pdata __initdata = {
> .win[0] = &smdk6440_fb_win0,
> + .vtiming = &smdk6440_lcd_timing,
> .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
> .setup_gpio = s5p64x0_fb_gpio_setup_24bpp,
> diff --git a/arch/arm/mach-s5p64x0/mach-smdk6450.c b/arch/arm/mach-s5p64x0/mach-smdk6450.c
> index efb69e2..e2335ec 100644
> --- a/arch/arm/mach-s5p64x0/mach-smdk6450.c
> +++ b/arch/arm/mach-s5p64x0/mach-smdk6450.c
> @@ -121,22 +121,26 @@ static struct s3c2410_uartcfg smdk6450_uartcfgs[] __initdata = {
>
> /* Frame Buffer */
> static struct s3c_fb_pd_win smdk6450_fb_win0 = {
> - .win_mode = {
> - .left_margin = 8,
> - .right_margin = 13,
> - .upper_margin = 7,
> - .lower_margin = 5,
> - .hsync_len = 3,
> - .vsync_len = 1,
> - .xres = 800,
> - .yres = 480,
> - },
> .max_bpp = 32,
> .default_bpp = 24,
> + .xres = 800,
> + .yres = 480,
> +};
> +
> +static struct fb_videomode smdk6450_lcd_timing = {
> + .left_margin = 8,
> + .right_margin = 13,
> + .upper_margin = 7,
> + .lower_margin = 5,
> + .hsync_len = 3,
> + .vsync_len = 1,
> + .xres = 800,
> + .yres = 480,
> };
>
> static struct s3c_fb_platdata smdk6450_lcd_pdata __initdata = {
> .win[0] = &smdk6450_fb_win0,
> + .vtiming = &smdk6450_lcd_timing,
> .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
> .setup_gpio = s5p64x0_fb_gpio_setup_24bpp,
> diff --git a/arch/arm/mach-s5pc100/mach-smdkc100.c b/arch/arm/mach-s5pc100/mach-smdkc100.c
> index 674d229..0c3ae38 100644
> --- a/arch/arm/mach-s5pc100/mach-smdkc100.c
> +++ b/arch/arm/mach-s5pc100/mach-smdkc100.c
> @@ -136,24 +136,27 @@ static struct platform_device smdkc100_lcd_powerdev = {
>
> /* Frame Buffer */
> static struct s3c_fb_pd_win smdkc100_fb_win0 = {
> - /* this is to ensure we use win0 */
> - .win_mode = {
> - .left_margin = 8,
> - .right_margin = 13,
> - .upper_margin = 7,
> - .lower_margin = 5,
> - .hsync_len = 3,
> - .vsync_len = 1,
> - .xres = 800,
> - .yres = 480,
> - .refresh = 80,
> - },
> .max_bpp = 32,
> .default_bpp = 16,
> + .xres = 800,
> + .yres = 480,
> +};
> +
> +static struct fb_videomode smdkc100_lcd_timing = {
> + .left_margin = 8,
> + .right_margin = 13,
> + .upper_margin = 7,
> + .lower_margin = 5,
> + .hsync_len = 3,
> + .vsync_len = 1,
> + .xres = 800,
> + .yres = 480,
> + .refresh = 80,
> };
>
> static struct s3c_fb_platdata smdkc100_lcd_pdata __initdata = {
> .win[0] = &smdkc100_fb_win0,
> + .vtiming = &smdkc100_lcd_timing,
> .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
> .setup_gpio = s5pc100_fb_gpio_setup_24bpp,
> diff --git a/arch/arm/mach-s5pv210/mach-aquila.c b/arch/arm/mach-s5pv210/mach-aquila.c
> index a9ea64e..7b91bbf 100644
> --- a/arch/arm/mach-s5pv210/mach-aquila.c
> +++ b/arch/arm/mach-s5pv210/mach-aquila.c
> @@ -96,38 +96,34 @@ static struct s3c2410_uartcfg aquila_uartcfgs[] __initdata = {
>
> /* Frame Buffer */
> static struct s3c_fb_pd_win aquila_fb_win0 = {
> - .win_mode = {
> - .left_margin = 16,
> - .right_margin = 16,
> - .upper_margin = 3,
> - .lower_margin = 28,
> - .hsync_len = 2,
> - .vsync_len = 2,
> - .xres = 480,
> - .yres = 800,
> - },
> .max_bpp = 32,
> .default_bpp = 16,
> + .xres = 480,
> + .yres = 800,
> };
>
> static struct s3c_fb_pd_win aquila_fb_win1 = {
> - .win_mode = {
> - .left_margin = 16,
> - .right_margin = 16,
> - .upper_margin = 3,
> - .lower_margin = 28,
> - .hsync_len = 2,
> - .vsync_len = 2,
> - .xres = 480,
> - .yres = 800,
> - },
> .max_bpp = 32,
> .default_bpp = 16,
> + .xres = 480,
> + .yres = 800,
> +};
> +
> +static struct fb_videomode aquila_lcd_timing = {
> + .left_margin = 16,
> + .right_margin = 16,
> + .upper_margin = 3,
> + .lower_margin = 28,
> + .hsync_len = 2,
> + .vsync_len = 2,
> + .xres = 480,
> + .yres = 800,
> };
>
> static struct s3c_fb_platdata aquila_lcd_pdata __initdata = {
> .win[0] = &aquila_fb_win0,
> .win[1] = &aquila_fb_win1,
> + .vtiming = &aquila_lcd_timing,
> .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC |
> VIDCON1_INV_VCLK | VIDCON1_INV_VDEN,
> diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c
> index 2cf5ed7..07a840d 100644
> --- a/arch/arm/mach-s5pv210/mach-goni.c
> +++ b/arch/arm/mach-s5pv210/mach-goni.c
> @@ -105,25 +105,29 @@ static struct s3c2410_uartcfg goni_uartcfgs[] __initdata = {
>
> /* Frame Buffer */
> static struct s3c_fb_pd_win goni_fb_win0 = {
> - .win_mode = {
> - .left_margin = 16,
> - .right_margin = 16,
> - .upper_margin = 2,
> - .lower_margin = 28,
> - .hsync_len = 2,
> - .vsync_len = 1,
> - .xres = 480,
> - .yres = 800,
> - .refresh = 55,
> - },
> .max_bpp = 32,
> .default_bpp = 16,
> + .xres = 480,
> + .yres = 800,
> .virtual_x = 480,
> .virtual_y = 2 * 800,
> };
>
> +static struct fb_videomode goni_lcd_timing = {
> + .left_margin = 16,
> + .right_margin = 16,
> + .upper_margin = 2,
> + .lower_margin = 28,
> + .hsync_len = 2,
> + .vsync_len = 1,
> + .xres = 480,
> + .yres = 800,
> + .refresh = 55,
> +};
> +
> static struct s3c_fb_platdata goni_lcd_pdata __initdata = {
> .win[0] = &goni_fb_win0,
> + .vtiming = &goni_lcd_timing,
> .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB |
> VIDCON0_CLKSEL_LCD,
> .vidcon1 = VIDCON1_INV_VCLK | VIDCON1_INV_VDEN
> diff --git a/arch/arm/mach-s5pv210/mach-smdkv210.c b/arch/arm/mach-s5pv210/mach-smdkv210.c
> index 91d4ad8..5e0c955 100644
> --- a/arch/arm/mach-s5pv210/mach-smdkv210.c
> +++ b/arch/arm/mach-s5pv210/mach-smdkv210.c
> @@ -189,22 +189,26 @@ static struct platform_device smdkv210_lcd_lte480wv = {
> };
>
> static struct s3c_fb_pd_win smdkv210_fb_win0 = {
> - .win_mode = {
> - .left_margin = 13,
> - .right_margin = 8,
> - .upper_margin = 7,
> - .lower_margin = 5,
> - .hsync_len = 3,
> - .vsync_len = 1,
> - .xres = 800,
> - .yres = 480,
> - },
> .max_bpp = 32,
> .default_bpp = 24,
> + .xres = 800,
> + .yres = 480,
> +};
> +
> +static struct fb_videomode smdkv210_lcd_timing = {
> + .left_margin = 13,
> + .right_margin = 8,
> + .upper_margin = 7,
> + .lower_margin = 5,
> + .hsync_len = 3,
> + .vsync_len = 1,
> + .xres = 800,
> + .yres = 480,
> };
>
> static struct s3c_fb_platdata smdkv210_lcd0_pdata __initdata = {
> .win[0] = &smdkv210_fb_win0,
> + .vtiming = &smdkv210_lcd_timing,
> .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
> .setup_gpio = s5pv210_fb_gpio_setup_24bpp,
> --
> 1.6.6.rc2
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v3 3/4] ARM: s3c64xx: Decouple lcd type from display controller window data
2012-03-24 16:40 ` [PATCH v3 3/4] ARM: s3c64xx: Decouple lcd type from display controller window data Thomas Abraham
@ 2012-03-28 10:07 ` Jingoo Han
0 siblings, 0 replies; 8+ messages in thread
From: Jingoo Han @ 2012-03-28 10:07 UTC (permalink / raw)
To: linux-arm-kernel
On 25 March 2012 01:29, Thomas Abraham < thomas.abraham@linaro.org> wrote:
> Subject: [PATCH v3 3/4] ARM: s3c64xx: Decouple lcd type from display controller window data
>
> The display controller window data should contain window configuration data
> for only one type of lcd panel. So, for real6410 and mini6410 boards, split
> the existing display controller window data, which contains window
> configuration data for two different types of lcd panels, into two seperate
> instances and register one of them depending on the type of the lcd panel
> detected at runtime.
>
> This is a prerequisite change for a subsequent commit that reorders the
> platform data of display controller by moving video interface timing out
> of window setup data.
>
> Cc: Darius Augulis <augulis.darius@gmail.com>
> Cc: Jingoo Han <jg1.han@samsung.com>
It looks good.
Acked-by: Jingoo Han <jg1.han@samsung.com>
> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
> ---
> arch/arm/mach-s3c64xx/mach-mini6410.c | 82 +++++++++++++++++---------------
> arch/arm/mach-s3c64xx/mach-real6410.c | 82 +++++++++++++++++---------------
> 2 files changed, 88 insertions(+), 76 deletions(-)
>
> diff --git a/arch/arm/mach-s3c64xx/mach-mini6410.c b/arch/arm/mach-s3c64xx/mach-mini6410.c
> index c34c2ab..34f5195 100644
> --- a/arch/arm/mach-s3c64xx/mach-mini6410.c
> +++ b/arch/arm/mach-s3c64xx/mach-mini6410.c
> @@ -151,41 +151,49 @@ static struct s3c2410_platform_nand mini6410_nand_info = {
> .sets = mini6410_nand_sets,
> };
>
> -static struct s3c_fb_pd_win mini6410_fb_win[] = {
> - {
> - .win_mode = { /* 4.3" 480x272 */
> - .left_margin = 3,
> - .right_margin = 2,
> - .upper_margin = 1,
> - .lower_margin = 1,
> - .hsync_len = 40,
> - .vsync_len = 1,
> - .xres = 480,
> - .yres = 272,
> - },
> - .max_bpp = 32,
> - .default_bpp = 16,
> - }, {
> - .win_mode = { /* 7.0" 800x480 */
> - .left_margin = 8,
> - .right_margin = 13,
> - .upper_margin = 7,
> - .lower_margin = 5,
> - .hsync_len = 3,
> - .vsync_len = 1,
> - .xres = 800,
> - .yres = 480,
> - },
> - .max_bpp = 32,
> - .default_bpp = 16,
> +static struct s3c_fb_pd_win mini6410_lcd_type0_fb_win = {
> + .win_mode = { /* 4.3" 480x272 */
> + .left_margin = 3,
> + .right_margin = 2,
> + .upper_margin = 1,
> + .lower_margin = 1,
> + .hsync_len = 40,
> + .vsync_len = 1,
> + .xres = 480,
> + .yres = 272,
> },
> + .max_bpp = 32,
> + .default_bpp = 16,
> };
>
> -static struct s3c_fb_platdata mini6410_lcd_pdata __initdata = {
> - .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
> - .win[0] = &mini6410_fb_win[0],
> - .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> - .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
> +static struct s3c_fb_pd_win mini6410_lcd_type1_fb_win = {
> + .win_mode = { /* 7.0" 800x480 */
> + .left_margin = 8,
> + .right_margin = 13,
> + .upper_margin = 7,
> + .lower_margin = 5,
> + .hsync_len = 3,
> + .vsync_len = 1,
> + .xres = 800,
> + .yres = 480,
> + },
> + .max_bpp = 32,
> + .default_bpp = 16,
> +};
> +
> +static struct s3c_fb_platdata mini6410_lcd_pdata[] __initdata = {
> + {
> + .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
> + .win[0] = &mini6410_lcd_type0_fb_win,
> + .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> + .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
> + }, {
> + .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
> + .win[0] = &mini6410_lcd_type1_fb_win,
> + .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> + .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
> + },
> + { },
> };
>
> static void mini6410_lcd_power_set(struct plat_lcd_data *pd,
> @@ -283,7 +291,7 @@ static void mini6410_parse_features(
> "screen type already set\n", f);
> } else {
> int li = f - '0';
> - if (li >= ARRAY_SIZE(mini6410_fb_win))
> + if (li >= ARRAY_SIZE(mini6410_lcd_pdata))
> printk(KERN_INFO "MINI6410: '%c' out "
> "of range LCD mode\n", f);
> else {
> @@ -307,14 +315,12 @@ static void __init mini6410_machine_init(void)
> /* Parse the feature string */
> mini6410_parse_features(&features, mini6410_features_str);
>
> - mini6410_lcd_pdata.win[0] = &mini6410_fb_win[features.lcd_index];
> -
> printk(KERN_INFO "MINI6410: selected LCD display is %dx%d\n",
> - mini6410_lcd_pdata.win[0]->win_mode.xres,
> - mini6410_lcd_pdata.win[0]->win_mode.yres);
> + mini6410_lcd_pdata[features.lcd_index].win[0]->win_mode.xres,
> + mini6410_lcd_pdata[features.lcd_index].win[0]->win_mode.yres);
>
> s3c_nand_set_platdata(&mini6410_nand_info);
> - s3c_fb_set_platdata(&mini6410_lcd_pdata);
> + s3c_fb_set_platdata(&mini6410_lcd_pdata[features.lcd_index]);
> s3c24xx_ts_set_platdata(NULL);
>
> /* configure nCS1 width to 16 bits */
> diff --git a/arch/arm/mach-s3c64xx/mach-real6410.c b/arch/arm/mach-s3c64xx/mach-real6410.c
> index be2a9a2..21f91e5 100644
> --- a/arch/arm/mach-s3c64xx/mach-real6410.c
> +++ b/arch/arm/mach-s3c64xx/mach-real6410.c
> @@ -117,41 +117,49 @@ static struct platform_device real6410_device_eth = {
> },
> };
>
> -static struct s3c_fb_pd_win real6410_fb_win[] = {
> - {
> - .win_mode = { /* 4.3" 480x272 */
> - .left_margin = 3,
> - .right_margin = 2,
> - .upper_margin = 1,
> - .lower_margin = 1,
> - .hsync_len = 40,
> - .vsync_len = 1,
> - .xres = 480,
> - .yres = 272,
> - },
> - .max_bpp = 32,
> - .default_bpp = 16,
> - }, {
> - .win_mode = { /* 7.0" 800x480 */
> - .left_margin = 8,
> - .right_margin = 13,
> - .upper_margin = 7,
> - .lower_margin = 5,
> - .hsync_len = 3,
> - .vsync_len = 1,
> - .xres = 800,
> - .yres = 480,
> - },
> - .max_bpp = 32,
> - .default_bpp = 16,
> +static struct s3c_fb_pd_win real6410_lcd_type0_fb_win = {
> + .win_mode = { /* 4.3" 480x272 */
> + .left_margin = 3,
> + .right_margin = 2,
> + .upper_margin = 1,
> + .lower_margin = 1,
> + .hsync_len = 40,
> + .vsync_len = 1,
> + .xres = 480,
> + .yres = 272,
> },
> + .max_bpp = 32,
> + .default_bpp = 16,
> };
>
> -static struct s3c_fb_platdata real6410_lcd_pdata __initdata = {
> - .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
> - .win[0] = &real6410_fb_win[0],
> - .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> - .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
> +static struct s3c_fb_pd_win real6410_lcd_type1_fb_win = {
> + .win_mode = { /* 7.0" 800x480 */
> + .left_margin = 8,
> + .right_margin = 13,
> + .upper_margin = 7,
> + .lower_margin = 5,
> + .hsync_len = 3,
> + .vsync_len = 1,
> + .xres = 800,
> + .yres = 480,
> + },
> + .max_bpp = 32,
> + .default_bpp = 16,
> +};
> +
> +static struct s3c_fb_platdata real6410_lcd_pdata[] __initdata = {
> + {
> + .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
> + .win[0] = &real6410_lcd_type0_fb_win,
> + .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> + .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
> + }, {
> + .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
> + .win[0] = &real6410_lcd_type1_fb_win,
> + .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> + .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
> + },
> + { },
> };
>
> static struct mtd_partition real6410_nand_part[] = {
> @@ -264,7 +272,7 @@ static void real6410_parse_features(
> "screen type already set\n", f);
> } else {
> int li = f - '0';
> - if (li >= ARRAY_SIZE(real6410_fb_win))
> + if (li >= ARRAY_SIZE(real6410_lcd_pdata))
> printk(KERN_INFO "REAL6410: '%c' out "
> "of range LCD mode\n", f);
> else {
> @@ -288,13 +296,11 @@ static void __init real6410_machine_init(void)
> /* Parse the feature string */
> real6410_parse_features(&features, real6410_features_str);
>
> - real6410_lcd_pdata.win[0] = &real6410_fb_win[features.lcd_index];
> -
> printk(KERN_INFO "REAL6410: selected LCD display is %dx%d\n",
> - real6410_lcd_pdata.win[0]->win_mode.xres,
> - real6410_lcd_pdata.win[0]->win_mode.yres);
> + real6410_lcd_pdata[features.lcd_index].win[0]->win_mode.xres,
> + real6410_lcd_pdata[features.lcd_index].win[0]->win_mode.yres);
>
> - s3c_fb_set_platdata(&real6410_lcd_pdata);
> + s3c_fb_set_platdata(&real6410_lcd_pdata[features.lcd_index]);
> s3c_nand_set_platdata(&real6410_nand_info);
> s3c24xx_ts_set_platdata(NULL);
>
> --
> 1.6.6.rc2
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v3 0/4] video: s3c-fb: Rearrange the elements in platform data
2012-03-24 16:40 [PATCH v3 0/4] video: s3c-fb: Rearrange the elements in platform data Thomas Abraham
` (3 preceding siblings ...)
2012-03-24 16:40 ` [PATCH v3 4/4] ARM: Samsung: Rework platform data of s3c-fb driver Thomas Abraham
@ 2012-04-12 2:20 ` Florian Tobias Schandinat
4 siblings, 0 replies; 8+ messages in thread
From: Florian Tobias Schandinat @ 2012-04-12 2:20 UTC (permalink / raw)
To: linux-arm-kernel
On 03/24/2012 04:28 PM, Thomas Abraham wrote:
> Changes since v2:
> - Patch 3/4 is a new patch in this series. The real6410 and mini6410 boards
> use the display controllers window configuration data to represent video
> timing of two different lcd panels. Since the window configuration data
> should be not be used to specify timing of two different panels, this has
> been reworked in such a way that two instance of display controller's
> platform data is setup for the two supported lcd panels. Depending on the
> lcd panel specified using boot parameters, the corresponding platform data
> is registered. This maintains backward compatibility with existing
> functionality of supporting multiple lcd panels at runtime.
>
> Changes since v1:
> - Includes all changes suggested by Jingoo Han.
> - Reworked s3c-fb platform data in all Samsung SoC based board files.
>
> This patchset rearranges the elements in the platform data of the s3c-fb
> driver with the intent of adding device tree support to the driver in
> subsequent patches.
>
> The first patch moves the video timing information from the individual window
> setup data into the platform specific configuration section in the platform
> data. The video timing is independent of the window setup. The resolution of
> the window could be smaller than that of the lcd panel attached. So the video
> timing data is removed from window configuration data.
>
> The second patch removes the need for the 'default_win' element in the
> platform data. This element was used to decide whether the video data
> output from the controller should be enabled or disabled when the window
> specified by 'default_win' is enabled or disabled. With the first patch
> removing the need for atleast one window to be of the same resolution as
> that of the lcd panel, it is now possible to decide when to enable/disable
> the video data output based on the state of each window. If any of the
> window is active, the lcd data output is enabled. Otherwise, the lcd data
> output is disabled. Hence, the 'default_win' parameter from the platform
> data can be removed, which anyways cannot be specified when using
> device tree.
>
> The third patch reworks the display controller's platform data that was
> used to supply video timing information for two different panels on the
> mini6410 and real6410 boards. That was not the correct usage of the window
> data and hence reworks the runtime handling of two different lcd panels.
>
> For all the Samsung SoC based boards, the forth patch reworks the platform
> data of the display controller based on the changes introduced in the first
> two patches.
>
> This patch series is based on
> http://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git [for-next]
>
> with all patches merged from
> https://github.com/schandinat/linux-2.6.git [fbdev-next]
>
> and tested one Exynos4210 based Origen board (only compile tested for
> other boards)
>
> Thomas Abraham (4):
> video: s3c-fb: move video interface timing out of window setup data
> video: s3c-fb: remove 'default_win' element from platform data
> ARM: s3c64xx: Decouple lcd type from display controller window data
> ARM: Samsung: Rework platform data of s3c-fb driver
Applied this series.
Thanks,
Florian Tobias Schandinat
>
> arch/arm/mach-exynos/mach-nuri.c | 26 +++---
> arch/arm/mach-exynos/mach-origen.c | 24 +++--
> arch/arm/mach-exynos/mach-smdkv310.c | 28 ++++---
> arch/arm/mach-exynos/mach-universal_c210.c | 26 +++---
> arch/arm/mach-s3c24xx/mach-smdk2416.c | 27 +++---
> arch/arm/mach-s3c64xx/mach-anw6410.c | 25 +++---
> arch/arm/mach-s3c64xx/mach-crag6410.c | 25 +++---
> arch/arm/mach-s3c64xx/mach-hmt.c | 24 +++--
> arch/arm/mach-s3c64xx/mach-mini6410.c | 92 +++++++++++--------
> arch/arm/mach-s3c64xx/mach-real6410.c | 90 +++++++++++--------
> arch/arm/mach-s3c64xx/mach-smartq5.c | 26 +++---
> arch/arm/mach-s3c64xx/mach-smartq7.c | 26 +++---
> arch/arm/mach-s3c64xx/mach-smdk6410.c | 25 +++---
> arch/arm/mach-s5p64x0/mach-smdk6440.c | 24 +++--
> arch/arm/mach-s5p64x0/mach-smdk6450.c | 24 +++--
> arch/arm/mach-s5pc100/mach-smdkc100.c | 27 +++---
> arch/arm/mach-s5pv210/mach-aquila.c | 36 ++++----
> arch/arm/mach-s5pv210/mach-goni.c | 26 +++---
> arch/arm/mach-s5pv210/mach-smdkv210.c | 24 +++--
> arch/arm/plat-samsung/include/plat/fb.h | 11 ++-
> drivers/video/s3c-fb.c | 135 +++++++++++++--------------
> 21 files changed, 426 insertions(+), 345 deletions(-)
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-04-12 2:20 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-24 16:40 [PATCH v3 0/4] video: s3c-fb: Rearrange the elements in platform data Thomas Abraham
2012-03-24 16:40 ` [PATCH v3 1/4] video: s3c-fb: move video interface timing out of window setup data Thomas Abraham
2012-03-24 16:40 ` [PATCH v3 2/4] video: s3c-fb: remove 'default_win' element from platform data Thomas Abraham
2012-03-24 16:40 ` [PATCH v3 3/4] ARM: s3c64xx: Decouple lcd type from display controller window data Thomas Abraham
2012-03-28 10:07 ` Jingoo Han
2012-03-24 16:40 ` [PATCH v3 4/4] ARM: Samsung: Rework platform data of s3c-fb driver Thomas Abraham
2012-03-28 10:07 ` Jingoo Han
2012-04-12 2:20 ` [PATCH v3 0/4] video: s3c-fb: Rearrange the elements in platform data Florian Tobias Schandinat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).