summaryrefslogtreecommitdiffstats
path: root/drivers/video/s3c-fb.c
Commit message (Collapse)AuthorAgeFilesLines
* video: s3c-fb: Add support EXYNOS5 FIMDJingoo Han2012-03-061-5/+47
| | | | | | | | | | | | | | | | This patch adds s3c_fb_driverdata s3c_fb_data_exynos5 for EXYNOS5 and adds extended timing control setting. EXYNOS5 FIMD needs extended setting for video timing control. Additional bits are added to VIDTCON2, VIDWxxADD2, VIDOSDxA and VIDOSDxB registers in order to set timing value for lager resolution. Also, address offset of VIDTCONx registers is changed from 0x0 to 0x20000, thus variable type should be changed to int type to handle the address offset of VIDTCONx registers for EXYNOS5 FIMD. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
* video: s3c-fb: use devm_request_irq()Jingoo Han2012-02-241-4/+1
| | | | | | | | The devm_ functions allocate memory that is released when a driver detaches. This patch uses devm_request_irq of these functions. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
* video: s3c-fb: add video clock running at data under-flowJingoo Han2012-01-281-0/+23
| | | | | | | | | This patch adds video clock running at data under-flow. It means that the pixel clock is continuously provided to lcd module, even when under-run occurs. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
* video: s3c-fb: add alpha value width settingJingoo Han2012-01-281-0/+18
| | | | | | | | | | This patch adds alpha value width setting according to transparency value of each window format, using BLENDCON register. When alpha value is 8 bits, BLENDCON will set alpha value width as 8 bits. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
* video: s3c-fb: fix checkpatch errorJingoo Han2012-01-281-1/+2
| | | | | | | | | This patch fixes the checkpatch error listed below: ERROR: trailing statements should be on next line Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
* video: s3c-fb: Convert to devm style allocationMark Brown2012-01-281-27/+5
| | | | | | | | | Saves some code, especially useful as the code saved is mostly in the infrequently tested error paths. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
* video: s3c-fb: Don't keep device runtime active when openMark Brown2012-01-031-22/+0
| | | | | | | | | | | Allow the controller to be runtime suspended when the screen is blanked by not taking a runtime reference while the device is open. This allows greater system wide power savings when used with a standard application layer and ensures that the screen does not blank unless requested. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
* video: s3c-fb: Hold runtime PM references when touching registersMark Brown2012-01-031-0/+22
| | | | | | | | | Take a runtime PM reference whenever updating registers in preparation for suspending the device when the framebuffer is blanked. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
* video: s3c-fb: Take a runtime PM reference when unblankedMark Brown2012-01-031-12/+54
| | | | | | | | | | | | | | | | | | When the framebuffer is unblanked hold a runtime PM reference. This prevents us powering down when userspace has left an image on the framebuffer and prepares the way for being able to power down the hardware when an application still has the device open. Since we now hold a runtime PM reference whenever the display is unblanked there is no need for the runtime power management to disable and enable the display, and doing so would lead to runtime PM trying to recurse into itself when called from the blanking code, so split the runtime PM into separate functions which only deal with the clocks. The PM core will runtime resume the device prior to system suspend. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
* video: s3c-fb: Disable runtime PM in error paths from probeMark Brown2012-01-031-2/+5
| | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
* video: s3c-fb: Use s3c_fb_enable() to enable the framebufferMark Brown2012-01-031-27/+28
| | | | | | | | | | | | The s3c-fb driver has a function called s3c_fb_enable() which turns on and off the physical output. However it is only actually used in paths which disable the screen, the enabling just writes to the register. Make the code less confusing by ensuring that the enable also goes through the same path. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
* video: s3c-fb: Make runtime PM functional againMark Brown2012-01-031-20/+31
| | | | | | | | | | | | | | | | | | | | | | | | The change in "video: s3c-fb: modify runtime pm functions" (commit 35784b) renders the runtime power management for the device completely ineffectual as while it leaves runtime power management notionally enabled a runtime power reference is held for the entire time the device is registered meaning it will never actually do anything. A further issue is introduced as runtime power management is added during the system suspend path which is not something which drivers are supposed to do and would interact poorly if there were any operations done in the runtime power management callbacks. While this does make things simpler (the main motivation for the original change) it will not only cause us to use more power in the framebuffer controller but will also prevent us entering lower power domain and SoC wide states as we can never power down the domain containing the device. Since neither of these things is desirable revert the change. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
* video: s3c-fb: add shadow register protectJingoo Han2011-12-191-1/+15
| | | | | | | | | Shadow registers should be protectd whenever the registers are updated. Shadow registers are updated after SHADOWCON shadow register is cleared. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
* video: s3c-fb: modify runtime pm functionsJingoo Han2011-12-191-31/+20
| | | | | | | | | | | | | | | | | | | | | | | | Runtime suspend and runtime resume are modified in order to reduce the complexity and improve the usability of runtime pm. After probe function, s3c-fb driver is not suspended until suspend or remove is called. The scheme is changed as follows: runtime_get is only called in probe and resume. runtime_put is only called in remove and suspend. open/close cannot call the runtime_get/put. Also, runtime_susepnd/resume are just called by runtime pm, not doing suspend/resume routine any longer. This is because open/close cannot call the runtime_get/put; the suspend/resume routine in runtime_suspend/resume were previously used when open and close were called. The name of s3c-fb dev_pm_ops is changed from s3cfb_pm_ops to s3c_fb_pm_ops in order to use more consistent naming. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
* video: s3c-fb: set missing bitmask of enabled hardware windowJingoo Han2011-12-191-0/+1
| | | | | | | | This patch set missing bitmask of enabled hardware window which should be checked whenever the hardware window is enabled. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
* video: s3c-fb: Unify runtime and system PM functionsMark Brown2011-12-031-74/+1
| | | | | | | | | | The s3c-fb driver has separate runtime and system PM functions but the implementations are identical so far as I can tell so unify them for simplicity. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
* video: convert drivers/video/* to use module_platform_driver()Axel Lin2011-12-031-12/+1
| | | | | | | | | | | | | | | | | This patch converts the drivers in drivers/video/* to use the module_platform_driver() macro which makes the code smaller and a bit simpler. Cc: Ben Dooks <ben@simtec.co.uk> Cc: Manuel Lauss <mano@roarinelk.homelinux.net> Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Wan ZongShun <mcuos.com@gmail.com> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Lennert Buytenhek <buytenh@wantstofly.org> Acked-by: Alexey Charkov <alchark@gmail.com> Acked-by: Damian Hobson-Garcia <dhobsong@igel.co.jp> Acked-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
* video: s3c-fb: fix transparency length for pixel blendingJingoo Han2011-11-111-1/+2
| | | | | | | | Transparency length is fixed for pixel blending in order to support ARGB 8888 format. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
* video: s3c-fb: Add S5P64X0 specific s3c_fb_driverdataAjay Kumar2011-09-141-0/+27
| | | | | | | | | | | This patch: -- Adds s3c_fb_driverdata for S5P64X0, which supports 3 windows. -- Also, register "s5p64x0-fb" type driver_data. Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com> Acked-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
* video: s3c-fb: Add support EXYNOS4 FIMDJingoo Han2011-08-241-4/+84
| | | | | | | | | | | | | | | | | | | This patch adds struct s3c_fb_driverdata s3c_fb_data_exynos4 for EXYNOS4 and adds lcd clock gating support. FIMD driver needs two clocks for FIMD IP and LCD pixel clock. Previously, both clocks are provided by using bus clock such as HCLK. However, EXYNOS4 can not select HCLK for LCD pixel clock because the EXYNOS4 FIMD IP does not have the CLKSEL bit of VIDCON0. So, FIMD driver should provide the lcd clock using SCLK_FIMD as LCD pixel clock for EXYNOS4. The driver selects enabling lcd clock according to has_clksel which means the CLKSEL bit of VIDCON0. If there is has_clksel, the driver will not enable the lcd clock using SCLK_FIMD because bus clock using HCLK is used a LCD pixel clock. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
* s3c-fb: use display information in info not in var for panningLaurent Pinchart2011-08-191-1/+1
| | | | | | | | We must not use any information in the passed var besides xoffset, yoffset and vmode as otherwise applications might abuse it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Jingoo Han <jg1.han@samsung.com>
* video: s3c-fb: move enabling channel for windowJingoo Han2011-06-091-7/+7
| | | | | | | | | This patch moves enabling channel for window, because there should be enabling channel before enabling window. If the sequence is reversed, it makes the problem in displaying images to lcd panel. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* video: s3c-fb: fix virtual resolution checkingJingoo Han2011-06-091-3/+2
| | | | | | | | | | | | | This patch fixes mishandling in virtual resolution checking. Previously, virtual resolution is changed to virtual_x and virtual_y which mean the size for buffer allocation, when s3c_fb_check_var is called by fb_check_var. However, it is meaningless, since virtual_x and virtual_y are fixed and user cannot change virtual resolution. Therefore, virtual resolution should be more than resolution such as xres and yres. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* video: s3c-fb: fix misleading kfree in remove functionJingoo Han2011-06-091-2/+1
| | | | | | | This patch fixes misleading kfree in remove function. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* video: s3c-fb: correct transparency checking in 32bppJingoo Han2011-05-241-1/+1
| | | | | | | | | | | | | 32bpp means ARGB 8888 in the driver, therfore the transparency length and offset should be 8 and 24 respectively. However, the transparency length and offset were previously 0, which means that the driver supports RGB 888 without alpha blending when 32bpp is used. So, the transparency checking in 32bpp is corrected so that the transparency length and offset are 8 and 24 respectively. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* video: s3c-fb: add gpio setup function to resume functionJingoo Han2011-05-241-2/+4
| | | | | | | | This patch adds gpio setup function to resume function to ensure gpio used by FIMD IP and LCD panel during a resume. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* video: s3c-fb: add window variant information for S5PJingoo Han2011-05-241-10/+67
| | | | | | | | | | Compared to s3c64xx, S5P series such as S5PC100 and S5PV210 have the different window features including valid bpp, palette size and palette bpp. Therefore, window variant information for S5P should be added. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* video: s3c-fb: add additional validate bppsJingoo Han2011-05-241-5/+10
| | | | | | | | | | Additional validate bpps are added to windows as follows: window0: 18 bpp for RGB666 window1, 2 and 3: 28 bpp for ARGB4888 window4: 19 bpp for ARGB1666, 28 bpp for ARGB4888 Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* video: s3c-fb: correct window osd size offset valuesJingoo Han2011-05-241-2/+2
| | | | | | | | | | | Offset values for OSD size registers of window 1 and 2 are corrected. The offset values of OSD size registers are as follows: window0: VIDOSDC (0x8) window1 and 2: VIDOSDD (0xc) window3 and 4: not present Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* drivers/video: Convert release_resource to release_mem_regionJulia Lawall2011-05-241-4/+2
| | | | | | | | | | | | | | | | | | | | | Request_mem_region should be used with release_mem_region, not release_resource. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @s exists@ expression e1,e2,e3,e4,e; @@ *e4 = request_mem_region(e1,e2,e3) ... when != e4 = e *release_resource(e4); // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* video: s3c-fb: add spinlock to interrupt routineJingoo Han2011-04-111-0/+7
| | | | | | | | The spinlock is added to interrupt routine to ensure that the driver is protected against multiple accesses. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* video: s3c-fb: make runtime pm functions staticJingoo Han2011-04-111-2/+2
| | | | | | | This patch makes runtime pm functions static. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* video: s3c-fb: fix checkpatch errors and warningJingoo Han2011-04-061-3/+5
| | | | | | | | | | | | | | | | This patch fixes the checkpatch errors listed below: ERROR: space required before the open parenthesis '(' ERROR: need consistent spacing around '+' (ctx:WxV) ERROR: space prohibited before that close parenthesis ')' Also, following warning is fixed by adding 'platid' variable which can reduce number of lines exceeding 80 characters. WARNING: line over 80 characters Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* video: s3c-fb: return proper error if clk_get failsaxel lin2011-03-221-0/+1
| | | | | | | | Return PTR_ERR(sfb->bus_clk) instead of 0 if clk_get fails. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* s3c-fb: add support for runtime pmJingoo Han2010-12-211-4/+107
| | | | | | | | | | | | | This patch adds support for runtime pm using the functions. - pm_runtime_get_sync() - pm_runtime_put_sync() pm_runtime_get_sync() and pm_runtime_put_sync() are called when open or release function of framebufer driver is called to inform the system if hardware is idle or not. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* s3c-fb: automatically calculate pixel clock when none is givenMaurus Cuelenaere2010-08-111-0/+25
| | | | | | | | | | | | | | | | | | | | Add a simple algorithm which calculates the pixel clock based on the video mode parameters. This is only done when no pixel clock is supplied through the platform data. This allows drivers to omit the pixel clock data and thus share the algorithm used for calculating it. Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com> Cc: Pawel Osciak <p.osciak@samsung.com> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Cc: InKi Dae <inki.dae@samsung.com> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Russell King <rmk@arm.linux.org.uk> Tested-by: Donghwa Lee <yiffie9819@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* s3c-fb: add support for DMA channel control on S5PV210Pawel Osciak2010-08-111-0/+15
| | | | | | | | | | | | | | S5PV210 SoCs allow enabling/disabling DMA channels per window. For a window to display data from framebuffer memory, its channel has to be enabled. Signed-off-by: Pawel Osciak <p.osciak@samsung.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: InKi Dae <inki.dae@samsung.com> Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* s3c-fb: fix section mismatchMarek Szyprowski2010-08-111-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the following section mismatch errors: WARNING: vmlinux.o(.data+0x20b40): Section mismatch in reference from the variable s3c_fb_driver_ids to the (unknown reference) .devinit.data:(unknown) The variable s3c_fb_driver_ids references the (unknown reference) __devinitdata (unknown) If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console, WARNING: vmlinux.o(.data+0x20b58): Section mismatch in reference from the variable s3c_fb_driver_ids to the (unknown reference) .devinit.data:(unknown) The variable s3c_fb_driver_ids references the (unknown reference) __devinitdata (unknown) If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console, WARNING: vmlinux.o(.data+0x20b70): Section mismatch in reference from the variable s3c_fb_driver_ids to the (unknown reference) .devinit.data:(unknown) The variable s3c_fb_driver_ids references the (unknown reference) __devinitdata (unknown) If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console, Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: InKi Dae <inki.dae@samsung.com> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* s3c-fb: protect window-specific registers during updatesPawel Osciak2010-08-111-0/+7
| | | | | | | | | | | | | | Newer hardware (S3C6410, S5P) have the ability to block updates from shadow registers during reconfiguration. Add protect calls for set_par and clear protection when resetting. Signed-off-by: Pawel Osciak <p.osciak@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: InKi Dae <inki.dae@samsung.com> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* s3c-fb: correct window osd size and alpha register handlingPawel Osciak2010-08-111-7/+47
| | | | | | | | | | | | | | S3C64xx and S5P OSD registers for OSD size and alpha are as follows: VIDOSDC: win 0 - size, win 1-4: alpha VIDOSDD: win 1-2 - size; not present for windows 0, 3 and 4 Signed-off-by: Pawel Osciak <p.osciak@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: InKi Dae <inki.dae@samsung.com> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* s3c-fb: add SHADOWCON shadow register locking support for S5PV210Pawel Osciak2010-08-111-4/+36
| | | | | | | | | | | | | S5PV210 allows per-window locking of register value updates from shadow registers. Signed-off-by: Pawel Osciak <p.osciak@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: InKi Dae <inki.dae@samsung.com> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* s3c-fb: window 3 of 64xx+ does not have an osd_d registerPawel Osciak2010-08-111-1/+0
| | | | | | | | | | Signed-off-by: Pawel Osciak <p.osciak@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: InKi Dae <inki.dae@samsung.com> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* s3c-fb: add wait for VSYNC ioctlPawel Osciak2010-08-111-1/+165
| | | | | | | | | | | | | Add VSYNC interrupt support and an ioctl that allows waiting for it. Interrupts are turned on only when needed. Signed-off-by: Pawel Osciak <p.osciak@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: InKi Dae <inki.dae@samsung.com> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* s3c-fb: add support for display panningPawel Osciak2010-08-111-0/+68
| | | | | | | | | | | | | | | | | | Supports all bpp modes. The PRTCON register is used to disable in-hardware updates of registers that store start and end addresses of framebuffer memory. This prevents display corruption in case we do not make it before VSYNC with updating them atomically. With this feature there is no need to wait for a VSYNC interrupt before each such update. Signed-off-by: Pawel Osciak <p.osciak@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: InKi Dae <inki.dae@samsung.com> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* s3c-fb: separate S5PC100 and S5PV210 framebuffer driver data structuresPawel Osciak2010-08-111-3/+34
| | | | | | | | | | | | | | | S5PC100 and S5PV210 framebuffer devices differ slightly in terms of available registers and their driver data structures have to be separate. Those differences include dissimilar ways to control shadow register updates. Signed-off-by: Pawel Osciak <p.osciak@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: InKi Dae <inki.dae@samsung.com> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* s3c-fb: fix various null references on framebuffer memory alloc failurePawel Osciak2010-08-111-3/+5
| | | | | | | | | | | | | | | | | | | | The following problems were found in the above situation: sfb->windows[win] was being assigned at the end of s3c_fb_probe_win only. This resulted in passing a NULL to s3c_fb_release_win if probe_win returned early and a memory leak. dma_free_writecombine does not allow its third argument to be NULL. fb_dealloc_cmap does not verify whether its argument is not NULL. Signed-off-by: Pawel Osciak <p.osciak@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: InKi Dae <inki.dae@samsung.com> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* s3c-fb: integrate palette setup code into main driverBen Dooks2010-08-111-1/+32
| | | | | | | | | | | | | Remove the palette setup code from the header files and put it into the main driver. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Pawel Osciak <p.osciak@samsung.com> Cc: InKi Dae <inki.dae@samsung.com> Cc: KyungMin Park <kyungmin.park.samsung.com> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* s3c-fb: udpate to support s3c2416/s3c2443 style hardwareBen Dooks2010-08-111-31/+131
| | | | | | | | | | | | | | | | | | | | | Update the variant and window variant structures with the necessary changes to support the older style of hardware where these are not in the same place. Add the support for the s3c2443/s3c2416 hardware by using the platform-device s3c2443 to cover both, and add the initialisation data for these. Also change to including just the v4 header files for the moment until the last of the merging of these is sorted out. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Pawel Osciak <p.osciak@samsung.com> Cc: InKi Dae <inki.dae@samsung.com> Cc: KyungMin Park <kyungmin.park.samsung.com> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* s3c-fb: initial move to unifying the header filesBen Dooks2010-08-111-28/+180
| | | | | | | | | | | | | | | | Remove the various header files that configure this driver and use the platform device name to select the correct configuration at probe time. Currently this does not remove the header files, only updates the driver and the relevant platform files. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Pawel Osciak <p.osciak@samsung.com> Cc: InKi Dae <inki.dae@samsung.com> Cc: KyungMin Park <kyungmin.park.samsung.com> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* s3c-fb: only init window colour key controls for windows with blendingBen Dooks2010-08-111-3/+11
| | | | | | | | | | | | | | | | | The driver clears all windows, but also sets the windows' colour key controls at the same time. However, the last window does not have these registers as it is always blended into the previous window. Move the colour key initialisation into the probe, and run it for only nr_win-1 windows. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Pawel Osciak <p.osciak@samsung.com> Cc: InKi Dae <inki.dae@samsung.com> Cc: KyungMin Park <kyungmin.park.samsung.com> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
OpenPOWER on IntegriCloud