profile/ivi/kernel-x86-ivi.git
11 years agofb: reorder the lock sequence to fix potential dead lock
Gu Zheng [Tue, 5 Nov 2013 10:00:57 +0000 (18:00 +0800)]
fb: reorder the lock sequence to fix potential dead lock

Following commits:

50e244cc79 fb: rework locking to fix lock ordering on takeover
e93a9a8687 fb: Yet another band-aid for fixing lockdep mess
054430e773 fbcon: fix locking harder

reworked locking to fix related lock ordering on takeover, and introduced console_lock
into fbmem, but it seems that the new lock sequence(fb_info->lock ---> console_lock)
is against with the one in console_callback(console_lock ---> fb_info->lock), and leads to
a potential dead lock as following:

[  601.079000] ======================================================
[  601.079000] [ INFO: possible circular locking dependency detected ]
[  601.079000] 3.11.0 #189 Not tainted
[  601.079000] -------------------------------------------------------
[  601.079000] kworker/0:3/619 is trying to acquire lock:
[  601.079000]  (&fb_info->lock){+.+.+.}, at: [<ffffffff81397566>] lock_fb_info+0x26/0x60
[  601.079000]
but task is already holding lock:
[  601.079000]  (console_lock){+.+.+.}, at: [<ffffffff8141aae3>] console_callback+0x13/0x160
[  601.079000]
which lock already depends on the new lock.

[  601.079000]
the existing dependency chain (in reverse order) is:
[  601.079000]
-> #1 (console_lock){+.+.+.}:
[  601.079000]        [<ffffffff810dc971>] lock_acquire+0xa1/0x140
[  601.079000]        [<ffffffff810c6267>] console_lock+0x77/0x80
[  601.079000]        [<ffffffff81399448>] register_framebuffer+0x1d8/0x320
[  601.079000]        [<ffffffff81cfb4c8>] efifb_probe+0x408/0x48f
[  601.079000]        [<ffffffff8144a963>] platform_drv_probe+0x43/0x80
[  601.079000]        [<ffffffff8144853b>] driver_probe_device+0x8b/0x390
[  601.079000]        [<ffffffff814488eb>] __driver_attach+0xab/0xb0
[  601.079000]        [<ffffffff814463bd>] bus_for_each_dev+0x5d/0xa0
[  601.079000]        [<ffffffff81447e6e>] driver_attach+0x1e/0x20
[  601.079000]        [<ffffffff81447a07>] bus_add_driver+0x117/0x290
[  601.079000]        [<ffffffff81448fea>] driver_register+0x7a/0x170
[  601.079000]        [<ffffffff8144a10a>] __platform_driver_register+0x4a/0x50
[  601.079000]        [<ffffffff8144a12d>] platform_driver_probe+0x1d/0xb0
[  601.079000]        [<ffffffff81cfb0a1>] efifb_init+0x273/0x292
[  601.079000]        [<ffffffff81002132>] do_one_initcall+0x102/0x1c0
[  601.079000]        [<ffffffff81cb80a6>] kernel_init_freeable+0x15d/0x1ef
[  601.079000]        [<ffffffff8166d2de>] kernel_init+0xe/0xf0
[  601.079000]        [<ffffffff816914ec>] ret_from_fork+0x7c/0xb0
[  601.079000]
-> #0 (&fb_info->lock){+.+.+.}:
[  601.079000]        [<ffffffff810dc1d8>] __lock_acquire+0x1e18/0x1f10
[  601.079000]        [<ffffffff810dc971>] lock_acquire+0xa1/0x140
[  601.079000]        [<ffffffff816835ca>] mutex_lock_nested+0x7a/0x3b0
[  601.079000]        [<ffffffff81397566>] lock_fb_info+0x26/0x60
[  601.079000]        [<ffffffff813a4aeb>] fbcon_blank+0x29b/0x2e0
[  601.079000]        [<ffffffff81418658>] do_blank_screen+0x1d8/0x280
[  601.079000]        [<ffffffff8141ab34>] console_callback+0x64/0x160
[  601.079000]        [<ffffffff8108d855>] process_one_work+0x1f5/0x540
[  601.079000]        [<ffffffff8108e04c>] worker_thread+0x11c/0x370
[  601.079000]        [<ffffffff81095fbd>] kthread+0xed/0x100
[  601.079000]        [<ffffffff816914ec>] ret_from_fork+0x7c/0xb0
[  601.079000]
other info that might help us debug this:

[  601.079000]  Possible unsafe locking scenario:

[  601.079000]        CPU0                    CPU1
[  601.079000]        ----                    ----
[  601.079000]   lock(console_lock);
[  601.079000]                                lock(&fb_info->lock);
[  601.079000]                                lock(console_lock);
[  601.079000]   lock(&fb_info->lock);
[  601.079000]
 *** DEADLOCK ***

so we reorder the lock sequence the same as it in console_callback() to
avoid this issue. And following Tomi's suggestion, fix these similar
issues all in fb subsystem.

