Commit Graph

907 Commits

Author SHA1 Message Date
Ricardo Neri 7e151f7f6a OMAPDSS: HDMI: Decouple HDMI audio from ASoC
Instead of having OMAPDSS HDMI audio functionality depending on the
ASoC HDMI audio driver, use a new config option so that
potential users, including ASoC, may select if needed.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
2012-05-11 15:15:22 +03:00
Axel Castaneda Gonzalez 3df9fb5c51 OMAPDSS: HDMI: Decouple wrapper enable/disable and audio start/stop
Decouple the enable/disable operation of the HDMI audio wrapper from
audio start/stop. Otherwise, an audio FIFO underflow may occur. The
audio wrapper enablement must be done after configuration and
before audio playback is started.

Signed-off-by: Axel Castaneda Gonzalez <x0055901@ti.com>
Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
2012-05-11 15:15:22 +03:00
Ricardo Neri 7c92af1678 OMAPDSS: HDMI: OMAP4: Remove invalid I2S settings
According to the most up-to-date documentation from Texas Instruments,
the configuration of High Bitrate Audio is not possible. Also, it is
not possible to set polarity of the I2S Word Select signal. This patch
removes the invalid settings.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
2012-05-11 15:15:21 +03:00
Ricardo Neri 199e7fd621 OMAPDSS: HDMI: OMAP4: Remove CEA-861 audio infoframe and IEC-60958 enums
Instead of having its own definitions for CEA-861 and IEC-60958, the HDMI
driver should use those provided by ALSA. This patch removes the definitions
that are already provided by ALSA.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
2012-05-11 15:15:21 +03:00
Ricardo Neri 7c3291f06b OMAPDSS: HDMI: Remove ASoC codec
Remove the ASoC OMAP HDMI audio codec. The goal of removing the codec
is to, in subsequent patches, give way to the implementation of the HDMI
audio support using the DSS device driver audio interface. This
approach will expose the HDMI audio functionality to any interested entity.

In a separate patch, ASoC will use this new approach to expose HDMI audio
to ALSA.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
2012-05-11 15:15:18 +03:00
Ricardo Neri c0456be38f OMAPDSS: HDMI: Split video_enable into video_enable/disable
To improve readability, split the video_enable HDMI IP operation
into two separate functions for enabling and disabling video.
The video_enable function is also modified to return an error value.

While there, update these operations for the OMAP4 IP accordingly.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
2012-05-11 15:13:51 +03:00
Ricardo Neri 027bdc85ee OMAPDSS: HDMI: Split audio_enable into audio_enable/disable
To improve readability, split the audio_enable HDMI IP operation
into two separate functions for enabling and disabling audio.
The audio_enable function is also modified to return an error value.

While there, update these operations for the OMAP4 IP accordingly.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
2012-05-11 15:13:50 +03:00
Russ Dill af461d64e1 OMAPDSS: TFP410: use gpio_set_value_cansleep
The Beagleboard xM gpio used for TFP410 powerdown is connected through
an I2C attached chip which means setting the GPIO can sleep. Code that
calls tfp410_power_on/off holds a mutex, so sleeping should be fine.

Signed-off-by: Russ Dill <Russ.Dill@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-05-11 15:09:29 +03:00
Tomi Valkeinen 38f3daf678 OMAPDSS: separate pdata based initialization
Move the platform-data based display device initialization into a
separate function, so that we may later add of-based initialization.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-05-11 15:09:24 +03:00
Tomi Valkeinen 11ee960640 OMAPDSS: DSI: improve DSI module id handling
We currently use the id of the dsi platform device (dsidev->id) as the
DSI hardware module ID. This works because we assign the ID manually in
arch/arm/mach-omap2/display.c at boot time.

However, with device tree the platform device IDs are automatically
assigned to an arbitrary number, and we can't use it.

Instead of using dsidev->id during operation, this patch stores the
value of dsidev->id to a private field of the dsi driver at probe(). The
future device tree code can thus set the private field with some other
way.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-05-11 14:54:41 +03:00
Tomi Valkeinen 9d8232a77f OMAPDSS: init omap_dss_devices internally
Now that each output driver creates their own display devices, the
output drivers can also initialize those devices.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-05-11 14:54:38 +03:00
Tomi Valkeinen 35deca3de6 OMAPDSS: interface drivers register their panel devices
Currently the higher level omapdss platform driver gets the list of
displays in its platform data, and uses that list to create the
omap_dss_device for each display.

With DT, the logical way to do the above is to list the displays under
each individual output, i.e. we'd have "dpi" node, under which we would
have the display that uses DPI. In other words, each output driver
handles the displays that use that particular output.

To make the current code ready for DT, this patch modifies the output
drivers so that each of them creates the display devices which use that
output. However, instead of changing the platform data to suit this
method, each output driver is passed the full list of displays, and the
drivers pick the displays that are meant for them. This allows us to
keep the old platform data, and thus we avoid the need to change the
board files.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-05-11 14:52:23 +03:00
Tomi Valkeinen c018c6738b OMAPDSS: change default_device handling
We currently have a two ways to set a "default panel device" for dss, to
which the overlays are connected when the omapdss driver is loaded:

- in textual format (name of the display) as cmdline parameter
- as a pointer to the panel device from board file via pdata

The current code handles this in a bit too complex way by using both of
the above methods during runtime. However, with DT we don't have pdata
anymore, so the code handling the second case won't work anymore. The
current code has also the problem that it modifies the platform_data.

This patch simplifies the code a bit by using the pointer method only
inside the probe function, and stores the name of the panel device. This
way we only need to handle the textual format during operation and also
avoid modifying the platform_data.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-05-11 14:44:52 +03:00
Tomi Valkeinen d64f14e191 OMAPFB: add __init & __exit
Change omapfb to use platform_driver_probe and add __init & __exit.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-05-11 14:44:52 +03:00
Tomi Valkeinen 6e7e8f06b2 OMAPDSS: add __init & __exit
Now that we are using platform_driver_probe() we can add __inits and
__exits all around.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-05-11 14:44:52 +03:00
Tomi Valkeinen 61055d4b2e OMAPDSS: use platform_driver_probe for dsi/hdmi/rfbi/venc/dpi/sdi
Now that the core.c doesn't fail if output driver's init fails, we can
change the uses of platform_driver_register to platform_driver_probe.
This will allow us to use __init in the following patches.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-05-11 14:44:52 +03:00
Tomi Valkeinen e40402cf18 OMAPDSS: move the creation of debugfs files
Instead of having an ugly #ifdef mess in the core.c for creating debugfs
files, add a dss_debugfs_create_file() function that the dss drivers
can use to create the debugfs files.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-05-11 14:44:52 +03:00
Tomi Valkeinen 461395c464 OMAPDSS: handle output-driver reg/unreg more dynamically
Initialize and uninitialize the output drivers by using arrays of
pointers to the init/uninit functions. This simplifies the code
slightly.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-05-11 14:44:52 +03:00
Tomi Valkeinen 852f083843 OMAPDSS: remove uses of dss_runtime_get/put
Now that the omapdss_core device is the parent for all other dss
devices, we don't need to use the dss_runtime_get/put anymore. Instead,
enabling omapdss_core will happen automatically when a child device is
enabled.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-05-11 14:44:51 +03:00
Tomi Valkeinen a57dd4fe7b OMAPDSS: create DPI & SDI drivers
We currently have separate device/driver for each DSS HW module. The DPI
and SDI outputs are more or less parts of the DSS or DISPC hardware
modules, but in SW it makes sense to represent them as device/driver
pairs similarly to all the other outputs. This also makes sense for
device tree, as each node under dss will be a platform device, and
handling DPI & SDI somehow differently than the rest would just make the
code more complex.

This patch modifies the dpi.c and sdi.c to create drivers for the
platform devices.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-05-11 14:44:51 +03:00
Tomi Valkeinen 11436e1dd2 OMAPDSS: use platform_driver_probe for core/dispc/dss
The platform devices for omapdss, dss and dispc drivers are always
present, so we can use platform_driver_probe instead of
platform_driver_register.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-05-11 14:44:51 +03:00
Tomi Valkeinen 04c742c3dc OMAPDSS: remove return from platform_driver_unreg
For unknown reasons we seem to have a return in each of the omapdss's
uninit functions, which is a void function.

Remove the returns.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-05-11 14:44:51 +03:00
Tomi Valkeinen 00928eaf52 OMAPDSS: clean up the omapdss platform data mess
The omapdss pdata handling is a mess. This is more evident when trying
to use device tree for DSS, as we don't have platform data anymore in
that case. This patch cleans the pdata handling by:

- Remove struct omap_display_platform_data. It was used just as a
  wrapper for struct omap_dss_board_info.
- Pass the platform data only to omapdss device. The drivers for omap
  dss hwmods do not need the platform data. This should also work better
  for DT, as we can create omapdss device programmatically in generic omap
  boot code, and thus we can pass the pdata to it.
- Create dss functions for get_ctx_loss_count and dsi_enable/disable_pads
  that the dss hwmod drivers can call.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-05-11 14:44:51 +03:00
Tomi Valkeinen e23d83b0c9 OMAPDSS: DSI: use dsi_get_dsidev_id(dsidev) instead of dsidev->id
The DSI driver uses dsi_get_dsidev_id() to get the ID number for the DSI
instance. However, there were a few places where dsidev->id was used
instead of the function. Fix those places to use the function.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-05-11 14:44:50 +03:00
Tomi Valkeinen 958f2717b8 OMAPDSS: TFP410: pdata rewrite
To ease device tree adaptation in the future, rewrite TFP410 platform
data handling to be done inside probe(), so that probe() is the only
place where we need to handle the DT/pdata choice.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-05-11 14:44:50 +03:00
Tomi Valkeinen 3a028bb99d OMAPFB: fix parsing of vram parameter
omapfb_parse_vram_param()'s check for end pointer returned from
simple_strtoul() is wrong, causing the code to bug if the second or
later vram parameters are non-parseable, for example
"omapfb.vram=0:2M,:5M".

However, even in that case the code will most likely bail out with
-EINVAL in the following checks, so the bug is probably not a fatal one.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reported-by: Hein Tibosch <hein_tibosch@yahoo.es>
2012-05-11 14:44:27 +03:00
Grazvydas Ignotas b3e68d3065 OMAPDSS: OMAPFB: always allow to configure overlay
Currently when multiple overlays are active, OMAPFB_SETUP_PLANE fails.
Instead of failing, allow it to configure the first overlay as if there
was only one overlay, the remaining ones will have to be configured in
other ways (sysfs).

This allows overlay-controlling programs (like video players) to function
properly when framebuffer is cloned to another display (like TV).

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-05-11 14:44:21 +03:00
Grazvydas Ignotas 0aca3c63e0 OMAPDSS: VENC: allow switching venc output type at runtime
VENC output type (composite/svideo) doesn't have to be fixed by board
wiring, it is possible to also provide composite signal through svideo
luminance connector (software enabled), which is what pandora does.

Having to recompile the kernel for users who have TV connector types
that don't match default board setting is very inconvenient, especially
for users of a consumer device, so add support for switching VENC output
type at runtime over a new sysfs file output_type.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-05-11 14:44:13 +03:00
Tomi Valkeinen 9b71fb5cbc Merge branch 'for-l-o-3.5'
Conflicts:
	drivers/video/omap2/displays/panel-taal.c

Merge OMAP DSS related board file changes. The branch will also be
merged through linux-omap tree to solve conflicts.
2012-05-10 20:24:14 +03:00
Archit Taneja 81ab95b7ec OMAPDSS: DISPC: Remove usage of dispc_mgr_get_device()
The functions calc_fclk_five_taps() and check_horiz_timing_omap3() use the
function dispc_mgr_get_device() to get the omap_dss_device pointer to which
the manager is connected, the width of the panel is derived from that.

The manager's timing is stored in it's private data in APPLY. This contains
the latest timings applied to the manager. Pass these timings to
dispc_ovl_setup() and use them in the above functions. Remove the function
dispc_mgr_get_device() as it isn't used any more.

Signed-off-by: Archit Taneja <archit@ti.com>
2012-05-09 13:44:09 +03:00
Archit Taneja 3fa03ba854 OMAPDSS: DISPC: Remove omap_dss_device pointer usage from dispc_mgr_pclk_rate()
The pixel clock rate for the TV manager is calculated by checking the device
type connected to the manager, and then requesting the VENC/HDMI interface for
the pixel clock rate.

Remove the use of omap_dss_device pointer from here by checking which interface
generates the pixel clock by reading the DSS_CTRL.VENC_HDMI_SWITCH bit.

Signed-off-by: Archit Taneja <archit@ti.com>
2012-05-09 13:44:09 +03:00
Archit Taneja b3d795abb2 OMAPDSS: APPLY: Remove an unnecessary omap_dss_device pointer
The omap_dss_device pointer declared in dss_ovl_setup_fifo() isn't used. Remove
the pointer variable declaration and it's assignment.

Signed-off-by: Archit Taneja <archit@ti.com>
2012-05-09 13:44:08 +03:00
Archit Taneja fcc3661990 OMAPDSS: DPI/HDMI: Apply manager timings even if panel is disabled
The DPI and HDMI interfaces use their 'set_timing' functions to take in a new
set of timings. If the panel is disabled, they do not disable and re-enable
the interface. Currently, the manager timings are applied in hdmi_power_on()
and dpi_set_mode() respectively, these are not called by set_timings if the
panel is disabled.

When checking overlay and manager data, the DSS driver uses the last applied
manager timings, and not the timings held by omap_dss_device struct. Hence,
there is a need to apply the new manager timings even if the panel is disabled.

Apply the manager timings if the panel is disabled. Eventually, there should be
one common place where the timings are applied independent of the state of the
panel.

