summaryrefslogtreecommitdiff
path: root/drivers/video/omap2
AgeCommit message (Collapse)Author
2012-02-29Merge branch 'fbdev-for-linus' into fbdev-nextFlorian Tobias Schandinat
2012-02-29OMAPDSS: APPLY: make ovl_enable/disable synchronousTomi Valkeinen
ovl->enable/disable are meant to be synchronous so that they can handle the configuration of fifo sizes. The current kernel doesn't configure fifo sizes yet, and so the code doesn't need to block to function (from omapdss driver's perspective). However, for the users of omapdss a non-blocking ovl->disable is confusing, because they don't know when the memory area is not used any more. Furthermore, when the fifo size configuration is added in the next merge window, the change from non-blocking to blocking could cause side effects to the users of omapdss. So by making the functions block already will keep them behaving in the same manner. And, while not the main purpose of this patch, this will also remove the compile warning: drivers/video/omap2/dss/apply.c:350: warning: 'wait_pending_extra_info_updates' defined but not used Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2012-02-29OMAPDSS: panel-dvi: Add Kconfig dependency on I2CTomi Valkeinen
panel-dvi uses i2c, but the Kconfig didn't have dependency on I2C. Add it. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2012-02-24Merge branch 'fbdev-for-linus' into fbdev-nextFlorian Tobias Schandinat
2012-02-24Merge branch 'for-3.3-rc' of git://gitorious.org/linux-omap-dss2/linux into ↵Florian Tobias Schandinat
fbdev-for-linus
2012-02-23OMAPDSS: HDMI: hot plug detect fixRob Clark
The "OMAPDSS: HDMI: PHY burnout fix" commit switched the HDMI driver over to using a GPIO for plug detect. Unfortunately the ->detect() method was not also updated, causing HDMI to no longer work for the omapdrm driver (because it would actually check if a connection was detected before attempting to enable display). Signed-off-by: Rob Clark <rob@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-02-23OMAPDSS: HACK: Ensure DSS clock domain gets out of idle when HDMI is enabledArchit Taneja
For DSS clock domain to transition from idle to active state. It's necessary to enable the optional clock DSS_FCLK before we enable the module using the MODULEMODE bits in the clock domain's CM_DSS_DSS_CLKCTRL register. This sequence was not followed correctly for the 'dss_hdmi' hwmod and it led to DSS clock domain not getting out of idle when pm_runtime_get_sync() was called for hdmi's platform device. Since the clock domain failed to change it's state to active, the hwmod code disables any clocks it had enabled before for this hwmod. This led to the clock 'dss_48mhz_clk' gettind disabled. When hdmi's runtime_resume() op is called, the call to dss_runtime_get() correctly enables the DSS clock domain this time. However, the clock 'dss_48mhz_clk' is needed for HDMI's PHY to function correctly. Since it was disabled previously, the driver fails when it tries to enable HDMI's PHY. Fix this for now by ensuring that dss_runtime_get() is called before we call pm_runtime_get_sync() for hdmi's platform device. A correct fix for later would be to modify the DSS related hwmod's mainclks, and also some changes in how opt clocks are handled in the DSS driver. This fixes the issue of HDMI not working when it's the default display. The issue is not seen if any other display is already enabled as the first display would have correctly enabled the DSS clockdomain. Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-02-09ARM: omap: fix oops in drivers/video/omap2/dss/dpi.cRussell King
When a PMIC is not found, this driver is unable to obtain its 'vdds_dsi_reg' regulator. Even through its initialization function fails, other code still calls its enable function, which fails to check whether it has this regulator before asking for it to be enabled. This fixes the oops, however a better fix would be to sort out the upper layers to prevent them calling into a module which failed to initialize. Unable to handle kernel NULL pointer dereference at virtual address 00000038 pgd = c0004000 [00000038] *pgd=00000000 Internal error: Oops: 5 [#1] PREEMPT Modules linked in: CPU: 0 Not tainted (3.3.0-rc2+ #228) PC is at regulator_enable+0x10/0x70 LR is at omapdss_dpi_display_enable+0x54/0x15c pc : [<c01b9a08>] lr : [<c01af994>] psr: 60000013 sp : c181fd90 ip : c181fdb0 fp : c181fdac r10: c042eff0 r9 : 00000060 r8 : c044a164 r7 : c042c0e4 r6 : c042bd60 r5 : 00000000 r4 : c042bd60 r3 : c084de48 r2 : c181e000 r1 : c042bd60 r0 : 00000000 Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel Control: 10c5387d Table: 80004019 DAC: 00000015 Process swapper (pid: 1, stack limit = 0xc181e2e8) Stack: (0xc181fd90 to 0xc1820000) fd80: c001754c c042bd60 00000000 c042bd60 fda0: c181fdcc c181fdb0 c01af994 c01b9a04 c0016104 c042bd60 c042bd60 c044a338 fdc0: c181fdec c181fdd0 c01b5ed0 c01af94c c042bd60 c042bd60 c1aa8000 c1aa8a0c fde0: c181fe04 c181fdf0 c01b5f54 c01b5ea8 c02fc18c c042bd60 c181fe3c c181fe08 fe00: c01b2a18 c01b5f48 c01aed14 c02fc160 c01df8ec 00000002 c042bd60 00000003 fe20: c042bd60 c1aa8000 c1aa8a0c c042eff8 c181fe84 c181fe40 c01b3874 c01b29fc fe40: c042eff8 00000000 c042f000 c0449db8 c044ed78 00000000 c181fe74 c042eff8 fe60: c042eff8 c0449db8 c0449db8 c044ed78 00000000 00000000 c181fe94 c181fe88 fe80: c01e452c c01b35e8 c181feb4 c181fe98 c01e2fdc c01e4518 c042eff8 c0449db8 fea0: c0449db8 c181fef0 c181fecc c181feb8 c01e3104 c01e2f48 c042eff8 c042f02c fec0: c181feec c181fed0 c01e3190 c01e30c0 c01e311c 00000000 c01e311c c0449db8 fee0: c181ff14 c181fef0 c01e1998 c01e3128 c18330a8 c1892290 c04165e8 c0449db8 ff00: c0449db8 c1ab60c0 c181ff24 c181ff18 c01e2e28 c01e194c c181ff54 c181ff28 ff20: c01e2218 c01e2e14 c039afed c181ff38 c04165e8 c041660c c0449db8 00000013 ff40: 00000000 c03ffdb8 c181ff7c c181ff58 c01e384c c01e217c c181ff7c c04165e8 ff60: c041660c c003a37c 00000013 00000000 c181ff8c c181ff80 c01e488c c01e3790 ff80: c181ff9c c181ff90 c03ffdcc c01e484c c181ffdc c181ffa0 c0008798 c03ffdc4 ffa0: c181ffc4 c181ffb0 c0056440 c0187810 c003a37c c04165e8 c041660c c003a37c ffc0: 00000013 00000000 00000000 00000000 c181fff4 c181ffe0 c03ea284 c0008708 ffe0: 00000000 c03ea208 00000000 c181fff8 c003a37c c03ea214 1073cec0 01f7ee08 Backtrace: [<c01b99f8>] (regulator_enable+0x0/0x70) from [<c01af994>] (omapdss_dpi_display_enable+0x54/0x15c) r6:c042bd60 r5:00000000 r4:c042bd60 [<c01af940>] (omapdss_dpi_display_enable+0x0/0x15c) from [<c01b5ed0>] (generic_dpi_panel_power_on+0x34/0x78) r6:c044a338 r5:c042bd60 r4:c042bd60 [<c01b5e9c>] (generic_dpi_panel_power_on+0x0/0x78) from [<c01b5f54>] (generic_dpi_panel_enable+0x18/0x28) r7:c1aa8a0c r6:c1aa8000 r5:c042bd60 r4:c042bd60 [<c01b5f3c>] (generic_dpi_panel_enable+0x0/0x28) from [<c01b2a18>] (omapfb_init_display+0x28/0x150) r4:c042bd60 [<c01b29f0>] (omapfb_init_display+0x0/0x150) from [<c01b3874>] (omapfb_probe+0x298/0x318) r8:c042eff8 r7:c1aa8a0c r6:c1aa8000 r5:c042bd60 r4:00000003 [<c01b35dc>] (omapfb_probe+0x0/0x318) from [<c01e452c>] (platform_drv_probe+0x20/0x24) [<c01e450c>] (platform_drv_probe+0x0/0x24) from [<c01e2fdc>] (really_probe+0xa0/0x178) [<c01e2f3c>] (really_probe+0x0/0x178) from [<c01e3104>] (driver_probe_device+0x50/0x68) r7:c181fef0 r6:c0449db8 r5:c0449db8 r4:c042eff8 [<c01e30b4>] (driver_probe_device+0x0/0x68) from [<c01e3190>] (__driver_attach+0x74/0x98) r5:c042f02c r4:c042eff8 [<c01e311c>] (__driver_attach+0x0/0x98) from [<c01e1998>] (bus_for_each_dev+0x58/0x98) r6:c0449db8 r5:c01e311c r4:00000000 [<c01e1940>] (bus_for_each_dev+0x0/0x98) from [<c01e2e28>] (driver_attach+0x20/0x28) r7:c1ab60c0 r6:c0449db8 r5:c0449db8 r4:c04165e8 [<c01e2e08>] (driver_attach+0x0/0x28) from [<c01e2218>] (bus_add_driver+0xa8/0x22c) [<c01e2170>] (bus_add_driver+0x0/0x22c) from [<c01e384c>] (driver_register+0xc8/0x154) [<c01e3784>] (driver_register+0x0/0x154) from [<c01e488c>] (platform_driver_register+0x4c/0x60) r8:00000000 r7:00000013 r6:c003a37c r5:c041660c r4:c04165e8 [<c01e4840>] (platform_driver_register+0x0/0x60) from [<c03ffdcc>] (omapfb_init+0x14/0x34) [<c03ffdb8>] (omapfb_init+0x0/0x34) from [<c0008798>] (do_one_initcall+0x9c/0x164) [<c00086fc>] (do_one_initcall+0x0/0x164) from [<c03ea284>] (kernel_init+0x7c/0x120) [<c03ea208>] (kernel_init+0x0/0x120) from [<c003a37c>] (do_exit+0x0/0x2d8) r5:c03ea208 r4:00000000 Code: e1a0c00d e92dd870 e24cb004 e24dd004 (e5906038) ---[ end trace 9e2474c2e193b223 ]--- Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-02-07Merge tag 'fbdev-fixes-for-3.3-1' of git://github.com/schandinat/linux-2.6Linus Torvalds
fbdev fixes for 3.3 It includes: - compile fix for fsl-diu-fb - fix for a suspend/resume issue in atmel_lcdfb - fix for a suspend/resume issue in OMAP - workaround for a hardware bug to avoid physical damage in OMAP - really trivial dead code removal in intelfb * tag 'fbdev-fixes-for-3.3-1' of git://github.com/schandinat/linux-2.6: atmel_lcdfb: fix usage of CONTRAST_CTR in suspend/resume intelfb: remove some dead code drivers/video: compile fixes for fsl-diu-fb.c OMAPDSS: HDMI: PHY burnout fix OMAP: 4430SDP/Panda: add HDMI HPD gpio OMAP: 4430SDP/Panda: setup HDMI GPIO muxes OMAPDSS: remove wrong HDMI HPD muxing OMAP: 4430SDP/Panda: rename HPD GPIO to CT_CP_HPD OMAP: 4430SDP/Panda: use gpio_free_array to free HDMI gpios OMAPDSS: use sync versions of pm_runtime_put
2012-01-28video: convert drivers/video/* to use module_spi_driver()Axel Lin
This patch converts the drivers in drivers/video/* to use the module_spi_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin <axel.lin@gmail.com> Cc: Imre Deak <imre.deak@nokia.com> Cc: Roger Quadros <roger.quadros@nokia.com> Cc: Steve Sakoman <steve@sakoman.com> Cc: Erik Gilling <konkers@android.com> Cc: Gražvydas Ignotas <notasas@gmail.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2012-01-28video: use gpio_request_oneJingoo Han
Using gpio_request_one can make the code simpler because it can set the direction and initial value in one shot. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Michael Hennerich <michael.hennerich@analog.com> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2012-01-28Merge commit 'v3.3-rc1' into fbdev-nextFlorian Tobias Schandinat
2012-01-26OMAPDSS: HDMI: PHY burnout fixTomi Valkeinen
A hardware bug in the OMAP4 HDMI PHY causes physical damage to the board if the HDMI PHY is kept powered on when the cable is not connected. This patch solves the problem by adding hot-plug-detection into the HDMI IP driver. This is not a real HPD support in the sense that nobody else than the IP driver gets to know about the HPD events, but is only meant to fix the HW bug. The strategy is simple: If the display device is turned off by the user, the PHY power is set to OFF. When the display device is turned on by the user, the PHY power is set either to LDOON or TXON, depending on whether the HDMI cable is connected. The reason to avoid PHY OFF when the display device is on, but the cable is disconnected, is that when the PHY is turned OFF, the HDMI IP is not "ticking" and thus the DISPC does not receive pixel clock from the HDMI IP. This would, for example, prevent any VSYNCs from happening, and would thus affect the users of omapdss. By using LDOON when the cable is disconnected we'll avoid the HW bug, but keep the HDMI working as usual from the user's point of view. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-26OMAPDSS: use sync versions of pm_runtime_putTomi Valkeinen
omapdss doesn't work properly on system suspend. The problem seems to be the fact that omapdss uses pm_runtime_put() functions when turning off the hardware, and when system suspend is in process only sync versions are allowed. Using non-sync versions normally and sync versions when suspending would need rather ugly hacks to convey the information of suspending/not-suspending to different functions. Optimally the driver wouldn't even need to care about this, and the PM layer would handle syncing when suspend is in process. This patch changes all omapdss's pm_runtime_put calls to pm_runtime_put_sync. This fixes the suspend problem, and probably the performance penalty of always using sync versions is negligible. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Acked-by: Kevin Hilman <khilman@ti.com>
2012-01-14Merge branch 'fbdev-next' of git://github.com/schandinat/linux-2.6Linus Torvalds
* 'fbdev-next' of git://github.com/schandinat/linux-2.6: (175 commits) module_param: make bool parameters really bool (drivers/video/i810) Revert "atmel_lcdfb: Adjust HFP calculation so it matches the manual." OMAPDSS: HDMI: Disable DDC internal pull up OMAPDSS: HDMI: Move duplicate code from boardfile OMAPDSS: add OrtusTech COM43H4M10XTC display support OMAP: DSS2: Support for UMSH-8173MD TFT panel ASoC: OMAP: HDMI: Move HDMI codec trigger function to generic HDMI driver OMAPDSS: HDMI: Create function to enable HDMI audio ASoC: OMAP: HDMI: Correct signature of ASoC functions ASoC: OMAP: HDMI: Introduce driver data for audio codec grvga: fix section mismatch warnings video: s3c-fb: Don't keep device runtime active when open video: s3c-fb: Hold runtime PM references when touching registers video: s3c-fb: Take a runtime PM reference when unblanked video: s3c-fb: Disable runtime PM in error paths from probe video: s3c-fb: Use s3c_fb_enable() to enable the framebuffer video: s3c-fb: Make runtime PM functional again drivers/video: fsl-diu-fb: merge fsl_diu_alloc() into map_video_memory() drivers/video: fsl-diu-fb: add default platform ops functions drivers/video: fsl-diu-fb: remove broken reference count enabling the display ...
2012-01-13module_param: make bool parameters really bool (drivers & misc)Rusty Russell
module_param(bool) used to counter-intuitively take an int. In fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy trick. It's time to remove the int/unsigned int option. For this version it'll simply give a warning, but it'll break next kernel version. Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-01-08Merge branch 'for-florian' of git://gitorious.org/linux-omap-dss2/linux into ↵Florian Tobias Schandinat
fbdev-next
2012-01-05OMAPDSS: add OrtusTech COM43H4M10XTC display supportIlya Yanok
dd data for the OrtusTech COM43H4M10XTC display to the generic_dpi_panel driver. CC: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Ilya Yanok <yanok@emcraft.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-05OMAP: DSS2: Support for UMSH-8173MD TFT panelDaniel Mack
This patch adds support for Microtip Technologies' UMSH-8173MD 800x480 RGB TFT panel. Tested with an OMAP3 board. Signed-off-by: Daniel Mack <zonque@gmail.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> [tomi.valkeinen@ti.com: changed the panel name string] Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-05ASoC: OMAP: HDMI: Move HDMI codec trigger function to generic HDMI driverRicardo Neri
The function hdmi_audio_trigger is a callback used by ASoC to stop/start HDMI audio. Also, it does not perform IP-specific configuration directly. Hence, it should be placed in the general portion of the HDMI driver, along with the other ASoC callbacks. Also, make this function static. Signed-off-by: Ricardo Neri <ricardo.neri@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-05OMAPDSS: HDMI: Create function to enable HDMI audioRicardo Neri
In order to separate clearly IP-specific code from general DSS code, a function for OMAP4 audio enable is created. This function is included in the HDMI IP ops to align with the current implementation of the DSS HDMI driver. This function is to be used by the ASoC HDMI audio codec. Signed-off-by: Ricardo Neri <ricardo.neri@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-05ASoC: OMAP: HDMI: Correct signature of ASoC functionsRicardo Neri
These functions require access to IP-secific data. However, it is not possible to pass such data as a function argument as such functions have a specific signature specified by ASoC. Instead, they will have access to the IP-specific data by calling snd_soc_codec_get_drvdata. The codec driver data is set at probe time. Signed-off-by: Ricardo Neri <ricardo.neri@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-05ASoC: OMAP: HDMI: Introduce driver data for audio codecRicardo Neri
Under the new DSS architecture for HDMI, there is a clear separation between general DSS code and HDMI IP-specific data. Functions that require access to the HDMI driver IP-specific data receive an hdmi_ip_data structure. The ASoC codec require access to such IP-specific data. Then, instead of accessing it directly, it will be passed as codec driver data. This also helps to have a clear separation between DSS and ASoC portions of the code. Signed-off-by: Ricardo Neri <ricardo.neri@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-02OMAPDSS: DISPC: Update Scaling Clock LogicChandrabhanu Mahapatra
Clock requirements for scaling in OMAP2, OMAP3 and OMAP4 are different. In OMAP2 and OMAP3 the required clock rate is a function of pixel clock, vertical downscale ratio and horizontal downscale ratio whereas in OMAP4 it is a function of pixel clock and horizontal downscale ratio only. Selection of 3-tap vs 5-tap coefficients depends on clock rate line buffer width in OMAP3 whereas in OMAP4 it is independent of clock rate and line buffer width. In OMAP2 3-tap for vertical and 5-tap for horizontal scaling is used. In OMAP4 5-tap is used both for horizontal and vertical scaling for better performance. Also, the number and width of line buffers differs in OMAP3 and OMAP4. So, clock functions have been fined tuned for OMAP3 and support has been added added for OMAP4. This code has been tested on OMAP2, OMAP3 and OMAP4, and scaling issues due to clock errors have been resolved. Signed-off-by: Chandrabhanu Mahapatra <cmahapatra@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-02OMAPDSS: DISPC: Update Fir CoefficientsChandrabhanu Mahapatra
The FIR coefficients present in kernel are being updated to new coefficients consisting of 24 coefficient tables, with 12 each for 3 tap and 5 tap scenario, which are chosen on the basis of DISPC up/downsampling filters M value. M is the inverse of low pass cut off frequency of the sampling filter. For vertical scaling 3 tap or 5 tap tables are used based on the clock rate and width of the line buffer whereas in OMAP2 3 tap is always used. For horizontal scaling however 5 tap tables are always used. New coefficients and the corresponding logic have been tested on OMAP2, OMAP3 and OMAP4. Horizontal and vertical scaling worked fine except for some 3 tap vs 5 tap issue during vertical upscaling and clock failing issues which is acknowledged in the next patch. Vertical upscaling was found to perform better under 5 taps. The 24 coefficient tables have been moved to another file dispc_coefs.c for proper maintainance. This code is written based on code written by Lajos Molnar <lajos@ti.com> in Android Kernel for scaling. Lajos Molnar <lajos@ti.com> had fine tuned the FIR coefficient selection process and reduced outliness and blockiness around images when upscaling more than 2 times. Signed-off-by: Chandrabhanu Mahapatra <cmahapatra@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-02OMAPDSS: APPLY: fix NULL pointer deref when mgr is not setRob Clark
extra_info_update_ongoing() goes through all overlays, but doesn't check if the overlay is connected to a manager. This leads to a crash whenever an overlay has been detached. Add a check to skip the non-connected overlays. Reported-by: Rob Clark <rob@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-02OMAPDSS: Displays: Make PICODLP driver depend on DPIArchit Taneja
Make PICODLP driver on OMAP2_DSS_DPI since it is the display interface it uses. Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-02OMAPDSS: Panel NEC: Set omap_dss_device states correctlyArchit Taneja
The display state parameter of omap_dss_device struct is not being set correctly in the panel driver NEC panel driver panel-nec-nl8048hl11-01b.c. Set the correct states in the panel's enable/disable/suspend/resume functions. CC: Erik Gilling <konkers@android.com> Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-02OMAPDSS: DSI: Fix HSDIV related PLL info in dsi_dump_clocks()Archit Taneja
The clock names of DSI_PLL_HSDIV_DISPC and DSI_PLL_HSDIV_DSI was made dynamic based on the current value of DISPC and DSI FCLK sources. This doesn't need to be done since we are just interested in the clock names, and not the current clock sources for DISPC and DSI FCLKs. Use only the generic and omap specific names for the DSI PLL's HSDIV clocks. Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-02OMAPDSS: APPLY: move simple_check functionsTomi Valkeinen
The functions dss_ovl_simple_check() and dss_mgr_simple_check() are not really part of the apply mechanism, and can be moved to overlay.c and manager.c. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-02OMAPDSS: fix potential NULL pointer ref in OCP_ERR handling pathRob Clark
The dispc's error handler tries to disable all outputs when OCP_ERR happens. However, the code doesn't check if there actually is a display on each particular output, nor if there's a driver for the display. This may lead to NULL pointer reference. Signed-off-by: Rob Clark <rob@ti.com> [tomi.valkeinen@ti.com: added patch description] Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-02OMAPDSS: APPLY: move check functionsTomi Valkeinen
The functions dss_ovl_check, dss_mgr_check_zorder, dss_mgr_check in apply.c are not really part of the apply mechanism, and can be moved to overlay.c and manager.c. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-02OMAPDSS: APPLY: remove unused variablesTomi Valkeinen
dss_mgr_check_zorder() has two unused variables. Remove them. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-09Merge 3.2-rc5 into staging-nextGreg Kroah-Hartman
This resolves the conflict in the drivers/staging/iio/industrialio-core.c file due to two different changes made to resolve the same problem. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-03video: Remove redundant spi driver bus initializationLars-Peter Clausen
In ancient times it was necessary to manually initialize the bus field of an spi_driver to spi_bus_type. These days this is done in spi_driver_register(), so we can drop the manual assignment. The patch was generated using the following coccinelle semantic patch: // <smpl> @@ identifier _driver; @@ struct spi_driver _driver = { .driver = { - .bus = &spi_bus_type, }, }; // </smpl> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: linux-fbdev@vger.kernel.org Cc: linux-omap@vger.kernel.org Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-12-02OMAPDSS: APPLY: write fifo thresholds only if changedTomi Valkeinen
Current code will always write fifo threshold values to the register, even if they are the same as previously. Separate the setting of fifo fields into a separate function, and only set new values if they are different than the old ones. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: APPLY: add dss_setup_fifosTomi Valkeinen
Currently fifo threshold configuration is done per overlay or per manager. However, when a fifo size configuration is added, we need to always configure the thresholds for all overlays. This patch prepares for that by changing the fifo threshold configuration to always handle all overlays. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: APPLY: simplify dss_mgr_enableTomi Valkeinen
dss_mgr_enable() has some extra assigns to mp->enabled, which can be removed. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: APPLY: add op->enablingTomi Valkeinen
When we are enabling an overlay, there's a point in time when the overlay is not actually enabled yet (nor do we want it to be enabled), but we do want to check if the configuration for the overlay is valid, and to calculate correct fifo thresholds for the soon-to-be-enabled overlay. Current code handled this in a hacky way, setting op->enabled to true temporarily when calling functions that need to consider the state when the overlay is enabled. This patch makes this a bit cleaner, adding "enabling" field, which is set when the overlay is not yet enabled but should be considered in the checks and calculations. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: APPLY: cleanup extra_info_update_ongoingTomi Valkeinen
Trivial cleanup for extra_info_update_ongoing(), making the function a bit cleaner. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: APPLY: add dss_set_go_bits()Tomi Valkeinen
Currently dss_write_regs() implicitely sets the GO bits for all managers with shadow dirty flags set. This is a bit misleading, as one does not presume "write registers" function to also set the GO bit. Thus this patch splits the setting of GO bits into a separate function, dss_set_go_bits, which is used after writing the registers. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: APPLY: clear shadow dirty flags only if GO had been setTomi Valkeinen
In the apply irq handler the code currently clears the shadow dirty flags whenever the manager in question is not busy (i.e. GO bit is down). However, this is not quite right, as the GO bit may have never been set. While not done in the current code, the above would cause bug in scenario where the registers are written, and thus shadow_dirty flag is set, but the GO bit will be set only later. In this case the shadow_dirty flags would be cleared, even if the HW is not using the new configurations. This patch fixes the issue by clearing the shadow flags only when the GO bit is clear, and the GO bit had been set. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: APPLY: fix need_isrTomi Valkeinen
need_isr() should return true whenever there's work that needs to be handled in the VSYNC/FRAMEDONE irq handler. However, need_isr() is missing some cases where we need the irq handler. This patch adds checks for shadow dirty flags, so that the irq handler is started/kept running while shadow dirty flags are set. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: APPLY: fix extra_info_update_ongoingTomi Valkeinen
extra_info_update_ongoing() skipped checks for overlays that were marked as disabled. This doesn't work, as the enable status of an overlay is in the extra_info group, and thus extra_info_update_ongoing() reports false when we are disabling an overlay. This causes wait_pending_extra_info_updates() to not wait for the ongoing overlay disable. This patch changes extra_info_update_ongoing() to check the state of overlays marked as disabled. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: check the return value of dss_mgr_enable()Tomi Valkeinen
Now that dss_mgr_enable returns an error value, check it in all the places dss_mgr_enable is used, and bail out properly. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: APPLY: add return value to dss_mgr_enable()Tomi Valkeinen
Now that dss_mgr_enable() can fail due to checks, make it return the error value. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: APPLY: add checking of ovls/mgrs settingsTomi Valkeinen
Add checks for overlay and manager settings. The checks are a bit complex, as we need to observe the bigger picture instead of overlays and managers independently. Things like the used display and the zorder of other overlays affect the validity of the settings. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: APPLY: add dss_mgr_simple_check()Tomi Valkeinen
Add dss_mgr_simple_check() which is used to check the validity of certain manager attributes. Only attributes that can be checked independently, without knowing the display being used, is done here (thus "simple"). We can use this function in dss_mgr_set_info(). Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: APPLY: add dss_ovl_simple_check()Tomi Valkeinen
Add dss_ovl_simple_check() which is used to check the validity of certain overlay attributes. Only attributes that can be checked independently, without knowing the display being used, is done here (thus "simple"). We can use this function in dss_ovl_set_info(). Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: APPLY: remove runtime_getTomi Valkeinen
apply.c no longer touches any registers if an output is not enabled. This means that we don't need to do dispc_runtime_get() anymore, and the calls can be removed. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>