Commit Graph

4549 Commits (8d5c68362f7d77cdffdf12ab7516a6eb77a5dd90)

Author SHA1 Message Date
Jingoo Han d8b97db4c8 video: s3c-fb: add video clock running at data under-flow
This patch adds video clock running at data under-flow.
It means that the pixel clock is continuously provided
to lcd module, even when under-run occurs.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2012-01-28 20:58:11 +00:00
Jingoo Han f7f31e505a video: s3c-fb: add alpha value width setting
This patch adds alpha value width setting according to
transparency value of each window format, using BLENDCON
register. When alpha value is 8 bits, BLENDCON will set
alpha value width as 8 bits.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2012-01-28 20:58:09 +00:00
Jingoo Han 05e52b4bfb video: s3c-fb: fix checkpatch error
This patch fixes the checkpatch error listed below:

ERROR: trailing statements should be on next line

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2012-01-28 20:50:40 +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
Julia Lawall 1c16697bf9 drivers/video/au*fb.c: 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.

In au1100fb.c, the probe function now returns -ENODEV on failure.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Manuel Lauss <manuel.lauss@googlemail.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2012-01-28 20:47:52 +00:00
Kay Sievers 92a9c19a89 udlfb: remove sysfs framebuffer device with USB .disconnect()
The USB graphics card driver delays the unregistering of the framebuffer
device to a workqueue, which breaks the userspace visible remove uevent
sequence. Recent userspace tools started to support USB graphics card
hotplug out-of-the-box and rely on proper events sent by the kernel.

The framebuffer device is a direct child of the USB interface which is
removed immediately after the USB .disconnect() callback. But the fb device
in /sys stays around until its final cleanup, at a time where all the parent
devices have been removed already.

To work around that, we remove the sysfs fb device directly in the USB
.disconnect() callback and leave only the cleanup of the internal fb
data to the delayed work.

Before:
 add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2 (usb)
 add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0 (usb)
 add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/graphics/fb0 (graphics)
 remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0 (usb)
 remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2 (usb)
 remove   /2-1.2:1.0/graphics/fb0 (graphics)

After:
 add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2 (usb)
 add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0 (usb)
 add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/graphics/fb1 (graphics)
 remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/graphics/fb1 (graphics)
 remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0 (usb)
 remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2 (usb)

Cc: stable@vger.kernel.org
Tested-by: Bernie Thompson <bernie@plugable.com>
Acked-by: Bernie Thompson <bernie@plugable.com>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2012-01-28 19:57:46 +00:00
Mark Brown 857a8df946 video: s3c-fb: Convert to devm style allocation
Saves some code, especially useful as the code saved is mostly in the
infrequently tested error paths.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2012-01-28 19:56:27 +00:00
Manjunathappa, Prakash f820917aba video: da8xx-fb: reset LCDC only if functional clock changes with DVFS
LCDC functional clock may or may not be derived from CPU/MPU DPLL,
For example,
AM335x => Separate independent DPLL for LCDC
Davinci => Same DPLL as MPU

So, on platforms where LCDC functional clock is not derived from CPU/MPU
PLL it is not required to reset LCDC module as its functional clock does
not change with DVFS.

This patch adds check to do reset only if functional clock changes
between pre and post notifier callbacks with DVFS.

Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2012-01-28 19:55:34 +00:00
Peter Korsgaard 787f9fd232 atmel_lcdfb: support 16bit BGR:565 mode, remove unsupported 15bit modes
Allow framebuffer to be configured in 16bit mode when panel is wired in
(the default) BGR configuration, and don't claim to support 15bit input
modes, which the LCD controller cannot handle.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2012-01-28 19:54:10 +00:00
Florian Tobias Schandinat b20f86625d Merge commit 'v3.3-rc1' into fbdev-next 2012-01-28 19:52:40 +00:00
Hubert Feurstein 9f1065032c atmel_lcdfb: fix usage of CONTRAST_CTR in suspend/resume
An error was existing in the saving of CONTRAST_CTR register
across suspend/resume.

Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2012-01-28 19:50:22 +00:00
Dan Carpenter 7bc1dc7174 intelfb: remove some dead code
The goto on the line before means the return is unreachable.  The goto
also returns -ENODEV so no changes are needed there.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2012-01-28 19:39:17 +00:00
Florian Tobias Schandinat 64a9de8f07 Merge branch 'for-3.3-rc' of git://gitorious.org/linux-omap-dss2/linux into fbdev-for-linus 2012-01-28 19:37:39 +00:00
Michael Neuling f7f5ef0afd drivers/video: compile fixes for fsl-diu-fb.c
Fix a compiler errors introduced in:
  commit ddd3d90543
  Author: Timur Tabi <timur@freescale.com>
  drivers/video: fsl-diu-fb: merge all allocated data into one block

Signed-off-by: Michael Neuling <mikey@neuling.org>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2012-01-28 19:35:24 +00:00
Paul Mundt c40e0fa51c Merge branches 'sh/urgent' and 'sh/platform-updates' into sh-latest 2012-01-27 16:37:30 +09:00
Linus Torvalds 0dbfe8ddaa Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
  m68k: Fix assembler constraint to prevent overeager gcc optimisation
  mac_esp: rename irq
  mac_scsi: dont enable mac_scsi irq before requesting it
  macfb: fix black and white modes
  m68k/irq: Remove obsolete IRQ_FLG_* definitions

Fix up trivial conflict in arch/m68k/kernel/process_mm.c as per Geert.
2012-01-26 12:43:57 -08: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
Axel Lin d59d9ebaac drivers/video/backlight/l4f00242t03.c: return proper error in l4f00242t03_probe if regulator_get() fails
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Alberto Panizzo <alberto@amarulasolutions.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-01-23 08:38:48 -08:00
Axel Lin 36c3e75907 drivers/video/backlight/adp88x0_bl.c: fix bit testing logic
We need to write new value if the bit mask fields of new value is not
equal to old value.  It does not make sense to write new value only when
all the bit_mask bits are zero.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Michael Hennerich <michael.hennerich@analog.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-01-23 08:38:48 -08:00
Finn Thain d9070fc499 macfb: fix black and white modes
macfb won't init in black & white modes since fb_alloc_cmap() no longer
works for zero cmap length. Fix this and also clean up a few printk's and
some stylistic inconsistencies.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2012-01-22 14:50:02 +01:00
Tony Lindgren 967809bd7f Merge branch 'omap1-part2' into omap1
Conflicts:
	drivers/leds/leds-ams-delta.c
2012-01-20 05:31:52 -08:00
Linus Torvalds 57f2685c16 Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma
* 'next' of git://git.infradead.org/users/vkoul/slave-dma: (53 commits)
  ARM: mach-shmobile: specify CHCLR registers on SH7372
  dma: shdma: fix runtime PM: clear channel buffers on reset
  dma/imx-sdma: save irq flags when use spin_lock in sdma_tx_submit
  dmaengine/ste_dma40: clear LNK on channel startup
  dmaengine: intel_mid_dma: remove legacy pm interface
  ASoC: mxs: correct 'direction' of device_prep_dma_cyclic
  dmaengine: intel_mid_dma: error path fix
  dmaengine: intel_mid_dma: locking and freeing fixes
  mtd: gpmi-nand: move to dma_transfer_direction
  mtd: fix compile error for gpmi-nand
  mmc: mxs-mmc: fix the dma_transfer_direction migration
  dmaengine: add DMA_TRANS_NONE to dma_transfer_direction
  dma: mxs-dma: Don't use CLKGATE bits in CTRL0 to disable DMA channels
  dma: mxs-dma: make mxs_dma_prep_slave_sg() multi user safe
  dma: mxs-dma: Always leave mxs_dma_init() with the clock disabled.
  dma: mxs-dma: fix a typo in comment
  DMA: PL330: Remove pm_runtime_xxx calls from pl330 probe/remove
  video i.MX IPU: Fix display connections
  i.MX IPU DMA: Fix wrong burstsize settings
  dmaengine/ste_dma40: allow fixed physical channel
  ...

