History log of /include/video/omapdss.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
c49d005b6cc8491fad5b24f82805be2d6bcbd3dd 17-Jan-2012 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAPDSS: HDMI: PHY burnout fix

A hardware bug in the OMAP4 HDMI PHY causes physical damage to the board
if the HDMI PHY is kept powered on when the cable is not connected.

This patch solves the problem by adding hot-plug-detection into the HDMI
IP driver. This is not a real HPD support in the sense that nobody else
than the IP driver gets to know about the HPD events, but is only meant
to fix the HW bug.

The strategy is simple: If the display device is turned off by the user,
the PHY power is set to OFF. When the display device is turned on by the
user, the PHY power is set either to LDOON or TXON, depending on whether
the HDMI cable is connected.

The reason to avoid PHY OFF when the display device is on, but the cable
is disconnected, is that when the PHY is turned OFF, the HDMI IP is not
"ticking" and thus the DISPC does not receive pixel clock from the HDMI
IP. This would, for example, prevent any VSYNCs from happening, and
would thus affect the users of omapdss. By using LDOON when the cable is
disconnected we'll avoid the HW bug, but keep the HDMI working as usual
from the user's point of view.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/include/video/omapdss.h
9a9016832d2601a290db4dce6dd55552bdae5b1a 02-Jan-2012 Mythri P K <mythripk@ti.com> OMAPDSS: HDMI: Disable DDC internal pull up

Disables the internal pull resistor for SDA and SCL which are enabled by
default, as there are external pull up's in 4460 and 4430 ES2.3
SDP, Blaze and Panda Boards, It is done to avoid the EDID read failure.

Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@linaro.org>
Signed-off-by: Mythri P K <mythripk@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/include/video/omapdss.h
ee9dfd82ff1317ac5c0147fe21508ad6d7df4cff 02-Jan-2012 Mythri P K <mythripk@ti.com> OMAPDSS: HDMI: Move duplicate code from boardfile

Move duplicate HDMI mux_init code from omap4 and panda board file
to display file.

Signed-off-by: Mythri P K <mythripk@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/include/video/omapdss.h
9d11c321a84266db2dba82cfb0d9d3bc17c326a8 17-Nov-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAPDSS: Add comments about blocking of ovl/mgr functions

Add comments specifying what ovl/mgr functions may block.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/include/video/omapdss.h
ff4733dcf56480bebcd3801adde27213b893635d 16-Nov-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAPDSS: APPLY: remove device_changed field

omap_overlay_manager contains device_changed field, which no longer has
any use. So remove the field and the few places where it is touched.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/include/video/omapdss.h
5d5a97a6fbf98f82ae50c837eba3ebcfea0902f8 16-Nov-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAPDSS: APPLY: move channel-field to extra_info set

Setting overlay's output channel is currently handled at the same time
as other overlay attributes. This is not right, as the normal attributes
should only affect one overlay and manager, but changing the channel
affects two managers.

This patch moves the channel field into the "extra_info" set, handled
together with enabled-status.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/include/video/omapdss.h
c1a9febfafa2a9a9ac09b2de4c80aa96b41a03d1 16-Nov-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAPDSS: APPLY: move ovl->info to apply.c

struct omap_overlayr contains info and info_dirty fields, both of which
should be internal to apply.c.

This patch moves those fields into ovl_priv data, and names them
user_info and user_info_dirty.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/include/video/omapdss.h
388c4c6cbb335e69fe23c8d18bd4b0e8dd66901b 16-Nov-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAPDSS: APPLY: move mgr->info to apply.c

struct omap_overlay_manager contains info and info_dirty fields, both of
which should be internal to apply.c.

This patch moves those fields into mgr_priv data, and names them
user_info and user_info_dirty.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/include/video/omapdss.h
aaa874a985158383c4b394c687c716ef26288741 15-Nov-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAPDSS: APPLY: rewrite overlay enable/disable

Overlays are currently enabled and disabled with a boolean in the struct
omap_overlay_info. The overlay info is set with ovl->set_overlay_info(),
and made into use with mgr->apply().

This doesn't work properly, as the enable/disable status may affect also
other overlays, for example when using fifo-merge. Thus the enabling and
disabling of the overlay needs to be done outside the normal overlay
configuration.

This patch achieves that by doing the following things:

1) Add function pointers to struct omap_overlay: enable(), disable() and
is_enabled(). These are used to do the obvious. The functions may block.

