History log of /drivers/video/omap2/dss/dss.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
0eaf9f52e94f756147dbfe1faf1f77a02378dbf9 23-Jan-2012 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAPDSS: use sync versions of pm_runtime_put

omapdss doesn't work properly on system suspend. The problem seems to be
the fact that omapdss uses pm_runtime_put() functions when turning off
the hardware, and when system suspend is in process only sync versions
are allowed.

Using non-sync versions normally and sync versions when suspending would
need rather ugly hacks to convey the information of
suspending/not-suspending to different functions. Optimally the driver
wouldn't even need to care about this, and the PM layer would handle
syncing when suspend is in process.

This patch changes all omapdss's pm_runtime_put calls to
pm_runtime_put_sync. This fixes the suspend problem, and probably the
performance penalty of always using sync versions is negligible.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Kevin Hilman <khilman@ti.com>
/drivers/video/omap2/dss/dss.c
a8a359318530a779c8d28d86357d492adead5b1f 10-Jul-2011 Paul Gortmaker <paul.gortmaker@windriver.com> video: Add export.h for THIS_MODULE/EXPORT_SYMBOL to drivers/video

With module.h being implicitly everywhere via device.h, the absence
of explicitly including something for EXPORT_SYMBOL went unnoticed.
Since we are heading to fix things up and clean module.h from the
device.h file, we need to explicitly include these files now.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
/drivers/video/omap2/dss/dss.c
4a61e267c84e98caeddcab25432a871bf1a599dd 31-Aug-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAP: DSS2: add dss_get_hdmi_venc_clk_source()

Add dss_get_hdmi_venc_clk_source(), which can be used to get the value
programmed with dss_select_hdmi_venc_clk_source(). This can be used to
find out if the digit output is going to VENC or HDMI.

For OMAP2/3 dss_get_hdmi_venc_clk_source() always returns
DSS_VENC_TV_CLK.

Cc: Mythri P K <mythripk@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/drivers/video/omap2/dss/dss.c
f36465822d2e2651e03baf5c4c1a90ee4c1f9cdd 02-Aug-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAP: DSS2: remove unneeded fck enable/disables

Now that the HWMOD fmwk handles the fcks of DSS modules properly, the
DSS driver no longer needs to explicitely enable/disable the fck.

This patch removes the enables/disables of fck from dispc, dsi and dss.
The clk_get(fck) is still needed there, as the modules need to know the
frequency of the clock.

For hdmi and venc this patch also removes the clk_get(fck), as they
don't need the clock at all.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/drivers/video/omap2/dss/dss.c
bfe4f8d32df9d2afa5fb0dccca9dfdef8573f04a 04-Aug-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> Revert "HACK: OMAP: DSS2: clk hack for OMAP2/3"

This reverts commit 9ede365aa6f74428a1f69c21ca1cf21213167576.

The hack is no longer needed, as the HWMOD data has been fixed.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/drivers/video/omap2/dss/dss.c
9ede365aa6f74428a1f69c21ca1cf21213167576 01-Aug-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> HACK: OMAP: DSS2: clk hack for OMAP2/3

The HWMOD data for OMAP2 and 3 are currently not up to date regarding
DSS (OMAP4 HWMOD data is fine). This patch makes the DSS driver to get
the opt clocks needed for OMAP2/3 with the old clock names, thus
allowing DSS driver to use runtime PM.

The HWMOD databases should be fixes ASAP, and this patch can be reverted
after that.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/drivers/video/omap2/dss/dss.c
69f06054aad122b314cd64fdafdf14fc3b8e5b7c 01-Jun-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAP: DSS2: DSS: Fix context save/restore

The current method of saving and restoring the context could cause a
restore before saving, effectively "restoring" zero values to registers.

Add ctx_valid field to indicate if the saved context is valid and can be
restored.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/drivers/video/omap2/dss/dss.c
39020710e707a01d80ea6c9e55dad4de93bb4730 26-May-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAP: DSS2: Remove ctx loss count from dss.c

dss.c only saves 1 register (3 in OMAP3) so the extra overhead from
need_ctx_restore & co. is probably bigger than the time spent saving and
restoring those few registers every time.

So remove the code from dss.c and restore context every time dss has
been off.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/drivers/video/omap2/dss/dss.c
4fbafaf371be780ed2cd73a520dfeafa1ea73e24 27-May-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAP: DSS2: Use PM runtime & HWMOD support