Fix up conflicts in drivers/dma/{Kconfig,mxs-dma.c,pl330.c}

The conflicts looked pretty trivial, but I'll ask people to verify them.
2012-01-17 18:40:24 -08:00
Paul Mundt 0c929238ca Merge branch 'sh/platform-updates' into sh-latest 2012-01-17 22:55:28 +10: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
Linus Torvalds 4964e0664c Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (119 commits)
  MIPS: Delete unused function add_temporary_entry.
  MIPS: Set default pci cache line size.
  MIPS: Flush huge TLB
  MIPS: Octeon: Remove SYS_SUPPORTS_HIGHMEM.
  MIPS: Octeon: Add support for OCTEON II PCIe
  MIPS: Octeon: Update PCI Latency timer and enable more error reporting.
  MIPS: Alchemy: Update cpu-feature-overrides
  MIPS: Alchemy: db1200: Improve PB1200 detection.
  MIPS: Alchemy: merge Au1000 and Au1300-style IRQ controller code.
  MIPS: Alchemy: chain IRQ controllers to MIPS IRQ controller
  MIPS: Alchemy: irq: register pm at irq init time
  MIPS: Alchemy: Touchscreen support on DB1100
  MIPS: Alchemy: Hook up IrDA on DB1000/DB1100
  net/irda: convert au1k_ir to platform driver.
  MIPS: Alchemy: remove unused board headers
  MTD: nand: make au1550nd.c a platform_driver
  MIPS: Netlogic: Mark Netlogic chips as SMT capable
  MIPS: Netlogic: Add support for XLP 3XX cores
  MIPS: Netlogic: Merge some of XLR/XLP wakup code
  MIPS: Netlogic: Add default XLP config.
  ...

Fix up trivial conflicts in arch/mips/kernel/{perf_event_mipsxx.c,
traps.c} and drivers/tty/serial/Makefile
2012-01-14 13:05:21 -08:00
Linus Torvalds 0a80939b3e Autogenerated GPG tag for Rusty D1ADB8F1: 15EE 8D6C AB0E 7F0C F999 BFCB D920 0E6C D1AD B8F1
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJPD2aFAAoJENkgDmzRrbjxNzsQAIeYbbrXYLjr6kQzUSngj/eC
 FzjaTEfYTQIeuQCFJHcHthyc5lXV4sQbo3jOezW+Bp5yuDJL2aWIHesSfWZe7imu
 zQdM4VshOYdAmUR9Q0AW5zhB8Smbs7/AyABiF2jm4p0ZPOuyMDSlei9sjvE9Vjvt
 B7g5ht7L6kz0JbDnwwy0u5gs+tEitwpXYId9Y4ysZIBzIbL0qkPX8veOddGTMy0N
 8xhWXaKtufpjvxFD2ORLDsw3AkoF1xXSNuFd/5nzCNpbeE7TW931jfkPoqJumuAO
 7GLxcU9kKYl+IICobC6wBtsj/RrB7w+cBXMvPGwdBliam1qaRhUcJZi5FLM/Ha5d
 2A9QDYNUpoXiO8JbPXrV9Z+Y0+Co8RilsQj7R/rjZh6AbbYCWt9nxzx2Svl/RfTr
 xfiimHuB2P3rHjOvpCXULwOOuE5c8MzPuWncpdjiD3uGXOY/aY+X1m+if/quJw9D
 grPlKL0+YiRakEYUeGG4M77KCqyKFZaF7L7UQPbqfZcj8V/9AW3/7U5I/B9RlAjs
 idsr4fcf5s0N+oKUyTCW1ncpUDQNiwbU2NyJQqeu1ZxaRGj72AgyvsaNeyIPDyK+
 f6x95Bi7i8KLjXc9Z1KvJwh2Nxt25gNUiTYVha/9H2NpJGd1cfI15kTOGXrgddVv
 1pvuGcJDZwYiwfiXr3FL
 =HHrh
 -----END PGP SIGNATURE-----

Merge tag 'for-linus' of git://github.com/rustyrussell/linux

Autogenerated GPG tag for Rusty D1ADB8F1: 15EE 8D6C AB0E 7F0C F999  BFCB D920 0E6C D1AD B8F1

* tag 'for-linus' of git://github.com/rustyrussell/linux:
  module_param: check that bool parameters really are bool.
  intelfbdrv.c: bailearly is an int module_param
  paride/pcd: fix bool verbose module parameter.
  module_param: make bool parameters really bool (drivers & misc)
  module_param: make bool parameters really bool (arch)
  module_param: make bool parameters really bool (core code)
  kernel/async: remove redundant declaration.
  printk: fix unnecessary module_param_name.
  lirc_parallel: fix module parameter description.
  module_param: avoid bool abuse, add bint for special cases.
  module_param: check type correctness for module_param_array
  modpost: use linker section to generate table.
  modpost: use a table rather than a giant if/else statement.
  modules: sysfs - export: taint, coresize, initsize
  kernel/params: replace DEBUGP with pr_debug
  module: replace DEBUGP with pr_debug
  module: struct module_ref should contains long fields
  module: Fix performance regression on modules with large symbol tables
  module: Add comments describing how the "strmap" logic works

Fix up conflicts in scripts/mod/file2alias.c due to the new linker-
generated table approach to adding __mod_*_device_table entries.  The
ARM sa11x0 mcp bus needed to be converted to that too.
2012-01-14 12:32:16 -08:00
Paul Mundt 6d7120a713 video: pvr2fb: Fix up spurious section mismatch warnings.
pvr2fb special cases its init/exit routines which causes spurious section
mismatches. Set the board_driver array __refdata to silence them.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2012-01-13 16:42:50 +09:00
Andrew Morton 08346bf805 drivers/video/nvidia/nvidia.c: fix warning
Fix the int/bool confusion in there.

  drivers/video/nvidia/nvidia.c:1602: warning: return from incompatible pointer type

Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-01-12 20:13:03 -08:00
Rusty Russell f787f32e67 module_param: make bool parameters really bool (drivers/video/i810)
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.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2012-01-12 23:28:59 +00:00
Rusty Russell a6e02554c1 intelfbdrv.c: bailearly is an int module_param
Dan Carpenter points out that it's an int, not a bool:
intelfbdrv.c:818:	if (bailearly == 1)
intelfbdrv.c:828:	if (bailearly == 2)
intelfbdrv.c:836:	if (bailearly == 3)
intelfbdrv.c:842:	if (bailearly == 4)
intelfbdrv.c:851:	if (bailearly == 5)
intelfbdrv.c:859:	if (bailearly == 6)
intelfbdrv.c:866:				    bailearly > 6 ? bailearly - 6 : 0);
intelfbdrv.c:874:	if (bailearly == 18)
intelfbdrv.c:886:	if (bailearly == 19)
intelfbdrv.c:893:	if (bailearly == 20)

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
2012-01-13 09:32:28 +10:30
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 6b3cbe4094 Revert "atmel_lcdfb: Adjust HFP calculation so it matches the manual."
This reverts commit 5d910426a6.

