summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2011-12-02OMAPDSS: APPLY: rename dss_cache to dss_dataTomi Valkeinen
dss_cache struct contains private data used to manage dispc. "cache" is not a good word for it, so rename it to dss_data. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: APPLY: move spinlock outside the structTomi Valkeinen
dss_cache struct contains a spinlock used to protect the struct. A more logical place for the spinlock is outside the struct that it is protecting. So move it there. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: APPLY: rename manager_cache_dataTomi Valkeinen
manager_cache_data is not a suitable name for the struct. It is more of a private data for the manager. Rename the struct to mgr_priv_data, and add a function, get_mgr_priv(mgr), to get a pointer to the data. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: APPLY: rename overlay_cache_dataTomi Valkeinen
overlay_cache_data is not a suitable name for the struct. It is more of a private data for the overlay. Rename the struct to ovl_priv_data, and add a function, get_ovl_priv(ovl), to get a pointer to the data. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: APPLY: configure_* funcs take ovl/manager as argsTomi Valkeinen
Make configure_overlay() and configure_manager() take overlay/manager pointer as an argument, instead of the ovl/mgr id. This will be useful with the future patches. Also rename the functions to be a bit more informative: dss_ovl_write_regs, dss_mgr_write_regs, dss_write_regs. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: APPLY: use dispc_mgr_get_vsync_irq()Tomi Valkeinen
Use dispc_mgr_get_vsync_irq() to get the interrupt numbers for vsync, instead of hardcoding the values depending on the display type. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: DISPC: Add dispc_mgr_get_vsync_irq()Tomi Valkeinen
Add dispc_mgr_get_vsync_irq() which returns the irq number for vsync on the given channel. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: APPLY: separate vsync isr register/unregisterTomi Valkeinen
Create separate functions for the vsync isr register/unregister code for cleaner code. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: store overlays in a list for each managerTomi Valkeinen
Current way of handling overlay-manager links is a bit strange: each manager has a static array, containing pointers to all the overlays (even those used by other managers). The overlays contain a pointer to the manager being used. This patch makes the system a bit saner: each manager has a linked list of overlays, and only the overlays linked to that manager are in the list. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: store managers in an arrayTomi Valkeinen
Overlay managers are stored in a linked list. There's no need for this list, as an array would do just as fine. This patch changes the code to use an array for overlay managers. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: store overlays in an arrayTomi Valkeinen
Overlays are stored in a linked list. There's no need for this list, as an array would do just as fine. This patch changes the code to use an array for overlays. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: APPLY: cleanup dss_mgr_start_updateTomi Valkeinen
dss_mgr_start_update() has a loop, of which sole purpose is to find the manager used for this update. The whole loop is extra, as we already know the manager. Remove the loop. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: APPLY: skip isr register and config for disabled displaysTomi Valkeinen
There's no need to register the vsync ISR and configure the hardware if the overlay manager is disabled, so this patch adds a check for disabled managers to the omap_dss_mgr_apply() function. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: APPLY: skip isr register and config for manual update displaysTomi Valkeinen
The mechanism to cache manager and overlay settings and configure them into the HW registers in VSYNC is meant only for auto-update displays, as it doesn't make sense (and doesn't work) for manual-update displays. This patchs adds a check so that we skip the above for manual update displays. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: APPLY: track whether a manager is enabledTomi Valkeinen
Add "enabled" field to struct omap_overlay_manager, which tells if the output is enabled or not. This will be used in apply.c in the following patches. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: hide manager's enable/disable()Tomi Valkeinen
omap_overlay_manager struct contains enable() and disable() functions. However, these are only meant to be used from inside omapdss, and thus it's bad to expose the functions. This patch adds dss_mgr_enable() and dss_mgr_disable() functions to apply.c, which handle enabling and disabling the output. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: create apply.cTomi Valkeinen
Create a new file, apply.c, and move code about handling the apply-mechanism and configuration of the managers and overlays from manager.c to apply.c. Not all related code is moved in this patch, but only the core apply/configure functions. The later patches move rest of the code from overlay.c and manager.c, adding necessary locking at the same time. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: apply affects only one overlay managerTomi Valkeinen
omap_dss_mgr_apply currently applies settings to all overlays and overlay managers. The reason for this was to support cases where configuration changes affecting multiple managers are made. However, the current code doesn't support changing such configurations, so the functionality is not needed. Change the apply to affect only the manager given as an argument, and the overlays attached to that manager. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: split omap_dss_mgr_apply() to smaller funcsTomi Valkeinen
Split omap_dss_mgr_apply() into smaller functions for clarity. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: add ovl/mgr_manual_update() helpersTomi Valkeinen
Add helper functions ovl_manual_update() and mgr_manual_update() which return whether the overlay or manager is used with a manual update display. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: remove unneeded dss_ovl_wait_for_go()Tomi Valkeinen
There's an unnecessary wrapper function, dss_ovl_wait_for_go(), which does nothing else than call dss_mgr_wait_for_go_ovl(). The dss_ovl_wait_for_go() function can be removed. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: DISPC: remove unused functionsTomi Valkeinen
Remove unused functions: dispc_mgr_get_default_color dispc_mgr_get_trans_key dispc_mgr_trans_key_enabled dispc_mgr_alpha_fixed_zorder_enabled Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: setup manager with dispc_mgr_setup()Tomi Valkeinen
Change manager configuration to be similar to overlay configuration by creating dispc_mgr_setup() which takes omap_overlay_manager_info as parameter. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: separate overlay channel from ovl_setupTomi Valkeinen
Overlay channel is configured with ovl_setup, with all the other overlay attriutes. This patch separates overlay channel setup so that we can later configure the channel only when needed. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: separate FIFO threshold setup from ovl_setupTomi Valkeinen
Overlay FIFO thresholds are configured with ovl_setup, with all the other overlay attributes. This patch separates FIFO threshold setup so that we can later configure FIFO thresholds only when needed. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: handle ilace/replication when configuring overlayTomi Valkeinen
Move the configuration of interlace and replication from omap_dss_mgr_apply() to configure_overlay(). This removes the need to store the values into the cache data. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: DISPC: handle 0 out_width/out_height in ovl_setup()Tomi Valkeinen
Overlay out_width/height are set to 0 when scaling is not used by the users of omapdss. Currently ovl_setup() expects the caller of ovl_setup() to convert those zero values to width or height. This patch makes ovl_setup() accept zero values for out_width/height, making calling ovl_setup() a bit simpler as the overlay_info can be just passed to this function without modifications. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: pass ovl manager to dss_start_updateTomi Valkeinen
dss_start_update() takes currently the dss device as a parameter. Change the parameter to ovl manager, as that is what the dss_start_update() actually needs. Change the name of the function to dss_mgr_start_update() to reflect the change. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: remove partial update from panel-taalTomi Valkeinen
Partial update for manual update displays has never worked quite well: * The HW has limitations on the update area, and the x and width need to be even. * Showing a part of a scaled overlay causes artifacts. * Makes the management of dispc very complex Considering the above points and the fact that partial update is not used anywhere, this and the following patches remove the partial update support. This will greatly simplify the following re-write of the apply mechanism to get proper locking and additional features like fifo-merge. This patch removes the partial update from the panel-taal.c. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: remove partial update from DSITomi Valkeinen
Partial update for manual update displays has never worked quite well: * The HW has limitations on the update area, and the x and width need to be even. * Showing a part of a scaled overlay causes artifacts. * Makes the management of dispc very complex Considering the above points and the fact that partial update is not used anywhere, this and the following patches remove the partial update support. This will greatly simplify the following re-write of the apply mechanism to get proper locking and additional features like fifo-merge. This patch removes the partial update from the dsi.c. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: remove partial update from the overlay managerTomi Valkeinen
Partial update for manual update displays has never worked quite well: * The HW has limitations on the update area, and the x and width need to be even. * Showing a part of a scaled overlay causes artifacts. * Makes the management of dispc very complex Considering the above points and the fact that partial update is not used anywhere, this and the following patches remove the partial update support. This will greatly simplify the following re-write of the apply mechanism to get proper locking and additional features like fifo-merge. This patch removes the partial update from the manager.c. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: DISPC: make dispc_ovl_set_fifo_threshold() publicTomi Valkeinen
Make dispc_ovl_set_fifo_threshold() public so that later patches can handle overlay fifo configuration. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: DISPC: make dispc_ovl_set_channel_out() publicTomi Valkeinen
Make dispc_ovl_set_channel_out() public so that later patches can handle changing overlay's manager. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: remove L4_EXAMPLE codeTomi Valkeinen
Some old example code has been left lying around. Remove the example code. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: Remove old fifomerge hacksTomi Valkeinen
Once in a time omapdss had basic support for fifomerge. Fifomerge was removed as the implementation didn't work properly, and a proper implementation is a complex problem. However, some unused fifo-merge related code was left behind. This patch removes those. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: DISPC: add missing prototypeTomi Valkeinen
dispc_mgr_is_enabled() was missing a prototype in dss.h Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: DSI: disable DDR_CLK_ALWAYS_ON when entering ULPSTomi Valkeinen
ULPS cannot be entered if the DDR clk is enabled. Thus disable the DDR clk before entering ULPS. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: DSI: improve wait_for_bit_changeTomi Valkeinen
We sometimes get timeout when disabling the DSI interface with video mode. It looks like the disable will stall until the current frame has been finished, and this can take multiple milliseconds. wait_for_bit_change() currently uses a busyloop to wait for a bit to change. This is used in multiple places. The problem is, we don't have clear understanding how long particular operations can take, so the function needs to support longer waits. Improve wait_for_bit_change() to first busy loop for 100 times to see if the bit changes almost right away. If the bit hasn't changed, move to a loop with a sleep of 1ms, and poll for 500ms. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: DSI: fix lane handling when entering ULPSTomi Valkeinen
The current code always enters ULPS for 3 lanes. This is not right, as there could be only 2 lanes used, and on OMAP4 we have 5 lanes. Fix the code to put all used lanes into ULPS. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: DSI: remove dsi_get_num_lanes_usedTomi Valkeinen
There's no longer need for the dsi_get_num_lanes_used function, so it can be removed. The lane check in dsi_init_display() can be removed as the validity of the config will be verified when parsing it. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: DSI: use lane config in dsi_cio_enable_lane_overrideTomi Valkeinen
Use the new lane config in dsi_cio_enable_lane_override(). The function parameters are also slightly changed. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: DSI: use lane config in dsi_cio_wait_tx_clk_esc_resetTomi Valkeinen
Use the new lane config in dsi_cio_wait_tx_clk_esc_reset(). This also extends the function to support 5 lanes on OMAP4, instead of 3 lanes. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: DSI: use lane config in dsi_get_lane_maskTomi Valkeinen
Use the new lane config in dsi_get_lane_mask(). Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: DSI: Use new lane config in dsi_set_lane_configTomi Valkeinen
Use the new lane config in dsi_set_lane_config(). Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: DSI: Parse lane configTomi Valkeinen
Parse the lane configuration from the device data into internal lane config format. This will be used in the following patches to clean up the lane handling. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: DSI: count with number of lanesTomi Valkeinen
DSI driver currently counts used lanes and number of supported lanes by using the number of data lanes (i.e. excluding clock lane). This patch changes this to use the number of all lanes so that the following lane config patches are cleaner. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: DISPC: Flush posted writes when enabling outputsTomi Valkeinen
Flush posted write in _enable_lcd_out() and _enable_digit_out(). This ensures the the lcd/digit bit is written before the code starts waiting for interrupts about enabling/disabling the output. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: DSI: flush posted write in send_btaTomi Valkeinen
Flush posted write after setting the bit to send the BTA to ensure the BTA is sent right away, as the code in dsi_vc_send_bta_sync() waits for an interrupt caused indirectly by sending the BTA. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: DSI: flush posted write when entering ULPSTomi Valkeinen
Flush posted write between writing the ULPS enable bits and waiting for the interrupt. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02OMAPDSS: add FocalTech ETM070003DH6 display supportIlya Yanok
Add data for the FocalTech ETM070003DH6 display to the generic_dpi_panel display driver. Signed-off-by: Ilya Yanok <yanok@emcraft.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>