2) Move the "enabled" field from struct omap_overlay to ovl_priv_data.

3) Add a new route for settings to be applied to the HW, called
"extra_info". The status of the normal info and extra_info are tracked
separately.

The point here is to allow the normal info to be changed and
applied in non-blocking matter, whereas the extra_info can only be
changed when holding the mutex. This makes it possible to, for example,
set the overlay enable flag, apply it, and wait until the HW has taken
the flag into use.

This is not possible if the enable flag would be in the normal info, as
a new value for the flag could be set at any time from the users of
omapdss.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/include/video/omapdss.h
bf213523fe9708572a0b0a9149f7196a4f058564 15-Nov-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAPDSS: APPLY: move mgr->enabled to mgr_priv_data

struct omap_overlay_manager contains "enabled"-field, used to track if
the manager is enabled or not. This field should be internal to apply.c.

This patch moves the field to mgr_priv_data, and applies the necessary
locking when accessing the field.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/include/video/omapdss.h
9a147a65de1ac89e506ef90413f41ebd96e03fd3 09-Nov-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAPDSS: DSI: call mgr_enable/disable for cmd mode displays

The current code uses dsi_video_mode_enable/disable functions to
enable/disable DISPC output for video mode displays. For command mode
displays we have no notion in the DISPC side of whether the panel is
enabled, except when a dss_mgr_start_update() call is made.

However, to properly maintain the DISPC state in apply.c, we need to
know if a manager used for a manual update display is currently in use.

This patch achieves that by changing dsi_video_mode_enable/disable to
dsi_enable/disable_video_output, which is called by both video and
command mode displays. For video mode displays it starts the actual
pixel stream, as it did before. For command mode displays it doesn't do
anything else than mark that the manager is currently in use.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/include/video/omapdss.h
07e327c9c18b382656bf455051759be8182627ae 05-Nov-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAPDSS: store overlays in a list for each manager

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>
/include/video/omapdss.h
5617ad097959cb39b96d08af0a9b3d51215deaba 05-Nov-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAPDSS: store managers in an array

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>
/include/video/omapdss.h
be729178f0e0f31ab14b42b3fe5d6b4463fbeb3a 04-Nov-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAPDSS: APPLY: track whether a manager is enabled

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>
/include/video/omapdss.h
7797c6da64852b06b585b7eca8d3f657bfc9fa47 04-Nov-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAPDSS: hide manager's enable/disable()

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>
/include/video/omapdss.h
5476e74a03f4be972708162050c8ac7fe150449f 03-Nov-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAPDSS: remove partial update from DSI

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>
/include/video/omapdss.h
13662dc5b177d68885695ef513dd4ae0e4d2a099 08-Nov-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> ARM: OMAP: HWMOD: Unify DSS resets for OMAPs

This patch adds a custom DSS reset function used on OMAPs from OMAP2
forward.

The function doesn't actually do a reset, it only waits for the reset to
complete. The reason for this is that on OMAP4 there is no possibility
to do a SW reset, and on OMAP2/3 doing a SW reset for dss_core resets
all the other DSS modules also, thus breaking the HWMOD model where
every DSS module is handled independently.

This fixes the problem with DSS reset on OMAP4, caused by the fact that
because there's no SW reset for dss_core on OMAP4, the HWMOD framework
doesn't try to reset dss_core and thus the DSS clocks were never enabled
at the same time. This causes causes the HWMOD reset to fail for
dss_dispc and dss_rfbi.

The common reset function will also allow us to fix another problem in
the future: before doing a reset we need to disable DSS outputs, which
are in some cases enabled by the bootloader, as otherwise DSS HW seems
to get more or less stuck, requiring a power reset to recover.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
[paul@pwsan.com: modified to build arch/arm/mach-omap2/display.o
unconditionally to avoid an error when !CONFIG_OMAP2_DSS]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
/include/video/omapdss.h
54128701ecccbeb6f740030e0cc5f8e5701fe8ee 08-Sep-2011 Archit Taneja <archit@ti.com> OMAPDSS: DISPC: zorder support for DSS overlays

Add zorder support on OMAP4, this feature allows deciding the visibility order
of the overlays based on the zorder value provided as an overlay info parameter
or a sysfs attribute of the overlay object.

Use the overlay cap OMAP_DSS_OVL_CAP_ZORDER to determine whether zorder is
supported for the overlay or not. Use dss feature FEAT_ALPHA_FREE_ZORDER
if the caps are not available.