Nicolas Ferre <nicolas.ferre@atmel.com> wrote:
"Unfortunately this is not true for all the SoC that embed the
atmel_lcdfb... So I may need to rework this patch but it is certainly
not applicable in the current form."

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2012-01-11 22:29:30 +00:00
Ralf Baechle 7a5c3b8c5c Merge branch 'next/alchemy' into mips-for-linux-next 2012-01-11 15:42:10 +01:00
Linus Torvalds 40ba587923 Merge branch 'akpm' (aka "Andrew's patch-bomb")
Andrew elucidates:
 - First installmeant of MM.  We have a HUGE number of MM patches this
   time.  It's crazy.
 - MAINTAINERS updates
 - backlight updates
 - leds
 - checkpatch updates
 - misc ELF stuff
 - rtc updates
 - reiserfs
 - procfs
 - some misc other bits

* akpm: (124 commits)
  user namespace: make signal.c respect user namespaces
  workqueue: make alloc_workqueue() take printf fmt and args for name
  procfs: add hidepid= and gid= mount options
  procfs: parse mount options
  procfs: introduce the /proc/<pid>/map_files/ directory
  procfs: make proc_get_link to use dentry instead of inode
  signal: add block_sigmask() for adding sigmask to current->blocked
  sparc: make SA_NOMASK a synonym of SA_NODEFER
  reiserfs: don't lock root inode searching
  reiserfs: don't lock journal_init()
  reiserfs: delay reiserfs lock until journal initialization
  reiserfs: delete comments referring to the BKL
  drivers/rtc/interface.c: fix alarm rollover when day or month is out-of-range
  drivers/rtc/rtc-twl.c: add DT support for RTC inside twl4030/twl6030
  drivers/rtc/: remove redundant spi driver bus initialization
  drivers/rtc/rtc-jz4740.c: make jz4740_rtc_driver static
  drivers/rtc/rtc-mc13xxx.c: make mc13xxx_rtc_idtable static
  rtc: convert drivers/rtc/* to use module_platform_driver()
  drivers/rtc/rtc-wm831x.c: convert to devm_kzalloc()
  drivers/rtc/rtc-wm831x.c: remove unused period IRQ handler
  ...
2012-01-10 16:42:48 -08:00
Mark Brown e2c17bc6f7 backlight: convert pwm_bl to dev_pm_ops
Should be no functional changes, mainly a reorganisation to support future
work.

[akpm@linux-foundation.org: fix CONFIG_PM=n build]
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-01-10 16:30:48 -08:00
Mark Brown 48e78e8cc8 backlight: convert platform_lcd to devm_kzalloc()
Saves some error handling code and eliminates a class of leaks.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-01-10 16:30:48 -08:00
Jingoo Han 66655760bf backlight: use kstrtoul()
The usage of simple_strtoul() or strict_strtoul() is not preferred.  Thus,
kstrtoul should be used.

This patch also fixes checkpatch error as follows:
ERROR: space required after that ',' (ctx:VxV)

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-01-10 16:30:48 -08:00
Jingoo Han 1cfc6fee34 drivers/video/backlight/ep93xx_bl.c: remove duplicated header include
module.h is included twice.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ryan Mallon <rmallon@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-01-10 16:30:48 -08:00
Donghwa Lee b148a27294 backlight/ld9040.c: regulator control in the driver
This patch supports regulator power control in the driver.  Current ld9040
driver was controlled power on/off sequence by callback function in the
board file.  But, by doing this, there's no need to register lcd power
on/off callback function in the board file.

Signed-off-by: Donghwa Lee <dh09.lee@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-01-10 16:30:48 -08:00
Axel Lin 81178e0216 backlight: convert drivers/video/backlight/* to use module_platform_driver()
Convert the drivers in drivers/video/backlight/* to use the
module_platform_driver() macro which makes the code smaller and a bit
simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>	[ep93xx_bl.c]
Cc: Mike Rapoport <mike@compulab.co.il>
Cc: Richard Purdie <rpurdie@rpsys.net>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-01-10 16:30:48 -08:00
Paul Bolle 3ed0c15fd1 backlight: remove ADX backlight device support
Support for the Avionic Design Xanthos backlight device got added in
commit 3b96ea9ef8 ("backlight: Add support for the Avionic Design Xanthos
backlight device.").  That support depends on ARCH_PXA_ADX.  The code that
should have provided that Kconfig symbol never got submitted.  It has
never been possible to even build this driver.  Remove it.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Acked-by: Thierry Reding <thierry.reding@avionic-design.de>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-01-10 16:30:48 -08:00
Linus Torvalds 90160371b3 Merge branch 'stable/for-linus-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen
* 'stable/for-linus-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen: (37 commits)
  xen/pciback: Expand the warning message to include domain id.
  xen/pciback: Fix "device has been assigned to X domain!" warning
  xen/pciback: Move the PCI_DEV_FLAGS_ASSIGNED ops to the "[un|]bind"
  xen/xenbus: don't reimplement kvasprintf via a fixed size buffer
  xenbus: maximum buffer size is XENSTORE_PAYLOAD_MAX
  xen/xenbus: Reject replies with payload > XENSTORE_PAYLOAD_MAX.
  Xen: consolidate and simplify struct xenbus_driver instantiation
  xen-gntalloc: introduce missing kfree
  xen/xenbus: Fix compile error - missing header for xen_initial_domain()
  xen/netback: Enable netback on HVM guests
  xen/grant-table: Support mappings required by blkback
  xenbus: Use grant-table wrapper functions
  xenbus: Support HVM backends
  xen/xenbus-frontend: Fix compile error with randconfig
  xen/xenbus-frontend: Make error message more clear
  xen/privcmd: Remove unused support for arch specific privcmp mmap
  xen: Add xenbus_backend device
  xen: Add xenbus device driver
  xen: Add privcmd device driver
  xen/gntalloc: fix reference counts on multi-page mappings
  ...
2012-01-10 10:09:59 -08:00
Linus Torvalds 979ecef5b8 clock management changes for i.MX
Another simple series related to clock management, this time only for
 imx.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIVAwUATwta7GCrR//JCVInAQJD6A//ZbZtOEctF1nfrpQ6LeoPdJFWUt/4d+GX
 JW2CksR94AB1BqTNV0N0a/pRUNTEo5bBVzeXJw8XnJSCNnIakJpFoeZBh93YTOsO
 ZfuxhYwkVrbCusELaltrSdj5lUW/KgE58vTpfCkkqGgyMQQTzH73zJyjNOYAaWAK
 FleQ5jCpxm3FqoA5jp9+7xcHwF+o2btKXzM4kyEO/cAaypEIOz83qAK16FKzIvuI
 ba9QgMXN5sAKwNMIkNYJruHknlshGT00NBlYJebT0MXbd7pyuN9VsIfMMEQ+VG8B
 3hvfVvHrVeHiWoqdF0r8uxr/SZJiCZlE5RhDK1pO1MXPsroaOEAMSAeA/Y2193HK
 Dkz37iBBUf5T4mA5GfKb7dH4maM79OQ+SEtcQySF18hT+qCHeJV3J8WC0c7C81Ej
 7RFBJjFfpwKwd/SXFKn/PYmlgJZ4aW1+FNyx5xnIjBNpnU8N9knw2h1qGVvcjp+V
 SRQ7zghQToDY425U0ziiFle3XsrC/a0QZrzbFo+rqgUXMZQ2Vq7CiZr/E8QNsbiE
 I0AVE6hlWEx3aXgDoHKb0K3kSthIT7QkmO2UjhJmplEIjgVZw+vfjmAM9O+AeWJC
 BYLzgl2CRAZekNBD77aUdB1VUVz2cUUQ2zgh0wH11k2ca2+h3Lyw4buzsV4u3nxj
 Fqinw2GEt2U=
 =czKE
 -----END PGP SIGNATURE-----

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

clock management changes for i.MX

Another simple series related to clock management, this time only for
imx.

* tag 'clk' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  ARM: mxs: select HAVE_CLK_PREPARE for clock
  clk: add config option HAVE_CLK_PREPARE into Kconfig
  ASoC: mxs-saif: convert to clk_prepare/clk_unprepare
  video: mxsfb: convert to clk_prepare/clk_unprepare
  serial: mxs-auart: convert to clk_prepare/clk_unprepare
  net: flexcan: convert to clk_prepare/clk_unprepare
  mtd: gpmi-lib: convert to clk_prepare/clk_unprepare
  mmc: mxs-mmc: convert to clk_prepare/clk_unprepare
  dma: mxs-dma: convert to clk_prepare/clk_unprepare
  net: fec: add clk_prepare/clk_unprepare
  ARM: mxs: convert platform code to clk_prepare/clk_unprepare
  clk: add helper functions clk_prepare_enable and clk_disable_unprepare

Fix up trivial conflicts in drivers/net/ethernet/freescale/fec.c due to
commit 0ebafefcaa ("net: fec: add clk_prepare/clk_unprepare") clashing
trivially with commit e163cc97f9 ("net/fec: fix the .remove code").
2012-01-09 14:44:15 -08:00
Linus Torvalds 12e5550892 Merge branch 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
* 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (466 commits)
  net/hyperv: Add support for jumbo frame up to 64KB
  net/hyperv: Add NETVSP protocol version negotiation
  net/hyperv: Remove unnecessary kmap_atomic in netvsc driver
  staging/rtl8192e: Register against lib80211
  staging/rtl8192e: Convert to lib80211_crypt_info
  staging/rtl8192e: Convert to lib80211_crypt_data and lib80211_crypt_ops
  staging/rtl8192e: Add lib80211.h to rtllib.h
  staging/mei: add watchdog device registration wrappers
  drm/omap: GEM, deal with cache
  staging: vt6656: int.c, int.h: Change return of function to void
  staging: usbip: removed unused definitions from header
  staging: usbip: removed dead code from receive function
  staging:iio: Drop {mark,unmark}_in_use callbacks
  staging:iio: Drop buffer mark_param_change callback
  staging:iio: Drop the unused buffer enable() and is_enabled() callbacks
  staging:iio: Drop buffer busy flag
  staging:iio: Make sure a device is only opened once at a time
  staging:iio: Disallow modifying buffer size when buffer is enabled
  staging:iio: Disallow changing scan elements in all buffered modes
  staging:iio: Use iio_buffer_enabled instead of open coding it
  ...

Fix up conflict in drivers/staging/iio/adc/ad799x_core.c (removal of
module_init due to using module_i2c_driver() helper, next to removal of
MODULE_ALIAS due to using MODULE_DEVICE_TABLE instead).
2012-01-09 12:18:17 -08:00
Linus Torvalds 98793265b4 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (53 commits)
  Kconfig: acpi: Fix typo in comment.
  misc latin1 to utf8 conversions
  devres: Fix a typo in devm_kfree comment
  btrfs: free-space-cache.c: remove extra semicolon.
  fat: Spelling s/obsolate/obsolete/g
  SCSI, pmcraid: Fix spelling error in a pmcraid_err() call
  tools/power turbostat: update fields in manpage
  mac80211: drop spelling fix
  types.h: fix comment spelling for 'architectures'
  typo fixes: aera -> area, exntension -> extension
  devices.txt: Fix typo of 'VMware'.
  sis900: Fix enum typo 'sis900_rx_bufer_status'
  decompress_bunzip2: remove invalid vi modeline
  treewide: Fix comment and string typo 'bufer'
  hyper-v: Update MAINTAINERS
  treewide: Fix typos in various parts of the kernel, and fix some comments.
  clockevents: drop unknown Kconfig symbol GENERIC_CLOCKEVENTS_MIGR
  gpio: Kconfig: drop unknown symbol 'CS5535_GPIO'
  leds: Kconfig: Fix typo 'D2NET_V2'
  sound: Kconfig: drop unknown symbol ARCH_CLPS7500
  ...

Fix up trivial conflicts in arch/powerpc/platforms/40x/Kconfig (some new
kconfig additions, close to removed commented-out old ones)
2012-01-08 13:21:22 -08:00
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
Linus Torvalds 7affca3537 Merge branch 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
* 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (73 commits)
  arm: fix up some samsung merge sysdev conversion problems
  firmware: Fix an oops on reading fw_priv->fw in sysfs loading file
  Drivers:hv: Fix a bug in vmbus_driver_unregister()
  driver core: remove __must_check from device_create_file
  debugfs: add missing #ifdef HAS_IOMEM
  arm: time.h: remove device.h #include
  driver-core: remove sysdev.h usage.
  clockevents: remove sysdev.h
  arm: convert sysdev_class to a regular subsystem
  arm: leds: convert sysdev_class to a regular subsystem
  kobject: remove kset_find_obj_hinted()
  m86k: gpio - convert sysdev_class to a regular subsystem
  mips: txx9_sram - convert sysdev_class to a regular subsystem
  mips: 7segled - convert sysdev_class to a regular subsystem
  sh: dma - convert sysdev_class to a regular subsystem
  sh: intc - convert sysdev_class to a regular subsystem
  power: suspend - convert sysdev_class to a regular subsystem
  power: qe_ic - convert sysdev_class to a regular subsystem
  power: cmm - convert sysdev_class to a regular subsystem
  s390: time - convert sysdev_class to a regular subsystem
  ...

Fix up conflicts with 'struct sysdev' removal from various platform
drivers that got changed:
 - arch/arm/mach-exynos/cpu.c
 - arch/arm/mach-exynos/irq-eint.c
 - arch/arm/mach-s3c64xx/common.c
 - arch/arm/mach-s3c64xx/cpu.c
 - arch/arm/mach-s5p64x0/cpu.c
 - arch/arm/mach-s5pv210/common.c
 - arch/arm/plat-samsung/include/plat/cpu.h
 - arch/powerpc/kernel/sysfs.c
and fix up cpu_is_hotpluggable() as per Greg in include/linux/cpu.h
2012-01-07 12:03:30 -08:00
Linus Torvalds d3d0b02434 Merge branch 'amba-modalias' of git://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm
* 'amba-modalias' of git://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm:
  sound: aaci: Enable module alias autogeneration for AMBA drivers
  watchdog: sp805: Enable module alias autogeneration for AMBA drivers
  fbdev: amba: Enable module alias autogeneration for AMBA drivers
  serial: pl011: Enable module alias autogeneration for AMBA drivers
  serial: pl010: Enable module alias autogeneration for AMBA drivers
  spi: pl022: Enable module alias autogeneration for AMBA drivers
  rtc: pl031: Enable module alias autogeneration for AMBA drivers
  rtc: pl030: Enable module alias autogeneration for AMBA drivers
  mmc: mmci: Enable module alias autogeneration for AMBA drivers
  input: ambakmi: Enable module alias autogeneration for AMBA drivers
  gpio: pl061: Enable module alias autogeneration for AMBA drivers
  dmaengine: pl330: Enable module alias autogeneration for AMBA drivers
  dmaengine: pl08x: Enable module alias autogeneration for AMBA drivers
  hwrng: nomadik: Enable module alias autogeneration for AMBA drivers
  ARM: amba: Auto-generate AMBA driver module aliases during modpost
  ARM: amba: Move definition of struct amba_id to mod_devicetable.h
2012-01-06 18:03:30 -08:00
Linus Torvalds e4e88f31bc Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (185 commits)
  powerpc: fix compile error with 85xx/p1010rdb.c
  powerpc: fix compile error with 85xx/p1023_rds.c
  powerpc/fsl: add MSI support for the Freescale hypervisor
  arch/powerpc/sysdev/fsl_rmu.c: introduce missing kfree
  powerpc/fsl: Add support for Integrated Flash Controller
  powerpc/fsl: update compatiable on fsl 16550 uart nodes
  powerpc/85xx: fix PCI and localbus properties in p1022ds.dts
  powerpc/85xx: re-enable ePAPR byte channel driver in corenet32_smp_defconfig
  powerpc/fsl: Update defconfigs to enable some standard FSL HW features
  powerpc: Add TBI PHY node to first MDIO bus
  sbc834x: put full compat string in board match check
  powerpc/fsl-pci: Allow 64-bit PCIe devices to DMA to any memory address
  powerpc: Fix unpaired probe_hcall_entry and probe_hcall_exit
  offb: Fix setting of the pseudo-palette for >8bpp
  offb: Add palette hack for qemu "standard vga" framebuffer
  offb: Fix bug in calculating requested vram size
  powerpc/boot: Change the WARN to INFO for boot wrapper overlap message
  powerpc/44x: Fix build error on currituck platform
  powerpc/boot: Change the load address for the wrapper to fit the kernel
  powerpc/44x: Enable CRASH_DUMP for 440x
  ...

Fix up a trivial conflict in arch/powerpc/include/asm/cputime.h due to
the additional sparse-checking code for cputime_t.
2012-01-06 17:58:22 -08:00
Greg Kroah-Hartman ff4b8a57f0 Merge branch 'driver-core-next' into Linux 3.2
This resolves the conflict in the arch/arm/mach-s3c64xx/s3c6400.c file,
and it fixes the build error in the arch/x86/kernel/microcode_core.c
file, that the merge did not catch.

The microcode_core.c patch was provided by Stephen Rothwell
<sfr@canb.auug.org.au> who was invaluable in the merge issues involved
with the large sysdev removal process in the driver-core tree.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-06 11:42:52 -08: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
Jan Beulich 73db144b58 Xen: consolidate and simplify struct xenbus_driver instantiation
The 'name', 'owner', and 'mod_name' members are redundant with the
identically named fields in the 'driver' sub-structure. Rather than
switching each instance to specify these fields explicitly, introduce
a macro to simplify this.

Eliminate further redundancy by allowing the drvname argument to
DEFINE_XENBUS_DRIVER() to be blank (in which case the first entry from
the ID table will be used for .driver.name).

Also eliminate the questionable xenbus_register_{back,front}end()
wrappers - their sole remaining purpose was the checking of the
'owner' field, proper setting of which shouldn't be an issue anymore
when the macro gets used.

v2: Restore DRV_NAME for the driver name in xen-pciback.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2012-01-04 17:01:17 -05:00
Sam Ravnborg c5627f65d6 grvga: fix section mismatch warnings
Fix following section mismatch warnings:

WARNING: drivers/video/built-in.o(.devinit.text+0x110): Section mismatch in reference from the function grvga_probe() to the function .init.text:grvga_parse_custom()
The function __devinit grvga_probe() references
a function __init grvga_parse_custom().
If grvga_parse_custom is only used by grvga_probe then
annotate grvga_parse_custom with a matching annotation.

WARNING: drivers/video/built-in.o(.devinit.text+0x1f8): Section mismatch in reference from the function grvga_probe() to the variable .init.data:grvga_fix
The function __devinit grvga_probe() references
a variable __initdata grvga_fix.
If grvga_fix is only used by grvga_probe then
annotate grvga_fix with a matching annotation.

WARNING: drivers/video/built-in.o(.devinit.text+0x204): Section mismatch in reference from the function grvga_probe() to the variable .init.data:grvga_fix
The function __devinit grvga_probe() references
a variable __initdata grvga_fix.
If grvga_fix is only used by grvga_probe then
annotate grvga_fix with a matching annotation.

grvga_fix is used in a function annotated __devinit - so
match this using a __devinitdata annotation on grvga_fix.

grvga_parse_custom() is used in a function annotated
__devinit - so match this by annotating grvga_parse_custom()
with __devinit too.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Kristoffer Glembo <kristoffer@gaisler.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2012-01-03 16:02:55 +00:00
Mark Brown e2f55b5455 video: s3c-fb: Don't keep device runtime active when open
Allow the controller to be runtime suspended when the screen is blanked
by not taking a runtime reference while the device is open. This allows
greater system wide power savings when used with a standard application
layer and ensures that the screen does not blank unless requested.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2012-01-03 16:00:05 +00:00
Mark Brown 5751b23efb video: s3c-fb: Hold runtime PM references when touching registers
Take a runtime PM reference whenever updating registers in preparation
for suspending the device when the framebuffer is blanked.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2012-01-03 16:00:05 +00:00
Mark Brown f4f514734e video: s3c-fb: Take a runtime PM reference when unblanked
When the framebuffer is unblanked hold a runtime PM reference. This
prevents us powering down when userspace has left an image on the
framebuffer and prepares the way for being able to power down the hardware
when an application still has the device open.

Since we now hold a runtime PM reference whenever the display is unblanked
there is no need for the runtime power management to disable and enable
the display, and doing so would lead to runtime PM trying to recurse into
itself when called from the blanking code, so split the runtime PM into
separate functions which only deal with the clocks.  The PM core will
runtime resume the device prior to system suspend.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2012-01-03 16:00:04 +00:00
Mark Brown 3500b0be62 video: s3c-fb: Disable runtime PM in error paths from probe
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2012-01-03 16:00:04 +00:00
Mark Brown a2b77dcebf video: s3c-fb: Use s3c_fb_enable() to enable the framebuffer
The s3c-fb driver has a function called s3c_fb_enable() which turns on
and off the physical output. However it is only actually used in paths
which disable the screen, the enabling just writes to the register. Make
the code less confusing by ensuring that the enable also goes through
the same path.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2012-01-03 16:00:04 +00:00
Mark Brown fe05f8b1c3 video: s3c-fb: Make runtime PM functional again
The change in "video: s3c-fb: modify runtime pm functions" (commit
35784b) renders the runtime power management for the device completely
ineffectual as while it leaves runtime power management notionally
enabled a runtime power reference is held for the entire time the device
is registered meaning it will never actually do anything.

A further issue is introduced as runtime power management is added
during the system suspend path which is not something which drivers are
supposed to do and would interact poorly if there were any operations
done in the runtime power management callbacks.

While this does make things simpler (the main motivation for the
original change) it will not only cause us to use more power in the
framebuffer controller but will also prevent us entering lower power
domain and SoC wide states as we can never power down the domain
containing the device.  Since neither of these things is desirable
revert the change.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2012-01-03 16:00:04 +00:00
Timur Tabi 05342c0bdf drivers/video: fsl-diu-fb: merge fsl_diu_alloc() into map_video_memory()
Functions fsl_diu_alloc() and fsl_diu_free() were only being called by
map_video_memory() and unmap_video_memory(), respectively.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2012-01-03 15:59:09 +00:00
Timur Tabi e09a8c3a42 drivers/video: fsl-diu-fb: add default platform ops functions
The DIU driver requires some platform-specific functions to be defined,
but two them can be optional because most platforms implement them the
same way.  Functions set_gamma_table() and get_pixel_format() are only
needed because of quirks in the Freescale MPC8610 HPCD reference board.
For other boards, a generic implementation works, so we shouldn't
require the platform code to define them.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2012-01-03 15:59:09 +00:00
Timur Tabi d397e916f3 drivers/video: fsl-diu-fb: remove broken reference count enabling the display
The functions enable_lcdc() and disable_lcdc() used the variable fb_enable
to keep a reference count of when the display is enabled, but the code is
broken.  The display is always disabled when disable_lcdc(), and it is
always enabled when enable_lcdc() is called, regardless of the value of
fb_enable.  Obviously, we don't need to keep a reference count, so just
remove the variable.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2012-01-03 15:59:08 +00:00
Timur Tabi 934dbeebed drivers/video: fsl-diu-fb: set correct framebuffer flags
The DIU uses system RAM for the framebuffer, so FBINFO_VIRTFB should be set.

Since the framebuffer is in system RAM, it can be read from more quickly
than written to, so FBINFO_READS_FAST should be set.

We can also set FBINFO_PARTIAL_PAN_OK for the same reasons.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2012-01-03 15:59:08 +00:00
Timur Tabi f934fbd6ba drivers/video: fsl-diu-fb: merge init_fbinfo() into install_fb()
Function init_fbinfo() is called only from install_fb(), and it's only a few
lines long.  Plus, it ignores the return code from fb_alloc_cmap().  Merge
its contents into install_fb() and handle errors properly.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2012-01-03 15:59:08 +00:00
Benjamin Herrenschmidt 1bb0b7d215 offb: Fix setting of the pseudo-palette for >8bpp
When using a >8bpp framebuffer, offb advertises truecolor, not directcolor,
and doesn't touch the color map even if it has a corresponding access method
for the real hardware.

Thus it needs to set the pseudo-palette with all 3 components of the color,
like other truecolor framebuffers, not with copies of the color index like
a directcolor framebuffer would do.

This went unnoticed for a long time because it's pretty hard to get offb
to kick in with anything but 8bpp (old BootX under MacOS will do that and
qemu does it).

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
CC: stable@kernel.org
2012-01-03 12:09:25 +11:00
Benjamin Herrenschmidt 9b961ed21a offb: Add palette hack for qemu "standard vga" framebuffer
We rename the mach64 hack to "simple" since that's also applicable
to anything using VGA-style DAC IO ports (set to 8-bit DAC) and we
use it for qemu vga.

Note that this is keyed on a device-tree "compatible" property that
is currently only set by an upcoming version of SLOF when using the
qemu "pseries" platform. This is on purpose as other qemu ppc platforms
using OpenBIOS aren't properly setting the DAC to 8-bit at the time of
the writing of this patch.

We can fix OpenBIOS later to do that and add the required property, in
which case it will be matched by this change.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-01-03 12:09:23 +11:00
Benjamin Herrenschmidt c055fe0797 offb: Fix bug in calculating requested vram size
We used to try to request 8 times more vram than needed, which would
fail if the card has a too small BAR (observed with qemu & kvm).

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
CC: stable@kernel.org
2012-01-03 12:09:15 +11:00
Al Viro d36b691077 misc latin1 to utf8 conversions
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-01-02 13:04:55 +01: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
Axel Lin f806f9b6b8 video: omap: convert drivers/video/omap/* to use module_platform_driver()
This patch converts the drivers in drivers/video/omap/* to use the
module_platform_driver() macro which makes the code smaller and a bit
simpler.

Cc: Jonathan McDowell <noodles@earth.li>
Cc: Cory Maccarrone <darkstar6262@gmail.com>
Cc: Laurent Gonzalez <palmte.linux@free.fr>
Cc: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-02 08:51:25 +02:00
Axel Lin f990544125 video: omap: Staticise non-exported symbols
These symbols are not used outside it's driver so no need to
make the symbol global.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-01-02 08:51:25 +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
Shawn Guo ca4c22d391 video: mxsfb: convert to clk_prepare/clk_unprepare
The patch converts mxsfb driver to clk_prepare/clk_unprepare by
using helper functions clk_prepare_enable/clk_disable_unprepare.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-12-28 21:30:49 +08:00
Janusz Krzysztofik a218d19f6a omapfb: lcd_ams_delta: drive control lines over GPIO
Don't use Amstrad Delta custom I/O functions any longer, use GPIO API
instead.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-12-22 09:00:46 -08:00
Laurent Pinchart 56bba8cb42 fbdev: matroxfb: Fix compilation after fb_var_screeninfo change
Commit fb21c2f428 ("fbdev: Add FOURCC-based format configuration API")
modified the layout of the fb_var_screeninfo structure. Remove zero
fields from the static initializers in the matroxfb driver accordingly.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-12-21 02:26:11 +00:00
Ondrej Zary 66cde97da7 s3fb: fix Virge/VX
Add memory size detection for Virge/VX and small delay in mode setting (same
as in X.org driver) to fix blank screen problem.

Also adjust DTPC position to fix garbled screen in some modes (tested that
this adjustment does not break other cards - at least Trio32, Trio64V+,
Trio64V2/DX, Virge, Virge/DX).

Tested on ELSA Winner 2000AVI/3D.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-12-21 02:25:21 +00:00
Marek Vasut 396fa99e0e MXSFB: Fix driver registration
The driver should be registered with mxsfb_driver, not with mxsfb_devtype.
This caused obvious null pointer dereference and crash.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Huang Shijie <b32955@freescale.com>
Acked-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-12-21 02:24:30 +00:00
Rusty Russell 109782ec8d i810: fix module_param bool abuse.
The driver says "module_param(ddc3, bool, 0);".  But it's not a used
as a bool, it's used as a count.

Make it a bool.

Cc: Antonino Daplas <adaplas@gmail.com>
Cc: linux-fbdev@vger.kernel.org
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-12-19 20:21:55 +00:00
Axel Lin 00f1f199ea video: pnx4008: convert drivers/video/pnx4008/* to use module_platform_driver()
This patch converts the drivers in drivers/video/pnx4008/* to use the
module_platform_driver() macro which makes the code smaller and a bit
simpler.

Cc: Grigory Tolstolytkin <gtolstolytkin@ru.mvista.com>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-12-19 20:21:43 +00:00
Axel Lin 70f6255a48 video: convert mbxfb to use module_platform_driver()
This patch converts mbxfb to use the module_platform_driver() macro
which makes the code smaller and a bit simpler.

Cc: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-12-19 20:21:43 +00:00
Laurent Pinchart edd153a3e4 fbdev: sh_mobile_lcdc: Support FOURCC-based format API
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-12-19 20:07:13 +00:00
Laurent Pinchart fb21c2f428 fbdev: Add FOURCC-based format configuration API
This API will be used to support YUV frame buffer formats in a standard
way.

Last but not least, create a much needed fbdev API documentation and
document the format setting APIs.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-12-19 20:07:13 +00:00
Timur Tabi b779505282 drivers/video: fsl-diu-fb: rename "machine_data" to "data"
"machine_data" is too long and clunky, and the "machine" part doesn't make
much sense, anyway.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-12-19 20:06:41 +00:00
Jingoo Han ff8c910723 video: s3c-fb: add shadow register protect
Shadow registers should be protectd whenever the registers are
updated. Shadow registers are updated after SHADOWCON shadow
register is cleared.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-12-19 20:06:24 +00:00
Jingoo Han 35784b4315 video: s3c-fb: modify runtime pm functions
Runtime suspend and runtime resume are modified in order to
reduce the complexity and improve the usability of runtime pm.
After probe function, s3c-fb driver is not suspended until
suspend or remove is called.

The scheme is changed as follows:
 runtime_get is only called in probe and resume.
 runtime_put is only called in remove and suspend.
 open/close cannot call the runtime_get/put.

Also, runtime_susepnd/resume are just called by runtime pm,
not doing suspend/resume routine any longer. This is because
open/close cannot call the runtime_get/put; the suspend/resume
routine in runtime_suspend/resume were previously used when
open and close were called.

The name of s3c-fb dev_pm_ops is changed from s3cfb_pm_ops to
s3c_fb_pm_ops in order to use more consistent naming.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-12-19 20:06:04 +00:00
Timur Tabi ddd3d90543 drivers/video: fsl-diu-fb: merge all allocated data into one block
The Freescale DIU driver allocates multiple blocks of memory, including
multiple DMA buffers.  Merge all of these blocks into one data structure.

Specifically:

1) struct fsl_diu_data now contains everything that needs to be allocated,
except for the framebuffers themselves.  DMA'able objects are aligned correctly
within the structure.

2) struct diu_addr is no longer needed, because we don't have to manage
multiple blocks of DMA memory.

3) Since there's no diu_addr any more, macro DMA_ADDR is used to calculate
the DMA address of any field in fsl_diu_data.

4) Functions allocate_buf() and free_buf() are no longer needed, because we
now assume that dma_alloc_coherent() will allocate a page-aligned block,
and everything is properly aligned with fsl_diu_data already, so we no longer
need to align any memory blocks ourselves.

5) The "dummy" area descriptor is now defined separately from the other
five ADs, so NUM_AOIS (previously called FSL_AOI_NUM) is now set to five
instead of six.  Previously, all six were combined together to avoid a
separate call to allocate_buf() just for the dummy AD.

6) framebuffer_alloc() and framebuffer_release() are no longer used.  The
framebuffer is initialized manually.

7) Error handling is simplified since there's only one memory buffer
allocated.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-12-19 20:03:53 +00:00
Jingoo Han 2d9ae7ac48 video: s3c-fb: set missing bitmask of enabled hardware window
This patch set missing bitmask of enabled hardware window which
should be checked whenever the hardware window is enabled.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-12-19 20:03:30 +00: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
Sascha Hauer f910fb8fcd video i.MX IPU: Fix display connections
The IPU internally works on 32bit colors. It can arbitrarily map
between pixel formats and internal representation and also between
internal representation and the physical connection to the display.
The driver used to change the mapping between internal representation
and display connection depending on the user selected bpp which is
wrong. Instead, the mapping is specified by the hardware, so an
additional field in platform data is added to describe the connection
between i.MX and the display. The default for this field is RGB666
which seems to be the only configuration which works without this
patch, so I assumed that all in Kernel boards are connected this
way.
This patch has been tested on a RGB666 connected display and a
RGB888 connected display in both 16bpp and 32bpp modes.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
2011-12-08 12:59:03 +05:30
Thomas Bogendoerfer e84de0c619 MIPS: GIO bus support for SGI IP22/28
SGI IP22/IP28 machines have GIO busses for adding graphics and other
extension cards. This patch adds support for GIO driver/device
handling and converts the newport console driver to a GIO driver.

[ralf@linux-mips.org: Fixed build error caused by the modules.h -> export.h
changes.]

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
To: linux-fbdev@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/2886/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2011-12-07 22:03:44 +00:00
Manuel Lauss f59c811f8c MIPS: Alchemy: one kernel for DB1000/DB1500/DB1100
These 3 boards are very similar; with this patch a single kernel image
which runs on all three can be built.

Tested on DB1500 and DB1100.

Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com>
To: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/2872/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2011-12-07 22:02:07 +00:00
Manuel Lauss a9b71a8f0f MIPS: Alchemy: move au1200fb global functions to platform data
au1200fb calls 3 functions which have to be defined in board code.
Fix this ugliness with the introduction of platform_data.

Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com>
Cc: linux-fbdev@vger.kernel.org
To: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/2871/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2011-12-07 22:02:07 +00:00
Manuel Lauss 64cd04d0cf MIPS: Alchemy: Basic support for the DB1300 board.
Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com>
To: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/2867/
Patchwork: https://patchwork.linux-mips.org/patch/2919/
Patchwork: https://patchwork.linux-mips.org/patch/2928/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2011-12-07 22:02:06 +00:00
Manuel Lauss 809f36c6f4 MIPS: Alchemy: Au1300 SoC support
Add basic support for the Au1300 variant(s):
- New GPIO/Interrupt controller
- DBDMA ids
- USB setup
- MMC support
- enable various PSC drivers
- detection code.

Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com>
To: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/2866/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2011-12-07 22:02:05 +00:00
Paul Bolle 90802ed9c3 treewide: Fix comment and string typo 'bufer'
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-12-06 09:53:40 +01:00
Jingoo Han f940b88d3a video: s3c2410: fix checkpatch error and warnings
This patch fixes the checkpatch errors listed below:

ERROR: do not initialise statics to 0 or NULL
WARNING: Use #include <linux/io.h> instead of <asm/io.h>
WARNING: braces {} are not necessary for single statement blocks
WARNING: braces {} are not necessary for any arm of this statement
WARNING: static char array declaration should probably be static const char
WARNING: line over 80 characters
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-12-03 22:10:43 +00:00
Mark Brown 69166ed019 video: s3c-fb: Unify runtime and system PM functions
The s3c-fb driver has separate runtime and system PM functions but the
implementations are identical so far as I can tell so unify them for
simplicity.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-12-03 22:09:50 +00:00
Axel Lin 4277f2c466 video: convert drivers/video/* to use module_platform_driver()
This patch converts the drivers in drivers/video/* to use the
module_platform_driver() macro which makes the code smaller and a bit
simpler.

Cc: Ben Dooks <ben@simtec.co.uk>
Cc: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Wan ZongShun <mcuos.com@gmail.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>
Acked-by: Alexey Charkov <alchark@gmail.com>
Acked-by: Damian Hobson-Garcia <dhobsong@igel.co.jp>
Acked-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-12-03 22:08:42 +00: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
Geert Uytterhoeven 61640c295b fbdev/amifb: Use framebuffer_alloc()
Use framebuffer_alloc() instead of static fb_info and currentpar variables.
Also sanitize the error path and cleanup code (e.g. missing free_irq()).

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-12-03 22:03:32 +00:00
Geert Uytterhoeven af5761d609 fbdev/amifb: Enable Copper DMA after setting up the Copper
Else the Copper may start executing random instructions

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-12-03 22:03:32 +00:00
Geert Uytterhoeven 03c740a04c fbdev/amifb: Store monitor limits in separate __initdata variables
The static fb_info will go away soon.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-12-03 22:03:32 +00:00
Geert Uytterhoeven 423a53086c fbdev/amifb: Remove superfluous casts when assigning void *
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-12-03 22:03:32 +00:00
Geert Uytterhoeven 78ffd70e6a fbdev/amifb: Make amifb_setup() static
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-12-03 22:03:32 +00:00
Geert Uytterhoeven f1cbb17ac7 fbdev/amifb: Reorder functions to remove forward declarations
No functional changes

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-12-03 22:03:32 +00:00
Geert Uytterhoeven 769ea33145 fbdev/amifb: Fix double free
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-12-03 22:03:31 +00:00
Geert Uytterhoeven f0058b4bb0 fbdev/amifb: Correct whitespace
- indentation
  - spacing around binary operators

No functional changes

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-12-03 22:03:31 +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
Dave Martin 6054f9b83c fbdev: amba: Enable module alias autogeneration for AMBA drivers
Signed-off-by: Dave Martin <dave.martin@linaro.org>
2011-11-22 10:58:33 +00:00
Florian Tobias Schandinat 64cebcb510 Merge branch 'fbdev-for-linus' into fbdev-next 2011-11-22 01:00:31 +00:00
Zac Storer 2dfd7cf6ce Drivers: video: sbuslib: fixed a brace coding style issue
Fixed a brace coding style issue.

Signed-off-by: Zac Storer <zac.3.14159@gmail.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-11-22 01:00:24 +00:00
Zac Storer 5345010cc8 Drivers: video: controlfb: fixed a brace coding style issue
Fixed a brace coding style issue.

Signed-off-by: Zac Storer <zac.3.14159@gmail.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-11-22 01:00:16 +00:00
Daniel Drake a32839696a viafb: correct sync polarity for OLPC DCON
While the OLPC display appears to be able to handle either positive
or negative sync, the Display Controller only recognises positive sync.

This brings viafb (for XO-1.5) in line with lxfb (for XO-1) and
fixes a recent regression where the XO-1.5 DCON could no longer be
frozen. Thanks to Florian Tobias Schandinat for helping identify
the fix.

Test case: from a vt,
	echo 1 > /sys/devices/platform/dcon/freeze
should cause the current screen contents to freeze, rather than garbage being
displayed.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: stable@kernel.org
2011-11-22 00:56:17 +00:00
Florian Tobias Schandinat 50084842cc Merge branch 'for-3.2-rc' of git://gitorious.org/linux-omap-dss2/linux into fbdev-for-linus 2011-11-22 00:55:59 +00:00
Manjunathappa, Prakash 74a0efdef1 video:da8xx-fb: Disable and reset sequence on version2 of LCDC
Patch follows the disable and software reset sequence specified
in version2 to LCDC functional specification.
Without this flicker is observed on re-enabling the LCDC.

Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-11-22 00:55:53 +00:00
Kuninori Morimoto 97cab45583 fbdev: sh_mipi_dsi: fixup setup timing DSICTRL
DSICTRL should be called after all mipi settings

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-11-21 23:43:22 +00:00
Kuninori Morimoto a2065a368c fbdev: sh_mipi_dsi: fixup setup timing of SYSCONF
SYSCONF should be set after PHYCTRL

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-11-21 23:43:22 +00:00
Kuninori Morimoto c2658b70f0 fbdev: sh_mipi_dsi: fixup setup timing of sh_mipi_setup()
sh_mipi_setup() should be called after setting of CPG

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-11-21 23:43:22 +00:00
Kuninori Morimoto 7d9f88b4f4 fbdev: sh_mipi_dsi: sh_mipi has pdata instead of dev
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-11-21 23:43:22 +00:00
Kuninori Morimoto a2e6297153 fbdev: sh_mipi_dsi: add HSxxCLK support
SH MIPI manual explains the calculation method of HBP/HFP.
it is based on HSbyteCLK settings.
SH73a0 chip can use HS6divCLK/HS4divCLK for it.
This patch has compatibility to SH7372 mipi

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-11-21 23:43:22 +00:00
Kuninori Morimoto 5e47431aab fbdev: sh_mipi_dsi: add set_dot_clock() for each platform
Dot clock of SH MIPI are depends on each platform board.
This patch adds set_dot_clock() function for it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-11-21 23:43:21 +00:00
Kuninori Morimoto 08750617ba fbdev: sh_mipi_dsi: add VMLEN1/VMLEN2 calculation
VMLEN1/VMLEN2 needs blanking length which is calculated from
video image size.

The calculation methods are explained on
[SH MIPI] - [Video Mode] - [Blanking Packet setting]
But HFPLEN (= VMLEN2) is un-understandable.

For example, if SH-MIPI input was RGB888 (3byte),
output was RGB888 (3byte)
and 3lane connection, the date goes straight.

But if SH-MIPI input was RGB888 (3byte),
output was RGB565 (2byte)
and 4lane connection, it needs delay in HFPLEN.
Then (input cycle - output cycle) * lane is necessary the delay

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-11-21 23:43:21 +00:00
Kuninori Morimoto f832906a56 fbdev: sh_mipi_dsi: add sync_pulses/sync_events/burst mode
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-11-21 23:43:21 +00:00
Kuninori Morimoto 26c3d7ac21 fbdev: sh_mipi_dsi: add lane control support
SH MIPI DSI can use 0-4 lane

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-11-21 23:43:21 +00:00
Kuninori Morimoto d07a9d2a5e fbdev: sh_mipi_dsi: add SH_MIPI_DSI_BL2E flag
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-11-21 23:43:21 +00:00
Kuninori Morimoto f7b0af68bc fbdev: sh_mipi_dsi: add SH_MIPI_DSI_HFPBM flag
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-11-21 23:43:21 +00:00
Kuninori Morimoto 3c2a659936 fbdev: sh_mipi_dsi: tidyup VMCTR2 parameter expression
VMCTR2 parameter will be supported more in the future.
1 << xx style is easy to understand.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-11-21 23:43:20 +00:00
Kuninori Morimoto 32ba95c69f fbdev: sh_mipi_dsi: typo fix of SH_MIPI_DSI_HBPBM
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-11-21 23:43:20 +00:00
Kuninori Morimoto 9250741e5f fbdev: sh_mipi_dsi: tidyup dsip_clk
dsipck clock is controled by CLKDEV_ICK_ID() in clock-shxxx.
dsi0p_clk/dsi1p_clk naming is not needed.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-11-21 23:43:20 +00:00
Kuninori Morimoto 41e583c22c fbdev: sh_mobile_lcdcfb: fixup LDHAJR :: HSYNPAJ needs mask
LDHAJR register will be broken by hsync_pos without this patch

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-11-21 23:43:20 +00:00
Florian Tobias Schandinat 300e812db2 Merge commit 'v3.2-rc2' into fbdev-next 2011-11-21 23:42:06 +00:00
Greg Kroah-Hartman fe7484834b USB: convert some miscellanies drivers to use module_usb_driver()
This converts the remaining USB drivers in the kernel to use the
module_usb_driver() macro which makes the code smaller and a bit
simpler.

Added bonus is that it removes some unneeded kernel log messages about
drivers loading and/or unloading.

Cc: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Till Harbaum <till@harbaum.org>
Cc: Karsten Keil <isdn@linux-pingi.de>
Cc: Chris Ball <cjb@laptop.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Lauro Ramos Venancio <lauro.venancio@openbossa.org>
Cc: Aloisio Almeida Jr <aloisio.almeida@openbossa.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Steve Glendinning <steve.glendinning@smsc.com>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Evgeniy Polyakov <zbr@ioremap.net>
Cc: Wim Van Sebroeck <wim@iguana.be>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jesper Juhl <jj@chaosbits.net>
Cc: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Cc: Jamie Iles <jamie@jamieiles.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-18 09:52:10 -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 1c6bc89972 OMAPFB: fix compilation warnings due to missing include
Fix warnings similar to this by including module.h:

drivers/video/omap/dispc.c:276:1: warning: data definition has no type
or storage class
drivers/video/omap/dispc.c:276:1: warning: type defaults to 'int' in
declaration of 'EXPORT_SYMBOL'

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