Arnd Bergmann [Tue, 15 May 2012 21:03:00 +0000 (15:03 -0600)]
drivers/savagefb: use mdelay instead of udelay
Long delays need to use mdelay on architectures such as ARM
that cannot compute long timeouts in udelay.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Arnd Bergmann [Tue, 15 May 2012 21:02:59 +0000 (15:02 -0600)]
video/console: automatically select a font
The frame buffer console needs at least one font to be built into
the kernel, so add the necessary Kconfig magic to guarantee that
one of the available font is always on. If a user accidentally
disables all fonts manually, the 8x16 font will be selected
anyway.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Arnd Bergmann [Tue, 15 May 2012 21:02:58 +0000 (15:02 -0600)]
video/ili9320: do not mark exported functions __devexit
No symbol can be exported when the section is discarded - the only
solution I could think of is not to mark symbols as __devexit
when they are exported.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Arnd Bergmann [Tue, 15 May 2012 21:02:57 +0000 (15:02 -0600)]
drivers/video: use correct __devexit_p annotation
__devexit functions are discarded when CONFIG_HOTPLUG
is not set, so the symbol needs to be referenced carefully.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Emil Goode [Tue, 29 May 2012 16:57:00 +0000 (18:57 +0200)]
video: bfin_adv7393fb: Convert to kstrtouint_from_user
This patch removes a call to the deprecated simple_strtoul function
and simplifies the code by replacing two function calls with one
call to kstrtouint_from_user.
-Simplify the adv7393_write_proc function by replacing the
simple_strtoul and copy_from_user calls with one call
to kstrtouint_from_user.
-Change the count parameter from unsigned long to size_t as
this is the type that the kstrtouint_from_user function expects.
(size_t is what will be passed to the adv7393_write_proc function
by the proc write handler function proc_file_write anyway)
Signed-off-by: Emil Goode <emilgoode@gmail.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Florian Tobias Schandinat [Tue, 5 Jun 2012 21:46:54 +0000 (21:46 +0000)]
Merge tag 'omapdss-for-3.5-rc2' of git://gitorious.org/linux-omap-dss2/linux into fbdev-for-linus
Small fixes for omapdss driver. Most importantly, fixes a build problem when
debugfs or omapdss debug support is turned off, and fixes a suspend related
crash.
Tomi Valkeinen [Tue, 5 Jun 2012 10:17:32 +0000 (13:17 +0300)]
OMAPDSS: fix registration of DPI and SDI devices
The omapdss arch initialization code registers all the output devices as
omap_devices. However, DPI and SDI are not proper omap_devices, as they
do not have any corresponding HWMOD. This leads to crashes or problems
when the platform code tries to use omap_device functions for DPI and
SDI devices.
One such crash was reported by John Stultz <johnstul@us.ibm.com>:
[ 18.756835] Unable to handle kernel NULL pointer dereference at
virtual addr8
[ 18.765319] pgd =
ea6b8000
[ 18.768188] [
00000018] *pgd=
aa942831, *pte=
00000000, *ppte=
00000000
[ 18.774749] Internal error: Oops: 17 [#1] SMP ARM
[ 18.779663] Modules linked in:
[ 18.782836] CPU: 0 Not tainted (3.5.0-rc1-dirty #456)
[ 18.788482] PC is at _od_resume_noirq+0x1c/0x78
[ 18.793212] LR is at _od_resume_noirq+0x6c/0x78
[ 18.797943] pc : [<
c00307ec>] lr : [<
c003083c>] psr:
20000113
[ 18.797943] sp :
ec3abe80 ip :
ec3abdb8 fp :
00000006
[ 18.809936] r10:
ec1148b8 r9 :
c08a48f0 r8 :
c00307d0
[ 18.815368] r7 :
00000000 r6 :
00000000 r5 :
ec114800 r4 :
ec114808
[ 18.822174] r3 :
00000000 r2 :
00000000 r1 :
ec154fe8 r0 :
00000006
[ 18.829010] Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM
Segment user
[ 18.836456] Control:
10c5387d Table:
aa6b804a DAC:
00000015
[ 18.842437] Process sh (pid: 1139, stack limit = 0xec3aa2f0)
[ 18.848358] Stack: (0xec3abe80 to 0xec3ac000)
DPI and SDI can be plain platform_devices. This patch changes the
registration from omap_device_register() to platform_device_add().
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reported-by: John Stultz <johnstul@us.ibm.com>
Tested-by: Jean Pihet <jean.pihet@newoldbits.com>
Archit Taneja [Mon, 4 Jun 2012 08:06:34 +0000 (13:36 +0530)]
OMAPDSS: DSI: Fix bug when calculating LP command interleaving parameters
In function dsi_compute_interleave_lp(), the escape clock/LP clock time period
is calculated incorrectly. The escape clock/LP clock is calculated as:
LP Clock(Hz) = DSI_FCLK(Hz) / lp_clk_div
Since we are calculating the time period of LP clock, the LP clock divider
should be multiplied with the time period of DSI_FCLK.
Calculating incorrect value of txclkesc results in incorrect calculation of LP
interleaving parameters, it also creates a possibility of a divide by zero
error.
Reported-by: Sureshkumar Manimuthu <mail2msuresh@ti.com>
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Wed, 23 May 2012 14:02:26 +0000 (17:02 +0300)]
OMAPDSS: fix bogus WARN_ON in dss_runtime_put()
pm_runtime_put_sync() in dss_runtime_put() returns -EBUSY when any child
of dss is still enabled. This happens, for example, when a display
output is enabled and one dumps the clocks via debugfs. This causes
dss_runtime_get & put to be called.
While I couldn't find anything about this in the documentation and it
wasn't immediately clear from runtime_pm code, it looks to me that
pm_runtime_put_sync() returns -EBUSY to inform that things went fine,
but the device could not be turned off as there are still child devices
that are enabled. This is not a problem.
This patch skips the WARN_ON if pm_runtime_put_sync() returns -EBUSY.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Wed, 23 May 2012 13:56:09 +0000 (16:56 +0300)]
OMAPDSS: Taal: fix compilation warning
This patch fixes a warning:
drivers/video/omap2/displays/panel-taal.c: In function
‘taal_num_errors_show’:
drivers/video/omap2/displays/panel-taal.c:529: warning: ‘errors’ may be
used uninitialized in this function
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Wed, 23 May 2012 13:45:09 +0000 (16:45 +0300)]
OMAPDSS: fix build when DEBUG_FS or DSS_DEBUG_SUPPORT disabled
If CONFIG_DEBUG_FS or CONFIG_OMAP2_DSS_DEBUG_SUPPORT is disabled, the
build fails:
drivers/video/omap2/dss/core.c:197:50: error: static declaration of
'dss_debugfs_create_file' follows non-static declaration
drivers/video/omap2/dss/dss.h:166:5: note: previous declaration of
'dss_debugfs_create_file' was here
This patch fixes the dummy dss_debugfs_create_file() so that the driver
builds.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Emil Goode [Mon, 28 May 2012 16:54:51 +0000 (18:54 +0200)]
video: bfin_adv7393fb: Fix cleanup code
This patch fixes the cleanup code of the bfin_adv7393_fb_probe
function.
1) The resources were not freed in the order that we allocated them
so we call dma_free_coherent() before it was allocated.
2) The labels weren't in the right place which also meant that we
freed resources that weren't allocated.
3) We should free gpio_free(P_IDENT(P_PPI0_FS3)) before returning.
4) Lets change the label names into something more meaningful.
Signed-off-by: Emil Goode <emilgoode@gmail.com>
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Jingoo Han [Fri, 25 May 2012 07:21:38 +0000 (16:21 +0900)]
video: exynos_dp: reduce delay time when configuring video setting
This patch reduces delay time when configuring video setting,
which is helpful to reduce wakeup time during resume.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Jingoo Han [Fri, 25 May 2012 07:21:08 +0000 (16:21 +0900)]
video: exynos_dp: move sw reset prioir to enabling sw defined function
The sw reset should be called prioir to enabling sw defined function,
according to datasheet.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Jingoo Han [Fri, 25 May 2012 07:20:45 +0000 (16:20 +0900)]
video: exynos_dp: use devm_ functions
The devm_ functions allocate memory that is released when a driver
detaches. This makes the code smaller and a bit simpler.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Dan Carpenter [Mon, 14 May 2012 20:58:37 +0000 (23:58 +0300)]
fb: handle NULL pointers in framebuffer release
This function is called with a potential NULL pointer in
picolcd_init_framebuffer() and it causes a static checker warning. This
used to handle NULL pointers when the picolcd code was written, but a
couple months later we added the "info->apertures" dereference.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Florian Tobias Schandinat [Sun, 27 May 2012 20:58:20 +0000 (20:58 +0000)]
Merge tag 'omapdss-for-3.5' of git://github.com/tomba/linux into fbdev-next
Omapdss driver changes for 3.5 merge window.
Lots of normal development commits, but perhaps most notable changes are:
* HDMI rework to properly decouple the HDMI audio part from the HDMI video part.
* Restructure omapdss core driver so that it's possible to implement device
tree support. This included changing how platform data is passed to the
drivers, changing display device registration and improving the panel driver's
ability to configure the underlying video output interface.
* Basic support for DSI packet interleaving
Ricardo Neri [Tue, 22 May 2012 02:47:21 +0000 (21:47 -0500)]
OMAPDSS: HDMI: OMAP4: Update IRQ flags for the HPD IRQ request
genirq requires that the IRQ requests that do not provided a handler to
use the IRQF_ONESHOT flag. This is to prevent situations in which the irq line
is reenabled while the interrupt is still asserted. While this situation may
not happen in edge type interrupts, genirq still requires to use IRQF_ONESHOT.
Also, remove the IRQF_DISABLED as the flag is now a NOOP and has been
deprecated.
Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Archit Taneja [Mon, 21 May 2012 04:17:12 +0000 (09:47 +0530)]
OMAPDSS: Apply VENC timings even if panel is disabled
The VENC interfaces uses it's venc_set_timing() function to take in a new set
of timings. If the panel is disabled, it does not disable and re-enable the
interface. Currently, the manager timings are applied in venc_power_on(), 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 VENC panel is disabled.
This is similar to the commit below which fixed the same issue for HDMI/DPI
interfaces:
fcc36619901064a76e15a545ea36d38ba0e54192
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Archit Taneja [Fri, 18 May 2012 09:06:54 +0000 (14:36 +0530)]
OMAPDSS: VENC/DISPC: Delay dividing Y resolution for managers connected to VENC
DSS2 driver uses the timings in manager's private data to check the validity of
overlay and manager infos written by the user. For VENC interface, we divide the
Y resolution by half when writing to the DISPC_DIGIT_SIZE register as the
content is interlaced. However, the height of the manager/display with respect
to the content shown through VENC still remains the same.
The VENC driver divides the y_res parameter in omap_video_timings by half, and
then applies the configuration. This leads to manager's private data storing
the wrong Y resolution. Hence, overlay related checks fail.
Ensure that manager's private data stores the original timings, and the Y
resolution is halved only when we write to the DISPC register. This is a hack,
the proper solution would be to pass some sort of interlace parameter which
makes the call whether we should divide y_res or not.
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Chandrabhanu Mahapatra [Fri, 11 May 2012 13:49:55 +0000 (19:19 +0530)]
OMAPDSS: DISPC: Support rotation through TILER
TILER is a block in OMAP4's DMM which lets DSS fetch frames in a rotated manner.
Physical memory can be mapped to a portion of OMAP's system address space called
TILER address space. The TILER address space is split into 8 views. Each view
represents a rotated or mirrored form of the mapped physical memory. When a
DISPC overlay's base address is programmed to one of these views, the TILER
fetches the pixels according to the orientation of the view. A view is further
split into 4 containers, each container holds elements of a particular size.
Rotation can be achieved at the granularity of elements in the container. For
more information on TILER, refer to the Memory Subsytem section in OMAP4 TRM.
Rotation type TILER has been added which is used to exploit the capabilities of
these 8 views for performing various rotations.
When fetching from addresses mapped to TILER space, the DISPC DMA can fetch
pixels in either 1D or 2D bursts. The fetch depends on which TILER container we
are accessing. Accessing 8, 16 and 32 bit sized containers requires 2D bursts,
and page mode sized containers require 1D bursts.
The DSS2 user is expected to provide the Tiler address of the view that it is
interested in. This is passed to the paddr and p_uv_addr parameters in
omap_overlay_info. It is also expected to provide the stride value based on the
view's orientation and container type, this should be passed to the screen_width
parameter of omap_overlay_info. In calc_tiler_rotation_offset screen_width is
used to calculate the required row_inc for DISPC. x_predecim and y_predecim are
also used to calculate row_inc and pix_inc thereby adding predecimation support
for TILER.
Signed-off-by: Chandrabhanu Mahapatra <cmahapatra@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Fri, 18 May 2012 08:49:53 +0000 (11:49 +0300)]
OMAPDSS: VRFB: remove compiler warnings when CONFIG_BUG=n
If CONFIG_BUG is not enabled, BUG() does not stop the execution. Many
places in code expect the execution to stop, and this causes compiler
warnings about uninitialized variables and returning from a non-void
function without a return value.
This patch fixes the warnings by initializing the variables and
returning properly after BUG() lines. However, the behaviour is still
undefined after the BUG, but this is the choice the user makes when
using CONFIG_BUG=n.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Fri, 18 May 2012 08:48:28 +0000 (11:48 +0300)]
OMAPFB: remove compiler warnings when CONFIG_BUG=n
If CONFIG_BUG is not enabled, BUG() does not stop the execution. Many
places in code expect the execution to stop, and this causes compiler
warnings about uninitialized variables and returning from a non-void
function without a return value.
This patch fixes the warnings by initializing the variables and
returning properly after BUG() lines. However, the behaviour is still
undefined after the BUG, but this is the choice the user makes when
using CONFIG_BUG=n.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Fri, 18 May 2012 08:47:02 +0000 (11:47 +0300)]
OMAPDSS: remove compiler warnings when CONFIG_BUG=n
If CONFIG_BUG is not enabled, BUG() does not stop the execution. Many
places in code expect the execution to stop, and this causes compiler
warnings about uninitialized variables and returning from a non-void
function without a return value.
This patch fixes the warnings by initializing the variables and
returning properly after BUG() lines. However, the behaviour is still
undefined after the BUG, but this is the choice the user makes when
using CONFIG_BUG=n.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Tue, 15 May 2012 12:54:15 +0000 (15:54 +0300)]
OMAPDSS: DISPC: fix usage of dispc_ovl_set_accu_uv
Commit
05dd0f5308213e169b02458a7f3a61362e581e14 ("OMAPDSS: DISPC: Update
Accumulator configuration for chroma plane") adds
dispc_ovl_set_accu_uv() function that sets the accu, but the function
only handles YUV and NV12 modes, and BUGs otherwise.
The patch also adds a call to the function, but unfortunately the place
of call was such that the mode could be other than YUV or NV12, thus
crashing the driver.
This patchs moves the call to a slightly later spot, at which point only
YUV and NV12 modes are handled.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Chandrabhanu Mahapatra <cmahapatra@ti.com>
Tomi Valkeinen [Tue, 15 May 2012 12:31:01 +0000 (15:31 +0300)]
OMAPDSS: use DSI_FIFO_BUG workaround only for manual update displays
There is a problem related to DSS FIFO thresholds and power management
on OMAP3. It seems that when the full PM hits in, we get underflows. The
core reason is unknown, but after experiments it looks like only
particular FIFO thresholds work correctly.
This bug is related to an earlier patch, which added special FIFO
threshold configuration for OMAP3, because DSI command mode output
didn't work with the normal threshold configuration.
However, as the above work-around worked fine for other output types
also, we currently always configure thresholds in this special way on
OMAP3. In theory there should be negligible difference with this special
way and the standard way. The first paragraph explains what happens in
practice.
This patch changes the driver to use the special threshold configuration
only when the output is a manual update display on OMAP3. This does
include RFBI displays also, and although it hasn't been tested (no
boards using RFBI) I suspect the similar behaviour is present there
also, as the DISPC side should work similarly for DSI command mode and
RFBI.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Joe Woodward <jw@terrafix.co.uk>
Archit Taneja [Tue, 15 May 2012 06:02:18 +0000 (11:32 +0530)]
OMAPDSS: DSI: Support command mode interleaving during video mode blanking periods
DSI supports interleaving of command mode packets during the HSA, HFP, HBP and
BLLP blanking intervals in a video mode stream. This is useful as a user may
want to read or change the configuration of a panel without stopping the video
stream.
On OMAP DSI, we can queue HS or LP command mode packets in the TX FIFO, and
the DSI HW takes care of interleaving this data during the one of the blanking
intervals. The DSI HW needs to be programmed with the maximum amount of data
that can be interleaved in a particular blanking period. A blanking period
cannot be used to send command mode data for it's complete duration, there is
some amount of time required for the DSI data and clock lanes to transition
to the desired LP or HS state.
Based on the state of the lanes at the beginning and end of the blanking period,
we have different scenarios, with each scenario having a different value of time
required to transition to HS or LP. Refer to the section 'Interleaving Mode' in
OMAP TRM for more info on the scenarios and the equations to calculate the time
required for HS or LP transitions.
We use the scenarios which takes the maximum time for HS or LP transition, this
gives us the minimum amount of time that can be used to interleave command mode
data. The amount of data that can be sent during this minimum time is calculated
for command mode packets both in LP and HS. These are written to the registers
DSI_VM_TIMING4 to DSI_VM_TIMING6.
The calculations don't take into account the time required of transmitting BTA
when doing a DSI read, or verifying if a DSI write went through correctly. Until
these latencies aren't considered, the behaviour of DSI is unpredictable when
a BTA is interleaved during a blanking period. Enhancement of these calculations
is a TODO item.
The calculations are derived from DSI parameter calculation tools written by
Sebastien Fagard <s-fagard@ti.com>
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Chandrabhanu Mahapatra [Tue, 15 May 2012 06:52:34 +0000 (12:22 +0530)]
OMAPDSS: DISPC: Update Accumulator configuration for chroma plane
DISPC has two accumulator registers DISPC_VIDp_ACCU_0 and DISPC_VIDp_ACCU_1 each
with horizontal and vertical bit fields. The bit fields can take values in the
range of -1024 to 1023. Based on bit field values DISPC decides on which one out
of 8 phases the filtering starts. DISPC_VIDp_ACCU_0 is used for progressive
output and for interlaced output both DISPC_VIDp_ACCU_0 and DISPC_VIDp_ACCU_1
are used.
The current accumulator values in DISPC scaling logic for chroma plane takes
default values for all color modes and rotation types. So, the horizontal and
vertical up and downsampling accumulator bit field values have been updated for
better performance.
Signed-off-by: Chandrabhanu Mahapatra <cmahapatra@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Timur Tabi [Thu, 10 May 2012 21:57:28 +0000 (16:57 -0500)]
drivers/video: fsl-diu-fb: don't initialize the THRESHOLDS registers
The THRESHOLDS register configures thresholds for two interrupts, but
these interrupts are not used in the DIU driver. An early version of the
driver may have used the "lines before vsync" interrupt, which requires
the LS_BF_VS of THRESHOLDS to be initialized.
Unfortunately, the initialization of this register does not do a
read-modify-write to set only LS_BF_VS. On the MPC8610, the value
written is correct. On other chips, like the P1022, the value overwrites
some reserved bits. This results in a performance drop on the P1022.
Since the default value is acceptable as-is on all SOCs, we should just
avoid touching this register.
Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Donghwa Lee [Wed, 9 May 2012 05:33:31 +0000 (14:33 +0900)]
video: exynos mipi dsi: support reverse panel type
This patch adds panel_reverse variable to support reversed s6e8ax0 panel
type.
Signed-off-by: Donghwa Lee <dh09.lee@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Sylwester Nawrocki [Wed, 9 May 2012 05:33:29 +0000 (14:33 +0900)]
video: exynos mipi dsi: Properly interpret the interrupt source flags
Rework the interrupt handler so the RX_DONE, FIFO_EMPTY interrupts are
properly detected. This prevents missing the interrupts when there are
other bits set in the INTSRC register than just RX_DONE and FIFO_EMPTY.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Donghwa Lee <dh09.lee@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Sylwester Nawrocki [Wed, 9 May 2012 05:33:28 +0000 (14:33 +0900)]
video: exynos mipi dsi: Avoid races in probe()
Make sure all resources are initialized before interrupt handler is
registered. Pass full platform device name to request_irq() so it
can be distinguished which device has requested an interrupt in cases
there are multiple instances in the system.
Also enable voltage regulators regardless of they have been enabled
by bootloader or not, to make sure other drivers using same regulators
don't disable them unexpectedly.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Donghwa Lee <dh09.lee@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Sylwester Nawrocki [Wed, 9 May 2012 05:33:26 +0000 (14:33 +0900)]
video: exynos mipi dsi: Do not use deprecated suspend/resume callbacks
Use proper PM ops from struct dev_pm_ops rather than the deprecated ones.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Donghwa Lee <dh09.lee@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Kuninori Morimoto [Tue, 8 May 2012 04:08:17 +0000 (21:08 -0700)]
fbdev: sh_mobile_hdmi: add HDMI Control Register support
Latest SuperH HDMI uses not only HDMI Core Register (HTOP0)
but also HDMI Control Register (HTOP1).
This patch adds HDMI Control Register support.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Kuninori Morimoto [Tue, 8 May 2012 04:07:49 +0000 (21:07 -0700)]
fbdev: sh_mobile_hdmi: 32bit register access support
Latest SuperH HDMI allows 32bit access only.
But the data is 8bit. So, we can keep compatibility by switching 8/32 bit access.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Kuninori Morimoto [Tue, 8 May 2012 04:07:20 +0000 (21:07 -0700)]
fbdev: sh_mobile_hdmi: add interrupt output option
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Kuninori Morimoto [Tue, 8 May 2012 04:06:54 +0000 (21:06 -0700)]
fbdev: sh_mobile_hdmi: add hdmi_bit_set() function
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Donghwa Lee [Mon, 7 May 2012 00:20:51 +0000 (09:20 +0900)]
video: EXYNOS: changes mipi dsi regulator name from vdd10 to vdd11
MIPI DSI uses 1.1v regulator, so change its supply name.
Signed-off-by: Donghwa Lee <dh09.lee@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Jingoo Han [Mon, 7 May 2012 00:20:09 +0000 (09:20 +0900)]
video: s3c-fb: use pr_debug instead of printk
This patch uses pr_debug instead of printk to allow dynamic debugging.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Jingoo Han [Fri, 4 May 2012 06:25:36 +0000 (15:25 +0900)]
video: exynos_dp: remove unnecessary header includes
Remove unnecessary headers from the file.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Julia Lawall [Thu, 19 Apr 2012 16:55:53 +0000 (18:55 +0200)]
drivers/video/intelfb/intelfbdrv.c: add missing agp_backend_release
Release bridge, as done on all other paths out of the function.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Tomi Valkeinen [Fri, 11 May 2012 12:38:23 +0000 (15:38 +0300)]
Merge branch 'omapdss-hdmi-audio'
Merge OMAP DSS HDMI audio patches from Ricardo Neri
Ricardo Neri [Thu, 10 May 2012 02:09:50 +0000 (21:09 -0500)]
OMAPDSS: HDMI: Implement DSS driver interface for audio
Implement the DSS device driver audio support interface in the HDMI
panel driver and generic driver. The implementation relies on the
IP-specific functions that are defined at DSS probe time.
A mixed locking strategy is used. The panel's mutex is used when
the state of the panel is queried as required by the audio functions.
The audio state is protected using a spinlock as users of DSS HDMI
audio functionality might start/stop audio while holding a spinlock.
The mutex and the spinlock are held and released as needed by each
individual function to protect the panel state and the audio state.
Although the panel's audio_start functions does not check whether
the panel is active, the audio _ENABLED state can be reached only
from audio_enable, which does check the state of the panel. Also,
if the panel is ever disabled, the audio state will transition
to _DISABLED. Transitions are always protected by the audio lock.
Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Ricardo Neri [Thu, 26 Apr 2012 00:29:06 +0000 (19:29 -0500)]
OMAPDSS: HDMI: Panel: Simplify the name of the HDMI mutex
As the hdmi_lock mutex is inside the hdmi struct, rename to simply
"lock". This is only a change in the name. There are not changes
in functionality.
Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Ricardo Neri [Thu, 3 May 2012 17:27:12 +0000 (12:27 -0500)]
OMAPDSS: HDMI: OMAP4: Remap speaker order to match ALSA order
As of today, the only know user of the DSS HDMI audio support is
ASoC. Hence, it makes sense to remap the speaker order to match
the ALSA speaker order. In the future, a dynamic mapping mechanism
may be implemented.
Remapping is needed as the HDMI speaker order is FL/FR/LFE/C/RL/RR/
RLC-FLC/RRC-FLC while the ALSA order is FL/FR/RL/RR/C/LFE/SL/SR.
Refer to CEA-861 Section 6.6.2 for further details.
Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Ricardo Neri [Wed, 21 Mar 2012 18:38:15 +0000 (12:38 -0600)]
OMAPDSS: HDMI: Add an audio configuration function
The generic HDMI driver does not need to know about the specific
settings of a given IP. Hence, it just passes the audio configuration
and the IP library parses such configuration and sets the IP
accordingly. This patch introduces an IP-specific audio configuration
function.
Also, this patch implements the audio config function for OMAP4. The
DMA, format and core config functions are no longer exposed to the
generic HDMI driver as they are IP-specific.
The audio configuration function caters for 16-bit through 24-bit
audio samples with sample rates from 32kHz and up to 192kHz as well
as up to 8 audio channels.
Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Ricardo Neri [Fri, 23 Mar 2012 21:49:02 +0000 (15:49 -0600)]
OMAPDSS: HDMI: Add support for more audio sample rates in N/CTS calculation
Add support for more sample rates when calculating N and CTS. This
covers all the audio sample rates that an HDMI source is allowed
to transmit according to the HDMI 1.4a specification.
Also, reorganize the logic for the calculation when using deep color.
Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Ricardo Neri [Wed, 21 Mar 2012 03:02:01 +0000 (21:02 -0600)]
OMAPDSS: HDMI: Relocate N/CTS calculation
The N and CTS parameters are relevant to all HDMI implementations and
not specific to a given IP. Hence, the calculation is relocated
into the generic HDMI driver.
Also, deep color is not queried but it is still considered in the
calculation of N. This is to be changed when deep color functionality is
implemented in the driver.
Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Ricardo Neri [Mon, 19 Mar 2012 18:27:41 +0000 (12:27 -0600)]
OMAPDSS: HDMI: OMAP4: Expand configuration for IEC-60958 audio
Utilize a snd_aes_iec958 struct to write the parameters of the IEC-60958
channel status word into the HDMI IP registers. Hence, the user of the
driver has full control of what parameters are written in the word.
Also, some of the parameters of the I2S structure have been removed
as they are actually IEC-60958 parameters.
Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Ricardo Neri [Thu, 15 Mar 2012 20:08:03 +0000 (14:08 -0600)]
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>
Axel Castaneda Gonzalez [Thu, 3 May 2012 14:00:21 +0000 (09:00 -0500)]
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>
Ricardo Neri [Mon, 19 Mar 2012 15:30:21 +0000 (09:30 -0600)]
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>
Ricardo Neri [Thu, 15 Mar 2012 16:39:00 +0000 (10:39 -0600)]
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>
Ricardo Neri [Thu, 15 Mar 2012 18:58:51 +0000 (12:58 -0600)]
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>
Ricardo Neri [Fri, 27 Apr 2012 18:48:45 +0000 (13:48 -0500)]
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>
Ricardo Neri [Fri, 20 Apr 2012 22:17:46 +0000 (17:17 -0500)]
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>
Ricardo Neri [Wed, 7 Mar 2012 00:20:37 +0000 (18:20 -0600)]
OMAPDSS: Provide an interface for audio support
There exist several display technologies and standards that support audio as
well. Hence, it is relevant to update the DSS device driver to provide an audio
interface that may be used by an audio driver or any other driver interested in
the functionality.
The audio_enable function is intended to prepare the relevant
IP for playback (e.g., enabling an audio FIFO, taking in/out of reset
some IP, enabling companion chips, etc). It is intended to be called before
audio_start. The audio_disable function performs the reverse operation and is
intended to be called after audio_stop.
While a given DSS device driver may support audio, it is possible that for
certain configurations audio is not supported (e.g., an HDMI display using a
VESA video timing). The audio_supported function is intended to query whether
the current configuration of the display supports audio.
The audio_config function is intended to configure all the relevant audio
parameters of the display. In order to make the function independent of any
specific DSS device driver, a struct omap_dss_audio is defined. Its purpose
is to contain all the required parameters for audio configuration. At the
moment, such structure contains pointers to IEC-60958 channel status word and
CEA-861 audio infoframe structures. This should be enough to support HDMI and
DisplayPort, as both are based on CEA-861 and IEC-60958. The omap_dss_audio
structure may be extended in the future if required.
The audio_enable/disable, audio_config and audio_supported functions could be
implemented as functions that may sleep. Hence, they should not be called
while holding a spinlock or a readlock.
The audio_start/audio_stop function is intended to effectively start/stop audio
playback after the configuration has taken place. These functions are designed
to be used in an atomic context. Hence, audio_start should return quickly and be
called only after all the needed resources for audio playback (audio FIFOs,
DMA channels, companion chips, etc) have been enabled to begin data transfers.
audio_stop is designed to only stop the audio transfers. The resources used
for playback are released using audio_disable.
A new enum omap_dss_audio_state is introduced to help the implementations of
the interface to keep track of the audio state. The initial state is _DISABLED;
then, the state transitions to _CONFIGURED, and then, when it is ready to
play audio, to _ENABLED. The state _PLAYING is used when the audio is being
rendered.
Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Tomi Valkeinen [Fri, 11 May 2012 12:10:10 +0000 (15:10 +0300)]
Merge branch 'dss-devtree-cleanup'
Merge OMAP DSS cleanups that restructure the omapdss driver to facilitate
implementing device tree support in the future.
Russ Dill [Wed, 9 May 2012 22:08:08 +0000 (15:08 -0700)]
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>
Tomi Valkeinen [Wed, 2 May 2012 11:55:12 +0000 (14:55 +0300)]
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>
Tomi Valkeinen [Fri, 9 Mar 2012 14:07:39 +0000 (16:07 +0200)]
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>
Tomi Valkeinen [Thu, 1 Mar 2012 14:58:39 +0000 (16:58 +0200)]
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>
Tomi Valkeinen [Thu, 1 Mar 2012 13:45:53 +0000 (15:45 +0200)]
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>
Tomi Valkeinen [Thu, 23 Feb 2012 11:00:51 +0000 (13:00 +0200)]
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>
Tomi Valkeinen [Fri, 17 Feb 2012 15:43:03 +0000 (17:43 +0200)]
OMAPFB: add __init & __exit
Change omapfb to use platform_driver_probe and add __init & __exit.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Fri, 17 Feb 2012 15:41:13 +0000 (17:41 +0200)]
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>
Tomi Valkeinen [Wed, 7 Mar 2012 10:53:38 +0000 (12:53 +0200)]
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>
Tomi Valkeinen [Fri, 2 Mar 2012 16:01:07 +0000 (18:01 +0200)]
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>
Tomi Valkeinen [Fri, 2 Mar 2012 15:37:53 +0000 (17:37 +0200)]
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>
Tomi Valkeinen [Fri, 17 Feb 2012 15:58:04 +0000 (17:58 +0200)]
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>
Tomi Valkeinen [Mon, 20 Feb 2012 14:57:37 +0000 (16:57 +0200)]
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>
Tomi Valkeinen [Wed, 7 Mar 2012 11:09:43 +0000 (13:09 +0200)]
OMAPDSS: create DPI & SDI devices
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 arch/arm/mach-omap2/display.c to create platform
devices for DPI and SDI, and later patches will implement driver for
them.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Fri, 17 Feb 2012 15:15:58 +0000 (17:15 +0200)]
OMAPDSS: create custom pdevs for DSS omap_devices
Instead of using omap_device_build() to create the omap_devices for DSS
hwmods, create them with a custom function. This will allow us to create
a parent-child hierarchy for the devices so that the omapdss_core device
is parent for the rest of the dss hwmod devices.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Wed, 7 Mar 2012 10:53:18 +0000 (12:53 +0200)]
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>
Tomi Valkeinen [Thu, 23 Feb 2012 13:32:37 +0000 (15:32 +0200)]
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>
Tomi Valkeinen [Mon, 20 Feb 2012 09:50:06 +0000 (11:50 +0200)]
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>
Tomi Valkeinen [Tue, 10 Jan 2012 09:26:52 +0000 (11:26 +0200)]
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>
Tomi Valkeinen [Fri, 17 Feb 2012 10:19:48 +0000 (12:19 +0200)]
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>
Tomi Valkeinen [Thu, 10 May 2012 08:15:14 +0000 (11:15 +0300)]
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>
Grazvydas Ignotas [Thu, 10 May 2012 11:19:56 +0000 (14:19 +0300)]
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>
Grazvydas Ignotas [Mon, 23 Apr 2012 21:08:54 +0000 (00:08 +0300)]
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>
Tomi Valkeinen [Thu, 10 May 2012 16:55:44 +0000 (19:55 +0300)]
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.
Tomi Valkeinen [Wed, 9 May 2012 10:50:32 +0000 (13:50 +0300)]
Merge branch 'archit/set-timing-work'
An overlay manager's timings (the manager size, and blanking parameters
if an LCD manager) are DISPC shadow registers, and they should hence
follow the correct programming model.
This series makes the video timings an extra_info parameter in manager's
private data. The interface drivers now apply the timings instead of
directly writing to registers.
This change also prevents the need to use display resolution for overlay
checks, hence making some of the APPLY functions less dependent on the
display. Some DISPC functions that needed display width can also use
these privately stored timings.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Archit Taneja [Tue, 8 May 2012 10:23:20 +0000 (15:53 +0530)]
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>
Archit Taneja [Mon, 9 Apr 2012 09:36:41 +0000 (15:06 +0530)]
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>
Archit Taneja [Mon, 9 Apr 2012 09:06:08 +0000 (14:36 +0530)]
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>
Archit Taneja [Thu, 3 May 2012 14:33:11 +0000 (20:03 +0530)]
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>
Archit Taneja [Thu, 26 Apr 2012 19:52:28 +0000 (01:22 +0530)]
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>
Archit Taneja [Tue, 8 May 2012 12:49:15 +0000 (18:19 +0530)]
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>
Archit Taneja [Thu, 26 Apr 2012 19:37:28 +0000 (01:07 +0530)]
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>
Archit Taneja [Thu, 26 Apr 2012 14:40:46 +0000 (20:10 +0530)]
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>
Archit Taneja [Thu, 26 Apr 2012 14:01:22 +0000 (19:31 +0530)]
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>
Archit Taneja [Mon, 7 May 2012 11:21:36 +0000 (16:51 +0530)]
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>
Archit Taneja [Mon, 7 May 2012 11:21:35 +0000 (16:51 +0530)]
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>
Archit Taneja [Mon, 7 May 2012 13:20:28 +0000 (18:50 +0530)]
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>
Archit Taneja [Mon, 7 May 2012 13:20:27 +0000 (18:50 +0530)]
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>
Tomi Valkeinen [Wed, 28 Mar 2012 12:58:56 +0000 (15:58 +0300)]
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>
Tomi Valkeinen [Mon, 20 Feb 2012 10:18:52 +0000 (12:18 +0200)]
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>
Tomi Valkeinen [Thu, 22 Dec 2011 09:12:13 +0000 (11:12 +0200)]
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>
Tomi Valkeinen [Mon, 5 Mar 2012 12:29:28 +0000 (14:29 +0200)]
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>