Signed-off-by: Archit Taneja <archit@ti.com>
2012-05-09 13:44:08 +03:00
Archit Taneja 228b21349d OMAPDSS: APPLY: Remove display dependency from overlay and manager checks
In order to check the validity of overlay and manager info, there was a need to
use the omap_dss_device struct to get the panel resolution. The manager's
private data in APPLY now contains the manager timings. Hence, we don't need to
rely on the display resolution any more.

Pass the manager's timings in private data to dss_mgr_check(). Remove the need
to pass omap_dss_device structs in the functions which check for the validity
of overlay and manager parameters.

Signed-off-by: Archit Taneja <archit@ti.com>
2012-05-09 13:44:07 +03:00
Archit Taneja 5dd747e889 OMAPDSS: APPLY: Don't check manager settings if it is disabled
If a manager is disabled, there is no guarantee at any point in time that all
it's parameters are configured. There is always a chance that some more
parameters are yet to be configured by a user of DSS, or by DSS itself.

However, when the manager is enabled, we can be certain that all the parameters
have been configured, as we can't enable a manager with an incomplete
configuration. Therefore, if a manager is disabled, don't check for the validity
of it's parameters or the parameters of the overlays connected to it. Only check
once it is enabled. Add a check in dss_check_settings_low() to achieve the same.

Signed-off-by: Archit Taneja <archit@ti.com>
2012-05-09 13:44:07 +03:00
Archit Taneja b917fa3961 OMAPDSS: MANAGER: Create a function to check manager timings
Create a function dss_mgr_check_timings() which wraps around the function
dispc_mgr_timings_ok(). This is mainly a clean up to hide dispc functions
from interface drivers.

dss_mgr_check_timings() is added in the function dss_mgr_check(), it currently
takes the timings maintained in the omap_dss_device struct. This would be later
replaced by the timings stored in the manager's private data.

Make dss_mgr_check_timings() and dispc_mgr_timings_ok() take a const
omap_video_timings pointer since these functions just check the timings.

Signed-off-by: Archit Taneja <archit@ti.com>
2012-05-09 13:44:07 +03:00
Archit Taneja 4172116385 OMAPDSS: Apply manager timings instead of direct DISPC writes
Replace the function dispc_mgr_set_timings() with dss_mgr_set_timings() in the
interface drivers. The latter function ensures that the timing related DISPC
registers are configured according to the shadow register programming model.

Remove the call to dispc_mgr_go() in dpi_set_timings() as the manager's go bit
is set by dss_mgr_set_timings().

Signed-off-by: Archit Taneja <archit@ti.com>
2012-05-09 13:44:06 +03:00
Archit Taneja 45324a2648 OMAPDSS: APPLY: Add manager timings as extra_info in private data
DISPC manager size and DISPC manager blanking parameters(for LCD managers)
follow the shadow register programming model. Currently, they are programmed
directly by the interface drivers.

To configure manager timings using APPLY, there is a need to introduce extra
info flags for managers, similar to what is done for overlays. This is needed
because timings aren't a part of overlay_manager_info struct configured by a
user of DSS, they are configured internally by the interface or panel drivers.

Add dirty and shadow_dirty extra_info flags for managers, update these flags
at the appropriate places. Rewrite the function extra_info_update_ongoing()
slightly as checking for manager's extra_info flags can simplify the code a bit.

Create function dss_mgr_set_timings() which applies the new manager timings to
extra_info.

Signed-off-by: Archit Taneja <archit@ti.com>
2012-05-09 13:44:06 +03:00
Archit Taneja 408d9dbbc4 OMAPDSS: DISPC: Remove Fake VSYNC support
Fake VSYNC support is a hack and has some bugs in it. It isn't used by any user
of DSS. Remove Fake VSYNC support. For DSI command mode and RFBI panels, a user
of DSS should wait for the completion of a frame by using the panel driver's
sync op.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-05-09 13:43:17 +03:00
Archit Taneja a2e5d82758 OMAPDSS: Fix DSI_FCLK clock source selection
The wrong bit field was being updated in DSS_CTRL when trying to configure the
clock source of DSI2 functional clock. Use the correct bit field based on the
dsi module number.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-05-09 13:43:11 +03:00
Archit Taneja 9b9c457b43 OMAPDSS: HDMI: define and dump CORE registers in correct order
The HDMI core register offset macros aren't defined in ascending order of their
values, some of the offset macros are also redefined. The same issues occur when
these core registers are dumped.

Clean up the ordering of HDMI core registers and remove repeated registers in
the definition in ti_hdmi_4xxx_ip.h and in ti_hdmi_4xxx_core_dump().

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-05-09 13:43:05 +03:00
Archit Taneja 3c7de24771 OMAPDSS: HDMI: Fix ti_hdmi_4xxx_core_dump
The function ti_hdmi_4xxx_core_dump has some bugs, the following mention the
bugs and the solutions:

- The macros DUMPCORE and DUMPCOREAV in ti_hdmi_4xxx_core_dump() use
  hdmi_pll_base() for the offsets needed to calculate register addresses, use
  functions hdmi_core_sys_base() amd hdmi_av_base() to calculate the correct
  offsets for CORE_SYS and CORE_AV registers.

- Many of the CORE_AV registers use the DUMPCORE macro, and hence the register
  addresses are calculated incorrectly. Rename the current DUMPCOREAV macro as
  DUMPCOREAV2 as it takes 2 arguments to dump indexed CORE_AV registers, create
  a new macro called DUMPCOREAV which is now used for dumping non-indexed
  CORE_AV registers.

Thanks to Ancy Tom <ancytom@gmail.com> for pointing out the issues.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-05-09 13:42:58 +03:00
Tomi Valkeinen e4a9e94cc5 OMAPDSS: DSI: implement generic DSI pin config
In preparation for device tree, this patch changes how the DSI pins are
configured. The current configuration method is only doable with board
files and the configuration data is OMAP specific.

This patch moves the configuration data to the panel's platform data,
and the data can easily be given via DT in the future. The configuration
data format is also changed to a generic one which should be suitable
for all platforms.

The new format is an array of pin numbers, where the array items start
from clock + and -, then data1 + and -, and so on. For example:

{
	0,	// pin num for clock lane +
	1,	// pin num for clock lane -
	2,	// pin num for data1 lane +
	3,	// pin num for data1 lane -
	...
}

The pin numbers are translated by the DSI driver and used to configure
the hardware appropriately.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
2012-05-09 10:53:05 +03:00
Tomi Valkeinen 3acc797c1d OMAPDSS: Taal: move reset gpio handling to taal driver
The reset GPIO for Taal panel driver is currently requested in the
4430sdp board file. This patch moves the gpio request/free into the Taal
driver, where it should be.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
2012-05-09 10:53:05 +03:00
Tomi Valkeinen dac8eb5f1d OMAPDSS: TFP410: rename dvi files to tfp410
Now that the tfp410 driver has been renamed in the code, this patch
finishes the renaming by renaming the files.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
2012-05-09 10:51:05 +03:00
Tomi Valkeinen 2e6f2ee7ac OMAPDSS: TFP410: rename dvi -> tfp410
The driver for the TFP410 DPI-to-DVI chip was named quite badly as "DVI
panel driver". This patch renames the code to use tfp410 name for the
driver.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
2012-05-09 10:51:05 +03:00
Tomi Valkeinen e813a55eb9 OMAP: board-files: remove custom PD GPIO handling for DVI output
Now that the panel-dvi driver handles the PD (power-down) GPIO, we can
remove the custom PD handling from the board files.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
2012-05-09 10:51:04 +03:00
Tomi Valkeinen 2da35193dc OMAPDSS: panel-dvi: add PD gpio handling
The driver for the TFP410 chip should handle the power-down signal of
the chip, instead of the current way of handling it in the board files.

This patch adds power_down_gpio into the device's platform data, and
adds the necessary code in the driver to request and handle the GPIO.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-05-09 10:51:04 +03:00
Chandrabhanu Mahapatra 8b53d99119 OMAPDSS: DISPC: Correct DISPC functional clock usage
DISPC_FCLK is incorrectly used as functional clock of DISPC in scaling
calculations. So, DISPC_CORE_CLK replaces as functional clock of DISPC.
DISPC_CORE_CLK is derived from DISPC_FCLK divided by an independent DISPC
divisor LCD.

Signed-off-by: Chandrabhanu Mahapatra <cmahapatra@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-05-03 16:13:01 +03:00
Chandrabhanu Mahapatra 7faa92339b OMAPDSS: DISPC: Handle synclost errors in OMAP3
In OMAP3 DISPC video overlays suffer from some undocumented horizontal position
and timing related limitations leading to SYNCLOST errors. Whenever the image
window is moved towards the right of the screen SYNCLOST errors become
frequent. Checks have been implemented to see that DISPC driver rejects
configuration exceeding above limitations.

This code was successfully tested on OMAP3. This code is written based on code
written by Ville Syrjälä <ville.syrjala@nokia.com> in Linux OMAP kernel. Ville
Syrjälä <ville.syrjala@nokia.com> had added checks for video overlay horizontal
timing and DISPC horizontal blanking length limitations.

Signed-off-by: Chandrabhanu Mahapatra <cmahapatra@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-05-03 16:12:57 +03:00
Chandrabhanu Mahapatra aed74b5500 OMAPDSS: DISPC: Enable predecimation
In OMAP3 and OMAP4, the DISPC Scaler can downscale an image up to 4 times, and
up to 2 times in OMAP2. However, with predecimation, the image can be reduced
to 16 times by fetching only the necessary pixels in memory. Then this
predecimated image can be downscaled further by the DISPC scaler.

The pipeline is configured to use a burst of size 8 * 128 bits which consists
of 8 mini bursts of 16 bytes each. So, horizontal predecimation more than 16
can lead to complete discarding of such mini bursts. L3 interconnect may
handover the bus to some other initiator and inturn delay the fetching of
pixels leading to underflows. So, maximum predecimation limit is fixed at 16.

Based on the downscaling required, a prior calculation of predecimation values
for width and height of an image is done. Since, Predecimation reduces quality
of an image higher priorty is given to DISPC Scaler for downscaling.

This code was successfully tested on OMAP2, OMAP3 and OMAP4. Horizontal and
vertical predecimation worked fine except for some synclost errors due to
undocumented errata in OMAP3 which are fixed later and skewed images were seen
on OMAP2 and OMAP3 during horizontal predecimation which will be addressed in
the future patches.

This code is based on code written by Lajos Molnar <lajos@ti.com> who had added
predecimation support for NV12/YUV/rotated/SDMA buffers.

Signed-off-by: Chandrabhanu Mahapatra <cmahapatra@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-05-03 16:12:48 +03:00
Jan Weitzel 3dd606e435 ARM: OMAP2+ Add Primview displays to panel-generic
Add displays to panel-generic-dpi.c
Prime View PD050VL1 (640 x 480)
Prime View PD104SLF (800 x 600)
Prime View PM070WL4 (800 x 480)

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-04-23 10:48:11 +03:00
Archit Taneja 8f366162d2 OMAPDSS: DISPC: Clean up manager timing/size functions
Clean up the DISPC manager timings related function by:

- Create a common function to set size for LCD and TV.
- Create a common function to check timings for LCD and TV.
- Add dss params to get the range of manager size.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-04-23 10:48:10 +03:00
Archit Taneja c51d921a0c OMAPDSS: DISPC: Use a common function to set manager timings
Currently, a LCD manager's timings is set by dispc_mgr_set_lcd_timings() and TV
manager's timings is set by dispc_set_digit_size(). Use a common function called
dispc_mgr_set_timings() which sets timings for both type of managers.

We finally want the interface drivers to use an overlay manager function to
configure it's timings, having a common DISPC function would make things
cleaner.

For LCD managers, dispc_mgr_set_timings() sets LCD size and blanking values, for
TV manager, it sets only the TV size since blanking values don't exist for TV.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-04-23 10:48:10 +03:00
Archit Taneja e5c09e06a9 OMAPDSS: DISPC/RFBI: Use dispc_mgr_set_lcd_timings() for setting lcd size
The RFBI driver uses dispc_mgr_set_lcd_size() to set the width and height of
the LCD manager. Replace this to use dispc_mgr_set_lcd_timings(), pass dummy
blanking parameters like done in the DSI driver.

This prevents the need to export dispc_mgr_set_lcd_size(), and use a common
function to set lcd timings.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-04-23 10:48:09 +03:00
Thomas Weber e97374c0fe OMAPDSS: Add EDT ET0500G0DH6 display support
The EDT ET0500G0DH6 is a 5 inch display. It is
tested on an OMAP3 board.

Signed-off-by: Thomas Weber <weber@corscience.de>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-04-23 10:48:08 +03:00
Thomas Weber 697bacbaea OMAPDSS: Add Mitsubishi AA084SB01 display support
This patch adds support for the Mitsubishi display
AA084SB01. This is a 7 inch LVDS display. It is tested with
an OMAP3 board.

