summaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss/output.c
AgeCommit message (Collapse)AuthorFilesLines
2014-04-17video: move fbdev to drivers/video/fbdevTomi Valkeinen1-254/+0
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>
2013-08-30OMAPDSS: rename omap_dss_device's 'device' field to 'dst'Tomi Valkeinen1-8/+8
In the old panel device model we had omap_dss_output entities, representing the encoders in the DSS block. This entity had "device" field, which pointed to the panel that was using the omap_dss_output. With the new panel device model, the omap_dss_output is integrated into omap_dss_device, which now represents a "display entity". Thus the "device" field, now in omap_dss_device, points to the next entity in the display entity-chain. This patch renames the "device" field to "dst", which much better tells what the field points to. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Archit Taneja <archit@ti.com>
2013-08-30OMAPDSS: rename omap_dss_device's 'output' to 'src'Tomi Valkeinen1-4/+4
In the old panel device model we had "outputs", which were the encoders inside OMAP DSS block, and panel devices (omap_dss_device). The panel devices had a reference to the source of the video data, i.e. reference to an "output", in a field named "output". That was somewhat confusing even in the old panel device model, but even more so with the panel device model where we can have longer chains of display entities. This patch renames the "output" field to "src", which much better tells what the field points to. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Archit Taneja <archit@ti.com>
2013-06-17OMAPDSS: modify get/find functions to go through the device chainTomi Valkeinen1-1/+7
In the future will have arbitrarily long video pipeline chains, instead of the current two-entities-per-pipeline model. This patch changes the affected get/find style functions so that they properly go through the video pipeline chain, for example when getting the overlay manager connected to a given display. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-06-17OMAPDSS: public omapdss_register_output()Tomi Valkeinen1-2/+5
In order to allow multiple display block in a video pipeline, we need to give the drivers way to register themselves. For now we have the omapdss_register_display() which is used to register panels, and dss_register_output() which is used to register DSS encoders. This patch makes dss_register_output() public (with the name of omapdss_register_output), which can be used to register also external encoders. The distinction between register_output and register_display is that a "display" is an entity at the end of the videopipeline, and "output" is something inside the pipeline. The registration and naming will be made saner in the future, but the current names and functions are kept to minimize changes during the dss device model transition. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-06-17OMAPDSS: output: increase refcount in find_output funcsTomi Valkeinen1-4/+9
Now that omap_dss_output has been combined into omap_dss_device, we can add ref counting for the relevant output functions also. This patch adds omap_dss_get_device() calls to the various find_output() style functions. This, of course, means that the users of those find_output functions need to do a omap_dss_put_device() after use. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-06-17OMAPDSS: combine omap_dss_output into omap_dss_deviceTomi Valkeinen1-16/+16
We currently have omap_dss_device, which represents an external display device, sometimes an external encoder, sometimes a panel. Then we have omap_dss_output, which represents DSS's output encoder. In the future with new display device model, we construct a video pipeline from the display blocks. To accomplish this, all the blocks need to be presented by the same entity. Thus, this patch combines omap_dss_output into omap_dss_device. Some of the fields in omap_dss_output are already found in omap_dss_device, but some are not. This means we'll have DSS output specific fields in omap_dss_device, which is not very nice. However, it is easier to just keep those output specific fields there for now, and after transition to new display device model is made, they can be cleaned up easier than could be done now. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-06-17OMAPDSS: Implement display (dis)connect supportTomi Valkeinen1-0/+14
We currently have two steps in panel initialization and startup: probing and enabling. After the panel has been probed, it's ready and can be configured and later enabled. This model is not enough with more complex display pipelines, where we may have, for example, two panels, of which only one can be used at a time, connected to the same video output. To support that kind of scenarios, we need to add new step to the initialization: connect. This patch adds support for connecting and disconnecting panels. After probe, but before connect, no panel ops should be called. When the connect is called, a proper video pipeline is established, and the panel is ready for use. If some part in the video pipeline is already connected (by some other panel), the connect call fails. One key difference with the old style setup is that connect() handles also connecting to the overlay manager. This means that the omapfb (or omapdrm) no longer needs to figure out which overlay manager to use, but it can just call connect() on the panel, and the proper overlay manager is connected by omapdss. This also allows us to add back the support for dynamic switching between two exclusive panels. However, the current panel device model is not changed to support this, as the new device model is implemented in the following patches and the old model will be removed. The new device model supports dynamic switching. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-06-17OMAPDSS: add helpers to get mgr or output from displayTomi Valkeinen1-0/+19
Add two helper functions that can be used to find either the DSS output or the overlay manager that is connected to the given display. This hides how the output and the manager are actually connected, making it easier to change the connections in the future. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-06-17OMAPDSS: add omap_dss_find_output_by_node()Tomi Valkeinen1-0/+13
Add a support function to find a DSS output by given DT node. This is used in later patches to link the panels to DSS outputs. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-06-17OMAPDSS: add omap_dss_find_output()Tomi Valkeinen1-0/+13
Add a support function to find a DSS output by given name. This is used in later patches to link the panels to DSS outputs. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-04-03OMAPDSS: add missing export for omap_dss_get_output()Tomi Valkeinen1-0/+1
omap_dss_get_output() is a public function, but was missing EXPORT_SYMBOL(). Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Archit Taneja <archit@ti.com>
2012-12-07OMAPDSS: export dss_mgr_ops functionsTomi Valkeinen1-0/+9
Export dss_mgr_ops related functions. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-12-07OMAPDSS: manage framedone irq with mgr opsTomi Valkeinen1-0/+12
Some of the output drivers need to handle FRAMEDONE interrupt from DISPC. This creates a direct dependency to dispc code, and we need to avoid this to make the compat code to work. Instead of the output drivers registering for dispc interrupts, we create new mgr-ops that are used to register a framedone handler. The code implementing the mgr-ops is responsible for calling the handler when DISPC FRAMEDONE interrupt happens. The compat layer is improved accordingly to do the call to the framedone handler. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-12-07OMAPDSS: add manager opsTomi Valkeinen1-0/+44
The output drivers need some operations from the overlay managers, like enable and set_timings. These will affect the dispc registers, and need to be synchronized with the composition-side changes with overlays and overlay managers. We want to handle these calls in the apply.c in the compatibility mode, but when in non-compat mode, the calls need to be handled by some other component (e.g. omapdrm). To make this possible, this patch creates a set of function pointers in a dss_mgr_ops struct, that is used to redirect the calls into the correct destination. The non-compat users can install their mgr ops with dss_install_mgr_ops() function. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-12-07OMAPDSS: manage output-dssdev connection in output driversTomi Valkeinen1-33/+0
We currently attach an output to a dssdev in the initialization code for dssdevices in display.c. This works, but doesn't quite make sense: an output entity represents (surprisingly) an output of DSS, which is managed by an output driver. The output driver also handles adding new dssdev's for that particular output. It makes more sense to make the output-dssdev connection in the output driver. This is also in line with common display framework. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-09-26OMAPDSS: Create links between managers, outputs and devicesArchit Taneja1-0/+33
Links between DSS entities are made in dss_init_connections() when a panel device is registered, and are removed in dss_uninit_connections() when the device is unregistered. Modify these functions to incorporate the addition of outputs. The fields in omap_dss_device struct gives information on which output and manager to connect to. The desired manager and output pointers are retrieved and prepared to form the desired links. The output is linked to the device, and then the manager to the output. A helper function omapdss_get_output_from_device() is created to retrieve the output from the display by checking it's type, and the module id in case of DSI. Signed-off-by: Archit Taneja <archit@ti.com>
2012-09-26OMAPDSS: output: Add set/unset device ops for omap_dss_outputArchit Taneja1-0/+67
An output entity represented by the struct omap_dss_output connects to a omap_dss_device entity. Add functions to set or unset an output's device. This is similar to how managers and devices were connected previously. An output can connect to a device without being connected to a manager. However, the output needs to eventually connect to a manager so that the connected panel can be enabled. Keep the omap_overlay_manager pointer in omap_dss_device for now to prevent breaking things. This will be removed later when outputs are supported completely. Signed-off-by: Archit Taneja <archit@ti.com>
2012-09-26OMAPDSS: outputs: Create a new entity called outputsArchit Taneja1-0/+48
The current OMAPDSS design contains 3 software entities: Overlays, Managers and Devices. These map to pipelines, overlay managers and the panels respectively in hardware. One or more overlays connect to a manager to represent a composition, the manager connects to a device(generally a display) to display the content. The part of DSS hardware which isn't represented by any of the above entities are interfaces/outputs that connect to an overlay manager, i.e blocks like DSI, HDMI, VENC and so on. Currently, an overlay manager directly connects to the display, and the output to which it is actually connected is ignored. The panel driver of the display is responsible of calling output specific functions to configure the output. Adding outputs as a new software entity gives us the following benefits: - Have exact information on the possible connections between managers and outputs: A manager can't connect to each and every output, there only limited hardware links between a manager's video port and some of the outputs. - Remove hacks related to connecting managers and devices: Currently, default links between managers and devices are set in a not so clean way. Matching is done via comparing the device type, and the display types supported by the manager. This isn't sufficient to establish all the possible links between managers, outputs and devices in hardware. - Make panel drivers more generic: The DSS panel drivers currently call interface/output specific functions to configure the hardware IP. When making these calls, the driver isn't actually aware of the underlying output. The output driver extracts information from the panel's omap_dss_device pointer to figure out which interface it is connected to, and then configures the corresponding output block. An example of this is when a DSI panel calls dsi functions, the dsi driver figures out whether the panel is connected to DSI1 or DSI2. This isn't correct, and having output as entities will give the panel driver the exact information on which output to configure. Having outputs also gives the opportunity to make panel drivers generic across different platforms/SoCs, this is achieved as omap specific output calls can be replaced by ops of a particular output type. - Have more complex connections between managers, outputs and devices: OMAPDSS currently doesn't support use cases like 2 outputs connect to a single device. This can be achieved by extending properties of outputs to connect to more managers or devices. - Represent writeback as an output: The writeback pipeline fits well in OMAPDSS as compared to overlays, managers or devices. Add a new struct to represent outputs. An output struct holds pointers to the manager and device structs to which it is connected. Add functions which can register/unregister an output, or look for one. Create an enum which represent each output instance. Signed-off-by: Archit Taneja <archit@ti.com>