Use PM runtime and HWMOD support to handle enabling and disabling of DSS
modules.

Each DSS module will have get and put functions which can be used to
enable and disable that module. The functions use pm_runtime and hwmod
opt-clocks to enable the hardware.

Acked-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/drivers/video/omap2/dss/dss.c
de3050a74e2d2830189ceaa5f5fc05b776518d68 17-May-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAP: DSS2: Remove CONFIG_OMAP2_DSS_SLEEP_BEFORE_RESET

CONFIG_OMAP2_DSS_SLEEP_BEFORE_RESET is used to avoid an unclear bug at
DSS reset time. The pm runtime will handle reset in the future, and this
code has to be removed. Hopefully we won't see this error anymore.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/drivers/video/omap2/dss/dss.c
7e42403e3bbce191ad7e4ce8c598d48be6232f57 17-May-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAP: DSS2: Remove core_dump_clocks

Currently dss.c does all the low level clock handling in the DSS, and
thus it contains pointers to all the clocks. This allows dss.c to dump
the clock information for all the clocks.

With pm_runtime this is no longer the case, as each submodule will
handle its clocks independently. Thus remove the core_dump_clocks
function as it cannot be used with pm_runtime.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/drivers/video/omap2/dss/dss.c
aac927c93bb353375c74779491e217427cc4d3a9 23-May-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAP: DSS2: rewrite use of context_loss_count

The function to get device's context loss count has changed from

omap_pm_get_last_off_on_transaction_id() to
omap_pm_get_dev_context_loss_count()

Change name of the function pointer in omapdss.h accordingly, and use
the term "context loss count" instead of "context id" in the code.

Restructure the context loss count functions to handle errors properly,
and ensure that context is always considered lost if an error happens.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/drivers/video/omap2/dss/dss.c
b98482ed73810c4a970dee3402b35241d3ce4b7e 16-May-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAP: DSS2: Clean up probe for DSS & DSI

Both dss.c and dsi.c had a probe function, which was almost a dummy one,
calling dss_init() and dsi_init().

Remove the init functions by moving the initialization code into probe
functions.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/drivers/video/omap2/dss/dss.c
94c042ce589b6b81e5dc0020fce2d248940412bd 16-May-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAP: DSS2: Handle dpll4_m4_ck in dss_get/put_clocks

Get and put for dpll4_m4_ck was handled in dss_init/dss_exit. Move the
code to dss_get/put_clocks(), which is a better place to handle it.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/drivers/video/omap2/dss/dss.c
24e6289c029b0cf5b4f75e12c1b66000d441c9ed 23-May-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAP: DSS2: remove extra includes from include/video/omapdss.h

omapdss.h included platform_device.h and atomic.h, neither of which is
needed by omapdss.h. Remove those includes from omapdss.h, and fix the
affected .c files which did not include platform_device.h even though
they should.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/drivers/video/omap2/dss/dss.c
5a8b572d832772722c3b3b7578e7fb968560fcf3 12-May-2011 Archit Taneja <archit@ti.com> OMAP4: DSS2: DSI: Changes for DSI2 on OMAP4

Introduce DSI2 PLL clock sources needed by LCD2 channel and DSI2 Protocol
engine and DISPC Functional clock. Do the following:

- Modify dss_get_dsi_clk_source() and dss_select_dsi_clk_source() to take the
dsi module number as an argument.
- Create debugfs files for dsi2, split the corresponding debugfs functions.
- Allow DPI to use these new clock sources.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/drivers/video/omap2/dss/dss.c
a72b64b99918ee801a3a6abf5391e356752bcad0 12-May-2011 Archit Taneja <archit@ti.com> OMAP: DSS2: Pass platform_device as an argument in dsi functions

The DSI interface is represented as a platform device, using the DSI platform
driver(dsi.c). The current DSI driver design is capable of running only one
instance of a DSI device. On OMAP4, there are 2 very similar DSI modules which
can be represented as instances of "omapdss_dsi" platform device.