Signed-off-by: Gu Zheng <guz.fnst@cn.fujitsu.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agofbdev: shmobile-lcdcfb: Convert to clk_prepare/unprepare
Laurent Pinchart [Mon, 28 Oct 2013 22:49:29 +0000 (23:49 +0100)]
fbdev: shmobile-lcdcfb: Convert to clk_prepare/unprepare

Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and
clk_disable_unprepare() to get ready for the migration to the common
clock framework.

Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: linux-fbdev@vger.kernel.org
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agofbdev: shmobile-hdmi: Convert to clk_prepare/unprepare
Laurent Pinchart [Mon, 28 Oct 2013 22:49:28 +0000 (23:49 +0100)]
fbdev: shmobile-hdmi: Convert to clk_prepare/unprepare

Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and
clk_disable_unprepare() to get ready for the migration to the common
clock framework.

Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: linux-fbdev@vger.kernel.org
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoomapdss: Add new panel driver for Topolly td028ttec1 LCD.
Marek Belisko [Tue, 29 Oct 2013 22:25:40 +0000 (23:25 +0100)]
omapdss: Add new panel driver for Topolly td028ttec1 LCD.

Signed-off-by: Marek Belisko <marek@goldelico.com>
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
[tomi.valkeinen@ti.com: made a few funcs static]
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: exynos_mipi_dsi: Unlock the mutex before returning
Sachin Kamat [Fri, 25 Oct 2013 05:12:44 +0000 (10:42 +0530)]
video: exynos_mipi_dsi: Unlock the mutex before returning

Mutex should be unlocked before returning. Fixes mutex lock-unlock
imbalance issue.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: da8xx-fb: remove unwanted define
Manish Badarkhe [Thu, 10 Oct 2013 04:28:31 +0000 (09:58 +0530)]
video: da8xx-fb: remove unwanted define

Remove unwanted define "WSI_TIMEOUT" present in code.

Signed-off-by: Manish Badarkhe <badarkhe.manish@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: Remove unnecessary semicolons
Joe Perches [Tue, 8 Oct 2013 23:23:24 +0000 (16:23 -0700)]
video: Remove unnecessary semicolons

These aren't necessary after switch, for, and if blocks.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agosimplefb: use write-combined remapping
David Herrmann [Wed, 2 Oct 2013 14:58:39 +0000 (16:58 +0200)]
simplefb: use write-combined remapping

Framebuffers shouldn't be cached and it is usually very uncommon to read
them. Therefore, use ioremap_wc() to get significant speed improvements on
systems which provide it. On all other systems it's aliased to
ioremap_nocache() which is also fine.

Reported-by: Tom Gundersen <teg@jklm.no>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Tested-by: Tom Gundersen <teg@jklm.no>
Tested-by: Alexandre Courbot <acourbot@nvidia.com>
Tested-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agosimplefb: fix unmapping fb during destruction
David Herrmann [Wed, 2 Oct 2013 14:58:38 +0000 (16:58 +0200)]
simplefb: fix unmapping fb during destruction

Unfortunately, fbdev does not create its own "struct device" for
framebuffers. Instead, it attaches to the device of the parent layer. This
has the side-effect that devm_* managed resources are not cleaned up on
framebuffer-destruction but rather during destruction of the
parent-device. In case of fbdev this might be too late, though.
remove_conflicting_framebuffer() may remove fbdev devices but keep the
parent device as it is.

Therefore, we now use plain ioremap() and unmap the framebuffer in the
fb_destroy() callback. Note that we must not free the device here as this
might race with the parent-device removal. Instead, we rely on
unregister_framebuffer() as barrier and we're safe.

Reported-by: Tom Gundersen <teg@jklm.no>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: connector-dvi: fix releasing i2c_adapter
Tomi Valkeinen [Fri, 18 Oct 2013 07:46:33 +0000 (10:46 +0300)]
OMAPDSS: connector-dvi: fix releasing i2c_adapter

i2c adapter is not released correctly on error paths. Fix this.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: DSI: fix perf measuring ifdefs
Tomi Valkeinen [Wed, 2 Oct 2013 11:41:24 +0000 (14:41 +0300)]
OMAPDSS: DSI: fix perf measuring ifdefs

DSI performance measuring code is meant to be explicitly enabled at
compile time. At some point in time the perf code was changed to be
enabled if DEBUG is defined. This is not right, so this patch fixes it.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoframebuffer: Use fb_<level>
Joe Perches [Fri, 20 Sep 2013 01:35:55 +0000 (18:35 -0700)]
framebuffer: Use fb_<level>

Neaten and shorten the code using the new fb_<level> macros.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoframebuffer: Add fb_<level> convenience logging macros
Joe Perches [Fri, 20 Sep 2013 01:35:54 +0000 (18:35 -0700)]
framebuffer: Add fb_<level> convenience logging macros

Add fb_<level> convenience macros for emitting the
"fb%d: ", struct fb_info->node value.

Neatens and shortens the code a bit.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoefifb: prevent null-deref when iterating dmi_list
James Bates [Wed, 2 Oct 2013 16:43:39 +0000 (18:43 +0200)]
efifb: prevent null-deref when iterating dmi_list

The dmi_list array is initialized using gnu designated initializers, and
therefore may contain fewer explicitly defined entries as there are
elements in it. This is because the enum above with M_xyz constants
contains more items than the designated initializer. Those elements not
explicitly initialized are implicitly set to 0.

Now efifb_setup() loops through all these array elements, and performs
a strcmp on each item. For non explicitly initialized elements this will
be a null pointer:

This patch swaps the check order in the if statement, thus checks first
whether dmi_list[i].base is null.

