summaryrefslogtreecommitdiff
path: root/drivers/video/sh_mobile_meram.c
AgeCommit message (Collapse)Author
2014-04-07Rewind v3.13-rc3+ (78fd82238d0e5716) to v3.12Scott Wood
2013-11-26fbdev: sh_mobile_meram: Fix defined but not used compiler warningsGeert Uytterhoeven
If both CONFIG_PM_SLEEP and CONFIG_PM_RUNTIME are not set: drivers/video/sh_mobile_meram.c:573: warning: ‘sh_mobile_meram_suspend’ defined but not used drivers/video/sh_mobile_meram.c:597: warning: ‘sh_mobile_meram_resume’ defined but not used Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-01-03Drivers: video: remove __dev* attributes.Greg Kroah-Hartman
CONFIG_HOTPLUG is going away as an option. As a result, the __dev* markings need to be removed. This change removes the use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit from these drivers. Based on patches originally written by Bill Pemberton, but redone by me in order to handle some of the coding style issues better, by hand. Cc: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-19sh_mobile_meram: Add direct MERAM allocation APILaurent Pinchart
The API can be used to allocate and free MERAM blocks directly, without going through ICBs. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-07-19sh_mobile_meram: Use direct function calls for the public APILaurent Pinchart
There's no reason to use abstract operation pointers to implement the MERAM API. Replace them by direct function calls. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-07-19sh_mobile_meram: Rename operations to cache_[alloc|free|update]Laurent Pinchart
The MERAM operations meram_register, meram_unregister and meram_update handle LCDC cache. In preparation for "raw" MERAM allocation, rename them to more appropriate names. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12fbdev: sh_mobile_meram: Implement system suspend/resumeLaurent Pinchart
Supporting runtime PM is very nice, but that's not a reason not to implement system suspend/resume properly. Reported-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12fbdev: sh_mobile_meram: Remove unneeded sanity checksLaurent Pinchart
The meram_register(), meram_unregister() and meram_update() operations check that the pointers they get from the caller are not NULL. Those checks can be remove, as the caller already ensures that the pointers are valid. The platform sanity checks can also be removed, as the operations can't be accessed without valid platform data anyway. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12fbdev: sh_mobile_meram: Don't perform update in register operationLaurent Pinchart
Remove the RGB or Y/C base address update from the meram_register() operation, as this belongs to the meram_update() operation. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12fbdev: sh_mobile_meram: Allocate ICBs automaticallyLaurent Pinchart
Instead of manually specifying the ICBs to use in platform data, allocate them automatically at runtime. The range of reserved ICBs (for instance to be used through UIO), if any, is passed in the platform data reserved_icbs field as a bitmask. The MERAM registration function now returns a pointer to an opaque MERAM object, which is passed to the update and unregistration functions. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12fbdev: sh_mobile_meram: Use genalloc to manage MERAM allocationLaurent Pinchart
Instead of requiring the users to hardcode MERAM allocation in platform data, allocate blocks at runtime using genalloc. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12fbdev: sh_mobile_meram: Divide the code into sectionsLaurent Pinchart
And rename a couple of constants to make prefixes more uniform. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12fbdev: sh_mobile_meram: Don't inline everythingLaurent Pinchart
Let the compiler decide which complex functions to inline, and constify constant static arrays. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12fbdev: sh_mobile_meram: Add struct sh_mobile_meram_icbLaurent Pinchart
The new structure stores ICB parameters for ICBs. Instead of modifying the struct sh_mobile_meram_cfg instances passed by callers, store the ICB parameters internally and make the public API take const pointers to sh_mobile_meram_cfg. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12fbdev: sh_mobile_meram: Make current_reg field store the current reg setLaurent Pinchart
Make sure current_reg == 0/1 always mean register set A/B through all the code. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12fbdev: sh_mobile_meram: Make variables unsigned where applicableLaurent Pinchart
Many variables, such as loop counters, sizes and offsets, should be unsigned integers. Make them so. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12fbdev: sh_mobile_meram: Add _cfg suffix to struct sh_mobile_meram_icbLaurent Pinchart
The structure describe ICB configuration, no ICB objects themselves. Rename it to sh_mobile_meram_icb_cfg in preparation for the addition of an ICB structure. All the structure fields are unsigned integers, make them so. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12fbdev: sh_mobile_meram: Request memory regions for memory resourcesLaurent Pinchart
Make sure the registers and MERAM spaces are reserved before using them. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2011-12-03video: convert drivers/video/* to use module_platform_driver()Axel Lin
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>
2011-09-05sh_mobile_meram: Reset ICBs at unregistration timeLaurent Pinchart
When ICBs are unregistered and later reused they need to be reset to avoid data corruption. Set the WBF, WF and RF bits to make sure ICBs get reset properly. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-08-19fbdev: sh_mobile_meram: Remove unneeded sh_mobile_meram.hLaurent Pinchart
The drivers/video/sh_mobile_meram.h header contains unused definitions and declarations. Move the only used macro to sh_mobile_meram.c, and remove the header. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2011-08-19fbdev: sh_mobile_meram: Fix MExxCTL register save on runtime PM suspendLaurent Pinchart
To reset the ICB on resume the MExxCTL register needs to be OR'ed with MExxCTL_WBF | MExxCTL_WF | MExxCTL_RF, no set to that value. Fix this. This fixes corruption at the bottom of the display when resuming from runtime PM. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2011-08-19fbdev: sh_mobile_meram: Validate ICB configuration outside mutexLaurent Pinchart
Validate as much of the requested ICB configuration as possible outside of the mutex-protected region when registering ICBs. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2011-08-19fbdev: sh_mobile_meram: Replace hardcoded register values with macrosLaurent Pinchart
Instead of hardcoding register values through the driver, define macros for individual register bits using the register name and the bit name, and use the macros. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2011-08-19fbdev: sh_mobile_meram: Backup/restore device registers on shutdown/resumeDamian Hobson-Garcia
Save and reconfigure the MERAM registers when the MERAM is powered down and restored Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp>
2011-08-19fbdev: sh_mobile_meram: Move private data from .h to .cDamian Hobson-Garcia
There is no reason for sh_mobile_meram_priv to be in the .h file since it should be private to sh_mobile_meram.c Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp>
2011-08-19fbdev: sh_mobile_meram: Enable runtime PMDamian Hobson-Garcia
Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp>
2011-06-24fbdev: sh_mobile_meram: Correct pointer check for YCbCr chroma planeDamian Hobson-Garcia
The check was intended to test if we have a valid pointer to write into, but it mistakenly checks the pointer contents instead. Since a valid pointer is mandatory for the chroma data if a YCbCr format is used, the pointer check has been removed. Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-05-23sh_mobile_meram: Add support for NV24 framebuffersDamian
Since the NV24 framebuffer has a CbCr plane that is twice as wide as the Y plane, it needs to be handled as a special case. Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-05-23sh_mobile_meram: MERAM framework for LCDCDamian
Based on the patch by Takanari Hayama <taki@igel.co.jp> Adds support framework necessary to use Media RAM (MERAM) caching functionality with the LCDC. The MERAM is accessed through up to 4 Interconnect Buffers (ICBs). ICB numbers and MERAM address ranges to use are specified in by filling in the .meram_cfg member of the LCDC platform data Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>