Commit Graph

122 Commits

Author SHA1 Message Date
Jean-Christophe PLAGNIOL-VILLARD 2436e8aa8a Merge branch 'fbdev-3.10-fixes' of git://gitorious.org/linux-omap-dss2/linux into linux-fbdev/for-3.10-fixes
Pull Tomi fixes for ps3fb and omap2

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2013-05-29 17:00:34 +08:00
Tomi Valkeinen 591a0ac7f1 OMAPDSS: Fix crash with DT boot
When booting with DT, there's a crash when omapfb is probed. This is
caused by the fact that omapdss+DT is not yet supported, and thus
omapdss is not probed at all. On the other hand, omapfb is always
probed. When omapfb tries to use omapdss, there's a NULL pointer
dereference crash. The same error should most likely happen with omapdrm
and omap_vout also.

To fix this, add an "initialized" state to omapdss. When omapdss has
been probed, it's marked as initialized. omapfb, omapdrm and omap_vout
check this state when they are probed to see that omapdss is actually
there.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
2013-05-23 12:54:21 +03:00
Tomi Valkeinen 77d3595b29 OMAPDSS: remove dsi videomode from dssdev
DSI videomode is no longer needed in the omap_dss_device, so remove it.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-04-03 15:19:18 +03:00
Tomi Valkeinen f1e0001f97 OMAPDSS: DSI: use new clock calculation code
Use the new clock calculation code in the DSI driver.

The new code does not need DSI video mode parameters from the panel
driver, like the old code does. Instead the new code is given the normal
video timings, and a few DSI parameters, which are used to create DSI
video timings.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-04-03 15:19:18 +03:00
Tomi Valkeinen 478d7df8af OMAPDSS: DSI: add enum omap_dss_dsi_trans_mode
Instead of managing DSI sync ends with booleans, add an enum for the DSI
transfer mode. This is much cleaner way to handle the DSI syncs.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-04-03 15:19:17 +03:00
Tomi Valkeinen 777f05cc79 OMAPDSS: DSI: simplify dsi configuration
We have a bunch of dsi functions that are used to do the basic
configuration for DSI. To simplify things, and to make sure we have all
the necessary information, create a single dsi config function, which
does the basic configuration.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-04-03 15:19:17 +03:00
Tomi Valkeinen 2eea5ae6c1 OMAPDSS: add output->dispc_channel
The DISPC channel used for each output is currently passed in panel
platform data from the board files.

To simplify this, and to make the panel drivers less dependent on OMAP,
this patch changes omapdss to resolve the channel independently. The
channel is resolved based on the OMAP version and, in case of DSI, the
DSI module id. This resolved channel is stored into a new field in
output, dispc_channel.

The few places where dssdev->channel was used are changed to use
output->recommended_channel. After this patch, dssdev->channel is
obsolete.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Archit Taneja <archit@ti.com>
2013-04-03 15:19:01 +03:00
Tomi Valkeinen 7286a08fb5 OMAPDSS: add output->name
Add name field to omapdss's outputs so that in the following patches
panels refer to the output by their name. The name also helps debugging.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Archit Taneja <archit@ti.com>
2013-04-03 15:19:01 +03:00
Tomi Valkeinen 4fdfdf062d OMAPDSS: HDMI: remove HDMI clk divisors from dssdev
struct omap_dss_device contains HDMI clock divisors. The idea is that the
board file can pass precalculated divisors to the display driver.
However, these divsors are no longer needed, as the omapdss driver can
calculate the divisors during runtime.

This patch removes the divisors from omap_dss_device, and their uses
from the hdmi driver.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Archit Taneja <archit@ti.com>
2013-04-03 15:19:00 +03:00
Tomi Valkeinen a0d269ec0b OMAPDSS: DSI: remove DSI & DISPC clk divisors from dssdev
struct omap_dss_device contains DSS clock divisors. The idea is that the
board file can pass precalculated divisors to the display driver.
However, these divsors are no longer needed, as the omapdss driver can
calculate the divisors during runtime.