Signed-off-by: James Bates <james.h.bates@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agofbdev: fix error return code in metronomefb_probe()
Wei Yongjun [Sat, 12 Oct 2013 06:25:23 +0000 (14:25 +0800)]
fbdev: fix error return code in metronomefb_probe()

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: xilinxfb: Fix for "Use standard variable name convention"
Stephen Rothwell [Mon, 28 Oct 2013 14:18:22 +0000 (01:18 +1100)]
video: xilinxfb: Fix for "Use standard variable name convention"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Tested-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: Fix de_level in videomode_to_omap_video_timings()
Roel Kluin [Sun, 13 Oct 2013 22:44:33 +0000 (00:44 +0200)]
OMAPDSS: Fix de_level in videomode_to_omap_video_timings()

In videomode_to_omap_video_timings, de_level is always set to HIGH
regardless of what the vm->flags says. Fix this to set it to high or low
according to vm->flags.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
[tomi.valkeinen@ti.com: rewrote the desc]
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: xilinxfb: Simplify error path
Michal Simek [Thu, 10 Oct 2013 06:30:22 +0000 (08:30 +0200)]
video: xilinxfb: Simplify error path

devm_iounmap is called automatically that's why remove it from the code
dev_set_drvdata(dev, NULL) is called by generic code
after device_release or on probe failure.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: xilinxfb: Use devm_kzalloc instead of kzalloc
Michal Simek [Thu, 10 Oct 2013 06:30:21 +0000 (08:30 +0200)]
video: xilinxfb: Use devm_kzalloc instead of kzalloc

Simplify driver probe and release function.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: xilinxfb: Use standard variable name convention
Michal Simek [Thu, 10 Oct 2013 06:30:20 +0000 (08:30 +0200)]
video: xilinxfb: Use standard variable name convention

s/op/pdev/ in xilinxfb_of_probe().
No functional chagnes.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agohyperv-fb: add blanking support
Gerd Hoffmann [Wed, 2 Oct 2013 11:55:11 +0000 (13:55 +0200)]
hyperv-fb: add blanking support

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agohyperv-fb: add pci stub
Gerd Hoffmann [Wed, 2 Oct 2013 11:55:10 +0000 (13:55 +0200)]
hyperv-fb: add pci stub

This patch adds a pci stub driver to hyper-fb.  The hyperv framebuffer
driver will bind to the pci device then, so linux kernel and userspace
know there is a proper kernel driver for the device active.  lspci shows
this for example:

[root@dhcp231 ~]# lspci -vs8
00:08.0 VGA compatible controller: Microsoft Corporation Hyper-V virtual
VGA (prog-if 00 [VGA controller])
        Flags: bus master, fast devsel, latency 0, IRQ 11
        Memory at f8000000 (32-bit, non-prefetchable) [size=64M]
        Expansion ROM at <unassigned> [disabled]
        Kernel driver in use: hyperv_fb

Another effect is that the xorg vesa driver will not attach to the
device and thus the Xorg server will automatically use the fbdev
driver instead.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: HDMI: Correctly compare timings
Richard Röjfors [Thu, 3 Oct 2013 18:45:19 +0000 (20:45 +0200)]
OMAPDSS: HDMI: Correctly compare timings

There is currently a copy and paste error where the hdmi vsync timings are not
compared correctly, this patch fixes this.

Signed-off-by: Richard Röjfors <richard.rojfors@gmail.com>
[tomi.valkeinen@ti.com: fixed to apply on top of latest tree]
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoomapdss: HDMI: move common functions to a separate file
Archit Taneja [Tue, 17 Sep 2013 06:13:15 +0000 (11:43 +0530)]
omapdss: HDMI: move common functions to a separate file

The OMAP4 HDMI encoder driver(hdmi4.c) contains timings tables, and helper
functions which can be used as is by the OMAP5/DRA7x encoder driver. Move these
to hdmi_common.c so that it's not replicated in the future.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoomapdss: OMAP4: HDMI: remove unnecessary edid macros
Archit Taneja [Fri, 6 Sep 2013 13:05:44 +0000 (18:35 +0530)]
omapdss: OMAP4: HDMI: remove unnecessary edid macros

The hdmi4 driver has edid macros that aren't used at all. Remove them.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoomapdss: HDMI: Rename hdmi driver files to nicer names
Archit Taneja [Thu, 12 Sep 2013 12:15:57 +0000 (17:45 +0530)]
omapdss: HDMI: Rename hdmi driver files to nicer names

Replace the ti_hdmi_4xxx* notation for OMAP4 HDMI driver with hdmi4. Rename
the hdmi.c encoder driver to hdmi4.c. Rename ti_hdmi.h to hdmi.h

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoomapdss: HDMI: add HDMI wrapper IRQ flags
Archit Taneja [Tue, 10 Sep 2013 11:04:02 +0000 (16:34 +0530)]
omapdss: HDMI: add HDMI wrapper IRQ flags

Add flags for the interrupts present in HDMI wrapper block, these will be used
to configure HDMI_IRQENABLE_SET/CLEAR and HDMI_IRQSTATUS registers.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoomapdss: HDMI: Clean up the header files
Archit Taneja [Thu, 12 Sep 2013 12:37:49 +0000 (18:07 +0530)]
omapdss: HDMI: Clean up the header files

Keep only OMAP4 HDMI core block related structs and enums in ti_hdmi_4xxx_ip.h,
move the rest to ti_hdmi.h. This holds all library specific data which will be
shared between OMAP4 and OMAP5/DRA7x HDMI encoder drivers.