Signed-off-by: Thomas Weber <weber@corscience.de>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-04-23 10:48:08 +03:00
Grazvydas Ignotas 31e8dfe148 OMAPDSS: TPO-TD03MTEA1: add set/check timing functions
On pandora we use .set_timings to alter refresh rate,
so add .check_timings/.set_timings functions.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-04-23 10:48:07 +03:00
Grazvydas Ignotas 4b6430fc98 OMAPDSS: provide default get_timings function for panels
With this we can eliminate some duplicate code in panel drivers.
Also lgphilips-lb035q02, nec-nl8048hl11-01b, picodlp and
tpo-td043mtea1 gain support of reading timings over sysfs.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-04-23 10:48:07 +03:00
Grazvydas Ignotas f3fb3bbc7f OMAPDSS: OMAPFB: check for matching memory size early
If the size of memory region that is being set up is the same as before,
we don't have to do memory and layer busy checks.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-04-23 10:48:06 +03:00
Mark Brown 2c83af49ca OMAPDSS: TPO-TD03MTEA1: Correct comment for power on delay
Since any power on stabilisation delay for the supply itself should be
taken care of transparently by the regulator API when the regulator is
enabled the additional delay that the TPO-TD03MTEA1 driver adds after
that returned should be due to the requirements of the device itself
rather than the supply (the delay is also suspicously long for one for
a regulator to ramp). Correct the comment to avoid misleading people
taking this code as a reference.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-04-23 10:48:06 +03:00
Mark Brown 956107eadc OMAPDSS: TPO-TD03MTEA1: Check for errors from regulator_enable()
It is possible for regulator_enable() to fail and if it does fail that's
generally a bad sign for anything we try to do with the hardware afterwards
so check for and immediately return an error if regulator_enable() fails.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-04-23 10:48:05 +03:00
Mark Brown ec8741078d OMAPDSS: VENC: Check for errors from regulator_enable()
It is possible for regulator_enable() to fail and if it does fail that's
generally a bad sign for anything we try to do with the hardware afterwards
so check for and immediately return an error if regulator_enable() fails.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-04-23 10:48:05 +03:00
Mark Brown 9c3d5eb71b OMAP: DSS2: Remove suspicous and unused TAAL regulator API usage
The TAAL driver contains some regulator support which is currently unused
(the code is there but the one panel supported by the driver doesn't have
any regulators provided). This code mostly looks like an open coded
version of the regulator core bulk API.

The only additional feature is that a voltage range can be set once when
the device is opened, though this is never varied at runtime. The general
expectation is that if the device is not actively managing the voltage of
the device (eg, doing DVFS) then any configuration will be done using the
constraints rather than by drivers, saving them code and ensuring that
they work well with systems where the voltage is not configurable.

If systems are added needing regulator support this can be added back in,
though it should be based on core features rather than open coding things.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-04-23 10:48:04 +03:00
Tomi Valkeinen b6e695abe7 OMAPDSS: DSI: remove option to use pck for DSI PLL clkin
For some OMAP versions the TRM says that the pixel clock from DISPC can
be used as an input clock for DSI PLL, instead of the default, which is
sysclk.  For some OMAP versions the bits affecting this are marked as
reserved.  This feature has never been tested, so it's unknown if the HW
even works, and has never been used.

To clean things up, this patch removes the functionality. This should
not affect any board.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-04-23 10:48:04 +03:00
Tomi Valkeinen a8081d3179 OMAPDSS: Ensure OPP100 when DSS is operational
Most of the DSS clocks have restrictions on their frequency based on the
OPP in use. For example, maximum frequency for a clock may be 180MHz in
OPP100, but 90MHz in OPP50. This means that when a high enough pixel
clock or function clock is required, we need to use OPP100.

However, there's currently no way in the PM framework to make that kind
of request. The closest we get is to ask for very high bus throughput
from the PM framework, which should effectively force OPP100.

This patch is a simple version for handling the problem. Instead of
asking for OPP100 only when needed, this patch asks for OPP100 whenever
DSS is active. This obviously is not an optimal solution for cases with
small displays where OPP50 would work just fine. However, a proper
solution is a complex one, and this patch is a short term solution for
the problem.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Acked-by: Kevin Hilman <khilman@ti.com>
2012-04-23 10:48:03 +03:00
Linus Torvalds 820d41cf0c ARM: cleanups of io includes
Rob Herring has done a sweeping change cleaning up all of the mach/io.h includes,
 moving some of the oft-repeated macros to a common location and removing a bunch of
 boiler plate. This is another step closer to a common zImage for multiple platforms.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJPcpqHAAoJEIwa5zzehBx3xCMP/2evrPQyorzMBztrFB4Ry9Ol
 qNkSVNsemZjdtkY2dnJv+zJ/Xb0PPDU9EuBHr/SpqmVrRZEZeJND42wZK/OTFCBZ
 Ufi7KP1qE30daO5H3YmL+58/Ixir5fTHqggqolHhTcEYU2hnHgLBI4rIFu92kSO7
 TMyrAUs14jSkTVZc6HSF83w3PfQWhMzWvspJVHQ6RebZRruETAr7v9weVMbgxcDk
 jQ5XJ9y73rGs2AF8bZTpUdFPzkcac7UiHn3/XyqoZs8RNCL98BGpskzhILyTARf5
 X90c9mqQF+AEbb9QSDDd52uYFsJ/5COJvWdlExRI9gZZDI8Pd05ijZBR9IdGJg/B
 NsVsl98wvZ/zjHJ/Sb2qt5ruet7PiQUGhkshB42jVHsaWfRM030sKGYxQ8pX5Tsa
 cSagnfBCvAZ9VjDLkXrnEbWRNTz8LSwn9l63z0jmtm5D8+vbpMtgvtWARtuZ4RNn
 D8wIWoyT0ytVZnosu5441TEgCejtcKOEFzThvKDYMeMJZ/rqVkAbcznapoC2qUd4
 fceNlLfQFvW7xpY1MY8mhlwC0ki4hM9MSDieaXUyefvAU/hoSp8MveVUH5UspYfb
 0FpkEhzklW/g0/fuq0DJQIrMn7dajjUvVZIUQtiVQuFHOr6RUbFG5vmXuCbAyx10
 PE2K4rnKz+PC8bKab7v9
 =YIsn
 -----END PGP SIGNATURE-----

Merge tag 'cleanup2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull "ARM: cleanups of io includes" from Olof Johansson:
 "Rob Herring has done a sweeping change cleaning up all of the
  mach/io.h includes, moving some of the oft-repeated macros to a common
  location and removing a bunch of boiler plate.  This is another step
  closer to a common zImage for multiple platforms."

Fix up various fairly trivial conflicts (<mach/io.h> removal vs changes
around it, tegra localtimer.o is *still* gone, yadda-yadda).

* tag 'cleanup2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (29 commits)
  ARM: tegra: Include assembler.h in sleep.S to fix build break
  ARM: pxa: use common IOMEM definition
  ARM: dma-mapping: convert ARCH_HAS_DMA_SET_COHERENT_MASK to kconfig symbol
  ARM: __io abuse cleanup
  ARM: create a common IOMEM definition
  ARM: iop13xx: fix missing declaration of iop13xx_init_early
  ARM: fix ioremap/iounmap for !CONFIG_MMU
  ARM: kill off __mem_pci
  ARM: remove bunch of now unused mach/io.h files
  ARM: make mach/io.h include optional
  ARM: clps711x: remove unneeded include of mach/io.h
  ARM: dove: add explicit include of dove.h to addr-map.c
  ARM: at91: add explicit include of hardware.h to uncompressor
  ARM: ep93xx: clean-up mach/io.h
  ARM: tegra: clean-up mach/io.h
  ARM: orion5x: clean-up mach/io.h
  ARM: davinci: remove unneeded mach/io.h include
  [media] davinci: remove includes of mach/io.h
  ARM: OMAP: Remove remaining includes for mach/io.h
  ARM: msm: clean-up mach/io.h
  ...
2012-03-29 18:02:10 -07:00
Linus Torvalds d61b7a572b ARM: global cleanups
Quite a bit of code gets removed, and some stuff moved around, mostly
 the old samsung s3c24xx stuff. There should be no functional changes
 in this series otherwise. Some cleanups have dependencies on other
 arm-soc branches and will be sent in the second round.
 
 Signed-off-by: Arnd Bergmann <arnd@arndb.de>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIVAwUAT2pCjGCrR//JCVInAQLd8RAAqCxhzSc4ewTUP/974gVhujj3TrpiEQcS
 FKvYWF76yP38Lbf3CJZBZaONRtrQNOhYpVQ0jb3WCV4F8mEH9PCes2q9RObeBYiY
 TNX8VdcuVjX2U9HaH0+RQtBUdujNLHpEOqtO57un7T5UDNssR5JOive1tNAooRv1
 pL0Hgx3AVqUbNOPpqQqHzy/MDdd67S6dX80yysANjFGMX87Nvp/ztYAdNnIdta+Z
 pDJt+DPlmK8LvjoSL3SEUN0p3Thk75621cCuauGq88PLIB2w62tzF0NFFbvIAgJT
 3aMlHM2flOiTJAWkUvA8zJiUzwv/0vYvH3xPoTo84abve3lVfZcY+fHNcfxE/Gge
 ri2MmkHyimVP3rNeyM0GbN1RTej1TN1MezeQW3nq2wP6nvS2k0/t32ObLLtWU7XA
 6iA0hKVMSnhqj4ln6jPAmyaDkaWHyYz97urhgetHqGadvLTiGPXCSBPalSiFmyMo
 11tvuqwUNz9tw4nsvGboFQwS2ZoVquC5inoHp5seqZETkGCB67JyeRGxtAM4gbP/
 wIRa3OBLY99yo1on6QovWNnSOMC6X4cOvBI/qHIjSEY/T9JVkslY87gRg3LkxCBR
 XpXfZ6iuLHoSRUGcIjE8D6KHjMgWIDPRnLkIliK4H+3Jn08g0R1MxCplevFCRtis
 egswZ8C24Xw=
 =o5Xl
 -----END PGP SIGNATURE-----

Merge tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull "ARM: global cleanups" from Arnd Bergmann:
 "Quite a bit of code gets removed, and some stuff moved around, mostly
  the old samsung s3c24xx stuff.  There should be no functional changes
  in this series otherwise.  Some cleanups have dependencies on other
  arm-soc branches and will be sent in the second round.

  Signed-off-by: Arnd Bergmann <arnd@arndb.de>"

Fixed up trivial conflicts mainly due to #include's being changes on
both sides.

* tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (121 commits)
  ep93xx: Remove unnecessary includes of ep93xx-regs.h
  ep93xx: Move EP93XX_SYSCON defines to SoC private header
  ep93xx: Move crunch code to mach-ep93xx directory
  ep93xx: Make syscon access functions private to SoC
  ep93xx: Configure GPIO ports in core code
  ep93xx: Move peripheral defines to local SoC header
  ep93xx: Convert the watchdog driver into a platform device.
  ep93xx: Use ioremap for backlight driver
  ep93xx: Move GPIO defines to gpio-ep93xx.h
  ep93xx: Don't use system controller defines in audio drivers
  ep93xx: Move PHYS_BASE defines to local SoC header file
  ARM: EXYNOS: Add clock register addresses for EXYNOS4X12 bus devfreq driver
  ARM: EXYNOS: add clock registers for exynos4x12-cpufreq
  PM / devfreq: update the name of EXYNOS clock registers that were omitted
  PM / devfreq: update the name of EXYNOS clock register
  ARM: EXYNOS: change the prefix S5P_ to EXYNOS4_ for clock
  ARM: EXYNOS: use static declaration on regarding clock
  ARM: EXYNOS: replace clock.c for other new EXYNOS SoCs
  ARM: OMAP2+: Fix build error after merge
  ARM: S3C24XX: remove call to s3c24xx_setup_clocks
  ...
2012-03-27 16:03:32 -07:00
Tomi Valkeinen dc7e57fa80 OMAPDSS: register dss drivers in module init
We do the dss driver registration in a rather strange way: we have the
higher level omapdss driver, and we use that driver's probe function to
register the drivers for the rest of the dss devices.

There doesn't seem to be any reason for that, and additionally the
soon-to-be-merged patch "ARM: OMAP: omap_device: remove
omap_device_parent" will break omapdss initialization with the current
registration model.

This patch changes the registration for all drivers to happen at the
same place, in the init of the module.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2012-03-21 12:55:15 +00:00
Florian Tobias Schandinat e9fe8a714e Merge branch 'for-3.4' of git://gitorious.org/linux-omap-dss2/linux into fbdev-next 2012-03-20 08:49:51 +00:00
Olof Johansson e3643b77de Merge branch 'next/cleanup-exynos-clock' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/cleanup
* 'next/cleanup-exynos-clock' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
  ARM: EXYNOS: Add clock register addresses for EXYNOS4X12 bus devfreq driver
  ARM: EXYNOS: add clock registers for exynos4x12-cpufreq
  PM / devfreq: update the name of EXYNOS clock registers that were omitted
  PM / devfreq: update the name of EXYNOS clock register
  ARM: EXYNOS: change the prefix S5P_ to EXYNOS4_ for clock
  ARM: EXYNOS: use static declaration on regarding clock
  ARM: EXYNOS: replace clock.c for other new EXYNOS SoCs
  (includes an update to v3.3-rc6)
2012-03-13 16:08:06 -07:00
Tomi Valkeinen df01d53068 OMAPDSS: APPLY: fix clearing shadow dirty flag with manual update
Currently the shadow-dirty flags for manual update displays is cleared
in the apply_irq_handler when an update has finished. This is not
correct, as the shadow registers are taken into use (i.e. after that
they are not dirty) when the update is started.

Move the mgr_clear_shadow_dirty() call from apply_irq_handler to
dss_mgr_start_update() to fix this.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-03-13 15:46:21 +02:00
Tony Lindgren 6076c64412 ARM: OMAP: Remove remaining includes for mach/io.h
These are no longer needed with the recent iomap.h
changes.

Reported-by: Rob Herring <robherring2@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2012-03-06 21:34:38 -06:00
Tomi Valkeinen 4614679c9d OMAPDSS: APPLY: print warning if wait_pending_extra_info_updates fails
wait_pending_extra_info_updates() currently does a hacky second check
for extra_info_update_ongoing() at the end of the function to show a
warning if extra_info update is still ongoing. The call to
extra_info_update_ongoing() should really be inside spinlock, but that's
a bit heavy just for verification.