Ensure that all overlays that are enabled and connected to the same manager
have different zorders. Swapping zorders of 2 enabled overlays currently
requires disabling one of the overlays.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/include/video/omapdss.h
b8c095b4d62f90ed8da0cca7116125863b1d8bef 13-Sep-2011 Archit Taneja <archit@ti.com> OMAPDSS: DISPC: VIDEO3 pipeline support

Add support for VIDEO3 pipeline on OMAP4:
- Add VIDEO3 pipeline information in dss_features and omapdss.h
- Add VIDEO3 pipeline register coefficients in dispc.h
- Create a new overlay structure corresponding to VIDEO3.
- Make changes in dispc.c for VIDEO3

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/include/video/omapdss.h
11354dd58da1134ec9c96b65104e5cf2d50e1eb9 26-Sep-2011 Archit Taneja <archit@ti.com> OMAPDSS/OMAP_VOUT: Fix incorrect OMAP3-alpha compatibility setting

On OMAP3, in order to enable alpha blending for LCD and TV managers, we needed
to set LCDALPHABLENDERENABLE/TVALPHABLENDERENABLE bits in DISPC_CONFIG. On
OMAP4, alpha blending is always enabled by default, if the above bits are set,
we switch to an OMAP3 compatibility mode where the zorder values in the pipeline
attribute registers are ignored and a fixed priority is configured.

Rename the manager_info member "alpha_enabled" to "partial_alpha_enabled" for
more clarity. Introduce two dss_features FEAT_ALPHA_FIXED_ZORDER and
FEAT_ALPHA_FREE_ZORDER which represent OMAP3-alpha compatibility mode and OMAP4
alpha mode respectively. Introduce an overlay cap for ZORDER. The DSS2 user is
expected to check for the ZORDER cap, if an overlay doesn't have this cap, the
user is expected to set the parameter partial_alpha_enabled. If the overlay has
ZORDER cap, the DSS2 user can assume that alpha blending is already enabled.

Don't support OMAP3 compatibility mode for now. Trying to read/write to
alpha_blending_enabled sysfs attribute issues a warning for OMAP4 and does not
set the LCDALPHABLENDERENABLE/TVALPHABLENDERENABLE bits.

Change alpha_enabled to partial_alpha_enabled in the omap_vout driver. Use
overlay cap "OMAP_DSS_OVL_CAP_GLOBAL_ALPHA" to check if overlay supports alpha
blending or not. Replace this with checks for VIDEO1 pipeline.

Cc: linux-media@vger.kernel.org
Cc: Lajos Molnar <molnar@ti.com>
Signed-off-by: Archit Taneja <archit@ti.com>
Acked-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/include/video/omapdss.h
212b0d50e2eb7fc60f7bea1e90e5867b5fc0647d 26-Sep-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAPDSS: remove vaddr from overlay info

overlay_info struct, used to configure overlays, currently includes both
physical and virtual addresses for the pixels. The vaddr was added to
support more exotic configurations where CPU would be used to update a
display, but it is not currently used and there has been no interest in
the feature. Using CPU to update a screen is also less interesting now
that OMAP4 has two LCD outputs.

This patch removes the vaddr field, and modifies the users of omapdss
accordingly. This makes the use of omapdss a bit simpler, as the user
doesn't need to think if it needs to give the vaddr.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/include/video/omapdss.h
df4769c9c4effa0960ead8d83522407f66e4a82a 29-Aug-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAP: DSS2: add detect() to omap_dss_driver struct

detect() can be used to probe if the display is connected.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/include/video/omapdss.h
3d5e0ef746c13f8a26d0150f5dfd4f9b738a5130 25-Aug-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAP: DSS2: add read_edid() to omap_dss_driver struct

read_edid() can be used to get the EDID information from the display.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/include/video/omapdss.h
7f6f3c4bf3f0fd4ea82682b5f1a417cbdbf4a27f 31-Aug-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAP: DSS2: DISPC: Add missing IRQ definitions

Add IRQ definitions for missing OMAP4 IRQs: FRAMEDONEWB, FRAMEDONETV,
WBBUFFEROVERFLOW.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/include/video/omapdss.h
c90a78ecc2ae3c8341ed6efbfbb7e3e655ee00fe 31-Aug-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAP: DSS2: DSI: Add comment about regn