Add member "module" in "dssdev.phy.dsi" that tells us which DSI module's lanes
the panel is connected to. Modify dsi.c functions to take the device's
platform_device struct pointer, provide functions dsi_get_dsidev_from_dssdev()
and dsi_get_dsidev_from_id() take the panel's omap_dss_device and module number
respectively, and return the platform_device pointer. Currently, the dsi struct
is declared globally and is accessed when dsi data is needed. The new pdev
argument will be used later to provide the platform device's dsi related data.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/drivers/video/omap2/dss/dss.c
44538b431517ebf4b0e8574cb727deb1a73652c8 09-May-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAP: DSS2: Remove DSS_IRQSTATUS

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>
/drivers/video/omap2/dss/dss.c
ab46d8b2a346ef9d2dc70d7e11aef5e752a090f8 04-Apr-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAP: DSS2: improve clock debugfs output

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>
/drivers/video/omap2/dss/dss.c
89a35e5170fc579e4fc3a1f3444c5dc1aa36904d 12-Apr-2011 Archit Taneja <archit@ti.com> OMAP2PLUS: DSS2: Change enum "dss_clk_source" to "omap_dss_clk_source"

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>
/drivers/video/omap2/dss/dss.c
f1aafdcd42ad45a4bda5cb8f4a6782b0e48549ba 02-Jun-2010 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAP: DSS2: make 50ms bug-fix sleep optional

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>
/drivers/video/omap2/dss/dss.c
89976f2990a97820b73a1768371ee505b0ffc176 31-Mar-2011 Archit Taneja <archit@ti.com> OMAP: DSS2: Fix: Return correct lcd clock source for OMAP2/3

dss.lcd_clk_source is set to the default value DSS_CLK_SRC_FCK at dss_init.
For OMAP2 and OMAP3, the dss.lcd_clk_source should always be the same as
dss.dispc_clk_source. The function dss_get_lcd_clk_source() always returns the
default value DSS_CLK_SRC_FCK for OMAP2/3. This leads to wrong clock dumps when
dispc_clk_source is not DSS_CLK_SRC_FCK.

Correct this function to always return dss.dispc_clk_source for OMAP2/3.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/drivers/video/omap2/dss/dss.c
a0b38cc4d35e095f14ab0f486135f8a619ebfc14 11-May-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAP: DSS2: Move display.h to include/video/

arch/arm/plat-omap/include/plat/display.h is an include for the OMAP DSS
driver. A more logical place for it is in include/video.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/drivers/video/omap2/dss/dss.c
2de110868f455b74e91111801ce63a3c9d06f091 14-Mar-2011 Murthy, Raghuveer <raghuveer.murthy@ti.com> OMAP: DSS2: Implement OMAP4 DSS fclk support

Add dss.dpll4_m4_ck (DSS FCLK) initialization for OMAP4. This is used
to compute the pixel clock for DPI interface and also to reconfigure
the DSS FCLK to the desired rate, corresponding to the rate computed
for pixel clock.

Adding these cpu_is_44xx() checks are meant to be temporary, until a
cleaner implementation to manage these checks are added. Currently this
is needed to get DVI display running on OMAP4 PandaBoard

Signed-off-by: Raghuveer Murthy <raghuveer.murthy@ti.com>
[tomi.valkeinen@ti.com: minor changes due to conflicts]
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/drivers/video/omap2/dss/dss.c
0acf659f1469725fb6e39d53af970f36c5f69a41 14-Mar-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAP: DSS2: Clean up for dpll4_m4_ck handling

OMAP2 does not have dpll4_m4_ck source clock for dss functional clock,
but later OMAPs do. Currently we check for cpu type in multiple places
to find out if dpll4_m4_ck is available.

This patch cleans up dss.c by using the fact that dss.dpll4_m4_ck
pointer is NULL on OMAP2. This allows us to remove many of the cpu
checks.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/drivers/video/omap2/dss/dss.c
7ed024aa280cb38c8aa5c188d2d2c98f5daede10 09-Mar-2011 Mythri P K <mythripk@ti.com> OMAP4: DSS2: HDMI: Select between HDMI VENC clock source.

Adding function to select between HDMI or VENC clock source.

Signed-off-by: Mythri P K <mythripk@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/drivers/video/omap2/dss/dss.c
31ef82377f1e0f1bc7d308ae4312e6cc5a431885 15-Mar-2011 Taneja, Archit <archit@ti.com> OMAP: DSS2: FEATURES: Functions to return min and max values of parameters

