aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* OMAP: DSS2: DSI: Add extra omap_dss_device argument in functions exported by dsiArchit Taneja2011-05-123-93/+110
| | | | | | | | | Add pointer to omap_dss_device struct as an argument in the functions which are exported to dsi panel drivers. This argument will tell the DSI driver which DSI interface's data it has to choose. Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: OMAPFB: make DBG() more resistant in if-else constructionsNiels de Vos2011-05-111-2/+4
| | | | | | | | | | When DBG() is used in a simple if-else, the resulting code path currently depends on the definition of DBG(). Inserting the statement in a "do { ... } while (0)" prevents this possible misuse. Signed-off-by: Niels de Vos <ndevos@redhat.com> [tomi.valkeinen@ti.com: changed the title of the commit msg] Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP2: avoid descending into disabled framebuffer dirsMike Frysinger2011-05-111-2/+2
| | | | | | | | | Rather than always add the omap2 dirs to the build list (and thus force everyone to generate a useless built-in.o), bind the dirs to their relevant kconfig symbol. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: Remove DSS_IRQSTATUSTomi Valkeinen2011-05-111-2/+0
| | | | | | | | | | DSS_IRQSTATUS register is available only on OMAP3, and reading it in dss_dump_registers() on OMAP4 seems to cause a crash. The register is not used for anything, and displaying its value is of no use, so let's just remove it altogether. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: Remove usage of struct dispc_regArchit Taneja2011-05-112-86/+82
| | | | | | | | | | | struct dispc_reg was originally used while migrating from old omapfb to catch cases where the arguments to dispc_read_reg/dispc_write_reg were in wrong order, since old omapfb had the arguments in reverse order. Remove this struct and use u16 instead Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: Clean up DISPC overlay manager register definitionsArchit Taneja2011-05-112-114/+276
| | | | | | | | | Represent manager/channel specific DISPC registers as inline functions returning the required dispc_reg struct. This is done since the current method is not scalable as the number of overlay managers increase in number. Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: Clean up DISPC overlay register definitionsArchit Taneja2011-05-112-499/+771
| | | | | | | | | | | | | | | | | | Move all DISPC register definitions to a new header dispc.h. There are separate register offset definitions for GFX, VID1 and VID2 pipeline share register definitions by using an argument. The introduction of VID3 pipeline on OMAP4 will not let us use the above method since VID3 pipe register offsets don't map with VID1 and VID2 offsets. Represent overlay registers as DISPC_OVL_XXXX(plane), where the plane argument tells the overlay. Register offsets are calculated as: DISPC_OVL_XXXX(plane) = DISPC_OVL_BASE(plane) + DISPC_XXXX_OFFSET(plane) Idea suggested by Tomi Valkeinen. Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: DSI: enable scp clock in dsi_dump_regs()Archit Taneja2011-05-111-0/+2
| | | | | | | | | OMAP4 requires SCP clocks enabled to access DSI PLL registers and DSI COMPLEXIO registers. Enable scp clock before accessing the registers and disable it before exiting dsi_dump_regs(). Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: Support for Powertip PH480272TEnric Balletbo i Serra2011-05-111-0/+25
| | | | | | | | | | Add support for Powertip PH480242T, a LCD 4.3inch (480x242) display type with 24-bit RGB interface, to panel-generic-dpi. Tested with IGEP v2 board. Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: Support for Seiko 70WVW1TZ3Enric Balletbo i Serra2011-05-111-0/+25
| | | | | | | | | | Add support for Seiko 70WVW1TZ3, a LCD 7.0inch WVGA (800x480) display type with 24-bit RGB interface and Touch-Panel, to panel-generic-dpi Tested with IGEP v2 board. Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: DSI: enable interface for omap4Vikram Pandita2011-05-111-1/+1
| | | | | | | | | | | | By default, the DSI is not getting enabled for omap4. OMAP2PLUS does not catch this issue since it has ARCH_OMAP3. The issue is only seen when using defconfig with ARCH_OMAP4 only. Signed-off-by: Vikram Pandita <vikram.pandita@ti.com> Cc: Archit Taneja <archit@ti.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: FEATURES: Add missing constsTomi Valkeinen2011-05-111-5/+5
| | | | | | omap_dss_features definitions were missing consts. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: DSI: Add OMAP4 CIO irqsTomi Valkeinen2011-05-111-4/+23
| | | | | | | | | OMAP4 DSI block has new interrupts for the two new DSI lanes. Add definitions for those interrupts, and add the interrupts to the CIO error mask. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: Taal: Implement ULPS functionalityTomi Valkeinen2011-05-112-7/+305
| | | | | | | | | | | | | ULPS is a low power state where the DSI lanes are kept at ground. This patch implements ULPS by having a DSI bus inactivity timer which triggers the entry to ULPS. ULPS exit will happen automatically when the driver needs to do something on the DSI lanes. The ulps_timeout is configurable from board file or via sysfs. Additionally another sysfs file, "ulps", can be used to check the current ULPS state, or to manually enter or exit ULPS. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: Taal: Rename esd_wq to workqueueTomi Valkeinen2011-05-111-6/+7
| | | | | | | ESD workqueue will be shared with other functionality also. Rename "esd_wq" to "workqueue" to better reflect its usage. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: Taal: Separate panel resetTomi Valkeinen2011-05-111-3/+10
| | | | | | | | Separate panel reset code to a function of its own. This will keep the code cleaner in the future when panel reset is called from multiple locations. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: Taal: Add sysfs file for ESD intervalTomi Valkeinen2011-05-111-0/+42
| | | | | | Implement sysfs support to configure the ESD interval. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: Taal: Clean up ESD queueingTomi Valkeinen2011-05-111-13/+23
| | | | | | | Separate the code which queues/cancels ESD work into their own functions. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: Taal: Implement configurable ESD intervalTomi Valkeinen2011-05-112-12/+12
| | | | | | | | ESD check in Taal driver is currently on/off feature with hardcoded interval. This patch changes it to a configurable interval, which can be set from the board file. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: DSI: ensure VDDS_DSI is disabled on exitTomi Valkeinen2011-05-111-0/+5
| | | | | | | | | The panel drivers can leave the VDDS_DSI regulator enabled, even when the panel is disabled, to ensure that the DSI pins are powered. This patch ensures that VDDS_DSI is disabled on DSI module unload. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: DSI: Add DSI pad muxing supportTomi Valkeinen2011-05-112-0/+16
| | | | | | | | Add dsi_mux_pads function pointer to omap_dss_board_info, and use the function pointer in DSI code to configure the DSI pads either to normal DSI operation, or to pull down when in ULPS. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: DSI: add parameter to enter ulps on disableTomi Valkeinen2011-05-113-7/+7
| | | | | | | | | | | | | | | | Add parameter to omapdss_dsi_display_disable() which the panel driver can use to tell if the DSI lanes should be put to ULPS before disabling the interface. This can be used to skip ULPS entry in cases where the panel doesn't care about ULPS state, for example when the panel will be reset, or when the display interface will be enabled again right after the disable. This will speed up the operation considerably in cases where entering ULPS would fail with timeout, and the panel driver isn't even interested in entering ULPS. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: DSI: wait for TXCLKESC domain to come out of resetTomi Valkeinen2011-05-111-0/+65
| | | | | | | | | Add dsi_cio_wait_tx_clk_esc_reset() function which waits for the TXCLKESC domains to come out of reset. Things have worked fine without this, but better be safe than sorry. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: DSI: fix CIO init and uninitTomi Valkeinen2011-05-111-25/+29
| | | | | | | | Use dsi_enable_scp_clk and dsi_disable_scp_clk in CIO init and uninit, and improve the CIO init by adding a few status checks and error handling. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: DSI: implement enable/disable SCP clkTomi Valkeinen2011-05-111-5/+28
| | | | | | | | | | | | SCP clock is needed for CIO on OMAP3, and for CIO and PLL on OMAP4. Current driver enables the CIO clock always when DSI display is initialized. However, if a DPI display tries to use DSI PLL, the SCP clock is never enabled. This patch implements simple ref counting enable/disable functions for SCP clock. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: DSI: fix _dsi_print_reset_statusTomi Valkeinen2011-05-111-2/+15
| | | | | | The bits for TXCLKESCx reset have changed for OMAP3630 and OMAP4. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: Add FEAT_DSI_REVERSE_TXCLKESCTomi Valkeinen2011-05-112-1/+2
| | | | | | | | | | | OMAP3430 has RESETDONETXCLKESCx bits in the order following bitnumber order for lanes 0, 1, 2: 28, 27, 26. OMAP3630 and later have them in saner order: 24, 25, 26 (and 27, 28 for OMAP4). This patch adds a dss_feature that can be used to differentiate between those two orders of RESETDONETXCLKESCx bits. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: DSI: rename complexio related functionsTomi Valkeinen2011-05-111-19/+19
| | | | | | | | Rename ComplexIO from dsi_complexio_xxx to dsi_cio_xxx for brevity. Also, add cio prefix for couple of functions that didn't have it, but are cio related. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: DSI: add option to leave DSI lanes powered onTomi Valkeinen2011-05-115-17/+31
| | | | | | | | | | | | | | | | | | | | | | | The DSI pins are powered by VDDS_DSI. If VDDS_DSI is off, the DSI pins are floating even if they are pinmuxed to, say, safe mode and there's a pull down/up. This patch gives the panel drivers an option to leave the VDDS_DSI power enabled while the DSS itself is turned off. This can be used to keep the DSI lanes in a valid state while DSS is off, if the DSI pins are muxed for pull down (not done in this patch). There will be a slight power consumption increase (~100 uA?) when the VDDS_DSI is left on, but because this option is used when the panel is left on, the regulator consumption is negligible compared to panel power consumption. When the panel is fully turned off the VDDS_DSI is also turned off. As an added bonus this will give us faster start up time when starting up the DSS and the regulator is already enabled. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: DSI: implement ULPS enter and exitTomi Valkeinen2011-05-111-18/+123
| | | | | | | | | | | | | | | | | | Entering ULPS (Ultra Low Power State) happens by sending ULPS entry sequence to the DSI peripheral and pulling the DSI lines down. Exiting ULPS happens by sending ULPS exit sequence. We can send the ULPS entry sequence by using OMAP DSS HW's ULPS support, but we cannot use the ULPS exit support from DSS HW. DSS HW refuses to send the ULPS exit sequence if it thinks that the lanes are not in ULPS. After being in OFF mode the DSS HW has been reset, and so it does not know that the lanes are actually in ULPS. Thus we need to use the lane override support and manually send the ULPS exit sequence. Luckily the sequence is very simple. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: DSI: Remove CIO LDO status checkTomi Valkeinen2011-05-113-13/+4
| | | | | | | | | | | | CIO LDO status check seems to be broken on OMAP3630+ chips, and it's also quite unclear what LDO status actually tells and when its status changes. This patch removes the whole check on the grounds that if there's a problem with the LDO, we should anyway catch the problem as we check the CIO power state and CIO reset status. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: DSI: Add lane override functionsTomi Valkeinen2011-05-111-0/+58
| | | | | | | | DSI_DSIPHY_CFG10 register can be used to override DSI lane state. Add functions to configure and enable the override, and to disable the override. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP2PLUS: DSS2: Clean up omap_display_init()Archit Taneja2011-05-111-26/+49
| | | | | | | | | | | | | | | Currently, omap_display_init() maintains arrays for hwmod name(oh_name) and the correspnding platform_device name(dev_name) needed by omap_device_build(). A variable oh_count keeps a track of the number of devices to build from oh_name based on what omap revision it is. Clean this up by maintaining an array of omap_dss_hwmod_data struct which is defined for each omap revision as suggested by Tomi Valkeinen. Assign the corresponding omap_dss_hwmod_data array struct to the pointer curr_dss_hwmod in omap_display_init(). Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: improve clock debugfs outputTomi Valkeinen2011-05-111-1/+12
| | | | | | | | | | | OMAP4 has clocks set up in a bit interesting way, causing, for example, the DSS's "ick" to be called "dss_fck". This patch changes the debugfs output to show both the DSS's name for the clock (ie. basically the clock alias), and the real name from the clock struct. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: Convert simple/strict_strto* to kstrto*Tomi Valkeinen2011-05-114-29/+66
| | | | | | | | | | | Convert simple/strict_strto* functions to kstrto* functions. Only simple cases are converted. simple_strto* uses are still left to places where it is used to parse numbers from a list of numbers. These need some other solution than kstrto*. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP2PLUS: DSS2: Remove hack config "CONFIG_OMAP2_DSS_USE_DSI_PLL"Archit Taneja2011-05-113-54/+42
| | | | | | | | | | The clock sources for DISPC_FCLK and LCD1_CLK are now specified in the board file. There is no need for the hack config "CONFIG_OMAP2_DSS_USE_DSI_PLL" anymore. Introduce function dpi_use_dsi_pll() which checks for the clock sources to decide whether DSI PLL is to be used or not. Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: HDMI: Use dss_device clock configuration for HDMI PLL parametersArchit Taneja2011-05-113-14/+27
| | | | | | | | | Move some of the configurable HDMI PLL parameters to dssdev.clock struct. Cleanup the function hdmi_compute_pll() by using the parameters defined in the board file and do some cosmetic modifications. Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP2PLUS: DSS2: Add clock sources to dss device clock configurationArchit Taneja2011-05-113-8/+14
| | | | | | | | | | | Add enum dss_clock_source in dssdev.clocks struct so that the clock sources can be specified in the board file. Replace hard coded clock sources in dsi.c, dpi.c and replace them with the new clock source members in dssdev.clocks. Modify the sdp4430_lcd_device struct in board-4430sdp.c to specify clock sources for DISPC_FCLK, LCD1_CLK and DSI1_FCLK. Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP2PLUS: DSS2: Change enum "dss_clk_source" to "omap_dss_clk_source"Archit Taneja2011-05-119-80/+80
| | | | | | | | | | Change enum dss_clk_source to omap_dss_clock_source and move it to 'plat/display.h'. Change the enum members to attach "OMAP_" in the beginning. These changes are done in order to specify the clock sources for DSS in the board file. Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: use __exit for selected panel driversTomi Valkeinen2011-05-113-6/+6
| | | | | | | We can use __exit for the driver remove function in plain dss panels (ie. those that do not need i2c or spi). Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: make omap_dss_(un)register_device staticTomi Valkeinen2011-05-112-5/+5
| | | | | | | omap_dss_register_device and omap_dss_unregister_device can only be called from core.c, so we can make it static. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: VENC: Add missing start/stop_device callsTomi Valkeinen2011-05-111-0/+12
| | | | | | | | VENC code was missing omap_dss_start/stop_device calls. This didn't cause any problems as VENC could not be compiled as a module, but nevertheless it's better to add the calls. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: OMAPFB: Remove implicit display update on unblankJani Nikula2011-05-111-13/+0
| | | | | | | | | | | | | | | | Currently omapfb does an implicit display update (for manual update displays) on unblank. There is no guarantee that the framebuffer contains a valid image when unblank is called. When using manual update displays it is the responsibility of the user space to update the display, and so it should be in this case also. This patch removes the implicit display update on unblank. Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com> [tomi.valkeinen@ti.com: improved description] Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: OMAPFB: Handle errors when initializing panelTomi Valkeinen2011-05-111-21/+59
| | | | | | | | | | Errors from the panel driver were ignored during panel initialization. Handle the errors and fail accordingly. Also move the display initialization to a separate function to make it cleaner. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: Add method for querying display dimensions from DSS driversJani Nikula2011-05-113-4/+22
| | | | | | | | Add get_dimensions() to struct omap_dss_driver. Use the call, if supported by the driver, in OMAPFB. Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: VENC: Remove sleeps at venc enable/disableTomi Valkeinen2011-05-111-6/+0
| | | | | | | VENC code had 50ms sleep after enabling the output and 100ms sleep after disabling the output. I don't see any reason for these sleeps. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: VENC: make 20ms venc bug-fix sleep optionalTomi Valkeinen2011-05-112-0/+15
| | | | | | | | There's a 20ms sleep after VENC reset. It's unknown what bug this circumvents and on what platforms. Add a Kconfig option to disable the sleep. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: make 50ms bug-fix sleep optionalTomi Valkeinen2011-05-112-0/+16
| | | | | | | | | | | | For some unknown reason we may get SYNC_LOST errors from the display subsystem at initialization time if we don't sleep before resetting the DSS. See the source (dss.c) for more comments. However, 50ms is quite long time to sleep, and with some configurations the SYNC_LOST may never happen, so this patch creates a Kconfig option to disable the sleep. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: remove non-working msleep(40) workaroundTomi Valkeinen2011-05-111-7/+12
| | | | | | | | | | | | The sleep workaround for the problem described in the comment doesn't really work. This patch removes the workaround, and improves the comment about the bug, and proposes an userspace workaround. omap_dss_set_manager() is called 6 times when loading omapdss and omapfb, which means that 40ms * 6 = 240ms was spent sleeping when booting up. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: move dss device clock configurationTomi Valkeinen2011-05-112-19/+23
| | | | | | | | | | | Clock configuration was defined inside dssdev.phy.dsi struct. The clock config doesn't really belong there, and so it's moved to dssdev.clock struct. Now the explicit clock configuration could also be used for other interfaces than DSI, although there's no support for it currently. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>