regn divider is one greater than the REGN divider in TRM. Add a comment
to point this out.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/include/video/omapdss.h
b44e45825dbe30f32c770b98c38555b6bd331760 22-Aug-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAP: DSS2: HDMI: change regn definition

regn divider is currently programmed to the registers without change,
but when calculating clock frequencies it is used as regn+1.

To make this similar to how DSI handles the dividers this patch changes
the regn value to be used as such for calculations, but the value
programmed to registers is regn-1.

This simplifies the clock frequency calculations, makes it similar to
DSI, and also allows us to use regn value 0 as undefined.

Cc: Mythri P K <mythripk@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/include/video/omapdss.h
8af6ff0107f0720b8fbf4feca7031d3e36c2fa11 05-Sep-2011 Archit Taneja <archit@ti.com> OMAP: DSS2: DSI Video mode support

Add initial support for DSI video mode panels:
- Add a new structure omap_dss_dsi_videomode_data in the member "panel" in
omap_dss_device struct. This allows panel driver to configure dsi video_mode
specific parameters.
- Configure basic DSI video mode timing parameters: HBP, HFP, HSA, VBP, VFP, VSA,
TL and VACT.
- Configure DSI protocol engine registers for video_mode support.
- Introduce functions dsi_video_mode_enable() and dsi_video_mode_disable() which
enable/disable video mode for a given virtual channel and a given pixel format
type.

Things left for later
- Add functions to check for errors in video mode timings provided by panel.
- Configure timing registers required for command mode interleaving.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/include/video/omapdss.h
a3b3cc2b883aac18a3388a405db809a99d66e3cf 08-Sep-2011 Archit Taneja <archit@ti.com> OMAP: DSS2: Create an enum for DSI pixel formats

Currently, DSI pixel info is only represented by the pixel size in bits using
the pixel_size parameter in omap_dss_device struct's ctrl member.

This is not sufficient information for DSI video mode usage, as two of the
supported formats(RGB666 loosely packed, and RGB888) have the same pixel
container size, but different data_type values for the video mode packet header.

Create enum "omap_dss_dsi_pixel_format" which describes the pixel data format
the panel is configured for. Create helper function dsi_get_pixel_size() which
returns the pixel size of the given pixel format.

Modify functions omapdss_default_get_recommended_bpp() and dss_use_replication()
to use dsi_get_pixel_size().

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/include/video/omapdss.h
b3b89c05cbd9869cfd6d4e352293a2e7e3bffc6e 30-Aug-2011 Archit Taneja <archit@ti.com> OMAP: DSS2: DSI: Introduce generic read functions

Introduce read functions which use generic Processor-to-Peripheral
transaction types. These are needed by some devices which may not support
corresponding DCS commands.

Add function dsi_vc_generic_send_read_request() which can send
a short packet with 0, 1 or 2 bytes of request data and the corresponding
generic data type.

Rename function dsi_vc_dcs_read_rx_fifo() to dsi_vc_read_rx_fifo() and modify
it to take the enum "dss_dsi_content_type" as an argument to use either DCS
or GENERIC Peripheral-to-Processor transaction types while parsing data read
from the device.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/include/video/omapdss.h
5c716a04ed1f5b8a3e1a8953b71f89441a70d1d4 22-Aug-2011 Archit Taneja <archit@ti.com> OMAP: DSS2: DSI: Remove functions dsi_vc_dcs_read_1() and dsi_vc_dcs_read_2()

Remove functions dsi_vc_dcs_read_1() and dsi_vc_dcs_read_2(), these are used
when the panel is expected to return 1 and 2 bytes respecitvely. This was manily
used for debugging purposes. These functions should be implemented in the panel
driver if needed.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/include/video/omapdss.h
6ff8aa3182db248db4d91e574254316025c0243c 25-Aug-2011 Archit Taneja <archit@ti.com> OMAP: DSS2: DSI: Introduce generic write functions

Intoduce enum "dss_dsi_content_type" to differentiate between DCS and generic
content types.

Introduce short and long packet write functions which use generic
Processor-to-Peripheral transaction types. These are needed by some devices
which may not support corresponding DCS commands. Create common write functions
which allow code reuse between DCS and generic write functions.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/include/video/omapdss.h
7e951ee9955f3df0c41e523a199cc3b9372cdb9f 21-Jul-2011 Archit Taneja <archit@ti.com> OMAP: DSS2: Create enum for DSI operation modes