Create 2 functions dss_feat_get_param_min() and dss_feat_get_param_max() which
return the minimum and maximum value of a parameter. Introduce a enum in
dss_features called dss_range_param which contains parameters whose ranges we
are interested in.

Replace this with dss_feat_get_max_dss_fck() which is specific to the parameter
DSS_FCK.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/drivers/video/omap2/dss/dss.c
235e7dba0264d4c6e56ee217fc7ef6d80da5eb67 15-Mar-2011 Taneja, Archit <archit@ti.com> OMAP2PLUS: DSS2: FEATURES: Fix usage of dss_reg_field and dss_clk_source_name

The structures dss_reg_field and dss_clk_source_name have enum members which
specify the register field and the clock source respectively. These members are
not used to choose the correct result in the corresponding feature functions.
Remove these members and change the features array declaration to incorporate
these enums.

The structure dss_clk_source_name without the enum member is just a pointer to
an string. Remove the structure and use a character pointer directly.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/drivers/video/omap2/dss/dss.c
ea75159ee6f00bd809f57a58e5505dc362382cc8 08-Mar-2011 Taneja, Archit <archit@ti.com> OMAP4: DSS2: Clock source changes for OMAP4

On OMAP3, the pixel clock for the LCD manager was derived through DISPC_FCLK as:

Lcd Pixel clock = DISPC_FCLK / lcd / pcd

Where lcd and pcd are divisors in the DISPC_DIVISOR register.

On OMAP4, the pixel clocks for LCD1 and LCD2 managers are derived from 2 new
clocks named LCD1_CLK and LCD2_CLK. The pixel clocks are calculated as:

Lcd_o Pixel clock = LCDo_CLK / lcdo /pcdo, o = 1, 2

Where lcdo and pcdo registers are divisors in DISPC_DIVISORo registers.

LCD1_CLK and LCD2_CLK can have DSS_FCLK, and the M4 divider clocks of DSI1 PLL
and DSI2 PLL as clock sources respectively. Introduce functions to select and
get the clock source for these new clocks. Modify DISPC functions get the
correct lck and pck rates based on the clock source of these clocks. Since
OMAP2/3 don't have these clocks, force OMAP2/3 to always have the LCD_CLK source
as DSS_CLK_SRC_FCK by introducing a dss feature.

Introduce clock source names for OMAP4 and some register field changes in
DSS_CTRL on OMAP4.

Currently, LCD2_CLK can only have DSS_FCLK as its clock source as DSI2 PLL
functionality hasn't been introduced yet. BUG for now if DSI2 PLL is selected as
clock.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/drivers/video/omap2/dss/dss.c
66534e8e936a0b926863df90054dc59826d70528 08-Mar-2011 Taneja, Archit <archit@ti.com> OMAP2PLUS: DSS2: Cleanup clock source related code

Clean up some of the DSS functions which select/get clock sources, use switch
to select the clock source members since more clock sources will be introduced
later on.

Remove the use of macro CONFIG_OMAP2_DSS_DSI in dispc_fclk_rate, use a dummy
inline for function for dsi_get_pll_hsdiv_dispc_rate() instead for code clarity.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/drivers/video/omap2/dss/dss.c
85604b0a247615157cedfec46b9cbfde2884f80f 03-Mar-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> HACK: OMAP: DSS2: add delay after enabling clocks

On omap4 the registers may not be accessible right after enabling the
clocks. At some point this will be handled by pm_runtime, but, for the
time begin, adding a small delay after clk_enable() should make things
work.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/drivers/video/omap2/dss/dss.c
587b5e8269fab583e4e9d2d6bbdc77b289ac78a7 01-Mar-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAP: DSS2: Move DPI & SDI init into DSS plat driver

DPI and SDI are different from the other interfaces as they are not
hwmods and there is not platform driver for them. They could be said to
be a part of DSS or DISPC modules, although it's not a clear definition.

This patch moves DPI and SDI initialization into DSS platform driver,
making the code more consistent: omap_dss_probe() only initializes
platform drivers now.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/drivers/video/omap2/dss/dss.c
42c9dee82129d965bc8ca02170150817317c0135 01-Mar-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAP: DSS2: Remove FB_OMAP_BOOTLOADER_INIT support

FB_OMAP_BOOTLOADER_INIT does not work, and it was only partially
implemented for SDI.

