diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-11-29 10:34:02 +0200 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-11-29 10:34:02 +0200 |
commit | fa1f94979883aeef231fa023e5b9be971d459952 (patch) | |
tree | d06f817560313c7ba1d1109fb3481dab7bdd42c7 /drivers/video | |
parent | 0074120228496d6fceb75ba17d21dc0b7476f8c4 (diff) | |
parent | 5a9c30a32dd187344cb966db3016861b6b385384 (diff) | |
download | linux-fa1f94979883aeef231fa023e5b9be971d459952.tar.bz2 |
Merge branch 'samsung-fb-next' of git://github.com/jingoo/linux into for-linus
Samsung Framebuffer changes for the 3.8 merge window.
- The bit definitions of header file are updated.
- Some minor typos are fixed.
- Some minor bugs of s3c_fb_check_var() are fixed.
* 'samsung-fb-next' of git://github.com/jingoo/linux:
video: s3c-fb: fix red offset and length for ARGB232 format
video: s3c-fb: return an error when bpp is invalid
video: s3c-fb: add "drop through" comment
video: s3c-fb: use dev_get_drvdata() instead of platform_get_drvdata()
video: s3c-fb: use FIMD_V8_VIDTCON0 for EXYNOS5 FIMD
video: s3c-fb: fix help message for FB_S3C_DEBUG_REGWRITE
video: s3c-fb: fix typo in comment
video: s3c-fb: add the bit definitions for VIDCON0_VIDOUT_WB
video: s3c-fb: move the bit definitions for DITHMODE register
video: s3c-fb: move the bit definitions for WINxMAP and WPALCON register
video: s3c-fb: move the bit definitions for VIDINTCON0 register
video: s3c-fb: move the address definition for VIDOSD register
video: s3c-fb: move the address definitions for VIDTCON registers
video: s3c-fb: clean the bit definition for WINCON register
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/Kconfig | 2 | ||||
-rw-r--r-- | drivers/video/s3c-fb.c | 24 |
2 files changed, 12 insertions, 14 deletions
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index d08d7998a4aa..9018a90b4588 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -2045,7 +2045,7 @@ config FB_S3C_DEBUG_REGWRITE bool "Debug register writes" depends on FB_S3C ---help--- - Show all register writes via printk(KERN_DEBUG) + Show all register writes via pr_debug() config FB_S3C2410 tristate "S3C2410 LCD framebuffer support" diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c index 2ed7b633bbd9..1a00ad241edd 100644 --- a/drivers/video/s3c-fb.c +++ b/drivers/video/s3c-fb.c @@ -189,7 +189,7 @@ struct s3c_fb_vsync { /** * struct s3c_fb - overall hardware state of the hardware - * @slock: The spinlock protection for this data sturucture. + * @slock: The spinlock protection for this data structure. * @dev: The device that we bound to, for printing, etc. * @bus_clk: The clk (hclk) feeding our interface and possibly pixclk. * @lcd_clk: The clk (sclk) feeding pixclk. @@ -268,10 +268,10 @@ static int s3c_fb_check_var(struct fb_var_screeninfo *var, case 8: if (sfb->variant.palette[win->index] != 0) { /* non palletised, A:1,R:2,G:3,B:2 mode */ - var->red.offset = 4; + var->red.offset = 5; var->green.offset = 2; var->blue.offset = 0; - var->red.length = 5; + var->red.length = 2; var->green.length = 3; var->blue.length = 2; var->transp.offset = 7; @@ -288,6 +288,7 @@ static int s3c_fb_check_var(struct fb_var_screeninfo *var, /* 666 with one bit alpha/transparency */ var->transp.offset = 18; var->transp.length = 1; + /* drop through */ case 18: var->bits_per_pixel = 32; @@ -329,6 +330,7 @@ static int s3c_fb_check_var(struct fb_var_screeninfo *var, default: dev_err(sfb->dev, "invalid bpp\n"); + return -EINVAL; } dev_dbg(sfb->dev, "%s: verified parameters\n", __func__); @@ -1544,8 +1546,7 @@ static int __devexit s3c_fb_remove(struct platform_device *pdev) #ifdef CONFIG_PM_SLEEP static int s3c_fb_suspend(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct s3c_fb *sfb = platform_get_drvdata(pdev); + struct s3c_fb *sfb = dev_get_drvdata(dev); struct s3c_fb_win *win; int win_no; @@ -1572,8 +1573,7 @@ static int s3c_fb_suspend(struct device *dev) static int s3c_fb_resume(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct s3c_fb *sfb = platform_get_drvdata(pdev); + struct s3c_fb *sfb = dev_get_drvdata(dev); struct s3c_fb_platdata *pd = sfb->pdata; struct s3c_fb_win *win; int win_no; @@ -1623,7 +1623,7 @@ static int s3c_fb_resume(struct device *dev) if (!win) continue; - dev_dbg(&pdev->dev, "resuming window %d\n", win_no); + dev_dbg(dev, "resuming window %d\n", win_no); s3c_fb_set_par(win->fbinfo); } @@ -1636,8 +1636,7 @@ static int s3c_fb_resume(struct device *dev) #ifdef CONFIG_PM_RUNTIME static int s3c_fb_runtime_suspend(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct s3c_fb *sfb = platform_get_drvdata(pdev); + struct s3c_fb *sfb = dev_get_drvdata(dev); if (!sfb->variant.has_clksel) clk_disable_unprepare(sfb->lcd_clk); @@ -1649,8 +1648,7 @@ static int s3c_fb_runtime_suspend(struct device *dev) static int s3c_fb_runtime_resume(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct s3c_fb *sfb = platform_get_drvdata(pdev); + struct s3c_fb *sfb = dev_get_drvdata(dev); struct s3c_fb_platdata *pd = sfb->pdata; clk_prepare_enable(sfb->bus_clk); @@ -1910,7 +1908,7 @@ static struct s3c_fb_driverdata s3c_fb_data_exynos4 = { static struct s3c_fb_driverdata s3c_fb_data_exynos5 = { .variant = { .nr_windows = 5, - .vidtcon = VIDTCON0, + .vidtcon = FIMD_V8_VIDTCON0, .wincon = WINCON(0), .winmap = WINxMAP(0), .keycon = WKEYCON, |