Move the duplicate register read/write/wait_for_bit_change functions in the hdmi
library files to ti_hdmi.h

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoomapdss: HDMI: remove hdmi_ip_data struct
Archit Taneja [Tue, 8 Oct 2013 08:52:03 +0000 (14:22 +0530)]
omapdss: HDMI: remove hdmi_ip_data struct

The struct hdmi_ip_data contains information related to HDMI wrapper, PLL, PHY
and core sub-blocks. Now that each of these sub blocks has it's own struct,
hdmi_ip_data serves no purpose. The mutex lock in the struct was also never
used.

Remove this struct to make things cleaner.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoomapdss: HDMI: Use OMAP4 HDMI core functions directly and remove hdmi_ip_ops
Archit Taneja [Tue, 8 Oct 2013 08:46:05 +0000 (14:16 +0530)]
omapdss: HDMI: Use OMAP4 HDMI core functions directly and remove hdmi_ip_ops

After removing wrapper, pll and phy funcs from ti_hdmi_4xxx_ip.c, we are left
with OMAP4 HDMI core functions. Use these directly in hdmi.c rather than using
hdmi_ip_ops. Rename the core functions with a 'hdmi4' suffix.

We used to have hdmi_ip_ops so that one could support HDMI within a TI SoC which
had a non-DSS display subsytem. This however never got put into use, and hence
these ops aren't useful any more.

The DT/hwmod information for hdmi doesn't split the address space according to
the required sub blocks. Keep the address offset and size information in the
driver for now. This will be removed when the driver gets the information
correctly from DT/hwmod.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoomapdss: HDMI: create a PHY library
Archit Taneja [Tue, 8 Oct 2013 07:37:00 +0000 (13:07 +0530)]
omapdss: HDMI: create a PHY library

HDMI PHY is a block common to DSS in OMAP4, OMAP5 and DRA7x. Move the
existing functions from ti_hdmi_4xxx_ip.c to a separate file. These funcs are
called directly from the hdmi driver rather than hdmi_ip_ops function pointer
calls.

Add the PHY library function declarations to ti_hdmi.h. These will be shared
amongst the omap4/5 hdmi platform drivers. Remove the PHY function pointer ops
from the ti_hdmi_ip_ops struct.

The DT/hwmod information for hdmi doesn't split the address space according to
the required sub blocks. Keep the address offset and size information in the
driver for now. This will be removed when the driver gets the information
correctly from DT/hwmod.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoomapdss: HDMI: create a PLL library
Archit Taneja [Tue, 8 Oct 2013 07:25:26 +0000 (12:55 +0530)]
omapdss: HDMI: create a PLL library

HDMI PLL is a block common to DSS in OMAP4, OMAP5 and DRA7x. Move the
existing PLL functions from ti_hdmi_4xxx_ip.c and hdmi.c to a separate file.
These funcs are called directly from the hdmi driver rather than hdmi_ip_ops
function pointer calls.

Add the PLL library function declarations to ti_hdmi.h. These will be shared
amongst the omap4/5 hdmi platform drivers. Remove the PLL function pointer ops
from the ti_hdmi_ip_ops struct. These will be shared amongst the omap4/5 hdmi
platform drivers and other libraries.

The DT/hwmod information for hdmi doesn't split the address space according to
the required sub blocks. Keep the address offset and size information in the
driver for now. This will be removed when the driver gets the information
correctly from DT/hwmod.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoomapdss: HDMI: create a Wrapper library
Archit Taneja [Tue, 6 Aug 2013 09:26:55 +0000 (14:56 +0530)]
omapdss: HDMI: create a Wrapper library

HDMI wrapper is a block common to DSS in OMAP4, OMAP5 and DRA7x. Move the
existing functions from ti_hdmi_4xxx_ip.c to a separate file. These funcs are
called directly from the hdmi driver rather than hdmi_ip_ops funtion pointer
calls.

Add new wrapper funcs which can be used by other hdmi libraries like core, pll
and phy. Move some of the enums, structs and funcs related to the wrapper from
ti_hdmi_4xxx_ip.h to ti_hdmi.h. These will be shared amongst the omap4/5 hdmi
platform drivers and other libraries.

The old hdmi_wp_init() is removed since it didn't do anything. Timing parameters
like interlace, hsync_level and vsync_level weren't copied correctly before.
Those are copied correctly now.

The DT/hwmod information for hdmi doesn't split the address space according to
the required sub blocks. Keep the address offset and size information in the
driver for now. This will be removed when the driver gets the information
correctly from DT/hwmod.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agosimplefb: print some info about the registered fb
Tom Gundersen [Sat, 7 Sep 2013 14:08:35 +0000 (16:08 +0200)]
simplefb: print some info about the registered fb

This is similar to the output printed by efifb.

Signed-off-by: Tom Gundersen <teg@jklm.no>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Cc: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: wmt_ge_rops: Fix a trivial typo
Sachin Kamat [Mon, 30 Sep 2013 08:50:20 +0000 (14:20 +0530)]
video: wmt_ge_rops: Fix a trivial typo

Add a missing closing brace for email address.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Alexey Charkov <alchark@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: wmt_ge_rops: Remove redundant of_match_ptr
Sachin Kamat [Mon, 30 Sep 2013 08:45:33 +0000 (14:15 +0530)]
video: wmt_ge_rops: Remove redundant of_match_ptr