This patch removes support for FB_OMAP_BOOTLOADER_INIT to clean up the
code and to remove any assumptions that FB_OMAP_BOOTLOADER_INIT would
work.

Proper implementation is much more complex, requiring early boot time
register and clock handling to keep the DSS running.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/drivers/video/omap2/dss/dss.c
1bb478350670fadf708d3cbd6137c32dfbe3fd5f 24-Feb-2011 Archit Taneja <archit@ti.com> OMAP2PLUS: DSS2: DSI: Generalize DSI PLL Clock Naming

DSI PLL output clock names have been made more generic. The clock name
describes what the source of the clock and what clock is used for. Some of
DSI PLL parameters like dividers and DSI PLL source have also been made more
generic.

dsi1_pll_fclk and dsi2_pll_fclk have been changed as dsi_pll_hsdiv_dispc_clk
and dsi_pll_hsdiv_dsi_clk respectively. Also, the hsdividers are now named
regm_dispc and regm_dsi instead of regm3 and regm4.

Functions and macros named on the basis of these clock names have also been
made generic.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/drivers/video/omap2/dss/dss.c
067a57e48e302863eb2d5ac0900ae9ae65dbc8c3 02-Mar-2011 Archit Taneja <archit@ti.com> OMAP2PLUS: DSS2: Use dss features to get clock source names of current OMAP

Clock source names vary across OMAP2/3 and OMAP4, the clock source enum
names have been made generic in the driver, but for purposes of debugging
and dumping clock sources, it is better to preserve the actual TRM name of
the clock.

Introduce a dss feature function 'dss_feat_get_clk_source_name()' which
returns a string with the TRM clock name for the current OMAP in use. The OMAP
specific name is printed along the generic name within brackets.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/drivers/video/omap2/dss/dss.c
88134fa138b90518819b750891ffecc13f5f4886 06-Jan-2011 Archit Taneja <archit@ti.com> OMAP2PLUS: DSS2: Make members of dss_clk_source generic

The enum members of 'dss_clk_source' have clock source names specific to
OMAP2/3. Change the names to more generic terms such that they now describe
where the clocks come from and what they are used for.

Also, change the enum member names to have "DSS_CLK_SRC" instead of "DSS_SRC"
for more clarity.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/drivers/video/omap2/dss/dss.c
819d807c59af10cce1dcbb13539c2fb100953fcd 01-Mar-2011 Archit Taneja <archit@ti.com> OMAP2PLUS: DSS2: FEATURES: Function to Provide the max fck supported

The maximum supported frequency for DSS has increased from 173 to 186 Mhz on
OMAP4.

Introduce a dss feature function to get the max_fck to replace DISPC_MAX_FCK
macro.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/drivers/video/omap2/dss/dss.c
a1a0dccaea9e036200dc0b1070af1bfae06690fb 01-Mar-2011 Semwal, Sumit <sumit.semwal@ti.com> OMAP2PLUS:DSS2: Use opt_clock_available from pdata

hwmod databases provide information about which optional clocks are available
for a given platform. This is available via a function pointer opt_clock_enable
in pdata.

Use this information during get/enable/disable/put of clocks.

Signed-off-by: Sumit Semwal <sumit.semwal@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/drivers/video/omap2/dss/dss.c
6ec549e50b192105ede7bb289a31da6f6e1a61e9 24-Feb-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAP: DSS2: Check for SDI HW before accessing SDI registers

Only OMAP 3430 hardware has SDI support. The availability of SDI HW can
be found out by checking if the LCD channel supports SDI displays.

This patch checks for SDI HW support before accessing SDI registers,
which fixes a crash on OMAP4 when SDI SW support is compiled in.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/drivers/video/omap2/dss/dss.c
affe360d13e54b415cde2f11cee02369b4ed54bd 23-Feb-2011 archit taneja <archit@ti.com> OMAP: DSS2: Have separate irq handlers for DISPC and DSI

Currently, the core DSS platform device requests for an irq line for OMAP2 and
OMAP3. Make DISPC and DSI platform devices request for a shared IRQ line.

On OMAP3, the logical OR of DSI and DISPC interrupt lines goes to the MPU. There
is a register DSS_IRQSTATUS which tells if the interrupt came from DISPC or DSI.

