Commit Graph
25 Commits
Author SHA1 Message Date
Alexandre Bounine 16052827d9 dmaengine/dma_slave: introduce inline wrappers
Add inline wrappers for device_prep_slave_sg() and device_prep_dma_cyclic()
interfaces to hide new parameter from current users of affected interfaces.
Convert current users to use new wrappers instead of direct calls.
Suggested by Russell King [https://lkml.org/lkml/2012/2/3/269].

Signed-off-by: Alexandre Bounine <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
2012-03-21 19:20:22 +05:30
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 <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
2011-12-08 12:59:03 +05:30
Vinod Koul e0d23ef29e Merge branch 'dma_slave_direction' into next_test_dirn
resolved conflicts:
	drivers/media/video/mx3_camera.c
2011-11-17 14:54:57 +05:30
Vinod Koul 1003cab827 media, video: move to dma_transfer_direction
fixup usage of dma direction by introducing dma_transfer_direction,
this patch moves media and video drivers to use new enum

Cc: Mauro Carvalho Chehab <[email protected]>
Cc: Paul Mundt <[email protected]>
Cc: Guennadi Liakhovetski <[email protected]>
Acked-by: Guennadi Liakhovetski <[email protected]>
Acked-by: Guennadi Liakhovetski <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
2011-10-31 09:40:15 +05:30
Wolfram Stering 8b53b7fb57 mx3fb: fix NULL pointer dereference in screen blanking.
When blanking an already blanked framebuffer, a kernel NULL pointer
dereference occurred, because mx3fb driver handles all kinds of screen
blanking (normal, vsync suspend, powerdown) in the same way.
Certain programs (Xorg X11 server) first do a normal blank, followed by
a powerdown blank, which triggered the bug.

Add an additional safeguard and make sdc_disable_channel() safe against
multiple calls independent of other logic.

Signed-off-by: Michael Thalmeier <[email protected]>
Signed-off-by: Florian Tobias Schandinat <[email protected]>
2011-10-03 15:52:32 +00:00
Laurent Pinchart 9f1b3ebbce mx3fb: use display information in info not in var for panning
We must not use any information in the passed var besides xoffset,
yoffset and vmode as otherwise applications might abuse it. Also use the
aligned fix.line_length and not the (possible) unaligned xres_virtual.

Signed-off-by: Laurent Pinchart <[email protected]>
Tested-by: Guennadi Liakhovetski <[email protected]>
2011-08-19 10:32:52 +02:00
Torben Hohn ac751efa6a console: rename acquire/release_console_sem() to console_lock/unlock()
The -rt patches change the console_semaphore to console_mutex.  As a
result, a quite large chunk of the patches changes all
acquire/release_console_sem() to acquire/release_console_mutex()

This commit makes things use more neutral function names which dont make
implications about the underlying lock.

The only real change is the return value of console_trylock which is
inverted from try_acquire_console_sem()

This patch also paves the way to switching console_sem from a semaphore to
a mutex.

[[email protected]: coding-style fixes]
[[email protected]: make console_trylock return 1 on success, per Geert]
Signed-off-by: Torben Hohn <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Greg KH <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Geert Uytterhoeven <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2011-01-26 10:50:06 +10:00
Paul Mundt 7ccbefe07e Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2010-12-22 12:56:10 +09:00
Joe Perches 3b80ffdef0 video: mx3fb: Use vsprintf extension %pR for struct resource
Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Paul Mundt <[email protected]>
2010-12-14 18:07:19 +09:00
Sascha Hauer 1b346af2f8 ARM mx3fb: check for DMA engine type
We have two dma engines in MX3 systems: The IPU and the SDMA
engine. We have to check if we got a channel from the correct
engine before proceeding with a channel.

Signed-off-by: Sascha Hauer <[email protected]>
Cc: Guennadi Liakhovetski <[email protected]>
Reviewed-by: Guennadi Liakhovetski <[email protected]>
2010-11-15 09:25:01 +01:00
Linus Walleij 058276303d DMAENGINE: extend the control command to include an arg
This adds an argument to the DMAengine control function, so that
we can later provide control commands that need some external data
passed in through an argument akin to the ioctl() operation
prototype.

[[email protected]: fix up some missed conversions]
Signed-off-by: Linus Walleij <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
2010-05-17 16:30:42 -07:00
Linus Walleij c3635c78e5 DMAENGINE: generic slave control v2
Convert the device_terminate_all() operation on the
DMA engine to a generic device_control() operation
which can now optionally support also pausing and
resuming DMA on a certain channel. Implemented for the
COH 901 318 DMAC as an example.

[[email protected]: update for timberdale]
Signed-off-by: Linus Walleij <[email protected]>
Acked-by: Mark Brown <[email protected]>
Cc: Maciej Sosnowski <[email protected]>
Cc: Nicolas Ferre <[email protected]>
Cc: Pavel Machek <[email protected]>
Cc: Li Yang <[email protected]>
Cc: Guennadi Liakhovetski <[email protected]>
Cc: Paul Mundt <[email protected]>
Cc: Ralf Baechle <[email protected]>
Cc: Haavard Skinnemoen <[email protected]>
Cc: Magnus Damm <[email protected]>
Cc: Liam Girdwood <[email protected]>
Cc: Joe Perches <[email protected]>
Cc: Roland Dreier <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
2010-03-26 16:44:01 -07:00
Alberto Panizzo b3cb537218 mx3fb: some debug and initialisation fixes
Fix the kernel oops when dev_dbg is called with mx3_fbi->txd == NULL

Fix the late initialisation of mx3fb->backlight_level.  If not, in the
chain of function started by init_fb_chan(), in __blank() call
sdc_set_brightness(mx3fb, mx3fb->backlight_level) that will shut down the
CONTRAST PWM output.

Signed-off-by: Alberto Panizzo <[email protected]>
Acked-by: Guennadi Liakhovetski <g.liakhovetski <at> gmx.de>
Cc: Sascha Hauer <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2010-02-02 18:11:21 -08:00
Guennadi Liakhovetski 20de03dae5 i.MX31: fix framebuffer locking regressions
Recent framebuffer locking patches first made affected systems unbootable,
then the dead-lock has been fixed but as of 2.6.31-rc4 the framebuffer on
mx3 machines doesn't work. Fix this.

Signed-off-by: Guennadi Liakhovetski <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Krzysztof Helt <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2009-08-07 10:39:56 -07:00
Krzysztof Helt 016d3569bf mx3fb: fix regression with uninitalized fb_info->mm_lock mutex
Remove call to the mx3fb_set_par() and the mx3fb_blank() before the
register_framebuffer().

This fixes a problem with uninitialized the fb_info->mm_lock mutex
introduced by the commit 537a1bf059 " fbdev: add mutex for fb_mmap
locking"

Signed-off-by: Krzysztof Helt <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2009-07-09 20:44:44 -07:00
Krzysztof Helt 537a1bf059 fbdev: add mutex for fb_mmap locking
Add a mutex to avoid a circular locking problem between the mm layer
semaphore and fbdev ioctl mutex through the fb_mmap() call.

Also, add mutex to all places where smem_start and smem_len fields change
so the mutex inside the fb_mmap() is actually used.  Changing of these
fields before calling the framebuffer_register() are not mutexed.

This is 2.6.31 material.  It removes one lockdep (fb_mmap() and
register_framebuffer()) but there is still another one (fb_release() and
register_framebuffer()).  It also cleans up handling of the smem_start and
smem_len fields used by mutexed section of the fb_mmap().

Signed-off-by: Krzysztof Helt <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: "Rafael J. Wysocki" <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2009-06-30 18:56:00 -07:00
Sascha Hauer 2eec8c318b mx3fb: Issue prettier log message
Without this patch we end up with a log message like
"mx3_sdc_fb mx3_sdc_fb: mx3fb: fb registered". That's two fb
too much for my taste.

Signed-off-by: Sascha Hauer <[email protected]>
2009-05-17 15:11:26 +02:00
Guennadi Liakhovetski c8a4fb472c FB: fix unsafe use of disable_irq() in mx3fb.c
mx3fb.c calls disable_irq() from a DMA callback, i.e., in an IRQ-handler
context, which has always been unsafe, and became deadly after the merge of
threaded interrupt handler support. Use disable_irq_nosync() instead.

Signed-off-by: Guennadi Liakhovetski <[email protected]>
Signed-off-by: Sascha Hauer <[email protected]>
2009-05-13 09:46:19 +02:00
Sascha Hauer b09de4209d mx3fb: Fix compilation with CONFIG_PM
Signed-off-by: Sascha Hauer <[email protected]>
2009-05-05 09:37:17 +02:00
Guennadi Liakhovetski d88ca815b5 fbdev: i.MX31: fix panning, error handling, clean up
1. check for errors returned from clk_get()
2. fix "Unbalanced enable for IRQ 160"
3. fix transmit descriptor handling in panning
4. clean frame buffer on blank - useful for OLED displays
5. formatting clean up

Signed-off-by: Guennadi Liakhovetski <[email protected]>
Cc: Dan Williams <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Krzysztof Helt <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2009-04-07 08:31:09 -07:00
Russell King 3879f5d6f0 Merge branch 'imx-fb-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx into devel
Conflicts:

	drivers/video/mx3fb.c
2009-03-16 22:28:04 +00:00
Sascha Hauer 9eb2eb8c40 MX31 clkdev support
This patch adds clkdev support for i.MX31. This is done in a
similar way done previously for i.MX27

Signed-off-by: Sascha Hauer <[email protected]>
2009-03-13 10:34:32 +01:00
Guennadi Liakhovetski 6e1588cbd8 i.MX31: framebuffer driver
This is a framebuffer driver for i.MX31 SoCs. It only supports synchronous
displays, vertical panning supported, no overlay support.

Signed-off-by: Guennadi Liakhovetski <[email protected]>
Acked-by: Sascha Hauer <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
2009-02-26 14:00:58 -07:00
Dan Williams 1febd91acf Revert "i.MX31: framebuffer driver"
This reverts commit 86528da229.

This version of the patch was tab-to-space corrupted before
application.

Signed-off-by: Dan Williams <[email protected]>
2009-02-26 13:58:37 -07:00
Guennadi Liakhovetski 86528da229 i.MX31: framebuffer driver
This is a framebuffer driver for i.MX31 SoCs. It only supports synchronous
displays, vertical panning supported, no overlay support.

Acked-by: Sascha Hauer <[email protected]>
Signed-off-by: Guennadi Liakhovetski <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
2009-01-21 10:32:34 -07:00