The data structure of_match_ptr() protects is always compiled in.
Hence of_match_ptr() is not needed.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Alexey Charkov <alchark@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: wm8505fb: Remove redundant of_match_ptr
Sachin Kamat [Mon, 30 Sep 2013 08:45:32 +0000 (14:15 +0530)]
video: wm8505fb: Remove redundant of_match_ptr

The data structure of_match_ptr() protects is always compiled in.
Hence of_match_ptr() is not needed.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Ed Spiridonov <edo.rus@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: ssd1307fb: Remove redundant of_match_ptr
Sachin Kamat [Mon, 30 Sep 2013 08:45:31 +0000 (14:15 +0530)]
video: ssd1307fb: Remove redundant of_match_ptr

The data structure of_match_ptr() protects is always compiled in.
Hence of_match_ptr() is not needed.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: amba-clcd: Remove unnecessary amba_set_drvdata()
Michal Simek [Thu, 3 Oct 2013 09:46:31 +0000 (11:46 +0200)]
video: amba-clcd: Remove unnecessary amba_set_drvdata()

Driver core clears the driver data to NULL after device_release
or on probe failure, so just remove it from here.

Driver core change:
"device-core: Ensure drvdata = NULL when no driver is bound"
(sha1: 0998d0631001288a5974afc0b2a5f568bcdecb4d)

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agofbdev: sh_mobile_hdmi: Use devm_kzalloc()
Sangjung Woo [Thu, 3 Oct 2013 14:04:27 +0000 (23:04 +0900)]
fbdev: sh_mobile_hdmi: Use devm_kzalloc()

Use devm_kzalloc() instead of kzalloc() in order to be free
automatically. This makes cleanup paths more simple.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoVideo / au1100fb: Use module_platform_driver() to simplify code
Hanjun Guo [Sun, 29 Sep 2013 05:32:10 +0000 (13:32 +0800)]
Video / au1100fb: Use module_platform_driver() to simplify code

Convert to module_platform_driver() to simplify code.

Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoVideo / au1200fb: Use module_platform_driver() to simplify code
Hanjun Guo [Sun, 29 Sep 2013 05:32:09 +0000 (13:32 +0800)]
Video / au1200fb: Use module_platform_driver() to simplify code

Convert to module_platform_driver() to simplify code.

Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoVideo / bf54x-lq043fb: Use module_platform_driver() to simplify code
Hanjun Guo [Sun, 29 Sep 2013 05:32:08 +0000 (13:32 +0800)]
Video / bf54x-lq043fb: Use module_platform_driver() to simplify code

Convert to module_platform_driver() to simplify code.

Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoVideo / broadsheetfb: Use module_platform_driver() to simplify code
Hanjun Guo [Sun, 29 Sep 2013 05:32:07 +0000 (13:32 +0800)]
Video / broadsheetfb: Use module_platform_driver() to simplify code

Convert to module_platform_driver() to simplify code.

Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoVideo / cobalt_lcdfb: Use module_platform_driver() to simplify code
Hanjun Guo [Sun, 29 Sep 2013 05:32:06 +0000 (13:32 +0800)]
Video / cobalt_lcdfb: Use module_platform_driver() to simplify code

Convert to module_platform_driver() to simplify code.

Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoVideo / da8xx-fb: Use module_platform_driver() to simplify code
Hanjun Guo [Sun, 29 Sep 2013 05:32:05 +0000 (13:32 +0800)]
Video / da8xx-fb: Use module_platform_driver() to simplify code

Convert to module_platform_driver() to simplify code.

Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoVideo / jz4740_fb: Use module_platform_driver() to simplify code
Hanjun Guo [Sun, 29 Sep 2013 05:32:04 +0000 (13:32 +0800)]
Video / jz4740_fb: Use module_platform_driver() to simplify code

Convert to module_platform_driver() to simplify code.

Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoVideo / metronomefb: Use module_platform_driver() to simplify code
Hanjun Guo [Sun, 29 Sep 2013 05:32:03 +0000 (13:32 +0800)]
Video / metronomefb: Use module_platform_driver() to simplify code

Convert to module_platform_driver() to simplify code.

Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoVideo / bfin-t350mcqb-fb: Use module_platform_driver() to simplify code
Hanjun Guo [Sun, 29 Sep 2013 05:32:02 +0000 (13:32 +0800)]
Video / bfin-t350mcqb-fb: Use module_platform_driver() to simplify code

Convert to module_platform_driver() to simplify code.

Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoVideo / hecubafb: Use module_platform_driver() to simplify code
Hanjun Guo [Sun, 29 Sep 2013 05:32:01 +0000 (13:32 +0800)]
Video / hecubafb: Use module_platform_driver() to simplify code

Convert to module_platform_driver() to simplify code.

Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: HDMI: OMAP4: Complete dumping of core registers
Ricardo Neri [Fri, 13 Sep 2013 10:29:38 +0000 (15:59 +0530)]
OMAPDSS: HDMI: OMAP4: Complete dumping of core registers

Add missing register entries when dumping the core.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: HDMI: OMAP4: Complete register definitions for core
Ricardo Neri [Fri, 13 Sep 2013 10:29:37 +0000 (15:59 +0530)]
OMAPDSS: HDMI: OMAP4: Complete register definitions for core

Add missing register definitions; mainly for colorspace conversion, video
timing and interrupt handling.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: HDMI: OMAP4: Rename the HDMI_CORE_CTRL1 register
Ricardo Neri [Fri, 13 Sep 2013 10:29:36 +0000 (15:59 +0530)]
OMAPDSS: HDMI: OMAP4: Rename the HDMI_CORE_CTRL1 register

