summaryrefslogtreecommitdiffstats
path: root/drivers/video/fbdev/omap2/dss/hdmi4.c
Commit message (Collapse)AuthorAgeFilesLines
* drm/omap: move omapdss & displays under omapdrmTomi Valkeinen2015-12-291-839/+0
| | | | | | | | | | | | | | Now that omapfb has its own copy of omapdss and display drivers, we can move omapdss and display drivers which omapdrm uses to omapdrm's directory. We also need to change the main drm Makefile so that omapdrm directory is always entered, because omapdss has a file that can't be built as a module. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Acked-by: Dave Airlie <airlied@gmail.com> Acked-by: Rob Clark <robdclark@gmail.com>
* OMAPDSS: remove extra out == NULL checksTomi Valkeinen2015-12-291-1/+1
| | | | | | | | All the output drivers check for 'out' being NULL, but it can never be NULL. Remove the check. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
* OMAPDSS: hdmi: Reconfigure and restart audio when display is enabledJyri Sarha2015-09-241-11/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reconfigure and restart audio when display is enabled, if audio playback was active before. This is needed in a situation when an audio+video stream application opens the audio stream before the video. When video stream is opened the display mode may change and that aborts audio playback, because the display is momentarily turned off. The audio configuration is stored when it is successfully applied and a boolean is set when the audio playback is started and unset when stopped. This data is used to reconfigure the audio when display is re-enabled. The audio playback is aborted if the reconfiguration fails. A new spin lock is introduced in order to protect state variables related to audio playback status. This is needed for the transition from display enabled state (when audio start/stop commands can be written to HW) to display disabled state (when audio start/stop commands update only the hdmi.audio_playing variable) to always serialize correctly with the start/stop audio commands. The already existing mutex can not be used, because the audio start and stop commands are executed in atomic context. For example: when display is turned back on we take the spinlock and we can be sure that the audio start/stop status will not change while we update the HW according to hdmi.audio_playing state and set hdmi.display_enabled to true. After releasing the lock hdmi.display_enabled is true and all audio_start and audio_stop commands write their stuff directly to HW. Signed-off-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* Merge omapdss scaling fixesTomi Valkeinen2015-06-221-1/+1
|\
| * OMAPDSS: HDMI4: fix error handlingTomi Valkeinen2015-06-171-1/+1
| | | | | | | | | | | | | | | | | | Error handling in hdmi_power_on_full() is not correct, and could leave resources unfreed. Fix this by arranging the error labels correctly. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* | OMAPDSS: componentize omapdssTomi Valkeinen2015-06-171-4/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | omapdss kernel module contains drivers for multiple devices, one for each DSS submodule. The probing we have at the moment is a mess, and doesn't give us proper deferred probing nor ensure that all the devices are probed before omapfb/omapdrm start using omapdss. This patch solves the mess by using the component system for DSS submodules. The changes to all DSS submodules (dispc, dpi, dsi, hdmi4/5, rfbi, sdi, venc) are the same: probe & remove functions are changed to bind & unbind, and new probe & remove functions are added which call component_add/del. The dss_core driver (dss.c) acts as a component master. Adding and matching the components is simple: all dss device's child devices are added as components. However, we do have some dependencies between the drivers. The order in which they should be probed is reflected by the list in core.c (dss_output_drv_reg_funcs). The drivers are registered in that order, which causes the components to be added in that order, which makes the components to be bound in that order. This feels a bit fragile, and we probably should improve the code to manage binds in random order. However, for now, this works fine. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
* | OMAPDSS: remove uses of __init/__exitTomi Valkeinen2015-06-171-3/+3
|/ | | | | | | | | | | | | | The following patches will add component handling to omapdss, improving the handling of deferred probing. However, at the moment we're using quite a lot of __inits and __exits in the driver, which prevent normal dynamic probing and removal. This patch removes most of the uses of __init and __exit, so that we can register drivers after module init, and so that we can unregister drivers even if the module is built-in. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
* Merge tag 'driver-core-3.19-rc1' of ↵Linus Torvalds2014-12-141-1/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core update from Greg KH: "Here's the set of driver core patches for 3.19-rc1. They are dominated by the removal of the .owner field in platform drivers. They touch a lot of files, but they are "simple" changes, just removing a line in a structure. Other than that, a few minor driver core and debugfs changes. There are some ath9k patches coming in through this tree that have been acked by the wireless maintainers as they relied on the debugfs changes. Everything has been in linux-next for a while" * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits) Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries" fs: debugfs: add forward declaration for struct device type firmware class: Deletion of an unnecessary check before the function call "vunmap" firmware loader: fix hung task warning dump devcoredump: provide a one-way disable function device: Add dev_<level>_once variants ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries ath: use seq_file api for ath9k debugfs files debugfs: add helper function to create device related seq_file drivers/base: cacheinfo: remove noisy error boot message Revert "core: platform: add warning if driver has no owner" drivers: base: support cpu cache information interface to userspace via sysfs drivers: base: add cpu_device_create to support per-cpu devices topology: replace custom attribute macros with standard DEVICE_ATTR* cpumask: factor out show_cpumap into separate helper function driver core: Fix unbalanced device reference in drivers_probe driver core: fix race with userland in device_add() sysfs/kernfs: make read requests on pre-alloc files use the buffer. sysfs/kernfs: allow attributes to request write buffer be pre-allocated. fs: sysfs: return EGBIG on write if offset is larger than file size ...
| * Merge branch 'platform/remove_owner' of ↵Greg Kroah-Hartman2014-11-031-1/+0
| |\ | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into driver-core-next Remove all .owner fields from platform drivers
| | * video: fbdev: omap2: dss: drop owner assignment from platform_driversWolfram Sang2014-10-201-1/+0
| | | | | | | | | | | | | | | | | | | | | A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
* | | OMAPDSS: hdmi: Remove __exit qualifier from hdmi_uninit_output()Jyri Sarha2014-12-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Remove __exit qualifier from hdmi_uninit_output() because it is used also in omapdss_hdmihw_probe(). Signed-off-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* | | OMAPDSS: hdmi4: Register ASoC platform device for omap hdmi audioJyri Sarha2014-12-011-0/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | Implements callbacks for OMAP HDMI audio platform driver and registers it in probe function. Unregistering is done in remove function. Signed-off-by: Jyri Sarha <jsarha@ti.com> Reviewed-by: Mark Brown <broonie@kernel.org> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* | | OMAPDSS: hdmi4: Remove callbacks for the old ASoC DAI driverJyri Sarha2014-12-011-113/+0
| | | | | | | | | | | | | | | | | | | | | | | | Removes the OMAP4 HDMI audio callbacks for the old external DAI driver. Signed-off-by: Jyri Sarha <jsarha@ti.com> Reviewed-by: Mark Brown <broonie@kernel.org> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* | | OMAPDSS: hdmi: Make hdmi structure publicJyri Sarha2014-11-261-22/+8
| | | | | | | | | | | | | | | | | | | | | | | | Unify the private anonymous struct in hdmi4.c and hdmi5.c, name it as struct omap_hdmi, and make it public in hdmi.h. Signed-off-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* | | OMAPDSS: HDMI: use common DSS PLL supportTomi Valkeinen2014-11-121-37/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we have the common DSS PLL support, change HDMI to use it. This results in quite a lot of changes, but almost all of them are trivial name changes. The function to program the PLL settings can be removed from hdmi_pll.c, as the common PLL API contains the same functionality. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* | | OMAPDSS: HDMI: split PLL enable & configTomi Valkeinen2014-11-121-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the moment we have one function, hdmi_pll_enable, which enables the PLL and writes the PLL configuration to registers. To make the HDMI PLL ahere to the DSS PLL API, split the hdmi_pll_enable into two parts: hdmi_pll_enable which enables the PLL HW, and hdmi_pll_set_config which writes the config. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* | | OMAPDSS: HDMI: store WP pointer to hdmi_pll_dataTomi Valkeinen2014-11-121-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HDMI PLL code needs the pointer to the WP block so that it can manage its power. Currently this is passed as a function parameter to hdmi_pll_enable and hdmi_pll_disable. To make the PLL function adhere to the DSS PLL API, we need to remove the WP parameter. This patch stores the WP pointer to hdmi_pll_data in hdmi_pll_init, so that it's available when needed. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* | | OMAPDSS: HDMI: rewrite HDMI PLL calculation codeTomi Valkeinen2014-11-121-6/+3
|/ / | | | | | | | | | | | | | | | | | | | | The code calculating HDMI PLL parameters has always been very confusing. Now that we are implementing a common PLL library for the DSS, it's important that the PLL code is understandable. This patch rewrites the calculation code, and removes a few hacks that were used there. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* | OMAPDSS: set suppress_bind_attrsTomi Valkeinen2014-10-221-0/+1
|/ | | | | | | | | | | omapdss drivers cannot handle devices being unbound while the devices are part of a connected display pipeline. Module refcounts are used to prevent unloading the modules, but one can still manually unbind the devices via sysfs, causing crash. Set suppress_bind_attrs to disable the bind/unbind support via sysfs. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: HDMI4: add support to set infoframe & HDMI modeTomi Valkeinen2014-07-041-31/+22
| | | | | | | | Instead of using hardcoded AVI infoframe, and a custom HDMI/DVI mode selection based in internal videomode tables, add support to set the infoframe and HDMI/DVI mode. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: HDMI: move irq & phy pwr handlingTomi Valkeinen2014-05-091-6/+69
| | | | | | | | | | | | | | | | | | | | | | HDMI IRQ handling was moved into hdmi_phy.c when restructuring the HDMI driver. While this worked fine, it's not correct. The HDMI IRQ handling should be either in the hdmi_wp, or in the main hdmi driver. This patch moves the handling to the main hdmi driver, as I feel it's a more appropriate choice. This move also requires changing the handling of the PHY power, as that was partly handled in the IRQ handler. The PHY power is handled via the WP module. An option would be to give HDMI PHY driver function pointers that it could use to manage the PHY power, but as the PHY power is not needed to access the PHY registers, the handling was also moved to the main HDMI driver. This could be changed later if need be. Note that there's slightly similar power issue with the PLL: the HDMI PLLs power is also handled via the WP module. For now, the PLL power handling is still done inside the PLL driver. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: HDMI4: set regulator voltage to 1.8VTomi Valkeinen2014-05-071-0/+10
| | | | | | | | | | Set the HDMI vdda regulator voltage to the required 1.8V. This is required for the case when the regulator in the DT data defines a range of allowed voltages. In this case it's required to set the voltage, as otherwise enabling the voltage fails. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: HDMI: lane config supportTomi Valkeinen2014-05-071-0/+28
| | | | | | | Add support to configure the pins used for the HDMI lanes. The order and polarity of the lanes can be defined in the DT data. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* video: move fbdev to drivers/video/fbdevTomi Valkeinen2014-04-171-0/+703
The drivers/video directory is a mess. It contains generic video related files, directories for backlight, console, linux logo, lots of fbdev device drivers, fbdev framework files. Make some order into the chaos by creating drivers/video/fbdev directory, and move all fbdev related files there. No functionality is changed, although I guess it is possible that some subtle Makefile build order related issue could be created by this patch. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Rob Clark <robdclark@gmail.com> Acked-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
OpenPOWER on IntegriCloud