Rather than that, check the return value of the
wait_for_completion_timeout() and print an error if it has timeouted or
returned an error.

Even better would be to return the error value and act on it in the
callers of wait_pending_extra_info_updates. However, it's not clear what
the callers should do in case of an error, as the error should only
happen if there's a bug in the driver or the HW. So we'll just print the
warning for now.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-03-06 14:08:39 +02:00
Lajos Molnar 21e56f79ab OMAPDSS: MANAGER/APPLY: Add runtime_pm protection around wait_for_go/vsync functions
If DSS suspends within the functions dss_mgr_wait_for_go(),
dss_mgr_wait_for_go_ovl() or dss_mgr_wait_for_vsync(). It may lose it's clock
and lead to a register access failure.

Request runtime_pm around these functions.

[archit@ti.com: Moved runtime_pm calls to wait_for_go/vsync functions rather
then calling them from omap_dispc_wait_for_irq_interruptible_timeout()]

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-03-06 14:08:30 +02:00
Lajos Molnar c0c1cfcb57 OMAPDSS: DISPC: Fix FIR coefficients
coef3_M8 had an incorrect phase with 50% more intensity. This resulted in
banding on slightly down/upscaled images. Fixed a rounding error in coef5_M9.

Also removed ARRAY_LEN macro as ARRAY_SIZE is the standard linux one.

Signed-off-by: Lajos Molnar <lajos@ti.com>
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-03-06 14:08:23 +02:00
Lajos Molnar 08f3267e26 OMAPDSS: DISPC: Fix OMAP4 supported color formats
Add missing but supported color formats for GFX pipeline in dss features:
RGBX16-4444, RGBA16-4444 and XRGB16-1555.

In dispc_ovl_set_color_mode():

- Remove unsupported modes on GFX pipeline: YUV2 and UYVY. Replace these by
  missing modes supported by GFX pipelines: RGBX16-4444 and RGBA16-4444.

- Fix swapped modes on VID pipelines: RGBX16-4444 and XRGB16-4444.

Signed-off-by: Lajos Molnar <lajos@ti.com>
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-03-06 14:08:16 +02:00
Mythri P K dd2116a35a OMAPDSS: HDMI: Add M2 divider while calculating clkout
While calculating regm and regmf value add using M2 divider in
the equation.
Formula for calculating:
Output clock on digital core domain:
	CLKOUT = (M / (N+1))*CLKINP*(1/M2)
Internal oscillator output clock on internal LDO domain:
	CLKDCOLDO = (M / (N+1))*CLKINP
The current code when allows variable M2 values as input
ignores using M2 divider values in calculation of regm and regmf.
so fix it by using M2 in calculation although the default value for
M2 is 1.

Signed-off-by: Mythri P K <mythripk@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-03-06 14:08:10 +02:00
Tomi Valkeinen 0ba86d7ede Merge commit 'v3.3-rc6'
Merge v3.3-rc6 to get the latest DSS and OMAP arch fixes.

Conflicts:
	arch/arm/mach-omap1/board-innovator.c
	drivers/video/omap2/dss/apply.c
2012-03-06 13:20:31 +02:00
Florian Tobias Schandinat 0d04c58aa4 Merge branch 'fbdev-for-linus' into fbdev-next 2012-02-29 22:42:55 +00:00
Tomi Valkeinen a3d0e4aeca OMAPDSS: APPLY: make ovl_enable/disable synchronous
ovl->enable/disable are meant to be synchronous so that they can handle
the configuration of fifo sizes. The current kernel doesn't configure
fifo sizes yet, and so the code doesn't need to block to function (from
omapdss driver's perspective).

However, for the users of omapdss a non-blocking ovl->disable is
confusing, because they don't know when the memory area is not used
any more.

Furthermore, when the fifo size configuration is added in the next merge
window, the change from non-blocking to blocking could cause side
effects to the users of omapdss. So by making the functions block
already will keep them behaving in the same manner.

And, while not the main purpose of this patch, this will also remove the
compile warning:

drivers/video/omap2/dss/apply.c:350: warning:
'wait_pending_extra_info_updates' defined but not used

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2012-02-29 22:42:28 +00:00
Tomi Valkeinen c9043ff9e6 OMAPDSS: panel-dvi: Add Kconfig dependency on I2C
panel-dvi uses i2c, but the Kconfig didn't have dependency on I2C. Add
it.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2012-02-29 22:42:28 +00:00
Arnd Bergmann a26d3c4fcd Merge branch 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/cleanup
* 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP2+: Fix L4_EMU_34XX_BASE error after iomap changes
  ARM: OMAP2+: Limit omap_read/write usage to legacy USB drivers
  ARM: OMAP: Remove plat/io.h by splitting it into mach/io.h and mach/hardware.h
  ARM: OMAP2+: Move most of plat/io.h into local iomap.h
  ARM: OMAP1: Move most of plat/io.h into local iomap.h
  ARM: OMAP1: Move 16xx GPIO system clock to platform init code
  ARM: OMAP: Move omap_init_consistent_dma_size() to local common.h
  ARM: OMAP2+: Move SDRC related functions from io.h into local common.h
  ARM: OMAP2+: Drop DISPC L3 firewall code
  ARM: OMAP2xxx: PM: remove obsolete timer disable code in the suspend path
  ARM: OMAP: McSPI: Remove unused flag from struct omap2_mcspi_device_config

(update to latest rmk/for-arm-soc branch)

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-02-29 21:18:13 +00:00
Tony Lindgren 2c799cef4d ARM: OMAP: Remove plat/io.h by splitting it into mach/io.h and mach/hardware.h
This is needed to minimize io.h so the SoC specific io.h
for ARMs can removed.

Note that minimal driver changes for DSS and RNG are needed to
include cpu.h for SoC detection macros.

Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Matt Mackall <mpm@selenic.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-02-24 10:34:35 -08:00
Tony Lindgren 1ca8c07bda ARM: OMAP2+: Drop DISPC L3 firewall code
This is only needed when using SRAM for framebuffer,
and the support for SRAM framebuffer is about to get
removed.

Otherwise we cannot move most of plat/io.h to be a local
iomap.h for mach-omap2.

Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: linux-fbdev@vger.kernel.org
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-02-24 10:34:32 -08:00
Florian Tobias Schandinat 8aaaaf3cbf Merge branch 'fbdev-for-linus' into fbdev-next 2012-02-24 00:47:05 +00:00
Florian Tobias Schandinat 4761c603dd Merge branch 'for-3.3-rc' of git://gitorious.org/linux-omap-dss2/linux into fbdev-for-linus 2012-02-24 00:28:57 +00:00
Rob Clark ca888a7958 OMAPDSS: HDMI: hot plug detect fix
The "OMAPDSS: HDMI: PHY burnout fix" commit switched the HDMI driver
over to using a GPIO for plug detect.  Unfortunately the ->detect()
method was not also updated, causing HDMI to no longer work for the
omapdrm driver (because it would actually check if a connection was
detected before attempting to enable display).

Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-02-23 10:29:08 +02:00
Archit Taneja a247ce78ca OMAPDSS: HACK: Ensure DSS clock domain gets out of idle when HDMI is enabled
For DSS clock domain to transition from idle to active state. It's necessary
to enable the optional clock DSS_FCLK before we enable the module using the
MODULEMODE bits in the clock domain's CM_DSS_DSS_CLKCTRL register.

This sequence was not followed correctly for the 'dss_hdmi' hwmod and it led
to DSS clock domain not getting out of idle when pm_runtime_get_sync() was
called for hdmi's platform device.

Since the clock domain failed to change it's state to active, the hwmod code
disables any clocks it had enabled before for this hwmod. This led to the clock
'dss_48mhz_clk' gettind disabled.

When hdmi's runtime_resume() op is called, the call to dss_runtime_get()
correctly enables the DSS clock domain this time. However, the clock
'dss_48mhz_clk' is needed for HDMI's PHY to function correctly. Since it was
disabled previously, the driver fails when it tries to enable HDMI's PHY.

Fix this for now by ensuring that dss_runtime_get() is called before we call
pm_runtime_get_sync() for hdmi's platform device. A correct fix for later would
be to modify the DSS related hwmod's mainclks, and also some changes in how
opt clocks are handled in the DSS driver.

This fixes the issue of HDMI not working when it's the default display. The
issue is not seen if any other display is already enabled as the first display
would have correctly enabled the DSS clockdomain.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-02-23 10:29:08 +02:00
Tomi Valkeinen 973b659cbf Merge branch 'work/old-omapfb-removal' 2012-02-23 09:45:58 +02:00
Tomi Valkeinen 82d5b3e231 OMAPFB: remove unused fb_format_to_dss_mode()
fb_format_to_dss_mode() function is no longer used, so remove it.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-02-23 09:39:18 +02:00
Tomi Valkeinen 80277566d0 OMAPFB: remove mem info from platform_data
omapfb driver used platform_data to get fb memory areas and formats
defined by the board file.

This patch removes omapfb's (both old and new omapfb) use of the
memory data in platform_data, because:

- No board uses them currently
- It's not board file's job to define things like amount of default
  framebuffer memory. These should come from the bootloader via command
  line parameters.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-02-23 09:39:18 +02:00
Tomi Valkeinen 2a803c887b OMAPDSS: Remove video SRAM support
OMAP SRAM can be used as video memory on OMAP1 and 2. However, there
usually is very little SRAM available, thus limiting its use, and no
board supported by the kernel currently uses it.

This patch removes the use of SRAM as video ram for the omapdss driver
to simplify memory handling.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
2012-02-23 09:38:26 +02:00
Ricardo Neri f15511e23d OMAPDSS: HDMI: Modify logic to configure MCLK
The MCLK mode defines a factor to divide the clock that is used to
generate the Audio Clock Regeneration packets, MCLK.

The divisor is not used when the CTS value is calculated by HW.
When the value is calculated by SW, it depends on the silicon
revision.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-02-21 09:40:22 +02:00
Ricardo Neri d8989d96eb OMAPDSS: HDMI: Implement initialization of MCLK
When the MCLK is used to drive the Audio Clock Regeneration packets,
the initialization procedure is to set ACR_CTRL[2] to 0 and then
back again to 1. Also, devices that do not support the MCLK, use
the TMDS clock directly by leaving ACR_CTRL[2] set to 0.

The MLCK clock divisor, mclk_mode, is configured only if MLCK
is used. Such configuration is no longer related to the CTS mode
as in some silicon revisions CTS SW-mode is used along with the MCLK.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-02-21 09:40:15 +02:00
Ricardo Neri 709881942d OMAPDSS: Add DSS feature for HDMI MCLK for audio
Certain OMAP4 revisions (i.e., 4430 ES2.3, 4460, and 4470) use
a pseudo clock (generated from the TMDS clock), MCLK, to drive the
generation of Audio Clock Regeneration packets. Other devices
(i.e., 4430 ES2.[0,2]) use the TMDS clock directly.

This patch adds a new DSS feature for MCLK support. It also rearranges
the omap_dss_features structures to reflect the devices supporting it.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-02-21 09:40:11 +02:00
Grazvydas Ignotas 4306b721ac OMAPDSS: TPO-TD03MTEA1: update default gamma
Over time better gamma has been determined and tuned with some
equipment so update the defaults. From subjective point of view
dark shades should be better visible.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-02-21 09:40:04 +02:00
Grazvydas Ignotas 8df4f5ce64 OMAPDSS: TPO-TD03MTEA1: fix suspend hang
During system suspend, at the time DSS is being suspended, SPI is
already suspended and it's clocks are cut. Because of this trying to
communicate with the LCD controller results in a deadlock.

To fix this, split out LCD programming parts of display enable/disable
functions and perform them from SPI PM callbacks instead when system is
being suspended. If the display is just being enabled/disabled, do it
from DSS callbacks as before.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-02-21 09:40:00 +02:00
Mythri P K da8f14fc3b OMAPDSS: HDMI: Move Avi-infoframe struct to hdmi_ip_data
With AVI infoframe various parameters of video stream such as
aspect ratio, quantization range, videocode etc will be indicated
from source to sink.Thus AVI information needs to be set/accessed
by the middle ware based on the video content.
Thus this parameter is now moved to the ip_data structure.

Signed-off-by: Mythri P K <mythripk@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-02-21 09:39:53 +02:00
Yegor Yefremov 992ee64af6 OMAPDSS: add Innolux AT080TN52 display support
This patch adds support for Innolux AT080TN52 800x600 panel.
Tested with AM3517 based board.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-02-21 09:39:50 +02:00
Archit Taneja 79ee89cdbd OMAPDSS: DISPC: Fix scaling constraints for OMAP4
The calculation of required DISPC_FCLK for downscaling is done by multplying the
pixel clock with an integer factor. This isn't true for OMAP4 where the required
clock is calculated using the exact ratio of downscaling done.

Fix this calculation for OMAP4. Also, do a minor clean up of calc_fclk().

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-02-21 09:39:30 +02:00
Archit Taneja c124f23dfd OMAPDSS: Features: Maintain dss_feats as a list
The number of dss_feat_id members has increased to a large value, the current
way of assigning a subset of these features (for a particular OMAP) as a mask
is no longer feasible.

Maintain the subset of features supported as lists. Make the function
dss_has_feature() traverse through this list.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-02-21 09:39:20 +02:00
Tomi Valkeinen cd3b34493f OMAPDSS: cleanup probe functions
Now that dss is using devm_ functions for allocation in probe functions,
small reordering of the allocations allows us to clean up the probe
functions more.