Rename the register to be aligned with the HDMI_CORE_SYS naming convention.
Also, update the naming of the #defines used for its fields.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: HDMI: OMAP4: Complete dumping of DPLL registers
Ricardo Neri [Fri, 13 Sep 2013 10:29:35 +0000 (15:59 +0530)]
OMAPDSS: HDMI: OMAP4: Complete dumping of DPLL registers

Add the spread spectrum clock configuration registers to the DPLL dump.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: HDMI: OMAP4: Complete register definitions for DPLL
Ricardo Neri [Fri, 13 Sep 2013 10:29:34 +0000 (15:59 +0530)]
OMAPDSS: HDMI: OMAP4: Complete register definitions for DPLL

Add missing register definitions for spread spectrum clocking.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: HDMI: OMAP4: Complete dumping of wrapper registers
Ricardo Neri [Fri, 13 Sep 2013 10:29:33 +0000 (15:59 +0530)]
OMAPDSS: HDMI: OMAP4: Complete dumping of wrapper registers

Add missing registers when dumping the HDMI wrapper. Also, order the dump by
offset to improve readability.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: HDMI: OMAP4: Complete register definitions for wrapper
Ricardo Neri [Fri, 13 Sep 2013 10:29:32 +0000 (15:59 +0530)]
OMAPDSS: HDMI: OMAP4: Complete register definitions for wrapper

Add definitions for missing registers in the HDMI wrapper. Also, order
the registers by offset to improve readability.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: atmel_lcdfb: add device tree suport
Jean-Christophe PLAGNIOL-VILLARD [Thu, 28 Mar 2013 18:05:47 +0000 (02:05 +0800)]
video: atmel_lcdfb: add device tree suport

get display timings from device tree
Use videomode helpers to get display timings and configurations from
device tree

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: atmel_lcdfb: pass the pdata as params
Jean-Christophe PLAGNIOL-VILLARD [Thu, 28 Mar 2013 18:05:47 +0000 (02:05 +0800)]
video: atmel_lcdfb: pass the pdata as params

so we can use have list gpio as example (probe via DT)

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: atmel_lcdfb: introduce atmel_lcdfb_power_control
Jean-Christophe PLAGNIOL-VILLARD [Thu, 11 Apr 2013 09:54:04 +0000 (17:54 +0800)]
video: atmel_lcdfb: introduce atmel_lcdfb_power_control

to simplify the check on the presence of the callback

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: atmel_lcdfb: fix platform data struct
Jean-Christophe PLAGNIOL-VILLARD [Thu, 28 Mar 2013 14:53:42 +0000 (22:53 +0800)]
video: atmel_lcdfb: fix platform data struct

Today we mix pdata and drivers data in the struct atmel_lcdfb_info
Fix it and introduce a new struct atmel_lcdfb_pdata for platform data only

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: xilinxfb: Remove redundant dev_set_drvdata
Sachin Kamat [Fri, 20 Sep 2013 06:32:24 +0000 (12:02 +0530)]
video: xilinxfb: Remove redundant dev_set_drvdata

Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: tcx: Remove redundant dev_set_drvdata
Sachin Kamat [Fri, 20 Sep 2013 06:32:23 +0000 (12:02 +0530)]
video: tcx: Remove redundant dev_set_drvdata

Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: sunxvr1000: Remove redundant dev_set_drvdata
Sachin Kamat [Fri, 20 Sep 2013 06:32:22 +0000 (12:02 +0530)]
video: sunxvr1000: Remove redundant dev_set_drvdata

Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: platinumfb: Remove redundant dev_set_drvdata
Sachin Kamat [Fri, 20 Sep 2013 06:32:21 +0000 (12:02 +0530)]
video: platinumfb: Remove redundant dev_set_drvdata

Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: p9100: Remove redundant dev_set_drvdata
Sachin Kamat [Fri, 20 Sep 2013 06:32:20 +0000 (12:02 +0530)]
video: p9100: Remove redundant dev_set_drvdata

Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: ffb: Remove redundant dev_set_drvdata
Sachin Kamat [Fri, 20 Sep 2013 06:32:19 +0000 (12:02 +0530)]
video: ffb: Remove redundant dev_set_drvdata

Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: cg6: Remove redundant dev_set_drvdata
Sachin Kamat [Fri, 20 Sep 2013 06:32:18 +0000 (12:02 +0530)]
video: cg6: Remove redundant dev_set_drvdata

Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: cg3: Remove redundant dev_set_drvdata
Sachin Kamat [Fri, 20 Sep 2013 06:32:17 +0000 (12:02 +0530)]
video: cg3: Remove redundant dev_set_drvdata

Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: cg14: Remove redundant dev_set_drvdata
Sachin Kamat [Fri, 20 Sep 2013 06:32:16 +0000 (12:02 +0530)]
video: cg14: Remove redundant dev_set_drvdata

Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: bw2: Remove redundant dev_set_drvdata
Sachin Kamat [Fri, 20 Sep 2013 06:32:15 +0000 (12:02 +0530)]
video: bw2: Remove redundant dev_set_drvdata

Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: amifb: Remove redundant dev_set_drvdata
Sachin Kamat [Fri, 20 Sep 2013 06:32:14 +0000 (12:02 +0530)]
video: amifb: Remove redundant dev_set_drvdata

Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: mb862xx: Remove redundant dev_set_drvdata
Sachin Kamat [Fri, 20 Sep 2013 06:32:13 +0000 (12:02 +0530)]
video: mb862xx: Remove redundant dev_set_drvdata

Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: leo: Remove redundant dev_set_drvdata
Sachin Kamat [Fri, 20 Sep 2013 06:32:12 +0000 (12:02 +0530)]
video: leo: Remove redundant dev_set_drvdata

Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: grvga: Remove redundant dev_set_drvdata
Sachin Kamat [Fri, 20 Sep 2013 06:32:11 +0000 (12:02 +0530)]
video: grvga: Remove redundant dev_set_drvdata

Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Kristoffer Glembo <kristoffer@gaisler.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: atmel_lcdfb: Remove redundant dev_set_drvdata
Sachin Kamat [Fri, 20 Sep 2013 06:32:10 +0000 (12:02 +0530)]
video: atmel_lcdfb: Remove redundant dev_set_drvdata

Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: jz4740-fb: Use clk_prepare_enable/clk_disable_unprepare
Lars-Peter Clausen [Sun, 22 Sep 2013 10:01:49 +0000 (12:01 +0200)]
video: jz4740-fb: Use clk_prepare_enable/clk_disable_unprepare

