summaryrefslogtreecommitdiffstats
path: root/drivers/video/fbdev/omap2/dss/dss.c
Commit message (Collapse)AuthorAgeFilesLines
* drm/omap: move omapdss & displays under omapdrmTomi Valkeinen2015-12-291-1329/+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: adopt pinctrl supportDave Gerlach2015-12-171-0/+6
| | | | | | | | | | | | | | | | Update omapdss driver to set the state of the pins to: - "default on resume - "sleep" on suspend By optionally putting the pins into sleep state in the suspend callback we can accomplish two things. - minimize current leakage from pins and thus save power, - prevent the IP from driving pins output in an uncontrolled manner, which may happen if the power domain drops the domain regulator. Signed-off-by: Dave Gerlach <d-gerlach@ti.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: fix probing if rfbi device is enabledTomi Valkeinen2015-07-021-0/+9
| | | | | | | | | | | | | | | | | | | After the commit 736e60ddc215b85e73bbf7da26e1cde84cc9500f ("OMAPDSS: componentize omapdss") the dss core device will wait until all the subdevices have been successfully probed. However, we don't have a working driver for RFBI, so if RFBI device exists, omapdss will never get probed. All the .dtsi files set RFBI as disabled, except am4372.dtsi. This causes omapdss probe to not finish on AM4 devices. This patch makes omapdss driver skip adding rfbi device as a subcomponent, solving the issue. This should be reverted when we have a working RFBI driver. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reported-by: Felipe Balbi <balbi@ti.com>
* OMAPDSS: componentize omapdssTomi Valkeinen2015-06-171-4/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-13/+13
| | | | | | | | | | | | | | 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>
* OMAPDSS: fix dss_init_ports error handlingTomi Valkeinen2015-06-171-3/+6
| | | | | | | | | | | The return value of dss_init_ports() is not handled at all, causing crashes later if the call failed. This patch adds the error handling, and we also move the call to a slightly earlier place to make bailing out easier. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
* OMAPDSS: refactor dss probe functionTomi Valkeinen2015-06-171-56/+69
| | | | | | | | | | Refactor dss probe function by extracting the setup for video plls into a separate function. The call to this function is also moved to a slightly earlier phase, so that in error case we can bail out more easily. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
* OMAPDSS: move 'dss_initialized' to dss driverTomi Valkeinen2015-06-171-0/+12
| | | | | | | | | | | | | | | | | We have a flag, 'dss_initialized', which tells omapfb and omapdrm if omapdss is available. At the moment it can be set even if the dss submodules are not all ready, in case something gets deferred. Move the flag to dss_core driver so that it'll signal the availability of the dss drivers move accurately. For now, it'll signal that dss_core is ready, which is not quite correct but still better than previously. The following patches will add component system to omapdss, and after those patches 'dss_initialized' will signal that all the submodules are ready. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
* OMAPDSS: disable VT switchTomi Valkeinen2015-04-201-0/+3
| | | | | | | | We don't need VT switch when suspending/resuming, so disable it. This speeds up suspend/resume. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: NeilBrown <neil@brown.name>
* OMAPDSS: Add Video PLLs for DRA7xxTomi Valkeinen2015-02-041-5/+53
| | | | | | | | | DRA7xx SoCs have one (DRA72x) or two (DRA74x) video PLLs. They are basically the same as DSI PLLs on OMAPs, but without the rest of the DSI hardware. The video PLLs also require some configuration via the CONTROL module. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: Add functions for external control of PLLTomi Valkeinen2015-02-041-0/+115
| | | | | | | | | | Add functions which configure the control module register CTRL_CORE_DSS_PLL_CONTROL found in DRA7xx SoCs. This register configures whether the PLL registers are accessed internally by DSS, or externally using OCP2SCP interface. They also configure muxes which route the PLL output to a particular LCD overlay manager within DSS. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: DSS: Add DRA7xx base supportTomi Valkeinen2015-02-041-0/+40
| | | | | | Add base support for DRA7xx to DSS core. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: constify port arraysTomi Valkeinen2015-02-041-3/+3
| | | | | | The port arrays are constant data, so set them as 'const'. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.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: DSI: remove unused hsdiv wait funcsTomi Valkeinen2014-11-121-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | With the previous patch "OMAPDSS: DSI: wait for hsdiv clocks when enabling PLL", dsi_wait_pll_hsdiv_dispc_active and dsi_wait_pll_hsdiv_dsi_active are no longer needed, so they and the callers can be removed. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* | | OMAPDSS: DSS: add a param to dpi_select_source which specifies it's port numberArchit Taneja2014-11-121-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add a 'port' parameter in dpi_select_source. The param tells the port number of the DPI instance that we want to configure. We use this number to select the overlay manager for that DPI instance. Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* | | OMAPDSS: DSS: init dss ports cleanlyArchit Taneja2014-11-121-14/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The init/uninit port functions are used to set up the DPI and SDI outputs under the dss platform device. A 'reg' property is used to determine the port number of the output. This tells us whether the port is DPI or SDI for OMAP34xx DSS revision. For other DSS revisions, we only have DPI outputs under the dss platform device. For multiple DPI output instances(introduced in DRA7xx DSS), we will use the the port number to specify which DPI output instance is being inited. The current functions work fine if there is only one DPI output instance in DSS. For multiple DPI instances, it would get complicated to figure out whether port number was used to specify whether the output is SDI, or another DPI instance. We create a list of port types supported for each DSS rev, with the index of the port in the list specifying the port number of the output for that DSS revision. This allows us to have a more generic way to init/uninit ports within DSS, and also support multiple DPI ports. We make the uninit_port functions iterative since we will have multiple DPI ports to uninit in the future. Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* | | OMAPDSS: DPI: Store dpi_data pointer in the DT port's dataArchit Taneja2014-11-121-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DPI and SDI ports are backed by only one parent DSS device. We don't have a corresponding platform_device for ports under DSS. In order to support multiple instances of DPI, we need to pass the driver data pointer through the DPI port's private data ('data' member in device_node struct). dpi_init_output/dpi_uninit_output are untouched and only used for non-DT case, these are called when the DPI platform device probed/removed. These funcs will be removed when non-DT mode is removed. dpi_init_output_port/dpi_uninit_output_port are created and used for the DT path, called when DSS inits/uninits it's ports. These new functions retrieve the dpi_data pointer from 'port->data', and not from the platform device's data(pdev->dev) like in the non-DT path. We add some code in dss_uninit_ports() to pass a pointer to the DPI port in dpi_uninit_port(). Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* | | OMAPDSS: DPI: Allocate driver dataArchit Taneja2014-11-121-3/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allocate driver data(dpi_data) for each DPI instance. It's allocated in omap_dpi_probe() when DT isn't used, and in dpi_init_port() when DT is used. The dpi_data struct instance is no longer global. In the case of DPI ops, it's retrieved from dpi_get_data_from_dssdev(). 'dssdev' passed by the connected encoder/panel driver is a pointer to the 'output' member in dpi_data, and thus can be used to get the DPI instance's driver data. In the case of probe/ini_port functions, it's set as DPI/DSS device's private data embedded in the platform_device struct. Having dpi_data as private data of the platform device will not work for multiple DPI instances in the DT case. This is because there is no corresponding platform_device for DPI or SDI, they exist only as ports under the parent DSS platform_device in the DT case. The DPI port's private data('data' member in device_node struct) will later be used to store dpi_data. Signed-off-by: Archit Taneja <archit@ti.com> 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: DSS & DISPC DT support for OMAP5Tomi Valkeinen2014-05-091-0/+1
| | | | | | Add omap5 entries to dispc's and dss's of_device_id tables. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: Add DSS features for AM43xxSathya Prakash M R2014-05-091-0/+11
| | | | | | | | Add DSS features for AM43xx. Signed-off-by: Sathya Prakash M R <sathyap@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* omapdss: remove check for simpler port/endpoint bindingArchit Taneja2014-05-091-5/+1
| | | | | | | | | The support for simpler port/endpoint binding was removed in the merged version of omapdss DT. But dss_init_ports still tries to get to an endpoint even if no port exists. Remove this as this doesn't work. Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: add __exit to dss_uninit_portsFabian Frederick2014-05-091-1/+1
| | | | | | | | | | dss_uninit_ports is only called by __exit omap_dsshw_remove Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: linux-omap@vger.kernel.org Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* video: move fbdev to drivers/video/fbdevTomi Valkeinen2014-04-171-0/+972
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