aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/omapfb
Commit message (Collapse)AuthorAgeFilesLines
* more driver stuff from 3.2.72Wolfgang Wiedmeyer2015-10-235-107/+347
|
* OMAP: DSS2: OMAPFB: Reduce stack usageTomi Valkeinen2011-05-121-34/+61
| | | | | | | | | | omapfb_mode_to_timings() had struct fb_info, struct fb_var and struct fb_ops allocated from stack. This caused the stack usage grow quite high. Use kzalloc to allocate the structs instead. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: OMAPFB: remove dead codeTomi Valkeinen2011-05-121-29/+0
| | | | | | Remove old unused code lying inside #if 0. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: OMAPFB: make DBG() more resistant in if-else constructionsNiels de Vos2011-05-111-2/+4
| | | | | | | | | | When DBG() is used in a simple if-else, the resulting code path currently depends on the definition of DBG(). Inserting the statement in a "do { ... } while (0)" prevents this possible misuse. Signed-off-by: Niels de Vos <ndevos@redhat.com> [tomi.valkeinen@ti.com: changed the title of the commit msg] Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: Convert simple/strict_strto* to kstrto*Tomi Valkeinen2011-05-111-7/+14
| | | | | | | | | | | Convert simple/strict_strto* functions to kstrto* functions. Only simple cases are converted. simple_strto* uses are still left to places where it is used to parse numbers from a list of numbers. These need some other solution than kstrto*. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: OMAPFB: Remove implicit display update on unblankJani Nikula2011-05-111-13/+0
| | | | | | | | | | | | | | | | Currently omapfb does an implicit display update (for manual update displays) on unblank. There is no guarantee that the framebuffer contains a valid image when unblank is called. When using manual update displays it is the responsibility of the user space to update the display, and so it should be in this case also. This patch removes the implicit display update on unblank. Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com> [tomi.valkeinen@ti.com: improved description] Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: OMAPFB: Handle errors when initializing panelTomi Valkeinen2011-05-111-21/+59
| | | | | | | | | | Errors from the panel driver were ignored during panel initialization. Handle the errors and fail accordingly. Also move the display initialization to a separate function to make it cleaner. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: Add method for querying display dimensions from DSS driversJani Nikula2011-05-112-4/+20
| | | | | | | | Add get_dimensions() to struct omap_dss_driver. Use the call, if supported by the driver, in OMAPFB. Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: Move display.h to include/video/Tomi Valkeinen2011-05-114-4/+4
| | | | | | | arch/arm/plat-omap/include/plat/display.h is an include for the OMAP DSS driver. A more logical place for it is in include/video. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPFB: Adding a check for timings in set_def_modeJanorkar, Mayuresh2011-03-111-7/+16
| | | | | | | | | | | | | | | | | | | When omapfb.mode is passed through bootargs, when omapfb is setting mode, it would check if timings passed are fine for panel attached to it. It makes use of check_timing API provided by the panel. In current code if check_timing API is not available for attached panel, OMAPFB would return -EINVAL and BPP sent via bootargs will not have any effect. In case of panels like TAAL panel, omapfb or any other driver should not be allowed to change the timings. So bpps sent via bootargs will not have an effect. In such case we can check only the x_res and y_res with the panels resolution and if they match go ahead and set the bpps. The bpp value sent via bootarg would have an effect. Signed-off-by: Mayuresh Janorkar <mayur@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP2PLUS: DSS2: Add OMAP4 Kconfig supportMayuresh Janorkar2011-03-111-3/+3
| | | | | | | Enable DSS2 and OMAPFB for OMAP4 in Kconfig Signed-off-by: Mayuresh Janorkar <mayur@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: OMAPFB: Add null pointer checkSamreen2011-01-101-2/+3
| | | | | | | | A null pointer check added. And using kstrdup() instead of kmalloc() & strcpy() Signed-off-by: Samreen <samreen@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
* OMAP: DSS2: OMAPFB: Allow usage of def_vrfb only for omap2,3Senthilvadivu Guruswamy2010-10-221-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>
* OMAP: DSS2: OMAPFB: make VRFB depends on OMAP2,3Senthilvadivu Guruswamy2010-10-221-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>
* OMAP: DSS2: OMAPFB: swap front and back porches for both hsync and vsyncTasslehoff Kjappfot2010-10-221-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>
* OMAP: DSS2: OMAPFB: add support for FBIO_WAITFORVSYNCGrazvydas Ignotas2010-08-051-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>
* OMAP: DSS2: OMAPFB: Fix invalid bpp for PAL and NTSC modesMaurus Cuelenaere2010-08-051-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>
* OMAP: DSS2: OMAPFB: Fix probe error pathAfzal Mohammed2010-08-051-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>
* OMAP: DSS2: OMAPFB: Fix sysfs mirror input checkJani Nikula2010-08-051-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>
* OMAP: DSS2: OMAPFB: Remove redundant color register range checkJani Nikula2010-08-051-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>
* OMAP: DSS2: OMAPFB: Remove redundant rotate range checkJani Nikula2010-08-051-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>
* OMAP: DSS2: OMAPFB: Check fb2display() return valueJani Nikula2010-08-052-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>
* OMAP: DSS2: OMAPFB: Add some locking debug checksVille Syrjälä2010-08-034-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>
* OMAP: DSS2: OMAPFB: Make lockdep happyVille Syrjälä2010-08-033-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>
* OMAP: DSS2: OMAPFB: Convert the memory region locking to rwsemVille Syrjälä2010-08-034-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>
* OMAP: DSS2: OMAPFB: Add locking for memory regionsVille Syrjälä2010-08-034-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>
* OMAP: DSS2: OMAPFB: Add support for switching memory regionsVille Syrjälä2010-08-034-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>
* OMAP: DSS2: OMAPFB: Skip unnecessary set_overlay_info()Ville Syrjälä2010-08-031-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>
* OMAP: DSS2: OMAPFB: Check var even if there isn't memoryVille Syrjälä2010-08-031-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>
* OMAP: DSS2: OMAPFB: Refactor overlay address calculationsVille Syrjälä2010-08-031-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>
* OMAP: DSS2: check lock_fb_info() return valueJani Nikula2010-05-182-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>
* OMAP: DSS2: fix lock_fb_info() and omapfb_lock() locking orderJani Nikula2010-05-182-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>
* include cleanup: Update gfp.h and slab.h includes to prepare for breaking ↵Tejun Heo2010-03-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implicit slab.h inclusion from percpu.h 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>
* OMAP: DSS2: OMAPFB: Constify some function parametersVille Syrjälä2010-03-011-9/+9
| | | | | Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
* OMAP: DSS2: OMAPFB: Remove FB_OMAP2_FORCE_AUTO_UPDATETomi Valkeinen2010-02-242-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>
* OMAP: DSS2: move timing functionsTomi Valkeinen2010-02-241-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>
* OMAP: DSS2: move enable/disable/suspend/resumeTomi Valkeinen2010-02-241-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>
* OMAP: DSS2: move update() and sync()Tomi Valkeinen2010-02-242-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>
* OMAP: DSS2: move set/get_update_mode()Tomi Valkeinen2010-02-242-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>
* OMAP: DSS2: move enable/get_te()Tomi Valkeinen2010-02-242-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>
* OMAP: DSS2: move get_recommended_bpp()Tomi Valkeinen2010-02-242-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>
* OMAP: DSS2: move get_resolution()Tomi Valkeinen2010-02-242-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>
* OMAP: DSS2: move wait_vsync()Tomi Valkeinen2010-02-241-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>
* OMAP: DSS2: move memory_read()Tomi Valkeinen2010-02-241-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>
* OMAP: DSS2: move run_test()Tomi Valkeinen2010-02-241-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>
* OMAP: DSS2: OMAPFB: fix cleanup on dssdev enable errorTomi Valkeinen2010-02-181-1/+3
| | | | | | If enabling a dss device failed, omapfb didn't exit, leading to crash. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
* OMAP: DSS2: OMAPFB: fix dssdev cleanup on errorTomi Valkeinen2010-02-181-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>
* OMAP: DSS2: OMAPFB: Add omapfb_update_window prototypeTomi Valkeinen2010-02-151-0/+3
| | | | Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
* OMAP: DSS2: OMAPFB: implement OMAPFB_GET_DISPLAY_INFOTomi Valkeinen2010-02-151-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>
* OMAP: DSS2: Improve Kconfig help textsTomi Valkeinen2010-02-121-1/+1
| | | | Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>