On OMAP2, there is no DSI, only DISPC interrupts goto the MPU. There is no
DSS_IRQSTATUS register.

Hence, it makes more sense to have separate irq handlers corresponding to the
DSS sub modules instead of having a common handler.

Since on OMAP3 the logical OR of the lines goes to MPU, the irq line is shared
among the IRQ handlers.

The hwmod irq info has been removed for DSS to DISPC and DSI for OMAP2 and OMAP3
hwmod databases. The Probes of DISPC and DSI now request for irq handlers.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/drivers/video/omap2/dss/dss.c
c7642f67e5bd71f91d165620f601f00c7c9802c9 31-Jan-2011 Archit Taneja <archit@ti.com> OMAP2PLUS: DSS2: Generalize external clock names in struct dss of dss.c

The dss struct in dss.c has omap2/3 specific clock names. Making them generic,
to increase readability and extendability.

Signed-off-by: Sumit Semwal <sumit.semwal@ti.com>
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/drivers/video/omap2/dss/dss.c
6af9cd1431db952a7f9f8931497c9989a48b07df 31-Jan-2011 Archit Taneja <archit@ti.com> OMAP2PLUS: DSS2: Generalize naming of PRCM related clock enums in DSS driver

enum dss_clock structure is replaced with generic names that
could be used across OMAP2420, 2430, 3xxx, 44xx platforms.

Signed-off-by: Sumit Semwal <sumit.semwal@ti.com>
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/drivers/video/omap2/dss/dss.c
872462cdfc74e7b93c09870128d9bb436d4e9804 31-Jan-2011 Sumit Semwal <sumit.semwal@ti.com> OMAP2PLUS: clocks: Align DSS clock names and roles

Currently, clock database has <dev, clock-name> tuples for DSS2. Because of
this, the clock names are different across different OMAP platforms.

This patch aligns the DSS2 clock names and roles across OMAP 2420, 2430, 3xxx,
44xx platforms in the clock databases, hwmod databases for opt-clocks, and DSS
clock handling.

This ensures that clk_get/put/enable/disable APIs in DSS can use uniform role
names.

Signed-off-by: Sumit Semwal <sumit.semwal@ti.com>
Acked-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/drivers/video/omap2/dss/dss.c
ef631f82500390b3dfc20b16214e53c443d675a4 16-Feb-2011 Senthilvadivu Guruswamy <svadivu@ti.com> OMAP2,3: DSS2: Get DSS IRQ from platform device

DSS IRQ number can be obtained from platform_get_irq(). This API in turn
picks the right IRQ number belonging to HW IP from the hwmod database.
So hardcoding of IRQ number could be removed.

This IRQ is stored in dss_irq as part of dss structure, and freed it in
dss_exit().

Reviewed-by: Paul Walmsley <paul@pwsan.com>
Reviewed-by: Kevin Hilman <khilman@ti.com>
Tested-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Senthilvadivu Guruswamy <svadivu@ti.com>
Signed-off-by: Sumit Semwal <sumit.semwal@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/drivers/video/omap2/dss/dss.c
ea9da36a304eed585fc5ef89c0f1c460eca61b48 24-Jan-2011 Senthilvadivu Guruswamy <svadivu@ti.com> OMAP2,3: DSS2: Use platform device to get baseaddr

DSS, DISPC, DSI, RFBI, VENC baseaddr can be obtained from platform_get_resource().
This API in turn picks the right silicon baseaddr from the hwmod database.
So hardcoding of base addr could be removed.

Reviewed-by: Paul Walmsley <paul@pwsan.com>
Reviewed-by: Kevin Hilman <khilman@ti.com>
Tested-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Sumit Semwal <sumit.semwal@ti.com>
Signed-off-by: Senthilvadivu Guruswamy <svadivu@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/drivers/video/omap2/dss/dss.c
8b9cb3a8f39d0864c925c5cd5c2c54cfd85ad551 24-Jan-2011 Senthilvadivu Guruswamy <svadivu@ti.com> OMAP2, 3: DSS2: Move clocks from core driver to dss driver

All clock management is moved to dss platform driver. clk_get/put APIs use
dss device instead of core platform device.