Create an enum for DSI operation modes, use this to set the capabilities of the
device in dsi_init_display().

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/include/video/omapdss.h
f6dc815098bde08c09fd1219e0f77663f8a9a6c7 15-Aug-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAP: DSS2: Add GLOBAL_ALPHA & PRE_MULT_ALPHA to ovl caps

Add OMAP_DSS_OVL_CAP_GLOBAL_ALPHA and OMAP_DSS_OVL_CAP_PRE_MULT_ALPHA to
overlay capabilities. Use these instead of FEAT_GLOBAL_ALPHA,
FEAT_GLOBAL_ALPHA_VID1 and FEAT_PRE_MULT_ALPHA in code.

Remove FEAT_GLOBAL_ALPHA_VID1 and FEAT_PRE_MULT_ALPHA which are no
longer used. FEAT_GLOBAL_ALPHA is still used to decide if the HW has
global alpha register.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Archit Taneja <archit@ti.com>
/include/video/omapdss.h
4a9e78abb76a2f1ddccab7098bdf73a2f095aaa6 15-Aug-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAP: DSS2: Remove support for non-DISPC overlays

Remove support for non-DISPC overlays and overlay managers.

The support to possibly have non-DISPC overlays and managers was made to
make it possible to use CPU and/or sDMA to update RFBI or DSI command
mode displays. It is ok to remove the support, because:

- No one has used the feature.
- Display update without DISPC is very slow, so it is debatable if the
update would even be usable.
- Removal cleans up code.
- If such a feature is needed later, it is better implemented outside
omapdss driver.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Archit Taneja <archit@ti.com>
/include/video/omapdss.h
8fa8031c542986746ed4dfbd1eb52358bc86000b 15-Aug-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAP: DSS2: Handle manager change in apply

Currently when changing the manager of an overlay, set_manager() directly
calls dispc to set the overlay's destination.

Change this to be more in line with other overlay configurations, and
this will also remove the need to have dispc clocks enabled when calling
set_manager().

A new field is added to overlay struct, "manager_changed". This is
similar to "display_changed" field in manager struct, and is used to
inform apply that the manager has changed and thus write to the
registers is needed.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/include/video/omapdss.h
5bc416cba15f43c799fc02727c6d6887f3e35a4e 15-Jun-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAP: DSS2: DSI: Improve dsi_mux_pads parameters

dsi_mux_pads() needs to know about the DSI HW module and the DSI lanes
used. Split the function into two, enable and disable, which take
necessary arguments, and add empty implementations for both.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/include/video/omapdss.h
aea4eb9590c6fa36e1b68b9cf5c3e4ddea402812 27-May-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAP: DSS2: Remove unused opt_clock_available

opt_clock_available() is no longer needed, so remove it.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/include/video/omapdss.h
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>
/include/video/omapdss.h
3c07cae2cccc4e40ff66521701a3c8eeda8726e1 21-Jun-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAP: DSS2: Add Color Phase Rotation support

Add Color Phase Rotation (CPR) support and sysfs files to enable CPR and
to set the CPR coefficient matrix.

CPR is enabled via manager?/cpr_enable file, and the coefficient matrix
is set via manager?/cpr_coef file. The values in cpr_coef are in the
following order:

RR RG RB GR GG GB BR BG BB

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/include/video/omapdss.h
8cff88c5da2197aa601409d4a7ce8f83f8de8190 30-Apr-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAP: DSS2: remove update_mode from omapdss

Remove the whole update_mode stuff from omapdss driver. If automatic
update for manual update displays is needed, it's better implemented in
higher layers.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/include/video/omapdss.h
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>
/include/video/omapdss.h
0d66cbb53eca4ab3db85d9189d5a85c9fac49b84 19-May-2011 Amber Jain <amber@ti.com> OMAP: DSS2: Add support for NV12 format

Add the support for NV12 color format.
Configure base address for UV component of NV12 color format.
Change the way chroma scaling is handled for YUV formats on OMAP4 by enabling
chroma-resampling for video pipeline and hence using FIR2 register set for
scaling UV.
Changes to _dispc_set_scaling(), because of the reason above, are:
- call _dispc_set_scaling_common() to handle scaling for all color formats
except for OMAP4 where it only handles scaling for RGB or Y-component
- call _dispc_set_scaling_uv() for special handling required for UV
component on OMAP4.
- dispc_set_scaling_uv() also resets chroma-resampling bit for RGB color modes.

