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>
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>
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>
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>
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>
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>
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>
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.
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Jingoo Han [Tue, 17 Sep 2013 05:10:37 +0000 (14:10 +0900)]
video: s3c-fb: 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>
Jingoo Han [Tue, 17 Sep 2013 05:10:19 +0000 (14:10 +0900)]
video: s1d13xxxfb: 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> Acked-by: Kristoffer Ericson <kristoffer.ericson@gmail.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Jingoo Han [Tue, 17 Sep 2013 05:09:37 +0000 (14:09 +0900)]
video: mbxfb: 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>
Jingoo Han [Tue, 17 Sep 2013 05:08:58 +0000 (14:08 +0900)]
video: imxfb: 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>
Jingoo Han [Tue, 17 Sep 2013 05:08:14 +0000 (14:08 +0900)]
video: ep93xx-fb: 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>
Jingoo Han [Tue, 17 Sep 2013 05:04:50 +0000 (14:04 +0900)]
video: da8xx-fb: 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>
Jingoo Han [Tue, 17 Sep 2013 05:03:53 +0000 (14:03 +0900)]
video: amba-clcd: 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>
Jingoo Han [Tue, 17 Sep 2013 05:03:19 +0000 (14:03 +0900)]
video: sh_mobile_hdmi: 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>