summaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss/dss.h
Commit message (Collapse)AuthorAgeFilesLines
* OMAPDSS: Change struct reg_field to dispc_reg_fieldJyri Sarha2014-04-141-6/+0
| | | | | | | | | Avoid colision with regmap's struct reg_field definition by renaming omapdss's struct reg_field to dispc_reg_field, and moving it inside dispc.c as that's the only place it is used. Signed-off-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* Merge branch '3.15/dss-dt' into 3.15/fbdevTomi Valkeinen2014-03-201-0/+6
|\ | | | | | | Merge OMAP DSS DT support
| * OMAPDSS: Add DT support to DSSTomi Valkeinen2014-03-191-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add DT support for DSS. Contrary to the non-DT version, the DSS in DT mode contains DPI and SDI outputs, which better reflects the hardware. The non-DT code will be removed after all boards have been converted to DT, so there's no need to change the non-DT code to act the same way. The code for DPI and SDI needs to be refined later to make it possible to add multiple DPI ports. For now, handling just a single DPI port is enough for all the boards. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Archit Taneja <archit@ti.com>
* | OMAPDSS: Remove unused get_context_loss_count supportTomi Valkeinen2014-02-281-2/+0
|/ | | | | | | | The omapdss driver no longer uses get_context_loss_count call, so we can remove it. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Archit Taneja <archit@ti.com>
* Merge branches '3.14/fbdev', '3.14/dss-misc' and '3.14/dss-fclk' into for-nextTomi Valkeinen2014-01-201-13/+4
|\ | | | | | | Merge fbdev topic branches
| * OMAPDSS: pass pck to dss fck clock calcTomi Valkeinen2013-11-181-1/+2
| | | | | | | | | | | | | | | | | | | | We need the required pixel clock rate when calculating the dss fclk on SoCs that have a dedicated DSS PLL. This patch changes the code to pass the pck to the calc functions. The pck rate is taken into use in the next patch. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| * OMAPDSS: cleanup fck parent handlingTomi Valkeinen2013-11-181-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The dss parent_clk_name currently points to a clock node which we use to change the fclk rate. Now that we have CLK_SET_RATE_PARENT properly set, we can set the rate directly to the fclk node. However, we still need to calculate the possible clock rates. For this, we need the rate of the parent of the current parent_clk. To simplify the code, this patch changes the parent_clk_name to point to the above mentioned parent, so that we can get the rate directly. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| * OMAPDSS: remove struct dss_clock_infoTomi Valkeinen2013-11-181-11/+2
| | | | | | | | | | | | | | | | Remove struct dss_clock_info, as it is not usable in a case where DSS fclk comes from a dedicated PLL. Instead, just use the fclk rate in place of dss_clock_info, as that is all that's needed. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* | omapdss: HDMI: Rename hdmi driver files to nicer namesArchit Taneja2013-10-091-2/+2
|/ | | | | | | | Replace the ti_hdmi_4xxx* notation for OMAP4 HDMI driver with hdmi4. Rename the hdmi.c encoder driver to hdmi4.c. Rename ti_hdmi.h to hdmi.h Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: DSS: remove legacy dss bus supportTomi Valkeinen2013-08-301-9/+0
| | | | | | | | | With all the old panels removed and all the old panel model APIs removed from the DSS encoders, we can now remove the custom omapdss-bus which was used in the old panel model. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Archit Taneja <archit@ti.com>
* OMAPDSS: VENC: remove code related to old panel modelTomi Valkeinen2013-08-291-14/+0
| | | | | | | | | | Now that the old panel drivers have been removed, we can remove the old-model API and related code from the DSS encoder drivers. This patch removes the code from the VENC driver. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Archit Taneja <archit@ti.com>
* OMAPDSS: HDMI: remove code related to old panel modelTomi Valkeinen2013-08-291-20/+0
| | | | | | | | | | Now that the old panel drivers have been removed, we can remove the old-model API and related code from the DSS encoder drivers. This patch removes the code from the HDMI driver. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Archit Taneja <archit@ti.com>
* OMAPDSS: DPI: change regulator handlingTomi Valkeinen2013-08-291-1/+0
| | | | | | | | | | | | Regulator handling for DPI and SDI is currently handled in the core.c, using the 'virtual' omapdss platform device. Nowadays we have proper devices for both DPI and SDI, and so we can handle the regulators inside the respective drivers. This patch moves the regulator handling for DPI into dpi.c. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Archit Taneja <archit@ti.com>
* OMAPDSS: SDI: change regulator handlingTomi Valkeinen2013-08-291-1/+0
| | | | | | | | | | | | Regulator handling for DPI and SDI is currently handled in the core.c, using the 'virtual' omapdss platform device. Nowadays we have proper devices for both DPI and SDI, and so we can handle the regulators inside the respective drivers. This patch moves the regulator handling for SDI into sdi.c. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Archit Taneja <archit@ti.com>
* OMAPDSS: public omapdss_register_output()Tomi Valkeinen2013-06-171-4/+0
| | | | | | | | | | | | | | | | | | | 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>
* OMAPDSS: remove dispc's dependency to VENC/HDMITomi Valkeinen2013-06-171-18/+1
| | | | | | | | | | | | | | DISPC needs to know the clock rate for DIGIT (i.e. TV) channel, and this clock is provided by either VENC or HDMI modules. Currently DISPC will call a function in VENC/HDMI, asking what the clock rate is. This means we have a fixed dependency from DISPC to both VENC and HDMI. To have a more generic approach, and in particular to allow adding OMAP5 HDMI driver, we need to remove this dependency. This patch makes VENC/HDMI inform DISPC when the their clock changes, thus reversing the dependency and removing the issue. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: combine omap_dss_output into omap_dss_deviceTomi Valkeinen2013-06-171-2/+2
| | | | | | | | | | | | | | | | | | | | 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>
* OMAPDSS: implement display sysfs without dss busTomi Valkeinen2013-06-171-4/+2
| | | | | | | | | | | | | We aim to remove the custom omapdss bus totally, as it's quite a strange construct and won't be compatible with common display framework. One problem on the road is that we have sysfs files for each display, and they depend on the omapdss bus. This patch creates the display sysfs files independent of the omapdss bus. This gives us backwards compatibility without using the omapdss bus for the sysfs files. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: split overlay manager creationTomi Valkeinen2013-06-171-2/+4
| | | | | | | | | | | Split the function that creates overlay manager structs into two: one that creates just the structs, and one that creates the sysfs files for the manager. This will help us use the overlay manager structs with omapdrm in the following patches, while still leaving the sysfs files out. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: DPI: fix compilation if DSI not compiled inTomi Valkeinen2013-05-021-4/+27
| | | | | | | | | | | | Commit 100c826235793345efe06b3558cc9d36166b1e26 (OMAPDSS: DPI: use new clock calculation code) breaks dpi.c compilation if DSI is not enabled in the kernel configuration. Fix compilation by adding dummy inline functions for the ones that dpi.c references. The functions will never be called, as dpi.c knows that there is no DSI device available. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: remove unused old clock calculation codeTomi Valkeinen2013-04-031-15/+0
| | | | | | | Now that the old clock calculation code is no longer used, we can remove it from the driver. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: DSI: add new clock calculation codeTomi Valkeinen2013-04-031-0/+12
| | | | | | | | | | Add new way to iterate over DSI PLL and HSDIV clock divisors. dsi_pll_calc() and dss_hsdiv_calc() provide a generic way to go over all the divisors, within given clock range. The functions will call a callback function for each divider set, making the function reusable for all use cases. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: DSS: add new clock calculation codeTomi Valkeinen2013-04-031-0/+3
| | | | | | | | | Add new way to iterate over DSS clock divisors. dss_div_calc() provides a generic way to go over all the divisors, within given clock range. dss_div_calc() will call a callback function for each divider set, making the function reusable for all use cases. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: DISPC: add new clock calculation codeTomi Valkeinen2013-04-031-0/+6
| | | | | | | | | Add new way to iterate over DISPC clock divisors. dispc_div_calc() provides a generic way to go over all the divisors, within given pixel clock range. dispc_div_calc() will call a callback function for each divider set, making the function reusable for all use cases. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: DISPC: get dss clock rate from dss driverTomi Valkeinen2012-12-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Dispc currently gets dispc's fck with clk_get() and uses clk_get_rate() to get the rate for scaling calculations. This causes a problem with common clock framework, as omapdss uses the dispc functions inside a spinlock, and common clock framework uses a mutex in clk_get_rate(). Looking at the DSS clock tree, the above use of the dispc fck is not quite correct. The DSS_FCLK from PRCM goes to DSS core block, which has a mux to select the clock for DISPC from various options, so the current use of dispc fck bypasses that. Fortunately we never change the dispc clock mux for now. To fix the issue with clk_get_rate(), this patch caches the dss clock rate in dss.c when it is set. Dispc will then ask for the clock rate from dss. While this is not very elegant, it does fix the issue, and it's not totally wrong when considering that the dispc fck actually comes via dss. In the future we should probably look into common clock framework and see if that could be used to represent the DSS clock tree properly. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: export dispc functionsTomi Valkeinen2012-12-071-35/+1
| | | | | | Export DISPC functions. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: export dss_mgr_ops functionsTomi Valkeinen2012-12-071-30/+0
| | | | | | Export dss_mgr_ops related functions. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: move display sysfs init to compat layerTomi Valkeinen2012-12-071-5/+0
| | | | | | Move creation of the sysfs files for displays to the compat layer. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: DISPC: add dispc_ovl_check()Tomi Valkeinen2012-12-071-0/+4
| | | | | | | | | This patch adds a new function, dispc_ovl_check(), which can be used to verify scaling configuration for an overlay. The function gets both the overlay and overlay manager as parameters, so that the caller does not need to configure the hardware before using this function. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: move irq handling to dispc-compatTomi Valkeinen2012-12-071-0/+5
| | | | | | | | | | | The whole dispc irq handling system we currently have is only needed for compat layer, and thus can be moved from dispc.c to the compat layer. This is quite straigtforward, but we need to add new dispc functions to request and free the actual hardware irq: dispc_request_irq() and dispc_free_irq(). Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: move blocking mgr enable/disable to compat layerTomi Valkeinen2012-12-071-2/+0
| | | | | | | | | | | | | dispc_mgr_enable_sync and dispc_mgr_disable_sync are only used with the compat mode. Non-compat will use the simpler enable and disable functions. This patch moves the synchronous enable/disable code to the compat layer. A new file is created, dispc-compat.c, which contains low level dispc compat code (versus apply.c, which contains slightly higher level compat code). Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: manage framedone irq with mgr opsTomi Valkeinen2012-12-071-0/+8
| | | | | | | | | | | | | | 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>
* OMAPDSS: add manager opsTomi Valkeinen2012-12-071-0/+13
| | | | | | | | | | | | | | | | | | | | 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>
* OMAPDSS: move ovl function setup to apply.cTomi Valkeinen2012-12-071-12/+0
| | | | | | | | Most of the functions that are assigned to the fields in ovl struct are in apply.c. By moving the function pointer setup into apply.c we can make these functions static. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: move ovl-mgr function setup to apply.cTomi Valkeinen2012-12-071-10/+0
| | | | | | | | Most of the functions that are assigned to the fields in ovl-mgr struct are in apply.c. By moving the function pointer setup into apply.c we can make these functions static. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: add omapdss_compat_init()Tomi Valkeinen2012-12-071-1/+0
| | | | | | | | | | | | Add two new exported functions, omapdss_compat_init and omapdss_compat_uninit, which are to be used by omapfb, omap_vout to enable compatibility mode for omapdss. The functions are called by omapdss internally for now, and moved to other drivers later. The compatibility mode is implemented fully in the following patches. For now, enabling compat mode only sets up the private data in apply.c. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: manage output-dssdev connection in output driversTomi Valkeinen2012-12-071-1/+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>
* OMAPDSS: Use only "omapdss_dss" platform device to get context lost countArchit Taneja2012-11-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When enabling a hwmod, omap_hwmod refers to the register mentioned in the hwmod struct's member 'prcm.omap4.context_offs' to see whether context was lost or not. It increments the context lost count for the hwmod and then clears the register. All the DSS hwmods have the same register(RM_DSS_DSS_CONTEXT) as context_offs. When DSS is enabled, the first hwmod to be enabled is the "dss_core" hwmod since it's corresponding platform device is the parent platform device("omapdss_dss"). The dss_core hwmod updates it's context lost count correctly and clears the register. When the hwmods corresponding to the children platform devices are enabled, they see that the register is clear, and don't increment their context lost count. Therefore, all the children platform devices never report a loss in context. The DISPC driver currently gets the context lost count for DSS power domain from it's corresponding platform device instance("omapdss_dispc"). The DISPC platform device is one of the child devices, and it's corresponding hwmod("dss_dispc") doesn't report the context lost count correctly. Modify dss_get_ctx_loss_count() such that it always takes the "omapdss_dss" platform device as it's input, move the function to dss.c so that it has access to that platform device. Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: add dss_get_core_pdev()Tomi Valkeinen2012-11-271-0/+1
| | | | | | | | Add dss_get_core_pdev() which returns the platform device for dss core device. The following patches use the core pdev to register sysfs files in the compat code. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: create display-sysfs.cTomi Valkeinen2012-11-271-0/+5
| | | | | | | Move display sysfs related code from display.c to display-sysfs.c, for clarity. The sysfs code will only be used for compat mode. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: don't WARN if there's no DSI deviceTomi Valkeinen2012-11-271-2/+0
| | | | | | | | | | dsi_get_dsidev_from_id() gives a WARN if DSI support is not compiled in. This warning is not right, as it's valid to call dsi_get_dsidev_from_id() to see if there is DSI support or not. Remove the WARN(). Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: remove declarations for non-existing functionsTomi Valkeinen2012-11-271-2/+0
| | | | | | | Remove dispc_mgr_is_channel_enabled() and dss_mgr_get_timings() declarations, as the function doesn't exist. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: hide dss_select_dispc_clk_source()Tomi Valkeinen2012-11-051-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | dss.c currently exposes functions to configure the dispc source clock and lcd source clock. There are configured separately from the output drivers. However, there is no safe way for the output drivers to handle dispc clock, as it's shared between the outputs. Thus, if, say, the DSI driver sets up DSI PLL and configures both the dispc and lcd clock sources to that DSI PLL, the resulting dispc clock could be too low for, say, HDMI. Thus the output drivers should really only be concerned about the lcd clock, which is what the output drivers actually use. There's lot to do to clean up the dss clock handling, but this patch takes one step forward and removes the use of dss_select_dispc_clk_source() from the output drivers. After this patch, the output drivers only configure the lcd source clock. On omap4+ the dispc src clock is never changed from the default PRCM source. On omap3, where the dispc and lcd clocks are actually the same, setting the lcd clock source sets the dispc clock source. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: add dss_calc_clock_rates() backTomi Valkeinen2012-11-051-0/+1
| | | | | | | dss_calc_clock_rates() was removed earlier as it was not used, but it is needed for DSI PLL calculations, so this patch adds it back. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: HDMI: use core power on/off with edid & detectTomi Valkeinen2012-10-291-0/+2
| | | | | | | | | This patch makes use of the hdmi_power_[on|off]_core() functions added in the previous patch. The functions are used when reading EDID or detecting if a monitor is connected. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Ricardo Neri <ricardo.neri@ti.com>
* OMAPDSS: DISPC: Add IRQ enable/status helpersTomi Valkeinen2012-10-291-0/+4
| | | | | | | | | | | | | | | | | DISPC irqs need to be handled from the compat layer and also in the future by the omapdrm. To make this possible, this patchs adds a set of helper functions, so that the irqs can be managed without direct register reads/writes. The following functions are added, and all the current direct reg reads/writes are changed to use these. u32 dispc_read_irqstatus(void); void dispc_clear_irqstatus(u32 mask); u32 dispc_read_irqenable(void); void dispc_write_irqenable(u32 mask); Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: add dispc_ovl_enabled()Tomi Valkeinen2012-10-291-0/+1
| | | | | | | Add new dispc function, dispc_ovl_enabled(). This returns if the overlay enable bit is set in the registers. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: DISPC: make _enable_mgr_out public as "dispc_mgr_enable"Tomi Valkeinen2012-10-291-0/+1
| | | | | | | | | We need a low level manager-enable function for omapdrm. We have that function as dispc internal func, _enable_mgr_out(). This patch exposes that function, and renames it to dispc_mgr_enable(). Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: DISPC: rename dispc_mgr_enable/disable to _syncTomi Valkeinen2012-10-291-2/+2
| | | | | | | | | | | | The current dispc_mgr_enable/disable function are blocking, and do a bit too much for omapdrm. We'll expose new enable & disable functions that will just set the bits in the registers in the following patches. This patch renames the current functions to *_sync, to make it clear that they are blocking, and also to free up the dispc_mgr_enable/disable names for these new functions. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: export dss_get_def_display_name()Tomi Valkeinen2012-10-291-1/+0
| | | | | | | | Export dss_get_def_display_name() with the name of omapdss_get_def_display_name() so that omapfb can use it after the next patch which moves default display handling to omapfb. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
OpenPOWER on IntegriCloud