This patch removes the divisors from omap_dss_device, and their uses
from the dsi driver.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Archit Taneja <archit@ti.com>
2013-04-03 15:19:00 +03:00
Tomi Valkeinen 348be69d30 OMAPDSS: export dispc functions
Export DISPC functions.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-12-07 17:06:00 +02:00
Tomi Valkeinen eda3427363 OMAPDSS: export dss_feat functions
Export dss_features related functions.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-12-07 17:05:59 +02:00
Tomi Valkeinen a97a963475 OMAPDSS: export dss_mgr_ops functions
Export dss_mgr_ops related functions.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-12-07 17:05:59 +02:00
Tomi Valkeinen 549acbe7a3 OMAPDSS: move omap_dispc_wait_for_irq_interruptible_timeout to dispc-compat.c
We have two functions to wait for a dispc interrupt:

int omap_dispc_wait_for_irq_timeout(u32 irqmask, unsigned long timeout);
int omap_dispc_wait_for_irq_interruptible_timeout(u32 irqmask,

Of these, the former is not used at all, and can be removed. The latter
is only used by the compat layer, and can be moved to the compat layer
code.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-12-07 17:05:56 +02:00
Tomi Valkeinen 8dd2491a42 OMAPDSS: add omapdss_compat_init()
Add two new exported functions, omapdss_compat_init and
omapdss_compat_uninit, which are to be used by omapfb, omap_vout to
enable compatibility mode for omapdss. The functions are called by
omapdss internally for now, and moved to other drivers later.

The compatibility mode is implemented fully in the following patches.
For now, enabling compat mode only sets up the private data in apply.c.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-12-07 17:05:53 +02:00
Tomi Valkeinen 9296dbd79e Merge branch '3.8/misc-2'
Merge omapdss miscellaneous patches.
2012-11-05 11:11:50 +02:00
Tomi Valkeinen 2bbcce5e0b OMAPDSS: export dss_get_def_display_name()
Export dss_get_def_display_name() with the name of
omapdss_get_def_display_name() so that omapfb can use it after the next
patch which moves default display handling to omapfb.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-10-29 12:40:46 +02:00
Tomi Valkeinen b2c7d54f72 OMAPDSS: get the dss version from core pdev
The output drivers get the omapdss hw version from the platform data for
their respective output device. This doesn't work with DT, as there's no
platform data for them.

Add a new function, omapdss_get_version(), which returns the dss version
from the core device, which will have platform data on DT also. The
function is exported so that users of omapdss can also use it.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-10-24 08:48:16 +03:00
Tomi Valkeinen 998c336d4c OMAPDSS: remove omap_dss_device's suspend/resume
The panel drivers contain enable, disable, suspend and resume calls.
The suspend and resume are effectively identical to disable and enable.

This patch removes panel suspend and enable code from omapdss and the
panel drivers, and replaces their use with enable and disable.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-10-24 08:46:23 +03:00
Archit Taneja 5028ea04c8 OMAPDSS: Remove acb and acbi fields from omap_dss_device
acbi and acb fields were meant for passive matrix panels which omapdss
doesn't support any longer. Remove these fields from omap_dss_device
struct.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-10-22 09:49:31 +03:00
Tomi Valkeinen acd18af93a OMAPDSS: add omapdss_version
Add new enum, omapdss_version, that is used to tell which DSS hardware
version the SoC has. This enum is initialized during platform init, and
passed in the platform data to omapdss driver.

Note that the versions are not "continuous", that is, you cannot check
if the version is less or greater than something, but you need to check
for exact version match. In other words, this is invalid:

/* test if DSS is 3630 or earlier */
if (ver <= OMAPDSS_VER_OMAP3630)
	...

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-10-16 13:43:56 +03:00
Archit Taneja 749feffa6b OMAPDSS: DISPC: Configure overlay-like parameters in dispc_wb_setup
Create struct omap_dss_writeback_info, this is similar to omap_overlay_info,
the major difference is that there is no parameter which describes the input
size to writeback, this is because this is always fixed, and decided by the
connected overlay or overlay manager. One more difference is that screen_width
is renamed to buf_width, to give the value of stride the writeback buffer has.

Call dispc_ovl_setup_common() through dispc_wb_setup() to configure overlay-like
parameters. The parameters in dispc_ovl_setup_common() which do not hold for
writeback are filled passed as zeroes or false, the code takes care of not
configuring them as they won't possess the needed overlay caps.

Signed-off-by: Archit Taneja <archit@ti.com>
2012-09-26 14:58:50 +03:00
Archit Taneja d79db85300 OMAPDSS: OVERLAY: Add position and replication as overlay caps
Add position and replication as overlay caps, and pass overlay caps as an
argument to the corresponding functions. Adding position and replication to
overlay caps seems a bit unnecessary, but it allows us to use the
corresponding functions for writeback too.

These caps will be set for all overlays, but not for writeback. This is done
so writeback can reuse dispc_ovl_setup() to the maximum.

Signed-off-by: Archit Taneja <archit@ti.com>
2012-09-26 14:58:49 +03:00
Archit Taneja 3c2995ac34 OMAPDSS: Remove old way of setting manager and device links
Now that an omap_dss_output can be used to link between managers and devices, we
can remove the old way of setting manager and device links. This involves
removing the device and manager pointers from omap_overlay_manager and
omap_dss_device respectively, and removing the set_device/unset_device ops from
omap_overlay_manager.

Signed-off-by: Archit Taneja <archit@ti.com>
2012-09-26 14:58:38 +03:00
Archit Taneja 794bc4eefa OMAPDSS: Remove manager->device references
With the introduction of output entities, managers will now connect to outputs.
Create helper ops for overlays and managers named get_device. This will abstract
away the information on how to get the device from an overlay or an overlay
manager. The get_device ops currently retrieve the output via a
ovl->manager->device reference. This will be later replaced by
ovl->manager->output->device references.

Signed-off-by: Archit Taneja <archit@ti.com>
2012-09-26 14:58:31 +03:00
Archit Taneja 97f01b3a2e OMAPDSS: APPLY: Add manager set/unset output ops for omap_overlay_manager
Add set_output/unset_output ops for overlay managers, these form links between
managers and outputs. Create a function in dss features which tell all the
output instances that connect to a manager, use it when a manager tries to set
an output. Add a constraint of not unsetting an output when the manager is
enabled.

Keep the omap_dss_device pointer and set/unset_device ops in overlay_manager for
now to not break things. Keep the dss feature function get_supported_displays
as it's used in some places. These will be removed later.

Signed-off-by: Archit Taneja <archit@ti.com>
2012-09-26 14:58:31 +03:00
Archit Taneja 6d71b923e5 OMAPDSS: output: Add set/unset device ops for omap_dss_output
An output entity represented by the struct omap_dss_output connects to a
omap_dss_device entity. Add functions to set or unset an output's device. This
is similar to how managers and devices were connected previously. An output can
connect to a device without being connected to a manager. However, the output
needs to eventually connect to a manager so that the connected panel can be
enabled.

Keep the omap_overlay_manager pointer in omap_dss_device for now to prevent
breaking things. This will be removed later when outputs are supported
completely.

Signed-off-by: Archit Taneja <archit@ti.com>
2012-09-26 16:31:46 +05:30
Archit Taneja 484dc404d2 OMAPDSS: outputs: Create a new entity called outputs
The current OMAPDSS design contains 3 software entities: Overlays, Managers and
Devices. These map to pipelines, overlay managers and the panels respectively in
hardware. One or more overlays connect to a manager to represent a composition,
the manager connects to a device(generally a display) to display the content.

The part of DSS hardware which isn't represented by any of the above entities
are interfaces/outputs that connect to an overlay manager, i.e blocks like DSI,
HDMI, VENC and so on. Currently, an overlay manager directly connects to the
display, and the output to which it is actually connected is ignored. The panel
driver of the display is responsible of calling output specific functions to
configure the output.

Adding outputs as a new software entity gives us the following benefits:

- Have exact information on the possible connections between managers and
  outputs: A manager can't connect to each and every output, there only limited
  hardware links between a manager's video port and some of the outputs.

- Remove hacks related to connecting managers and devices: Currently, default
  links between managers and devices are set in a not so clean way. Matching is
  done via comparing the device type, and the display types supported by the
  manager. This isn't sufficient to establish all the possible links between
  managers, outputs and devices in hardware.

- Make panel drivers more generic: The DSS panel drivers currently call
  interface/output specific functions to configure the hardware IP. When making
  these calls, the driver isn't actually aware of the underlying output. The
  output driver extracts information from the panel's omap_dss_device pointer
  to figure out which interface it is connected to, and then configures the
  corresponding output block. An example of this is when a DSI panel calls
  dsi functions, the dsi driver figures out whether the panel is connected
  to DSI1 or DSI2. This isn't correct, and having output as entities will
  give the panel driver the exact information on which output to configure.
  Having outputs also gives the opportunity to make panel drivers generic
  across different platforms/SoCs, this is achieved as omap specific output
  calls can be replaced by ops of a particular output type.

- Have more complex connections between managers, outputs and devices: OMAPDSS
  currently doesn't support use cases like 2 outputs connect to a single
  device. This can be achieved by extending properties of outputs to connect to
  more managers or devices.

- Represent writeback as an output: The writeback pipeline fits well in OMAPDSS
  as compared to overlays, managers or devices.

Add a new struct to represent outputs. An output struct holds pointers to the
manager and device structs to which it is connected. Add functions which can
register/unregister an output, or look for one. Create an enum which represent
each output instance.

Signed-off-by: Archit Taneja <archit@ti.com>
2012-09-26 16:29:10 +05:30
Tomi Valkeinen 66a0f9e4ac OMAPDSS: Use WB fifo for GFX overlay
OMAP4's GFX overlay has smaller fifo than the rest of the overlays
(including writeback "overlay"). This seems to be the reason for
underflows in some more demanding scenarios.

We can avoid the problems by using the WB fifo for GFX overlay, and vice
versa. WB usage is not supported yet, but when it will, it should
perform just fine with smaller fifo as there are no hard realtime
constraints with WB.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-09-07 20:02:13 +03:00
Tomi Valkeinen ee144e645a OMAPDSS: DSI: calculate dsi clock
Currently the way to configure clocks related to DSI (both DSI and DISPC
clocks) happens via omapdss platform data. The reason for this is that
configuring the DSS clocks is a very complex problem, and it's
impossible for the SW to know requirements about things like
interference.

However, for general cases it should be fine to calculate the dividers
for clocks in the SW. The calculated clocks are probably not perfect,
but should work.

This patch adds support to calculate the dividers when using DSI command
mode panels. The panel gives the required DDR clock rate and LP clock
rate, and the DSI driver configures itself and DISPC accordingly.

This patch is somewhat ugly, though. The code does its job by modifying
the platform data where the clock dividers would be if the board file
gave them. This is not how it's going to be in the future, but allows us
to have quite simple patch and keep the backward compatibility.

It also allows the developer to still give the exact dividers from the
board file when there's need for that, as long as the panel driver does
not override them.

There are also other areas for improvement. For example, it would be
better if the panel driver could ask for a DSI clock in a certain range,
as, at least command mode panels, the panel can work fine with many
different clock speeds.

While the patch is not perfect, it allows us to remove the hardcoded
clock dividers from the board file, making it easier to bring up a new
panel and to use device tree from omapdss.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-09-07 20:02:05 +03:00
Tomi Valkeinen cca35017ca OMAPDSS: HDMI: Move GPIO handling to HDMI driver
We currently manage HDMI GPIOs in the board files via
platform_enable/disable calls. This won't work with device tree, and in
any case the correct place to manage the GPIOs is in the HDMI driver.

This patch moves the handling of the GPIOs to the HDMI driver. The GPIO
handling is moved to the common hdmi.c file, and this probably needs to
be revisited when adding OMAP5 HDMI support to see if the GPIO handling
needs to be moved to IP specific files.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
2012-09-07 20:01:49 +03:00
Chandrabhanu Mahapatra 14d33d3846 OMAPDSS: Correct DISPC_IRQ bit definitions for LCD3
The DISPC_IRQ bit definitions pertaining to channel LCD3 as DISPC_IRQ_VSYNC3,
DISPC_IRQ_SYNC_LOST3, DISPC_IRQ_ACBIAS_COUNT_STAT3 AND DISPC_IRQ_FRAMEDONE3
which were incorrectly set in previous LCD3 patches have been corrected here.

Reported-by: Mark Tyler <mark.tyler@ti.com>
Signed-off-by: Chandrabhanu Mahapatra <cmahapatra@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-08-27 12:25:28 +03:00
Archit Taneja 6e883324b2 OMAPDSS: RFBI: Maitain copy of rfbi timings in driver data
The RFBI driver currently relies on the omap_dss_device struct to receive the
rfbi specific timings requested by the panel driver. This makes the RFBI
interface driver dependent on the omap_dss_device struct.

Make the RFBI driver data maintain it's own rfbi specific timings field. The
panel driver is expected to call omapdss_rfbi_set_interface_timings() to
configure the rfbi timings before the interface is enabled.

Signed-off-by: Archit Taneja <archit@ti.com>
2012-08-16 18:09:41 +05:30
Archit Taneja 0b3ffe397a OMAPDSS: DSI: Maintain copy of video mode timings in driver data
The DSI driver currently relies on the omap_dss_device struct to receive the
video mode timings requested by the panel driver. This makes the DSI interface
driver dependent on the omap_dss_device struct.

Make the DSI driver data maintain it's own video mode timings field. The panel
driver is expected to call omapdss_dsi_set_videomode_timings() to configure the
video mode timings before the interface is enabled.

Signed-off-by: Archit Taneja <archit@ti.com>
2012-08-16 18:05:56 +05:30
Archit Taneja 6b84937577 OMAPDSS: DSI: Rename dsi_videomode_data to dsi_videomode_timings
The struct omap_dss_dsi_videomode_data holds fields which need to be configured
for DSI to operate in video mode. Rename the struct to dsi_videomode_timings.

One reason to do this is because most of the fields in the struct are timings
related. The other reason is to create a generic op for output specific
timings. This generic op can be considered as a way to set custom or private
timings for the output.

In the case of OMAP, DSI and RFBI require some more timings apart from the
relgular DISPC timings. The structs omap_dss_videomode_timings and rfbi_timings
can be considered as these output specific timings respectively.

Signed-off-by: Archit Taneja <archit@ti.com>
2012-08-16 18:02:11 +05:30
Archit Taneja dca2b1522c OMAPDSS: DSI: Maintain copy of operation mode in driver data
The DSI driver currently relies on the omap_dss_device struct to know the mode
of operation of the DSI protocol(command or video mode). This makes the DSI
interface driver dependent on the omap_dss_device struct.

Make the DSI driver data maintain it's own operation mode field. The panel
driver is expected to call omapdss_dsi_set_operation_mode() before the interface
is enabled.

Signed-off-by: Archit Taneja <archit@ti.com>
2012-08-16 18:02:00 +05:30
Archit Taneja 889b4fd7ee OMAPDSS: SDI: Maintain copy of data pairs in driver data
The SDI driver currently relies on the omap_dss_device struct to configure the
number of data pairs as specified by the panel. This makes the SDI interface
driver dependent on the omap_dss_device struct.

Make the SDI driver data maintain it's own data lines field. A panel driver
is expected to call omapdss_sdi_set_datapairs() before enabling the interface.
Even though we configure the number of data pairs here, this function would be
finally mapped to a generic interface op called set_data_lines. The datapairs
argument type has been changed from u8 to int at some places to be in sync with
the 'set_data_lines' ops of other interfaces.

Signed-off-by: Archit Taneja <archit@ti.com>
2012-08-16 18:00:55 +05:30
Archit Taneja c6b393d4bc OMAPDSS: DPI: Maintain copy of number of data lines in driver data
The DPI driver currently relies on the omap_dss_device struct to configure the
number of data lines as specified by the panel. This makes the DPI interface
driver dependent on the omap_dss_device struct.

Make the DPI driver data maintain it's own data lines field. A panel driver
is expected to call omapdss_dpi_set_data_lines() before enabling the interface.

Signed-off-by: Archit Taneja <archit@ti.com>
2012-08-16 18:00:55 +05:30
Archit Taneja 475989b763 OMAPDSS: RFBI: Maintain copy of number of data lines in driver data
The RFBI driver currently relies on the omap_dss_device struct to configure the
number of data lines as specified by the panel. This makes the RFBI interface
driver dependent on the omap_dss_device struct.

Make the RFBI driver data maintain it's own data lines field. A panel driver
is expected to call omapdss_rfbi_set_data_lines() to configure the pixel format
before enabling the interface or calling omap_rfbi_configure().

Signed-off-by: Archit Taneja <archit@ti.com>
2012-08-16 18:00:54 +05:30
Archit Taneja b02875be08 OMAPDSS: RFBI: Maintain copy of pixel size in driver data
The RFBI driver currently relies on the omap_dss_device struct to receive the
desired pixel size of the panel. This makes the RFBI interface driver dependent
on the omap_dss_device struct.

Make the RFBI driver data maintain it's own pixel format field. A panel driver
is expected to call omapdss_rfbi_set_pixel_size() to configure the pixel format
before enabling the interface or calling omap_rfbi_configure().

Signed-off-by: Archit Taneja <archit@ti.com>
2012-08-16 18:00:54 +05:30
Archit Taneja 02c3960b1e OMAPDSS: DSI: Maintain copy of pixel format in driver data
The DSI driver currently relies on the omap_dss_device struct to receive the
desired pixel format of the panel. This makes the DSI interface driver dependent
on the omap_dss_device struct.

Make the DSI driver data maintain it's own pixel format field. The panel driver
is expected to call omapdss_dsi_set_pixel_format() to configure the pixel format
before the interface is enabled.

Signed-off-by: Archit Taneja <archit@ti.com>
2012-08-16 18:00:47 +05:30
Archit Taneja 6ff9dd5a6f OMAPDSS: RFBI: Add function to set panel size
RFBI drivers requires configuration of the update area. Since we don't support
partial updates, the size to be configures is the panel size itself.

Add a timings field in RFBI's driver data. Apart from x_res and y_res, all the
other fields are configured to an initial value when RFBI is enabled. A panel
driver is expected to call omapdss_rfbi_set_size() configure the size of the
panel.

Signed-off-by: Archit Taneja <archit@ti.com>
2012-08-15 15:53:09 +05:30
Archit Taneja 43eab86167 OMAPDSS: RFBI: Remove partial update support
Partial update suppport was removed from DISPC and DSI sometime back. The RFBI
driver still tries to support partial update without the underlying support in
DISPC.

Remove partial update support from RFBI, only support updates which span acros
the whole panel size. This also helps in DSI and RFBI having similar update
ops.

Signed-off-by: Archit Taneja <archit@ti.com>
2012-08-15 15:53:08 +05:30
Archit Taneja c7833f7bc0 OMAPDSS: SDI: Create a function to set timings
Create function omapdss_sdi_set_timings(). Configuring new timings is done the
same way as before, SDI is disabled, and re-enabled with the new timings in
dssdev. This just moves the code from the panel drivers to the SDI driver.

The panel drivers shouldn't be aware of how SDI manages to configure a new set
of timings. This should be taken care of by the SDI driver itself.

Signed-off-by: Archit Taneja <archit@ti.com>
2012-08-15 15:48:45 +05:30
Archit Taneja e352574db5 OMAPDSS: DSI: Add function to set panel size for command mode panels
DSI command mode panels don't need to configure a full set of timings to
configure DSI, they only require the width and the height of the panel in
pixels.

Use omapdss_dsi_set_size for command mode panels, omapdss_dsi_set_timings is
meant for video mode panels. When performing rotation via chaning the address
mode of the panel, we would need to swap width and height when doing 90 or 270
rotation. Make sure that omapdss_dsi_set_size() makes the new width and height
visible to DSI.

Signed-off-by: Archit Taneja <archit@ti.com>
2012-08-13 15:44:39 +05:30
Archit Taneja e67458a831 OMAPDSS: DSI: Maintain own copy of timings in driver data
The DSI driver currently relies on the timings in omap_dss_device struct to
configure the DISPC and DSI blocks accordingly. This makes the DSI interface
driver dependent on the omap_dss_device struct.

Make the DSI driver data maintain it's own timings field. A DSI video mode panel
driver is expected to call omapdss_dsi_set_timings() to set these timings before
the panel is enabled.

Signed-off-by: Archit Taneja <archit@ti.com>
2012-08-13 15:44:39 +05:30
Archit Taneja c499144c3b OMAPDSS: DPI: Maintain our own timings field in driver data
The DPI driver currently relies on the timings in omap_dss_device struct to
configure the DISPC accordingly. This makes the DPI interface driver dependent
on the omap_dss_device struct.

Make the DPI driver data maintain it's own timings field. The panel driver is
expected to call dpi_set_timings()(renamed to omapdss_dpi_set_timings) to set
these timings before the panel is enabled.

In the set_timings() op, we still ensure that the omap_dss_device timings
(dssdev->panel.timings) are configured. This will later be configured only by
the DPI panel drivers.

Signed-off-by: Archit Taneja <archit@ti.com>
2012-08-13 15:44:39 +05:30
Archit Taneja bd5a7b11a0 OMAPDSS: DSI: Fix HSYNC, VSYNC and DE polarities between DISPC and DSI
For DSI operation in videomode, DISPC logic levels for the signals HSYNC, VSYNC
and DE need to be specified to DSI via the fields VP_HSYNC_POL, VP_VSYNC_POL and
VP_DE_POL in DSI_CTRL registers.

This information is completely internal to DSS as logic levels for the above
signals hold no meaning on the DSI bus. Hence a DSI panel driver should be
totally oblivious of these fields.

Fix the logic levels/polarities in the DISPC and DSI registers to a default
value. This is done by overriding these fields in omap_video_timings struct
filled by the panel driver for DISPC, and use the equivalent default values
when programming DSI_CTRL registers. Also, remove the redundant polarity related
fields in omap_dss_dsi_videomode_data.

Signed-off-by: Archit Taneja <archit@ti.com>
2012-06-29 10:15:54 +03:00
Archit Taneja 23c8f88e8a OMAPDSS: Add interlace parameter to omap_video_timings
Add a parameter called interlace which tells whether the timings are in
interlaced or progressive mode. This aligns the omap_video_timings struct with
the Xorg modeline configuration.

It also removes the hack needed to write to divide the manager height by 2 if
the connected interface is VENC.

Signed-off-by: Archit Taneja <archit@ti.com>
2012-06-29 10:15:52 +03:00
Archit Taneja 07fb51c6bd OMAPDSS: Remove omap_panel_config enum from omap_dss_device
omap_panel_config contains fields which are finally written to DISPC_POL_FREQo
registers. These are now held by omap_video_timings and are set when the manager
timings are applied.

Remove the omap_panel_config enum, and remove all it's references from panel or
interface drivers.

Signed-off-by: Archit Taneja <archit@ti.com>
2012-06-29 10:15:51 +03:00