Contains chroma scaling (_dispc_set_scaling_uv) design and implemented by
Lajos Molnar <molnar@ti.com>

Signed-off-by: Amber Jain <amber@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/include/video/omapdss.h
f20e42205ab172cfd449c10e5183e2e371a629d6 19-May-2011 Amber Jain <amber@ti.com> OMAP: DSS2: Add new color formats for OMAP4

Add new color formats supported by OMAP4: NV12, RGBA16, RGBX16,
ARGB16_1555, XRGB16_1555.
NV12 color format is defined here, its support in DSS will be added separately.

Signed-off-by: Amber Jain <amber@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/include/video/omapdss.h
75d7247c07d27d046323504e2dbca5b3e94fbece 16-May-2011 Archit Taneja <archit@ti.com> OMAP: DSS2: DSI: Get number of DSI data lanes using DSI_GNQ register

On OMAP3, the DSI module has 2 data lanes. On OMAP4, DSI1 has 4 data lanes
and DSI2 has 2 data lanes. Introduce function dsi_get_num_data_lanes() which
returns the number of data lanes on the dsi interface, introduce function
dsi_get_num_data_lanes_dssdev() which returns the number of data lanes used by
the omap_dss_device connected to the lanes.

Use the DSI_GNQ register on OMAP4 to get the number of data lanes, modify
dsi.c to use the number of lanes and the extra data lanes on DSI1.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/include/video/omapdss.h
1d5952a868c3059dd0d431ffde357f1506823f5e 29-Apr-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAP: DSS2: RFBI: add omap_rfbi_configure

Add omap_rfbi_configure() which the panel driver can use to reconfigure
the data element size and the number of data lines in the RFBI bus.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/include/video/omapdss.h
773139f1759f9dc5efe2c314df9aad88b7364015 21-Apr-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAP: DSS2: RFBI: add rfbi_bus_lock

Add similar bus lock to RFBI as is in DSI. The panel driver can use the
bus lock to mark that the RFBI bus is currently in use.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/include/video/omapdss.h
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>
/include/video/omapdss.h
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>
/include/video/omapdss.h
1ffefe755c2681752a10ae50b2b17e70147bb194 12-May-2011 Archit Taneja <archit@ti.com> OMAP: DSS2: DSI: Add extra omap_dss_device argument in functions exported by dsi

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>
/include/video/omapdss.h
d1f5857e4bc9b2620fb3e84b1dbaa0ac11b831b4 30-Jul-2010 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAP: DSS2: DSI: Add DSI pad muxing support

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>
/include/video/omapdss.h
22d6d676261a5e204a7078df21459747750c92fb 11-Oct-2010 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAP: DSS2: DSI: add parameter to enter ulps on disable

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>
/include/video/omapdss.h
2a89dc15331983621b772240ebef9dea2cbe5322 29-Jul-2010 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAP: DSS2: DSI: add option to leave DSI lanes powered on

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>
/include/video/omapdss.h
6cb07b256af233965663d6dfc329d7df3dcae786 12-Apr-2011 Archit Taneja <archit@ti.com> OMAP: DSS2: HDMI: Use dss_device clock configuration for HDMI PLL parameters

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>
/include/video/omapdss.h
e888166247c0b23d3ccc8e54cf92de7325d71145 12-Apr-2011 Archit Taneja <archit@ti.com> OMAP2PLUS: DSS2: Add clock sources to dss device clock configuration

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>
/include/video/omapdss.h
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>
/include/video/omapdss.h
06b2b0d597ab6e3011e8215d02b2aa5f831efbc7 30-Mar-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAP: DSS2: make omap_dss_(un)register_device static

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>
/include/video/omapdss.h
7a0987bf2cf2683901d0cd7f1504023da2584c5f 16-Jun-2010 Jani Nikula <ext-jani.1.nikula@nokia.com> OMAP: DSS2: Add method for querying display dimensions from DSS drivers

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>
/include/video/omapdss.h
c6940a3dc59d9628c8d407b98b6f57df69e3ef52 22-Feb-2011 Tomi Valkeinen <tomi.valkeinen@ti.com> OMAP: DSS2: move dss device clock configuration

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>
/include/video/omapdss.h
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>
/include/video/omapdss.h