This patch moves "unmanaged" allocations after the managed ones, and
uses plain returns instead of gotos where possible. This lets us remove
a bunch of goto labels, simplifying the probe's error handling.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-02-21 09:39:12 +02:00
Tomi Valkeinen 3f60db4bde Merge commit 'v3.3-rc4' 2012-02-21 09:32:19 +02:00
Russell King 4041071571 ARM: omap: fix oops in drivers/video/omap2/dss/dpi.c
When a PMIC is not found, this driver is unable to obtain its
'vdds_dsi_reg' regulator.  Even through its initialization function
fails, other code still calls its enable function, which fails to
check whether it has this regulator before asking for it to be enabled.

This fixes the oops, however a better fix would be to sort out the
upper layers to prevent them calling into a module which failed to
initialize.

Unable to handle kernel NULL pointer dereference at virtual address 00000038
pgd = c0004000
[00000038] *pgd=00000000
Internal error: Oops: 5 [#1] PREEMPT
Modules linked in:
CPU: 0    Not tainted  (3.3.0-rc2+ #228)
PC is at regulator_enable+0x10/0x70
LR is at omapdss_dpi_display_enable+0x54/0x15c
pc : [<c01b9a08>]    lr : [<c01af994>]    psr: 60000013
sp : c181fd90  ip : c181fdb0  fp : c181fdac
r10: c042eff0  r9 : 00000060  r8 : c044a164
r7 : c042c0e4  r6 : c042bd60  r5 : 00000000  r4 : c042bd60
r3 : c084de48  r2 : c181e000  r1 : c042bd60  r0 : 00000000
Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 10c5387d  Table: 80004019  DAC: 00000015
Process swapper (pid: 1, stack limit = 0xc181e2e8)
Stack: (0xc181fd90 to 0xc1820000)
fd80:                                     c001754c c042bd60 00000000 c042bd60
fda0: c181fdcc c181fdb0 c01af994 c01b9a04 c0016104 c042bd60 c042bd60 c044a338
fdc0: c181fdec c181fdd0 c01b5ed0 c01af94c c042bd60 c042bd60 c1aa8000 c1aa8a0c
fde0: c181fe04 c181fdf0 c01b5f54 c01b5ea8 c02fc18c c042bd60 c181fe3c c181fe08
fe00: c01b2a18 c01b5f48 c01aed14 c02fc160 c01df8ec 00000002 c042bd60 00000003
fe20: c042bd60 c1aa8000 c1aa8a0c c042eff8 c181fe84 c181fe40 c01b3874 c01b29fc
fe40: c042eff8 00000000 c042f000 c0449db8 c044ed78 00000000 c181fe74 c042eff8
fe60: c042eff8 c0449db8 c0449db8 c044ed78 00000000 00000000 c181fe94 c181fe88
fe80: c01e452c c01b35e8 c181feb4 c181fe98 c01e2fdc c01e4518 c042eff8 c0449db8
fea0: c0449db8 c181fef0 c181fecc c181feb8 c01e3104 c01e2f48 c042eff8 c042f02c
fec0: c181feec c181fed0 c01e3190 c01e30c0 c01e311c 00000000 c01e311c c0449db8
fee0: c181ff14 c181fef0 c01e1998 c01e3128 c18330a8 c1892290 c04165e8 c0449db8
ff00: c0449db8 c1ab60c0 c181ff24 c181ff18 c01e2e28 c01e194c c181ff54 c181ff28
ff20: c01e2218 c01e2e14 c039afed c181ff38 c04165e8 c041660c c0449db8 00000013
ff40: 00000000 c03ffdb8 c181ff7c c181ff58 c01e384c c01e217c c181ff7c c04165e8
ff60: c041660c c003a37c 00000013 00000000 c181ff8c c181ff80 c01e488c c01e3790
ff80: c181ff9c c181ff90 c03ffdcc c01e484c c181ffdc c181ffa0 c0008798 c03ffdc4
ffa0: c181ffc4 c181ffb0 c0056440 c0187810 c003a37c c04165e8 c041660c c003a37c
ffc0: 00000013 00000000 00000000 00000000 c181fff4 c181ffe0 c03ea284 c0008708
ffe0: 00000000 c03ea208 00000000 c181fff8 c003a37c c03ea214 1073cec0 01f7ee08
Backtrace:
[<c01b99f8>] (regulator_enable+0x0/0x70) from [<c01af994>] (omapdss_dpi_display_enable+0x54/0x15c)
 r6:c042bd60 r5:00000000 r4:c042bd60
[<c01af940>] (omapdss_dpi_display_enable+0x0/0x15c) from [<c01b5ed0>] (generic_dpi_panel_power_on+0x34/0x78)
 r6:c044a338 r5:c042bd60 r4:c042bd60
[<c01b5e9c>] (generic_dpi_panel_power_on+0x0/0x78) from [<c01b5f54>] (generic_dpi_panel_enable+0x18/0x28)
 r7:c1aa8a0c r6:c1aa8000 r5:c042bd60 r4:c042bd60
[<c01b5f3c>] (generic_dpi_panel_enable+0x0/0x28) from [<c01b2a18>] (omapfb_init_display+0x28/0x150)
 r4:c042bd60
[<c01b29f0>] (omapfb_init_display+0x0/0x150) from [<c01b3874>] (omapfb_probe+0x298/0x318)
 r8:c042eff8 r7:c1aa8a0c r6:c1aa8000 r5:c042bd60 r4:00000003
[<c01b35dc>] (omapfb_probe+0x0/0x318) from [<c01e452c>] (platform_drv_probe+0x20/0x24)
[<c01e450c>] (platform_drv_probe+0x0/0x24) from [<c01e2fdc>] (really_probe+0xa0/0x178)
[<c01e2f3c>] (really_probe+0x0/0x178) from [<c01e3104>] (driver_probe_device+0x50/0x68)
 r7:c181fef0 r6:c0449db8 r5:c0449db8 r4:c042eff8
[<c01e30b4>] (driver_probe_device+0x0/0x68) from [<c01e3190>] (__driver_attach+0x74/0x98)
 r5:c042f02c r4:c042eff8
[<c01e311c>] (__driver_attach+0x0/0x98) from [<c01e1998>] (bus_for_each_dev+0x58/0x98)
 r6:c0449db8 r5:c01e311c r4:00000000
[<c01e1940>] (bus_for_each_dev+0x0/0x98) from [<c01e2e28>] (driver_attach+0x20/0x28)
 r7:c1ab60c0 r6:c0449db8 r5:c0449db8 r4:c04165e8
[<c01e2e08>] (driver_attach+0x0/0x28) from [<c01e2218>] (bus_add_driver+0xa8/0x22c)
[<c01e2170>] (bus_add_driver+0x0/0x22c) from [<c01e384c>] (driver_register+0xc8/0x154)
[<c01e3784>] (driver_register+0x0/0x154) from [<c01e488c>] (platform_driver_register+0x4c/0x60)
 r8:00000000 r7:00000013 r6:c003a37c r5:c041660c r4:c04165e8
[<c01e4840>] (platform_driver_register+0x0/0x60) from [<c03ffdcc>] (omapfb_init+0x14/0x34)
[<c03ffdb8>] (omapfb_init+0x0/0x34) from [<c0008798>] (do_one_initcall+0x9c/0x164)
[<c00086fc>] (do_one_initcall+0x0/0x164) from [<c03ea284>] (kernel_init+0x7c/0x120)
[<c03ea208>] (kernel_init+0x0/0x120) from [<c003a37c>] (do_exit+0x0/0x2d8)
 r5:c03ea208 r4:00000000
Code: e1a0c00d e92dd870 e24cb004 e24dd004 (e5906038)
---[ end trace 9e2474c2e193b223 ]---

Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-02-09 17:56:53 +00:00
Linus Torvalds 98e9685248 fbdev fixes for 3.3
It includes:
 - a compile fix for fsl-diu-fb
 
 - a fix for a suspend/resume issue in atmel_lcdfb
 
 - a fix for a suspend/resume issue in OMAP
 
 - a workaround for a hardware bug to avoid physical damage in OMAP
 
 - a really trivial dead code removal in intelfb
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJPMG54AAoJECSVL5KnPj1PR6QQAKOoD4luFRw2F85jdk4GYBiX
 WqUWc1OlKYxCGIhk6LpV6fwBLDZCTjOw9NU/9i3JIOHAscGzqVvUce1zYwolEu0B
 tTH15/6Bh6uuRJEKYF8H53t1vsbrutssvUsqVcJsHrfie6bVjqjGV18cLT9siVy5
 jEZnU958Nb7t8hk7Af1ppQkbB4cpExHX4k3hXTKM+dOkRWMaH1fHv2dnikKuYXDq
 G7PC57VqN89DP14M+isUGt5uUgaMSmI09VdTYZ8xgULaZwOxnfOQNnceb/AaKnTY
 I2oHDNlNwmiHVgafN7uS0tAhIqnlYOAVLJNLlDfL7xC71AyH6WtzwJuhXnqun7v6
 moSwzzGKHohCXyeTjMAthx6HyLq55fBPAI1CmEEtmFLMv1tADLAp9Rm4dsaAjyF8
 7aKJO/9iGEpolLYjAGJGGjgCALa+/NWdXnW/zP/2vmcjAaPOZtd0YlD3OaPYr31p
 0cImhG57xIAfh60BRq+/FDthEN478Xj8f2jRe/2nsonw8JuFodZZ6nUaFeQS25X/
 X/07Wkvmz2CY8FoPeXDHaKO8B1wJphzvY2iJjDwI1jg8u/PT2agILNM24tH3SVky
 s6nyBLOEBHZh7mVwll2YifjZ6zzJm4y09LzgZpqXmUXOYPDn5JP9yZE4+R23RaEY
 kVz8fkE/FjmjAlx/WjKa
 =2uP4
 -----END PGP SIGNATURE-----

Merge tag 'fbdev-fixes-for-3.3-1' of git://github.com/schandinat/linux-2.6

fbdev fixes for 3.3

It includes:
 - compile fix for fsl-diu-fb
 - fix for a suspend/resume issue in atmel_lcdfb
 - fix for a suspend/resume issue in OMAP
 - workaround for a hardware bug to avoid physical damage in OMAP
 - really trivial dead code removal in intelfb

* tag 'fbdev-fixes-for-3.3-1' of git://github.com/schandinat/linux-2.6:
  atmel_lcdfb: fix usage of CONTRAST_CTR in suspend/resume
  intelfb: remove some dead code
  drivers/video: compile fixes for fsl-diu-fb.c
  OMAPDSS: HDMI: PHY burnout fix
  OMAP: 4430SDP/Panda: add HDMI HPD gpio
  OMAP: 4430SDP/Panda: setup HDMI GPIO muxes
  OMAPDSS: remove wrong HDMI HPD muxing
  OMAP: 4430SDP/Panda: rename HPD GPIO to CT_CP_HPD
  OMAP: 4430SDP/Panda: use gpio_free_array to free HDMI gpios
  OMAPDSS: use sync versions of pm_runtime_put
2012-02-07 15:54:02 -08:00
Axel Lin c6d242aa64 video: convert drivers/video/* to use module_spi_driver()
This patch converts the drivers in drivers/video/* to use the
module_spi_driver() macro which makes the code smaller and a bit simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Imre Deak <imre.deak@nokia.com>
Cc: Roger Quadros <roger.quadros@nokia.com>
Cc: Steve Sakoman <steve@sakoman.com>
Cc: Erik Gilling <konkers@android.com>
Cc: Gražvydas Ignotas <notasas@gmail.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2012-01-28 20:59:38 +00:00
Jingoo Han f8bd493456 video: use gpio_request_one
Using gpio_request_one can make the code simpler because it can
set the direction and initial value in one shot.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Michael Hennerich <michael.hennerich@analog.com>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2012-01-28 20:50:11 +00:00
Florian Tobias Schandinat b20f86625d Merge commit 'v3.3-rc1' into fbdev-next 2012-01-28 19:52:40 +00:00
Tomi Valkeinen c49d005b6c 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>
2012-01-26 13:51:36 +02:00
Tomi Valkeinen 0eaf9f52e9 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>
2012-01-26 13:46:24 +02:00
Tomi Valkeinen 5e36097889 Merge branch 'work/fifomerge' 2012-01-25 13:50:34 +02:00
Julia Lawall 6e2a14d2c5 OMAPDSS: use devm_ functions
The various devm_ functions allocate memory that is released when a driver
detaches.  This patch uses these functions for data that is allocated in
the probe function of a platform device and is only freed in the remove
function.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-25 13:48:35 +02:00
Danny Kukawka cc1d3e032d OMAPDSS: VENC: fix NULL pointer dereference in DSS2 VENC sysfs debug attr on OMAP4
Commit ba02fa37de disabled the
venc driver registration on OMAP4. Since the driver never gets
probed/initialised your get a dereferenceed NULL pointer if you
try to get info from /sys/kernel/debug/omapdss/venc

Return info message about disabled venc if venc_dump_regs() gets called.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-25 13:48:34 +02:00
Ricardo Neri 1149c74419 OMAPDSS: HDMI: Correct source of the pixel clock in ACR calculation
Due to changes in struct hdmi_config, the pixel clock has to be obtained
differently.

The pixel clock is needed to calculate the CTS value as defined in the
HDMI specification.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-25 13:48:34 +02:00
Mythri P K 9e4ed603e6 OMAPDSS: HDMI: remove duplicate code and mode parameter
code and mode parameters are already a part of the ip_data structure
so no need to keep the same parameters again in hdmi global structure.

Signed-off-by: Mythri P K <mythripk@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-25 13:48:34 +02:00
Mythri P K 46095b2d96 OMAPDSS: HDMI: change the timing match logic
Change the timing match logic, Instead of the statically mapped method
to get the corresponding timings for a given code and mode, move to a
simpler array indexed method. It  will help to scale up to add more
timings when needed.

Signed-off-by: Mythri P K <mythripk@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-25 13:48:33 +02:00
Mythri P K a05ce78f30 OMAPDSS: HDMI: update static timing table
Add the vsync polarity, hsync polarity, interlace to hdmi_video_timings.
Remove the now duplicate structure hdmi_timings.
update the static table structure in HDMI with CEA/VESA code and mode.

Signed-off-by: Mythri P K <mythripk@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-25 13:48:33 +02:00
Mythri P K aeec1a6ccb OMAPDSS: HDMI: remove duplicate video interface code
video interface structure is a duplicate structure with parameters which are
already present in ip_data config structure, Thus removing the structure and
modifying corresponding code.

Signed-off-by: Mythri P K <mythripk@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-25 13:48:32 +02:00
Tomi Valkeinen e0e405b925 OMAPDSS: DISPC: Add naive threshold calc for fifomerge
Take fifo merge into use by implementing a rather naive fifo merge
threshold calculation: keep the low threshold always the same, but
increase the high threshold when fifo merge is used.

This should greatly increase the time between pixel data fetches from
SDRAM, as the usable fifo size is much larger. However, it probably
won't help for fifo underflows, as the low threshols is kept the same.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-25 13:46:20 +02:00
Tomi Valkeinen 83fa2f2e94 OMAPDSS: DISPC: move fifo threhold calc to dispc.c
Move fifo threshold calculation into dispc.c, as the thresholds are
really dispc internal thing.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-25 13:46:19 +02:00
Tomi Valkeinen 3cb5d966e2 OMAPDSS: DISPC: print fifo threshold values in bytes
Fifo thresholds are calculated using bytes, but the debug print prints
values in buffer units. Change the prints to use bytes to be in line
with the calculations, and also to print in the same units on all OMAPs.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-25 13:46:19 +02:00
Tomi Valkeinen 1d71f42b35 OMAPDSS: APPLY: add fifo-merge support
Add fifo-merge support. This is done mainly in four functions:
mgr_enable/disable and ovl_enable/disable. These are the functions where
overlays are taken into and out of active use.

The process to enable and disable fifo-merge is not simple. We need to
do it in steps, waiting in between for certain settings to be taken into
use, and continuing after that. The reason for this is that fifo-merge
is a common thing for all managers/overlays, and its use must be
synchronized.

As an example, when we disable an overlay, we first set the overlay as
disabled, then wait until the overlay is actually disabled in the HW,
and only after that we may re-configure the fifos, possibly taking
fifo-merge into use.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-25 13:46:18 +02:00
Tomi Valkeinen fb01197422 OMAPDSS: APPLY: add fifo merge support funcs
Add mechanism to set/unset the DISPC fifo-merge:

Add new fields to dss_data, fifo_merge and fifo_merge_dirty. These are
similar to the other info/dirty flags in ovl_priv_data and ovl_mgr_data,
but fifo merge is a common attribute to all managers and thus outside
the ovl_mgr_data.

The fifo-merge field is used in the dss_write_regs_common, which handles
writing the register.

dss_apply_fifo_merge() can be used to set/unset the fifo merge field in
the dss_data.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-25 13:46:18 +02:00
Tomi Valkeinen e6b0f88452 OMAPDSS: FEAT: Add FIFO_MERGE feature
Add feature flag for fifo merge. OMAP2 doesn't contain fifo merge, later
OMAPs do.

dispc_enable_fifomerge() checks for the flag when called, and gives a
WARN if fifo merge is being enabled when it is not supported.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-25 13:46:17 +02:00
Linus Torvalds 51be08419d Merge branch 'fbdev-next' of git://github.com/schandinat/linux-2.6
* 'fbdev-next' of git://github.com/schandinat/linux-2.6: (175 commits)
  module_param: make bool parameters really bool (drivers/video/i810)
  Revert "atmel_lcdfb: Adjust HFP calculation so it matches the manual."
  OMAPDSS: HDMI: Disable DDC internal pull up
  OMAPDSS: HDMI: Move duplicate code from boardfile
  OMAPDSS: add OrtusTech COM43H4M10XTC display support
  OMAP: DSS2: Support for UMSH-8173MD TFT panel
  ASoC: OMAP: HDMI: Move HDMI codec trigger function to generic HDMI driver
  OMAPDSS: HDMI: Create function to enable HDMI audio
  ASoC: OMAP: HDMI: Correct signature of ASoC functions
  ASoC: OMAP: HDMI: Introduce driver data for audio codec
  grvga: fix section mismatch warnings
  video: s3c-fb: Don't keep device runtime active when open
  video: s3c-fb: Hold runtime PM references when touching registers
  video: s3c-fb: Take a runtime PM reference when unblanked
  video: s3c-fb: Disable runtime PM in error paths from probe
  video: s3c-fb: Use s3c_fb_enable() to enable the framebuffer
  video: s3c-fb: Make runtime PM functional again
  drivers/video: fsl-diu-fb: merge fsl_diu_alloc() into map_video_memory()
  drivers/video: fsl-diu-fb: add default platform ops functions
  drivers/video: fsl-diu-fb: remove broken reference count enabling the display
  ...
2012-01-14 15:11:19 -08:00
Rusty Russell 90ab5ee941 module_param: make bool parameters really bool (drivers & misc)
module_param(bool) used to counter-intuitively take an int.  In
fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy
trick.

It's time to remove the int/unsigned int option.  For this version
it'll simply give a warning, but it'll break next kernel version.

Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-01-13 09:32:20 +10:30
Florian Tobias Schandinat 193984f43d Merge branch 'for-florian' of git://gitorious.org/linux-omap-dss2/linux into fbdev-next 2012-01-08 15:30:34 +00:00
Ilya Yanok 6acea9c2da OMAPDSS: add OrtusTech COM43H4M10XTC display support
dd data for the OrtusTech COM43H4M10XTC display to the
generic_dpi_panel driver.

CC: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Ilya Yanok <yanok@emcraft.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-05 10:34:49 +02:00
Daniel Mack 62941ecd53 OMAP: DSS2: Support for UMSH-8173MD TFT panel
This patch adds support for Microtip Technologies' UMSH-8173MD 800x480
RGB TFT panel. Tested with an OMAP3 board.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
[tomi.valkeinen@ti.com: changed the panel name string]
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-05 10:34:48 +02:00
Ricardo Neri edefcdad6a ASoC: OMAP: HDMI: Move HDMI codec trigger function to generic HDMI driver
The function hdmi_audio_trigger is a callback used by ASoC to stop/start
HDMI audio. Also, it does not perform IP-specific configuration directly.
Hence, it should be placed in the general portion of the HDMI driver,
along with the other ASoC callbacks.

Also, make this function static.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-05 10:34:48 +02:00
Ricardo Neri 80a4859628 OMAPDSS: HDMI: Create function to enable HDMI audio
In order to separate clearly IP-specific code from general DSS code,
a function for OMAP4 audio enable is created. This function is
included in the HDMI IP ops to align with the current implementation
of the DSS HDMI driver. This function is to be used by the ASoC
HDMI audio codec.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-05 10:34:48 +02:00
Ricardo Neri 284cb318c8 ASoC: OMAP: HDMI: Correct signature of ASoC functions
These functions require access to IP-secific data. However, it is not possible
to pass such data as a function argument as such functions have a specific
signature specified by ASoC. Instead, they will have access to the IP-specific
data by calling snd_soc_codec_get_drvdata. The codec driver data is set
at probe time.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-05 10:34:47 +02:00
Ricardo Neri b17ce11732 ASoC: OMAP: HDMI: Introduce driver data for audio codec
Under the new DSS architecture for HDMI, there is a clear separation
between general DSS code and HDMI IP-specific data. Functions
that require access to the HDMI driver IP-specific data receive an
hdmi_ip_data structure. The ASoC codec require access to such
IP-specific data. Then, instead of accessing it directly, it will be
passed as codec driver data. This also helps to have a clear separation
between DSS and ASoC portions of the code.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-05 10:34:47 +02:00
Chandrabhanu Mahapatra 7282f1b7c9 OMAPDSS: DISPC: Update Scaling Clock Logic
Clock requirements for scaling in OMAP2, OMAP3 and OMAP4 are different. In
OMAP2 and OMAP3 the required clock rate is a function of pixel clock, vertical
downscale ratio and horizontal downscale ratio whereas in OMAP4 it is a
function of pixel clock and horizontal downscale ratio only. Selection of 3-tap
vs 5-tap coefficients depends on clock rate line buffer width in OMAP3 whereas
in OMAP4 it is independent of clock rate and line buffer width. In OMAP2 3-tap
for vertical and 5-tap for horizontal scaling is used. In OMAP4 5-tap is used
both for horizontal and vertical scaling for better performance. Also, the
number and width of line buffers differs in OMAP3 and OMAP4.

So, clock functions have been fined tuned for OMAP3 and support has been added
added for OMAP4. This code has been tested on OMAP2, OMAP3 and OMAP4, and
scaling issues due to clock errors have been resolved.

Signed-off-by: Chandrabhanu Mahapatra <cmahapatra@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-02 08:51:29 +02:00
Chandrabhanu Mahapatra debd90749b OMAPDSS: DISPC: Update Fir Coefficients
The FIR coefficients present in kernel are being updated to new coefficients
consisting of 24 coefficient tables, with 12 each for 3 tap and 5 tap scenario,
which are chosen on the basis of DISPC up/downsampling filters M value. M is
the inverse of low pass cut off frequency of the sampling filter. For vertical
scaling 3 tap or 5 tap tables are used based on the clock rate and width of
the line buffer whereas in OMAP2 3 tap is always used. For horizontal scaling
however 5 tap tables are always used.

New coefficients and the corresponding logic have been tested on OMAP2, OMAP3
and OMAP4. Horizontal and vertical scaling worked fine except for some 3 tap
vs 5 tap issue during vertical upscaling and clock failing issues which is
acknowledged in the next patch. Vertical upscaling was found to perform better
under 5 taps. The 24 coefficient tables have been moved to another file
dispc_coefs.c for proper maintainance.

This code is written based on code written by Lajos Molnar <lajos@ti.com> in
Android Kernel for scaling. Lajos Molnar <lajos@ti.com> had fine tuned the FIR
coefficient selection process and reduced outliness and blockiness around
images when upscaling more than 2 times.

Signed-off-by: Chandrabhanu Mahapatra <cmahapatra@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-02 08:51:29 +02:00
Rob Clark 1f3f53ae51 OMAPDSS: APPLY: fix NULL pointer deref when mgr is not set
extra_info_update_ongoing() goes through all overlays, but doesn't check
if the overlay is connected to a manager. This leads to a crash whenever
an overlay has been detached.

Add a check to skip the non-connected overlays.

Reported-by: Rob Clark <rob@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-02 08:51:28 +02:00
Archit Taneja 6ea9b31792 OMAPDSS: Displays: Make PICODLP driver depend on DPI
Make PICODLP driver on OMAP2_DSS_DPI since it is the display interface it uses.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-02 08:51:28 +02:00
Archit Taneja d95c03f3fa OMAPDSS: Panel NEC: Set omap_dss_device states correctly
The display state parameter of omap_dss_device struct is not being set correctly
in the panel driver NEC panel driver panel-nec-nl8048hl11-01b.c. Set the correct
states in the panel's enable/disable/suspend/resume functions.

CC: Erik Gilling <konkers@android.com>
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-02 08:51:27 +02:00
Archit Taneja 84309f1632 OMAPDSS: DSI: Fix HSDIV related PLL info in dsi_dump_clocks()
The clock names of DSI_PLL_HSDIV_DISPC and DSI_PLL_HSDIV_DSI was made
dynamic based on the current value of DISPC and DSI FCLK sources. This
doesn't need to be done since we are just interested in the clock names,
and not the current clock sources for DISPC and DSI FCLKs.

Use only the generic and omap specific names for the DSI PLL's HSDIV
clocks.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-02 08:51:27 +02:00
Tomi Valkeinen 54540d41aa OMAPDSS: APPLY: move simple_check functions
The functions dss_ovl_simple_check() and dss_mgr_simple_check() are not
really part of the apply mechanism, and can be moved to overlay.c and
manager.c.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-02 08:51:26 +02:00
Rob Clark 00f17e4560 OMAPDSS: fix potential NULL pointer ref in OCP_ERR handling path
The dispc's error handler tries to disable all outputs when OCP_ERR
happens. However, the code doesn't check if there actually is a display
on each particular output, nor if there's a driver for the display. This
may lead to NULL pointer reference.

Signed-off-by: Rob Clark <rob@ti.com>
[tomi.valkeinen@ti.com: added patch description]
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-02 08:51:26 +02:00
Tomi Valkeinen 6ac48d1e3a OMAPDSS: APPLY: move check functions
The functions dss_ovl_check, dss_mgr_check_zorder, dss_mgr_check in
apply.c are not really part of the apply mechanism, and can be moved to
overlay.c and manager.c.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-02 08:51:25 +02:00
Tomi Valkeinen 5af661ce1a OMAPDSS: APPLY: remove unused variables
dss_mgr_check_zorder() has two unused variables. Remove them.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-02 08:51:24 +02:00
Greg Kroah-Hartman 407f3fd8fa Merge 3.2-rc5 into staging-next
This resolves the conflict in the
drivers/staging/iio/industrialio-core.c file due to two different
changes made to resolve the same problem.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-09 19:01:27 -08:00
Lars-Peter Clausen 9056df19c2 video: Remove redundant spi driver bus initialization
In ancient times it was necessary to manually initialize the bus field of an
spi_driver to spi_bus_type. These days this is done in spi_driver_register(),
so we can drop the manual assignment.

The patch was generated using the following coccinelle semantic patch:
// <smpl>
@@
identifier _driver;
@@
struct spi_driver _driver = {
	.driver = {
-		.bus = &spi_bus_type,
	},
};
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: linux-fbdev@vger.kernel.org
Cc: linux-omap@vger.kernel.org
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-12-03 22:05:56 +00:00
Tomi Valkeinen 04576d415e OMAPDSS: APPLY: write fifo thresholds only if changed
Current code will always write fifo threshold values to the register,
even if they are the same as previously. Separate the setting of fifo
fields into a separate function, and only set new values if they are
different than the old ones.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02 08:54:59 +02:00
Tomi Valkeinen 75ae118a00 OMAPDSS: APPLY: add dss_setup_fifos
Currently fifo threshold configuration is done per overlay or per
manager. However, when a fifo size configuration is added, we need to
always configure the thresholds for all overlays.

This patch prepares for that by changing the fifo threshold
configuration to always handle all overlays.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02 08:54:59 +02:00
Tomi Valkeinen a6b24f8360 OMAPDSS: APPLY: simplify dss_mgr_enable
dss_mgr_enable() has some extra assigns to mp->enabled, which can be
removed.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02 08:54:58 +02:00
Tomi Valkeinen 82153eda07 OMAPDSS: APPLY: add op->enabling
When we are enabling an overlay, there's a point in time when the
overlay is not actually enabled yet (nor do we want it to be enabled),
but we do want to check if the configuration for the overlay is valid,
and to calculate correct fifo thresholds for the soon-to-be-enabled
overlay.

Current code handled this in a hacky way, setting op->enabled to true
temporarily when calling functions that need to consider the state when
the overlay is enabled.

This patch makes this a bit cleaner, adding "enabling" field, which is
set when the overlay is not yet enabled but should be considered in the
checks and calculations.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02 08:54:58 +02:00
Tomi Valkeinen 153b6e7357 OMAPDSS: APPLY: cleanup extra_info_update_ongoing
Trivial cleanup for extra_info_update_ongoing(), making the function a
bit cleaner.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02 08:54:57 +02:00
Tomi Valkeinen 3ab15b2aa7 OMAPDSS: APPLY: add dss_set_go_bits()
Currently dss_write_regs() implicitely sets the GO bits for all managers
with shadow dirty flags set. This is a bit misleading, as one does not
presume "write registers" function to also set the GO bit.

Thus this patch splits the setting of GO bits into a separate function,
dss_set_go_bits, which is used after writing the registers.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02 08:54:56 +02:00
Tomi Valkeinen 5b2141719a OMAPDSS: APPLY: clear shadow dirty flags only if GO had been set
In the apply irq handler the code currently clears the shadow dirty
flags whenever the manager in question is not busy (i.e. GO bit is
down). However, this is not quite right, as the GO bit may have never
been set.

While not done in the current code, the above would cause bug in
scenario where the registers are written, and thus shadow_dirty flag is
set, but the GO bit will be set only later. In this case the
shadow_dirty flags would be cleared, even if the HW is not using the new
configurations.

This patch fixes the issue by clearing the shadow flags only when the GO
bit is clear, and the GO bit had been set.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02 08:54:56 +02:00
Tomi Valkeinen 9f808956d3 OMAPDSS: APPLY: fix need_isr
need_isr() should return true whenever there's work that needs to be
handled in the VSYNC/FRAMEDONE irq handler. However, need_isr() is
missing some cases where we need the irq handler.

This patch adds checks for shadow dirty flags, so that the irq handler
is started/kept running while shadow dirty flags are set.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02 08:54:55 +02:00
Tomi Valkeinen cc372d84e2 OMAPDSS: APPLY: fix extra_info_update_ongoing
extra_info_update_ongoing() skipped checks for overlays that were marked
as disabled. This doesn't work, as the enable status of an overlay is in
the extra_info group, and thus extra_info_update_ongoing() reports false
when we are disabling an overlay. This causes
wait_pending_extra_info_updates() to not wait for the ongoing overlay
disable.

This patch changes extra_info_update_ongoing() to check the state of
overlays marked as disabled.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02 08:54:55 +02:00
Tomi Valkeinen 33ca237f80 OMAPDSS: check the return value of dss_mgr_enable()
Now that dss_mgr_enable returns an error value, check it in all the
places dss_mgr_enable is used, and bail out properly.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02 08:54:54 +02:00
Tomi Valkeinen 2a4ee7ee68 OMAPDSS: APPLY: add return value to dss_mgr_enable()
Now that dss_mgr_enable() can fail due to checks, make it return the
error value.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02 08:54:54 +02:00
Tomi Valkeinen 39518356cc OMAPDSS: APPLY: add checking of ovls/mgrs settings
Add checks for overlay and manager settings. The checks are a bit
complex, as we need to observe the bigger picture instead of overlays
and managers independently. Things like the used display and the zorder
of other overlays affect the validity of the settings.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02 08:54:53 +02:00
Tomi Valkeinen f17d04fbbb OMAPDSS: APPLY: add dss_mgr_simple_check()
Add dss_mgr_simple_check() which is used to check the validity of
certain manager attributes. Only attributes that can be checked
independently, without knowing the display being used, is done here
(thus "simple").

We can use this function in dss_mgr_set_info().

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02 08:54:53 +02:00
Tomi Valkeinen fcc764dca8 OMAPDSS: APPLY: add dss_ovl_simple_check()
Add dss_ovl_simple_check() which is used to check the validity of
certain overlay attributes. Only attributes that can be checked
independently, without knowing the display being used, is done here
(thus "simple").

We can use this function in dss_ovl_set_info().

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02 08:54:52 +02:00
Tomi Valkeinen e70f98acaa OMAPDSS: APPLY: remove runtime_get
apply.c no longer touches any registers if an output is not enabled.
This means that we don't need to do dispc_runtime_get() anymore, and the
calls can be removed.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02 08:54:51 +02:00
Tomi Valkeinen f1577ce180 OMAPDSS: APPLY: add wait_pending_extra_info_updates()
Add wait_pending_extra_info_updates() function which can be used to wait
until any extra_info changes have been taken into use by the hardware.
This can be only called when holding the apply mutex, so that other
threads cannot insert new extra_info changes.

This will be used to handle fifo-configurations.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02 08:54:51 +02:00
Tomi Valkeinen e4f7ad702e OMAPDSS: APPLY: skip enable/disable if already enabled/disabled
Add checks to dss_mgr_enable, dss_mgr_disable, dss_ovl_enable,
dss_ovl_disable that check if the state is already the same as given in
the parameters, and exit if so.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02 08:54:50 +02:00
Tomi Valkeinen 841c09c797 OMAPDSS: APPLY: add dss_apply_ovl_enable()
Add a helper function dss_apply_ovl_enable(), which is similar to the
main apply() function: dss_apply_ovl_enable() applies the given overlay
enable-status to ovl_priv_data, and sets the dirty flag.

The difference between the helper function and the previous direct use
of the fields is that the helper function will not do anything if the
enable state is already the same as given in the parameter.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02 08:54:50 +02:00
Tomi Valkeinen ff4733dcf5 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>
2011-12-02 08:54:49 +02:00
Tomi Valkeinen 0b53f17971 OMAPDSS: APPLY: rename dirty & shadow_dirty
Rename ovl_priv_data's and mgr_priv_data's dirty and shadow_dirty fields
to info_dirty and shadow_info_dirty to better reflect what they mean.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02 08:54:48 +02:00
Tomi Valkeinen 6dc802e290 OMAPDSS: APPLY: move fifo thresholds to extra_info set
Setting overlay's fifo thresholds 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 fifo
thresholds are needed in cases like fifo-merge, where multiple managers
are affected.

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

This also lets us to calculate the fifos only when needed, specifically,
when an overlay or a manager is enabled.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02 08:54:48 +02:00
Tomi Valkeinen 5d5a97a6fb 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>
2011-12-02 08:54:47 +02:00
Tomi Valkeinen c1a9febfaf 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>
2011-12-02 08:54:47 +02:00
Tomi Valkeinen 388c4c6cbb 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>
2011-12-02 08:54:46 +02:00
Tomi Valkeinen 7609893c63 OMAPDSS: APPLY: clean up isr_handler
Add a helper function mgr_clear_shadow_dirty(), which clears the
shadow_dirty flags for the given manager and for the overlays on that
manager.

This lets us simplify the code in the dss_apply_irq_handler().

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02 08:54:46 +02:00
Tomi Valkeinen 34861378a5 OMAPDSS: APPLY: add updating flag
Add "updating" flag to mgr_priv_data, which is used to track whether the
manager is currently actively working, i.e. updating the screen.

For auto-update displays updating is always true when the display is
enabled, but for manual update displays the flag is true only during
frame transfers.

The flag is used to manage registers properly, for example when updating
is false and a register for a manager is written, there's no need to set
shadow_dirty flag nor set the GO bit, as the settings will be taken into
use by the HW automatically when the output is enabled.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02 08:54:45 +02:00
Tomi Valkeinen 7d1365c998 OMAPDSS: DISPC: add dispc_mgr_get_framedone_irq
Add dispc_mgr_get_framedone_irq() which returns the irq number for
FRAMEDONE for the given channel.

Note that the function returns always 0 for DIGIT channel, even if OMAP4
does have FRAMEDONE_TV interrupt. The reason for this is that this
function is currently used only to track manual updates, and thus
FRAMEDONE_TV is not needed.

If there's need in the future to also get the FRAMEDONE_TV this needs
revisiting. However, as FRAMEDONE_TV doesn't exist on OMAP2/3, the use
of this function for that purpose needs some extra code to handle the
OMAP2/3 case.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02 08:54:45 +02:00
Tomi Valkeinen 75c949653f OMAPDSS: APPLY: rewrite register writing
The functions writing to the DISPC registers in apply.c are more complex
than needed. This patch cleans things up.

Two helper functions are added: need_isr(), which returns if an isr for
VSYNC is needed, and need_go(), which tells if there has been a write to
the shadow registers and we need to set the GO bit.

The functions that call the actual dispc write functions will set the
dirty and shadow_dirty flags themselves, instead of that being done on
the caller side. The writing functions also check if the dirty flag is
even set, and return immediately if not.

This allows us to clean up dss_write_regs().

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02 08:54:44 +02:00
Tomi Valkeinen aaa874a985 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>
2011-12-02 08:54:44 +02:00
Tomi Valkeinen 43a972d96b OMAPDSS: APPLY: add busy field to mgr_priv_data
Add a new field to mgr_priv data, "busy", which is used to track the
status of GO bit with the manager. As manual update displays never use
the GO bit, the field is always false for managers used for manual
update displays.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02 08:54:43 +02:00
Tomi Valkeinen bf213523fe 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>
2011-12-02 08:54:43 +02:00
Tomi Valkeinen 9a147a65de 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>
2011-12-02 08:54:42 +02:00
Tomi Valkeinen e0a2aa5b3d OMAPDSS: APPLY: add missing uses of spinlock
The functions in apply.c, called mostly via function pointers in overlay
and overlay_manager structs, will be divided into two groups. The other
group will not sleep and can be called from interrupts, and the other
group may sleep.

The idea is that the non-sleeping functions may only change certain
settings in overlays and managers, and those settings may only affect
the particular overlay/manager. For example, set the base address of the
overlay.

The blocking functions, however, will handle more complex configuration
changes. For example, when an overlay is enabled and fifo-merge feature
is used, we need to do the enable in multiple steps, waiting in between,
and the change affects multiple overlays and managers.

apply.c already contains a spinlock, which has been used to protect
(badly) the dss_data. This patch adds locks/unlocks of the spinlock to
the missing places, and the lock should now properly protect dss_data.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02 08:54:42 +02:00
Tomi Valkeinen 5558db3fdd OMAPDSS: APPLY: add mutex
The functions in apply.c, called mostly via function pointers in overlay
and overlay_manager structs, will be divided into two groups. The first
group will not sleep and can be called from interrupts, and the second
group may sleep.

The idea is that the non-sleeping functions may only change certain
settings in overlays and managers, and those settings may only affect
the particular overlay/manager. For example, set the base address of the
overlay.

The blocking functions, however, will handle more complex configuration
changes. For example, when an overlay is enabled and fifo-merge feature
is used, we need to do the enable in multiple steps, waiting in between,
and the change affects multiple overlays and managers.

This patch adds the mutex which is used in the blocking functions to
have exclusive access to overlays and overlay managers.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02 08:54:41 +02:00
Tomi Valkeinen 5738b63313 OMAPDSS: remove ovl/mgr check-code temporarily
DSS currently tries to check that the given overlay and overlay manager
settings are acceptable, but the code does not work quite properly.
Things may change between the check and the actual use of the settings.

Furthermore, the following patches will rewrite how settings are
configured and managed, and trying to keep the (broken) settings
checking working during the rewrite would be very difficult.

This patch removes the checking code, and a working version of checking
will be added back after the settings rewrite has been done.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02 08:54:40 +02:00
Tomi Valkeinen eb70d739ad OMAPDSS: APPLY: move mgr funcs to apply.c
apply.c will handle the management of dispc in the future patches. This
patch moves overlay manager related functions to apply.c so that they
will have access to the private data and functions of apply.c.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02 08:54:40 +02:00
Tomi Valkeinen f77b30700e OMAPDSS: APPLY: move ovl funcs to apply.c
apply.c will handle the management of dispc in the future patches. This
patch moves overlay related functions to apply.c so that they will have
access to the private data and functions of apply.c.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02 08:54:39 +02:00
Tomi Valkeinen d09c7aa898 OMAPDSS: APPLY: rename dss_cache to dss_data
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-02 08:54:39 +02:00
Tomi Valkeinen 063fd701ab OMAPDSS: APPLY: move spinlock outside the struct
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-02 08:54:38 +02:00
Tomi Valkeinen af3d64b2c6 OMAPDSS: APPLY: rename manager_cache_data
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-02 08:54:38 +02:00
Tomi Valkeinen c10c6f042b OMAPDSS: APPLY: rename overlay_cache_data
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-02 08:54:37 +02:00
Tomi Valkeinen f6a5e0871f OMAPDSS: APPLY: configure_* funcs take ovl/manager as args
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-02 08:54:37 +02:00
Tomi Valkeinen bc1a95181f OMAPDSS: APPLY: use dispc_mgr_get_vsync_irq()
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-02 08:54:36 +02:00
Tomi Valkeinen 3dcec4d6ba OMAPDSS: DISPC: Add dispc_mgr_get_vsync_irq()
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-02 08:54:36 +02:00
Tomi Valkeinen dbce0160af OMAPDSS: APPLY: separate vsync isr register/unregister
Create separate functions for the vsync isr register/unregister code for
cleaner code.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02 08:54:35 +02:00
Tomi Valkeinen 07e327c9c1 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>
2011-12-02 08:54:35 +02:00
Tomi Valkeinen 5617ad0979 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>
2011-12-02 08:54:34 +02:00
Tomi Valkeinen 5845234126 OMAPDSS: store overlays in an array
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-02 08:54:34 +02:00
Tomi Valkeinen 6e53ca9dda OMAPDSS: APPLY: cleanup dss_mgr_start_update
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-02 08:54:33 +02:00
Tomi Valkeinen 04f6643a86 OMAPDSS: APPLY: skip isr register and config for disabled displays
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-02 08:54:32 +02:00
Tomi Valkeinen 18135eadac OMAPDSS: APPLY: skip isr register and config for manual update displays
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-02 08:54:32 +02:00
Tomi Valkeinen be729178f0 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>
2011-12-02 08:54:31 +02:00
Tomi Valkeinen 7797c6da64 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>
2011-12-02 08:54:31 +02:00
Tomi Valkeinen 58f2554807 OMAPDSS: create apply.c
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-02 08:54:30 +02:00
Tomi Valkeinen d2bbb9bbd1 OMAPDSS: apply affects only one overlay manager
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-02 08:54:30 +02:00
Tomi Valkeinen 209285012c OMAPDSS: split omap_dss_mgr_apply() to smaller funcs
Split omap_dss_mgr_apply() into smaller functions for clarity.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02 08:54:29 +02:00
Tomi Valkeinen 32eaa58410 OMAPDSS: add ovl/mgr_manual_update() helpers
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-02 08:54:29 +02:00
Tomi Valkeinen 550a8f646c OMAPDSS: remove unneeded dss_ovl_wait_for_go()
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-02 08:54:28 +02:00
Tomi Valkeinen c3f96fee1e OMAPDSS: DISPC: remove unused functions
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-02 08:54:28 +02:00
Tomi Valkeinen c64dca40c5 OMAPDSS: setup manager with dispc_mgr_setup()
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-02 08:54:27 +02:00
Tomi Valkeinen 2cc5d1af5a OMAPDSS: separate overlay channel from ovl_setup
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-02 08:54:26 +02:00
Tomi Valkeinen f38545da53 OMAPDSS: separate FIFO threshold setup from ovl_setup
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-02 08:54:26 +02:00
Tomi Valkeinen 3ba2a1c015 OMAPDSS: handle ilace/replication when configuring overlay
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-02 08:54:25 +02:00
Tomi Valkeinen cf0736681e OMAPDSS: DISPC: handle 0 out_width/out_height in ovl_setup()
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-02 08:54:25 +02:00
Tomi Valkeinen 1cb0017813 OMAPDSS: pass ovl manager to dss_start_update
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-02 08:54:24 +02:00
Tomi Valkeinen 6331709bca OMAPDSS: remove partial update from panel-taal
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-02 08:54:24 +02:00
Tomi Valkeinen 5476e74a03 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>
2011-12-02 08:54:23 +02:00
Tomi Valkeinen 8760db5406 OMAPDSS: remove partial update from the overlay manager
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-02 08:54:23 +02:00
Tomi Valkeinen 6f04e1bfc3 OMAPDSS: DISPC: make dispc_ovl_set_fifo_threshold() public
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-02 08:54:22 +02:00
Tomi Valkeinen f427984e89 OMAPDSS: DISPC: make dispc_ovl_set_channel_out() public
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-02 08:54:22 +02:00
Tomi Valkeinen b952b553d2 OMAPDSS: remove L4_EXAMPLE code
Some old example code has been left lying around. Remove the example
code.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02 08:54:21 +02:00
Tomi Valkeinen 714ad3ac50 OMAPDSS: Remove old fifomerge hacks
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-02 08:54:21 +02:00
Tomi Valkeinen 8754595796 OMAPDSS: DISPC: add missing prototype
dispc_mgr_is_enabled() was missing a prototype in dss.h

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02 08:54:20 +02:00
Tomi Valkeinen 6cc78aa984 OMAPDSS: DSI: disable DDR_CLK_ALWAYS_ON when entering ULPS
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-02 08:54:19 +02:00
Tomi Valkeinen 3b98409eb7 OMAPDSS: DSI: improve wait_for_bit_change
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-02 08:54:19 +02:00
Tomi Valkeinen 522a0c2fe5 OMAPDSS: DSI: fix lane handling when entering ULPS
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-02 08:54:18 +02:00
Tomi Valkeinen db18644f90 OMAPDSS: DSI: remove dsi_get_num_lanes_used
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-02 08:54:18 +02:00
Tomi Valkeinen 9b4362f2b5 OMAPDSS: DSI: use lane config in dsi_cio_enable_lane_override
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-02 08:54:17 +02:00
Tomi Valkeinen 8dc0766fcf OMAPDSS: DSI: use lane config in dsi_cio_wait_tx_clk_esc_reset
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-02 08:54:17 +02:00
Tomi Valkeinen 85f17e8e2c OMAPDSS: DSI: use lane config in dsi_get_lane_mask
Use the new lane config in dsi_get_lane_mask().

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02 08:54:16 +02:00
Tomi Valkeinen 48368395f6 OMAPDSS: DSI: Use new lane config in dsi_set_lane_config
Use the new lane config in dsi_set_lane_config().

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-12-02 08:54:16 +02:00
Tomi Valkeinen 739a7f46cb OMAPDSS: DSI: Parse lane config
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-02 08:54:15 +02:00
Tomi Valkeinen d982085050 OMAPDSS: DSI: count with number of lanes
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-02 08:54:15 +02:00
Tomi Valkeinen b6a44e7748 OMAPDSS: DISPC: Flush posted writes when enabling outputs
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-02 08:54:14 +02:00
Tomi Valkeinen 968f8e97a3 OMAPDSS: DSI: flush posted write in send_bta
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-02 08:54:14 +02:00
Tomi Valkeinen a702c85906 OMAPDSS: DSI: flush posted write when entering ULPS
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-02 08:54:13 +02:00
Ilya Yanok a47161a55e OMAPDSS: add FocalTech ETM070003DH6 display support
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>
2011-12-02 08:54:13 +02:00
Rob Clark cd5351f4d2 staging: add omapdrm DRM/KMS driver for TI OMAP platforms
A DRM display driver for TI OMAP platform.  Similar to omapfb (fbdev)
and omap_vout (v4l2 display) drivers in the past, this driver uses the
DSS2 driver to access the display hardware, including support for
HDMI, DVI, and various types of LCD panels.  And it implements GEM
support for buffer allocation (for KMS as well as offscreen buffers
used by the xf86-video-omap userspace xorg driver).

The driver maps CRTCs to overlays, encoders to overlay-managers, and
connectors to dssdev's.  Note that this arrangement might change slightly
when support for drm_plane overlays is added.

For GEM support, non-scanout buffers are using the shmem backed pages
provided by GEM core (In drm_gem_object_init()).  In the case of scanout
buffers, which need to be physically contiguous, those are allocated
with CMA and use drm_gem_private_object_init().

See userspace xorg driver:
git://github.com/robclark/xf86-video-omap.git

Refer to this link for CMA (Continuous Memory Allocator):
http://lkml.org/lkml/2011/8/19/302

Links to previous versions of the patch:
v1: http://lwn.net/Articles/458137/
v2: http://patches.linaro.org/4156/
v3: http://patches.linaro.org/4688/
v4: http://patches.linaro.org/4791/

History:

v5: move headers from include/drm at Greg KH's request, minor rebasing
    on 3.2-rc1, pull in private copies of drm_gem_{get,put}_pages()
    because "drm/gem: add functions to get/put pages" patch is not
    merged yet
v4: bit of rework of encoder/connector _dpms() code, modeset_init()
    rework to not use nested functions, update TODO.txt
v3: minor cleanups, improved error handling for dev_load(), some minor
    API changes that will be needed later for tiled buffer support
v2: replace omap_vram with CMA for scanout buffer allocation, remove
    unneeded functions, use dma_addr_t for physical addresses, error
    handling cleanup, refactor attach/detach pages into common drm
    functions, split non-userspace-facing API into omap_priv.h, remove
    plugin API

v1: original

Signed-off-by: Rob Clark <rob@ti.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:43:30 -08:00
Tomi Valkeinen f95cb5ebd8 OMAPDSS: DISPC: skip scaling calculations when not scaling
Current code calculates scaling factors for video overlays even when the
overlays are not scaled. Change the code to skip calculations when not
scaling.

This optimizes the code a bit, but also fixes a problem when configuring
an overlay for a disabled display: if the display is disabled we don't
necessarily know the pixel clock used when the display is enabled, and
in some cases (like HDMI) the pixel clock is set to zero until a proper
video mode is set later. A wrong pixel clock will mess up the
scaling calculations, causing an error like:

omapdss DISPC error: failed to set up scaling, required fclk rate = 0
Hz, current fclk rate = 170666666 Hz

A proper fix would be to check later whether the clocks are enough for the
scaling, at the point when the overlay or display is actually enabled,
but this patch removes the problem for now.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-11-18 10:09:17 +02:00
Tomi Valkeinen ef319c6e09 OMAPDSS: HDMI: fix returned HDMI pixel clock
hdmi_get_pixel_clock() returns the pixel clock in Hz, but the pck is
stored as kHz. This means the return value has to be multiplied by 1000,
not by 10000 as the code did.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-11-18 10:09:16 +02:00
Paul Gortmaker 355b200bac video: Add module.h to drivers/video files who really use it.
They were getting this implicitly by an include of module.h
from device.h -- but we are going to clean that up and break
that include chain, so include module.h explicitly now.

[ with contributions from Axel Lin <axel.lin@gmail.com> ]

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-10-31 19:31:33 -04:00
Paul Gortmaker a8a3593185 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>
2011-10-31 19:31:33 -04:00
Florian Tobias Schandinat ef26b7943c Merge branch 'for-florian' of git://gitorious.org/linux-omap-dss2/linux into fbdev-next 2011-10-15 00:19:52 +00:00
Tomi Valkeinen 3e28189038 OMAPDSS: picodlp: add missing #include <linux/module.h>
Compiling panel-picodlp.c failed with:

drivers/video/omap2/displays/panel-picodlp.c:560:12: error:
'THIS_MODULE' undeclared here (not in a function)

Add #include <linux/module.h> to get THIS_MODULE definition.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-10-04 11:45:29 +03:00
Yong Zhang f8798ccbef video: irq: Remove IRQF_DISABLED
Since commit [e58aa3d2: genirq: Run irq handlers with interrupts disabled],
We run all interrupt handlers with interrupts disabled
and we even check and yell when an interrupt handler
returns with interrupts enabled (see commit [b738a50a:
genirq: Warn when handler enables interrupts]).

So now this flag is a NOOP and can be removed.

Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
Acked-by: David Brown <davidb@codeaurora.org>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-10-03 15:52:22 +00:00
Archit Taneja 54128701ec 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>
2011-10-03 16:51:55 +03:00
Archit Taneja b8c095b4d6 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>
2011-10-03 16:51:54 +03:00
Archit Taneja 11354dd58d 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>
2011-10-03 16:51:54 +03:00
Arnd Bergmann 28748782b7 video/omap: fix build dependencies
Four of the LCD panel drivers depend on the backlight class,
so add the dependency in Kconfig.
Selecting the BACKLIGHT_CLASS_DEVICE symbol does not generally
work since it has other dependencies.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
[tomi.valkeinen@ti.com: changed also N8x0 panel]
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-10-03 13:28:14 +03:00
Tomi Valkeinen 212b0d50e2 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>
2011-09-30 16:17:32 +03:00
Mythri P K 162874d5f5 OMAPDSS: HDMI: Add support to dump registers through debugfs
Add support to dump the HDMI wrapper, core, PLL and PHY registers
through debugfs.

Signed-off-by: Mythri P K <mythripk@ti.com>
[tomi.valkeinen@ti.com: updated the description]
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-09-30 16:17:32 +03:00
Mythri P K 81302a7538 OMAPDSS: HDMI: Add missing register definitions
Add some of the missing register definitions, which are h/w indexable.

Signed-off-by: Mythri P K <mythripk@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-09-30 16:17:31 +03:00
Mythri P K 31ec732e8f OMAPDSS: HDMI: Replace hdmi_reg struct with u16
Remove usage of hdmi_reg struct to use u16 instead in the HDMI IP header
file. hdmi_reg struct is not really needed, and the same change was also
made for dispc earlier.

Signed-off-by: Mythri P K <mythripk@ti.com>
[tomi.valkeinen@ti.com: updated the description]
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-09-30 16:17:31 +03:00
Mythri P K 050958b97b OMAPDSS: HDMI: Move the comments in avi infoframe
Move the comments in AVI infoframe structure above each parameter
to align with other comments in the header file.

Signed-off-by: Mythri P K <mythripk@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-09-30 16:17:30 +03:00