aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/omapfb (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-10-22OMAP: DSS2: OMAPFB: Allow usage of def_vrfb only for omap2,3Senthilvadivu Guruswamy1-0/+10
VRFB is supported only on OMAP2 and OMAP3 platforms. If VRFB rotation is not supported by the hardware and the user requests VRFB rotation, print a warning and ignore the request from the user. Signed-off-by: Senthilvadivu Guruswamy <svadivu@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-10-22OMAP: DSS2: OMAPFB: make VRFB depends on OMAP2,3Senthilvadivu Guruswamy1-1/+1
config VRFB should depend on ARCH_OMAP2 or ARCH_OMAP3. Signed-off-by: Senthilvadivu Guruswamy <svadivu@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-10-22OMAP: DSS2: OMAPFB: swap front and back porches for both hsync and vsyncTasslehoff Kjappfot1-8/+8
Framebuffer's left and right margins are relative to the active pixel area. Front and back porches are relative to the sync area. Left margin was wrongly assigned to front porch (and right to back), this patch fixes it. Signed-off-by: tasskjapp@gmail.com Reviewed-by: Russ.Dill@gmail.com Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-05OMAP: DSS2: OMAPFB: add support for FBIO_WAITFORVSYNCGrazvydas Ignotas1-0/+12
FBIO_WAITFORVSYNC is a stardard ioctl for waiting vsync, already used by some userspace, so add it as an alias for OMAPFB_WAITFORVSYNC. Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-05OMAP: DSS2: OMAPFB: Fix invalid bpp for PAL and NTSC modesMaurus Cuelenaere1-2/+2
omapfb_mode_to_timings() sets the bpp to 0 when bootarg omapfb.mode is set to either "pal" or "ntsc". This patch corrects this by setting the bpp to 24, as would be done if omapdss_default_get_recommended_bpp() would be called. Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-05OMAP: DSS2: OMAPFB: Fix probe error pathAfzal Mohammed1-7/+7
Move sysfs entry creation to omapfb_probe() from omapfb_create_framebuffers(). This will make sure that sysfs entry is not left behind in case of unsuccessful probe due to failure in enabling fb0 of omapfb_create_framebuffers(). Signed-off-by: Afzal Mohammed <lazfamam@gmail.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-05OMAP: DSS2: OMAPFB: Fix sysfs mirror input checkJani Nikula1-1/+1
Using bool silently converted input to 0 or 1, making the range check useless. Use unsigned long instead, and convert to bool later. Found by Coverity. Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-05OMAP: DSS2: OMAPFB: Remove redundant color register range checkJani Nikula1-5/+0
Unsigned regno can never be less than zero. Found by Coverity. Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-05OMAP: DSS2: OMAPFB: Remove redundant rotate range checkJani Nikula1-1/+1
Unsigned rotate can never be less than zero. Found by Coverity. Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-05OMAP: DSS2: OMAPFB: Check fb2display() return valueJani Nikula2-1/+4
Make sure NULL return value of fb2display() is not referenced. Found by Coverity. Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-03OMAP: DSS2: OMAPFB: Add some locking debug checksVille Syrjälä4-0/+13
Trigger WARN_ON() messages from various places in the code in case the memory region is not currently locked. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-03OMAP: DSS2: OMAPFB: Make lockdep happyVille Syrjälä3-13/+36
When more than one memory region needs to be lockd at the same time use the memory region id to fix the order in which the locks are taken. Also one needs to use the _nested() versions of the locking primitives. The memory region id can serve as the lock class there as well. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-03OMAP: DSS2: OMAPFB: Convert the memory region locking to rwsemVille Syrjälä4-25/+10
R/W semaphore is a good fit for the memory region locking pattern. So use it. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-03OMAP: DSS2: OMAPFB: Add locking for memory regionsVille Syrjälä4-21/+140
Add locking to the memory regions to make sure the memory region size won't be changed while some other piece of code is performing some checks or setup based on that information. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-03OMAP: DSS2: OMAPFB: Add support for switching memory regionsVille Syrjälä4-63/+179
Separate the memory region from the framebuffer device a little bit. It's now possible to select the memory region used by the framebuffer device using the new mem_idx parameter of omapfb_plane_info. If the mem_idx is specified it will be interpreted as an index into the memory regions array, if it's not specified the framebuffer's index is used instead. So by default each framebuffer keeps using it's own memory region which preserves backwards compatibility. This allows cloning the same memory region to several overlays and yet each overlay can be controlled independently since they can be associated with separate framebuffer devices. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-03OMAP: DSS2: OMAPFB: Skip unnecessary set_overlay_info()Ville Syrjälä1-0/+2
In omapfb_enable_overlay() if the overlay state is already what we want skip the set_overlay_info(). Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-03OMAP: DSS2: OMAPFB: Check var even if there isn't memoryVille Syrjälä1-6/+5
If video memory hasn't been allocate have check_fb_var() still check most of the settings, just skip the ones involving the size of the memory region. Also skip the memory address calculations in omapfb_setup_overlay() if there's no memory. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-03OMAP: DSS2: OMAPFB: Refactor overlay address calculationsVille Syrjälä1-25/+38
Split the overlay address calculations into their own function. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-05-18OMAP: DSS2: check lock_fb_info() return valueJani Nikula2-8/+16
Give up if lock_fb_info() fails, following the same convention as other lock_fb_info() users. Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-05-18OMAP: DSS2: fix lock_fb_info() and omapfb_lock() locking orderJani Nikula2-6/+6
Framebuffer ioctl processing forces lock_fb_info() -> omapfb_lock() locking order. Follow that order to avoid possible circular locking dependency, detected by lockdep. Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-03-30include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.hTejun Heo1-0/+1
percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-01OMAP: DSS2: OMAPFB: Constify some function parametersVille Syrjälä1-9/+9
Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-02-24OMAP: DSS2: OMAPFB: Remove FB_OMAP2_FORCE_AUTO_UPDATETomi Valkeinen2-23/+3
Remove the option for forcing auto-update. Auto-update for manual update displays is no more a DSS feature, so if a particular display devices does have auto-update mode, it should be in display's custom settings. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-02-24OMAP: DSS2: move timing functionsTomi Valkeinen1-5/+5
Move check/set/get_timings() from omap_dss_device to omap_dss_driver. This is part of a larger patch-set, which moves the control from omapdss driver to the display driver. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-02-24OMAP: DSS2: move enable/disable/suspend/resumeTomi Valkeinen1-6/+6
Move enable/disable/suspend/resume from omap_dss_device to omap_dss_driver. This is part of a larger patch-set, which moves the control from omapdss driver to the display driver. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-02-24OMAP: DSS2: move update() and sync()Tomi Valkeinen2-10/+10
Move update() and sync() from omap_dss_device to omap_dss_driver. Also, update was hardcoded to use virtual channel 0. This patch adds a parameter that specifies the VC. This is part of a larger patch-set, which moves the control from omapdss driver to the display driver. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-02-24OMAP: DSS2: move set/get_update_mode()Tomi Valkeinen2-17/+23
Move set/get_update_mode() from omap_dss_device to omap_dss_driver. This is part of a larger patch-set, which moves the control from omapdss driver to the display driver. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-02-24OMAP: DSS2: move enable/get_te()Tomi Valkeinen2-6/+7
Move enable/get_te() from omap_dss_device to omap_dss_driver. This is part of a larger patch-set, which moves the control from omapdss driver to the display driver. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-02-24OMAP: DSS2: move get_recommended_bpp()Tomi Valkeinen2-5/+32
Move get_recommended_bpp() from omap_dss_device to omap_dss_driver. This is part of a larger patch-set, which moves the control from omapdss driver to the display driver. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-02-24OMAP: DSS2: move get_resolution()Tomi Valkeinen2-6/+7
Move get_resolution() from omap_dss_device to omap_dss_driver. This is part of a larger patch-set, which moves the control from omapdss driver to the display driver. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-02-24OMAP: DSS2: move wait_vsync()Tomi Valkeinen1-1/+1
Move wait_vsync() from omap_dss_device to overlay manager. This is part of a larger patch-set, which moves the control from omapdss driver to the display driver. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-02-24OMAP: DSS2: move memory_read()Tomi Valkeinen1-2/+2
Move memory_read() from omap_dss_device to omap_dss_driver. This is part of a larger patch-set, which moves the control from omapdss driver to the display driver. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-02-24OMAP: DSS2: move run_test()Tomi Valkeinen1-4/+4
Move run_test() from omap_dss_device to omap_dss_driver. This is part of a larger patch-set, which moves the control from omapdss driver to the display driver. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-02-18OMAP: DSS2: OMAPFB: fix cleanup on dssdev enable errorTomi Valkeinen1-1/+3
If enabling a dss device failed, omapfb didn't exit, leading to crash. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-02-18OMAP: DSS2: OMAPFB: fix dssdev cleanup on errorTomi Valkeinen1-2/+7
If there was a dss device without a driver and thus omapfb probe failed, ref counts could be left to dss devices. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-02-15OMAP: DSS2: OMAPFB: Add omapfb_update_window prototypeTomi Valkeinen1-0/+3
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-02-15OMAP: DSS2: OMAPFB: implement OMAPFB_GET_DISPLAY_INFOTomi Valkeinen1-0/+24
Previously the only place to get the size of the display was from the DSS's sysfs interface, making, for example, configuring overlays and doing updates on manual displays more difficult. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-02-12OMAP: DSS2: Improve Kconfig help textsTomi Valkeinen1-1/+1
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-01-12OMAP: DSS2: OMAPFB: fix crash when panel driver was not loadedTomi Valkeinen1-0/+5
If the panel's probe had failed, omapfb would still go on, eventually crashing. A better fix would be to handle each display properly, and leaving just the failed display out. But that is a bigger change. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-01-11OMAP: DSS2: OMAPFB: fix omapfb_free_fbmem()Tomi Valkeinen1-0/+1
Fixes bug causing VRFB memory area to be released twice. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com> Reported-by: Eino-Ville Talvala <talvala@stanford.edu>
2009-12-09OMAP: DSS2: omapfb driverTomi Valkeinen6-0/+3708
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>