In preparation to switching the jz4740 clk driver to the common clk framework
update the clk enable/disable calls to clk_prepare_enable/clk_disable_unprepare.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: jz4740-fb: Fix LCD_CMD bit definitions
Lars-Peter Clausen [Sun, 22 Sep 2013 10:01:48 +0000 (12:01 +0200)]
video: jz4740-fb: Fix LCD_CMD bit definitions

Fix the bit offsets for the LCD_CMD definitions.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoframebuffer: arkfb: Fix framebugger typo
Joe Perches [Fri, 20 Sep 2013 01:53:13 +0000 (18:53 -0700)]
framebuffer: arkfb: Fix framebugger typo

s/framebugger/framebuffer/

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: riva: Remove incorrect checks
Sachin Kamat [Wed, 25 Sep 2013 12:02:59 +0000 (17:32 +0530)]
video: riva: Remove incorrect checks

'xoffset' and 'yoffset' are unsigned and hence cannot be less than 0.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: aty: Remove incorrect checks
Sachin Kamat [Wed, 25 Sep 2013 12:02:58 +0000 (17:32 +0530)]
video: aty: Remove incorrect checks

'xoffset' and 'yoffset' are unsigned and hence cannot be less than 0.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: cirrusfb: Remove incorrect checks
Sachin Kamat [Wed, 25 Sep 2013 12:02:57 +0000 (17:32 +0530)]
video: cirrusfb: Remove incorrect checks

'xoffset' and 'yoffset' are unsigned and hence cannot be less than 0.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: vfb: Remove incorrect check
Sachin Kamat [Wed, 25 Sep 2013 12:02:56 +0000 (17:32 +0530)]
video: vfb: Remove incorrect check

'yoffset' is unsigned and hence cannot be less than 0.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: uvesafb: Remove redundant NULL check
Sachin Kamat [Wed, 25 Sep 2013 11:29:54 +0000 (16:59 +0530)]
video: uvesafb: Remove redundant NULL check

kfree on a NULL pointer is a no-op.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Michal Januszewski <spock@gentoo.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: kyro: Remove redundant break
Sachin Kamat [Wed, 25 Sep 2013 11:29:53 +0000 (16:59 +0530)]
video: kyro: Remove redundant break

'break' after return statement is redundant. Remove it.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: aty: Remove redundant break
Sachin Kamat [Wed, 25 Sep 2013 11:29:52 +0000 (16:59 +0530)]
video: aty: Remove redundant break

'break' after return statement is redundant. Remove it.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: da8xx-fb: Staticize reg_context
Sachin Kamat [Wed, 25 Sep 2013 11:29:51 +0000 (16:59 +0530)]
video: da8xx-fb: Staticize reg_context

'reg_context' is local to this file. Make it static.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: smscufx: Use NULL instead of 0
Sachin Kamat [Wed, 25 Sep 2013 11:29:50 +0000 (16:59 +0530)]
video: smscufx: Use NULL instead of 0

'info' is a pointer. Use NULL instead of 0.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Steve Glendinning <steve.glendinning@shawell.net>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: udlfb: Use NULL instead of 0
Sachin Kamat [Wed, 25 Sep 2013 11:29:49 +0000 (16:59 +0530)]
video: udlfb: Use NULL instead of 0

new_back is a pointer. Use NULL instead of 0.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Bernie Thompson <bernie@plugable.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agobacklight: tosa: Remove redundant spi_set_drvdata
Sachin Kamat [Fri, 20 Sep 2013 06:38:53 +0000 (12:08 +0530)]
backlight: tosa: Remove redundant spi_set_drvdata

Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agobacklight: l4f00242t03: Remove redundant spi_set_drvdata
Sachin Kamat [Fri, 20 Sep 2013 06:38:52 +0000 (12:08 +0530)]
backlight: l4f00242t03: Remove redundant spi_set_drvdata

Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: DISPC: Fix assignment of 0/1 to bool variables
Peter Senna Tschudin [Sun, 22 Sep 2013 18:44:11 +0000 (20:44 +0200)]
OMAPDSS: DISPC: Fix assignment of 0/1 to bool variables