Hwmod adaptation design requires each of the DSS HW IP to be a platform driver.
So the device name is changed from omapdss to omapdss_dss in 2420, 2430,
3xxx clock database files. Now the core driver "omapdss" only takes care
of panel registration with the custom bus.
core driver also uses the clk_enable() / clk_disable() APIs exposed by DSS for
clock management.
DSS driver would do clock management of clocks needed by DISPC, RFBI, DSI, VENC

TODO: The clock content would be adapted to omap_hwmod in a seperate series.

Signed-off-by: Senthilvadivu Guruswamy <svadivu@ti.com>
Signed-off-by: Sumit Semwal <sumit.semwal@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/drivers/video/omap2/dss/dss.c
96c401bcb83a182a4f332f2f64ee6530ba35511a 24-Jan-2011 Senthilvadivu Guruswamy <svadivu@ti.com> OMAP2, 3: DSS2: DSS: create platform_driver, move init, exit to driver

Hwmod adaptation design requires each of the DSS HW IP to be a platform driver.
So a platform_driver of DSS is created and init exit methods are moved from core.c
to its driver probe,remove. pdev member has to be maintained by its own drivers.

DSS platform driver is registered from inside omap_dss_probe, in the order desired.

Signed-off-by: Senthilvadivu Guruswamy <svadivu@ti.com>
Signed-off-by: Sumit Semwal <sumit.semwal@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/drivers/video/omap2/dss/dss.c
e406f9079b993f4d5d7b5a3452b11df81ff2aef0 09-Jun-2010 Tomi Valkeinen <tomi.valkeinen@nokia.com> OMAP: DSS2: DSI: Wait for DSI PLL clocks to be active before selecting them

The TRM tells us to wait for the DSI PLL derived clocks to become
active before selecting them for use. I didn't actually have any issues
which this would fix but according to the TRM it seems to be the right
thing to do.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
/drivers/video/omap2/dss/dss.c
ac01bb7ea06a02c8dc9084b4ed59cb59efeceb39 25-Apr-2010 Kishore Y <kishore.y@ti.com> OMAP3630: DSS2: Updating MAX divider value

In DPLL4 M3, M4, M5 and M6 field width has been increased by 1 bit in 3630.
So the max divider value that can be achived will be 32 and not 16.
In 3630 the functional clock is x1 of DPLL4 and not x2. Hence multiplier 2
is removed.

Signed-off-by: Sudeep Basavaraj <sudeep.basavaraj@ti.com>
Signed-off-by: Mukund Mittal <mmittal@ti.com>
Signed-off-by: Kishore Y <kishore.y@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
/drivers/video/omap2/dss/dss.c
ce619e1fb86d68f125e0e6d10a5484f67a6d97b3 11-Mar-2010 Tomi Valkeinen <tomi.valkeinen@nokia.com> OMAP: DSS2: initialize dss clk sources properly

Clk sources were not initialized, leading to kernel crash, or possibly to
strange behaviour if DSI was compiled in.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
/drivers/video/omap2/dss/dss.c
2f18c4d89861fc1abdfa2531ba76017acb78edc5 08-Jan-2010 Tomi Valkeinen <tomi.valkeinen@nokia.com> OMAP: DSS2: improve DSS clk src selection

dss_select_clk_source() was rather confusing. Selecting the source with
enums is much clearer.

The clk source selection is also stored into memory, so that we know what
is the selected source, even when clocks are off. This is important during
setup, as we need to what clocks to turn on before the clocks are turned
on.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
/drivers/video/omap2/dss/dss.c
24be78b32f0a6e14aead3eac89d768a361b091b3 07-Jan-2010 Tomi Valkeinen <tomi.valkeinen@nokia.com> OMAP: DSS2: Make check-delay-loops consistent

Loops checking for certain condition were rather inconsistent.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Reported-by: Juha Leppanen <juha_motorsportcom@luukku.com>
/drivers/video/omap2/dss/dss.c
559d67018950ced65c73358cd69c4bdd2b0c5dd6 03-Nov-2009 Tomi Valkeinen <tomi.valkeinen@nokia.com> OMAP: DSS2: Display Subsystem Driver core

The core files of DSS2. DSS2 commits are split a bit artificially to
make the individual commits smaller, and DSS2 doesn't compile properly
without the rest of the core commits. This shouldn't be a problem, as no
configuration uses DSS2 yet.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
/drivers/video/omap2/dss/dss.c