Convert 0 to false and 1 to true when assigning values to bool
variables. Inspired by commit 3db1cd5c05f35fb43eb134df6f321de4e63141f2.

The simplified semantic patch that find this problem is as
follows (http://coccinelle.lip6.fr/):

@@
bool b;
@@
(
-b = 0
+b = false
|
-b = 1
+b = true
)

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: mmp: add pitch info in mmp_win structure
Jing Xiang [Fri, 13 Sep 2013 06:59:49 +0000 (14:59 +0800)]
video: mmp: add pitch info in mmp_win structure

Add pitch length info of graphics/video layer, pitch is used
to represent line length in byte, the usage depends on pix_fmt.
If the fmt is YUV, the pitch[0] will be Y length,pitch[1]
will be U length, pitch[2] will be V lenth.
If the fmt is RGB, the picth[0] will be line lenth, and
pitch[1]/pitch[2] will be 0 and not be used.

Signed-off-by: Jing Xiang <jxiang@marvell.com>
Signed-off-by: Jett.Zhou <jtzhou@marvell.com>
Signed-off-by: Zhou Zhu <zzhu3@marvell.com>
Reviewed-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: mmp: calculate pitch value when fb set win
Jing Xiang [Fri, 13 Sep 2013 06:59:48 +0000 (14:59 +0800)]
video: mmp: calculate pitch value when fb set win

Add new func mmpfb_set_win to make code clean, it will do resolution
and fmt setting of win in mmpfb_set_win.

Signed-off-by: Jing Xiang <jxiang@marvell.com>
Signed-off-by: Jett.Zhou <jtzhou@marvell.com>
Signed-off-by: Zhou Zhu <zzhu3@marvell.com>
Reviewed-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: mmp: optimize some register setting code
Guoqing Li [Fri, 13 Sep 2013 06:59:47 +0000 (14:59 +0800)]
video: mmp: optimize some register setting code

There are dumplicate code of the smooth setting based on different
path, optimized the routine and use readl_relaxed instead.

Signed-off-by: Jett.Zhou <jtzhou@marvell.com>
Signed-off-by: Jing Xiang <jxiang@marvell.com>
Signed-off-by: Guoqing Li <ligq@marvell.com>
Signed-off-by: Zhou Zhu <zzhu3@marvell.com>
Reviewed-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoARM: mmp: remove the legacy rbswap setting for ttc_dkb platform
Jett.Zhou [Fri, 13 Sep 2013 06:59:46 +0000 (14:59 +0800)]
ARM: mmp: remove the legacy rbswap setting for ttc_dkb platform

According to new rbswap scheme of mmp_display, it support appropriate
rbswap setting based on specific pix_fmt, then we can remove the legacy
rbswap setting for ttc_dkb platform.

Signed-off-by: Jett.Zhou <jtzhou@marvell.com>
Signed-off-by: Zhou Zhu <zzhu3@marvell.com>
Reviewed-by: Daniel Drake <dsd@laptop.org>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: mmp: rb swap setting update for mmp display
Guoqing Li [Fri, 13 Sep 2013 06:59:45 +0000 (14:59 +0800)]
video: mmp: rb swap setting update for mmp display

We could set rb swap in two modules: DMA controler input part and
dsi interface output part.
DMA input part is based on pix_fmt to set rbswap, dsi output interface
part will set rbswap based on platform dsi_rbswap configuration.

This patch include below change and enhancement:

1) The input format which support rbswap is based on RGB format,
eg. RGB565 indicates the source data in memory is that Red is [15~11],
Green is [10~5], Blue is [4:0], Red is MSB, Blue is LSB, but for the
display dma input default setting(rbswap = 0), it only support Blue
is [15~11], Green is [10~5], Red is [4:0], Red is LSB, Blue is MSB,
so for this format(RGB565), display controller need to set rbswap
 = 1 and it can support the MSB/LSB correctly.
BGR/YUV format will not set it in mmp display driver.

2) The dsi output part of rbswap is depend on dsi_rbswap which is
defined in specific platfrom. For output dsi interface, it has this
feature to do rbswap again if it needs specifc byte sequence of RGB
byte for DSI panel.
eg. If display content is set RGB565 in memory and DMA input part set
rbswap in driver to support Red as MSB , Blue LSB, but dsi panel only
support Red as LSB, Blue as MSB, then it can use this feature.
If there is no this requirement of panel, this dsi output part is not
needed.

Signed-off-by: Guoqing Li <ligq@marvell.com>
Signed-off-by: Jett.Zhou <jtzhou@marvell.com>
Signed-off-by: Zhou Zhu <zzhu3@marvell.com>
Reviewed-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: w100fb: use dev_get_platdata()
Jingoo Han [Tue, 17 Sep 2013 05:11:55 +0000 (14:11 +0900)]
video: w100fb: use dev_get_platdata()

Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly. This is a cosmetic change
to make the code simpler and enhance the readability.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: tmiofb: use dev_get_platdata()
Jingoo Han [Tue, 17 Sep 2013 05:11:34 +0000 (14:11 +0900)]
video: tmiofb: use dev_get_platdata()

Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly. This is a cosmetic change
to make the code simpler and enhance the readability.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: simplefb: use dev_get_platdata()
Jingoo Han [Tue, 17 Sep 2013 05:11:04 +0000 (14:11 +0900)]
video: simplefb: use dev_get_platdata()

Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly. This is a cosmetic change
to make the code simpler and enhance the readability.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>