OSDN Git Service

sagit-ice-cold/kernel_xiaomi_msm8998.git
11 years agovideo: imxfb: Add DT support
Markus Pargmann [Sun, 26 May 2013 10:35:38 +0000 (12:35 +0200)]
video: imxfb: Add DT support

Add devicetree support for imx framebuffer driver. It uses the generic
display bindings and helper functions.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
11 years agoMerge tag 'fbdev-3.11-2' of git://gitorious.org/linux-omap-dss2/linux into fbdev...
Jean-Christophe PLAGNIOL-VILLARD [Fri, 28 Jun 2013 10:01:28 +0000 (18:01 +0800)]
Merge tag 'fbdev-3.11-2' of git://gitorious.org/linux-omap-dss2/linux into fbdev/for-next

Various fbdev changes for 3.11

* xilinxfb updates
* Small cleanups and fixes to multiple drivers

11 years agoMerge tag 'omapdss-for-3.11-2' of git://gitorious.org/linux-omap-dss2/linux into...
Jean-Christophe PLAGNIOL-VILLARD [Fri, 28 Jun 2013 10:01:14 +0000 (18:01 +0800)]
Merge tag 'omapdss-for-3.11-2' of git://gitorious.org/linux-omap-dss2/linux into fbdev/for-next

OMAP display subsystem changes for 3.11 (part 2/2)

This is the second part of OMAP DSS changes for 3.11. This part contains the
new DSS device model support.

The current OMAP panel drivers use a custom DSS bus, and there's a hard limit
of one external display block per video pipeline. In the new DSS device model
the devices/drivers are made according to the control bus of the display block,
usually platform, i2c or spi. The display blocks can also be chained so that we
can have separate drivers for setups with both external encoder and panel.

To allow the current board files, which use the old style panels, to function,
the old display drivers are left in their current state, and new ones are added
to drivers/video/omap2/displays-new/. When the board files have been converted
to use the new style panels, we can remove the old code. This is planned to
happen in v3.12.

Having to support two very different DSS device models makes the driver
somewhat confusing in some parts, and prevents us from properly cleaning up
some other parts. These cleanups will be done when the old code is removed.

The new device model is designed with CDF (Common Display Framework) in mind.
While CDF is still under work, the new DSS device model should be much more
similar to CDF's model than the old device model, which should make the
eventual conversion to CDF much easier.

11 years agoMerge tag 'omapdss-for-3.11-1' of git://gitorious.org/linux-omap-dss2/linux into...
Jean-Christophe PLAGNIOL-VILLARD [Fri, 28 Jun 2013 09:59:10 +0000 (17:59 +0800)]
Merge tag 'omapdss-for-3.11-1' of git://gitorious.org/linux-omap-dss2/linux into fbdev/for-next

OMAP display subsystem changes for 3.11 (part 1/2)

This is the first part of OMAP DSS changes for 3.11. This part contains fixes,
cleanups and reorganizations that are not directly related to the new DSS
device model that is added in part 2, although many of the reorganizations are
made to make the part 2 possible.

There should not be any functional changes visible to the user except the few
bug fixes.

The main new internal features:

- Display (dis)connect support, which allows us to explicitly (dis)connect a
  whole display pipeline

- Panel list, which allows us to operate without the specific DSS bus

- Combine omap_dss_output to omap_dss_device, so that we have one generic
  "entity" for display pipeline blocks

11 years agovideo: i740fb: Make i740fb_init static
Sachin Kamat [Thu, 27 Jun 2013 07:15:17 +0000 (12:45 +0530)]
video: i740fb: Make i740fb_init static

i740fb_init is referenced only in this function. Make it static.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agofb: make fp_get_options name argument const
Vincent Stehlé [Tue, 18 Jun 2013 14:23:05 +0000 (16:23 +0200)]
fb: make fp_get_options name argument const

drm_get_connector_name now returns a const value, which causes the following
compilation warning:

  drivers/gpu/drm/drm_fb_helper.c: In function ‘drm_fb_helper_parse_command_line’:
  drivers/gpu/drm/drm_fb_helper.c:127:3: warning: passing argument 1 of ‘fb_get_options’ discards ‘const’ qualifier from pointer target type [enabled by default]
  In file included from drivers/gpu/drm/drm_fb_helper.c:35:0:
  include/linux/fb.h:627:12: note: expected ‘char *’ but argument is of type ‘const char *’

As fb_get_options uses its name argument as read only, make it const. This
fixes the aforementioned compilation warning.

Signed-off-by: Vincent Stehlé <vincent.stehle@freescale.com>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: trivial@kernel.org
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
11 years agovideo: mmp: fix graphics/video layer enable/mask swap issue
Jing Xiang [Mon, 10 Jun 2013 15:52:32 +0000 (23:52 +0800)]
video: mmp: fix graphics/video layer enable/mask swap issue

There is bug when switch dma of graphic layer and video layer, it
configured opposite bit, fix it.

Signed-off-by: Jing Xiang <jxiang@marvell.com>
Signed-off-by: Jett.Zhou <jtzhou@marvell.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
11 years agovideo: mmp: fix memcpy wrong size for mmp_addr issue
Jing Xiang [Mon, 10 Jun 2013 15:52:42 +0000 (23:52 +0800)]
video: mmp: fix memcpy wrong size for mmp_addr issue

Memcpy used wrong struct of mmp_win, fix it.

Signed-off-by: Jing Xiang <jxiang@marvell.com>
Signed-off-by: Jett.Zhou <jtzhou@marvell.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
11 years agoradeon: use pdev->pm_cap instead of pci_find_capability(..,PCI_CAP_ID_PM)
Yijing Wang [Wed, 26 Jun 2013 01:13:41 +0000 (09:13 +0800)]
radeon: use pdev->pm_cap instead of pci_find_capability(..,PCI_CAP_ID_PM)

Pci core has been saved pm cap register offset by pdev->pm_cap in pci_pm_init()
in init path. So we can use pdev->pm_cap instead of using
pci_find_capability(pdev, PCI_CAP_ID_PM) for better performance and simplified code.

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: linux-fbdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoaty128fb: use pdev->pm_cap instead of pci_find_capability(..,PCI_CAP_ID_PM)
Yijing Wang [Wed, 26 Jun 2013 01:13:12 +0000 (09:13 +0800)]
aty128fb: use pdev->pm_cap instead of pci_find_capability(..,PCI_CAP_ID_PM)

Pci core has been saved pm cap register offset by pdev->pm_cap in pci_pm_init()
in init path. So we can use pdev->pm_cap instead of using
pci_find_capability(pdev, PCI_CAP_ID_PM) for better performance and simplified code.

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: linux-fbdev@vger.kernel.org
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: of_display_timing.h: Declare 'display_timing'
Fabio Estevam [Wed, 26 Jun 2013 13:34:25 +0000 (10:34 -0300)]
video: of_display_timing.h: Declare 'display_timing'

Commit ffa3fd21de ("videomode: implement public of_get_display_timing()") causes
the following build warning:

include/video/of_display_timing.h:18:10: warning: 'struct display_timing' declared inside parameter list [enabled by default]
include/video/of_display_timing.h:18:10: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]

Declare 'display_timing' to avoid the build warning.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agofbdev: bfin-lq035q1-fb: Use dev_pm_ops
Lars-Peter Clausen [Thu, 20 Jun 2013 16:38:46 +0000 (18:38 +0200)]
fbdev: bfin-lq035q1-fb: Use dev_pm_ops

Use dev_pm_ops instead of the legacy suspend/resume callbacks.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agofbmem: return -EFAULT on copy_to_user() failure
Dan Carpenter [Tue, 18 Jun 2013 07:05:29 +0000 (10:05 +0300)]
fbmem: return -EFAULT on copy_to_user() failure

copy_to_user() returns the number of bytes remaining to be copied.
put_user() returns -EFAULT on error.

This function ORs a bunch of stuff together and returns jumbled non-zero
values on error.  It should return -EFAULT.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: DPI: Fix wrong pixel clock limit
Tomi Valkeinen [Wed, 12 Jun 2013 06:44:52 +0000 (09:44 +0300)]
OMAPDSS: DPI: Fix wrong pixel clock limit

DPI is supposed to skip odd dividers in the clock path when the pixel
clock is higher than 100MHz. The code, however, defines the pixel clock
limit as 1MHz. This causes the driver to skip valid clock dividers,
possibly making the pixel clock to be further away from the requested
one than necessary.

Fix the clock limit to 100MHz.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: NeilBrown <neilb@suse.de>
11 years agovideo: replace strict_strtoul() with kstrtoul()
Jingoo Han [Sat, 1 Jun 2013 07:31:21 +0000 (16:31 +0900)]
video: replace strict_strtoul() with kstrtoul()

The usage of strict_strtoul() is not preferred, because
strict_strtoul() is obsolete. Thus, kstrtoul() should be
used.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agouvesafb: Correct/simplify warning message
Borislav Petkov [Fri, 19 Apr 2013 14:05:25 +0000 (16:05 +0200)]
uvesafb: Correct/simplify warning message

Streamline it a bit. No functional change.

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Wang YanQing <udknight@gmail.com>
Cc: Michal Januszewski <spock@gentoo.org>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: linux-fbdev@vger.kernel.org
Acked-by: Wang YanQing <udknight@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agofb: fix atyfb unused data warnings
Randy Dunlap [Mon, 24 Jun 2013 17:54:20 +0000 (10:54 -0700)]
fb: fix atyfb unused data warnings

Fix compiler warnings of data defined but not used by using the
__maybe_unused attribute.  The date are only used with certain kconfig
settings.

drivers/video/aty/atyfb_base.c:534:13: warning: 'ram_dram' defined but not used [-Wunused-variable]
drivers/video/aty/atyfb_base.c:535:13: warning: 'ram_resv' defined but not used [-Wunused-variable]

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linux-fbdev@vger.kernel.org
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agofb: fix atyfb build warning
Randy Dunlap [Thu, 20 Jun 2013 02:38:13 +0000 (19:38 -0700)]
fb: fix atyfb build warning

Fix build warning when neither of CONFIG_FB_ATY_GX or
CONFIG_FB_ATY_CT is enabled, since ARRAY_SIZE(aty_chips) is 0 in
that case.

drivers/video/aty/atyfb_base.c:437:11: warning: overflow in implicit constant conversion [-Woverflow]

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linux-fbdev@vger.kernel.org
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: imxfb: Make local symbols static
Sachin Kamat [Fri, 10 May 2013 11:55:08 +0000 (17:25 +0530)]
video: imxfb: Make local symbols static

These symbols are used only in this file.
Make them static.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: udlfb: Make local symbol static
Sachin Kamat [Fri, 10 May 2013 11:46:49 +0000 (17:16 +0530)]
video: udlfb: Make local symbol static

'dlfb_handle_damage' is used only in 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: udlfb: Use NULL instead of 0
Sachin Kamat [Fri, 10 May 2013 11:46:48 +0000 (17:16 +0530)]
video: udlfb: Use NULL instead of 0

Pointer variables should be initialized with NULL instead of 0.

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 [Fri, 10 May 2013 11:35:07 +0000 (17:05 +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>
Acked-by: Steve Glendinning <steve.glendinning@shawell.net>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: remove unnecessary platform_set_drvdata()
Jingoo Han [Tue, 25 Jun 2013 01:56:07 +0000 (10:56 +0900)]
video: remove unnecessary platform_set_drvdata()

The driver core clears the driver data to NULL after device_release
or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d
(device-core: Ensure drvdata = NULL when no driver is bound).
Thus, it is not needed to manually clear the device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Cc: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: mxsfb: remove redundant dev_err call in mxsfb_probe()
Wei Yongjun [Wed, 26 Jun 2013 01:50:50 +0000 (09:50 +0800)]
video: mxsfb: remove redundant dev_err call in mxsfb_probe()

There is a error message within devm_ioremap_resource
already, so remove the dev_err call to avoid redundant
error message.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: xilinxfb: Use driver for Xilinx ARM Zynq
Michal Simek [Mon, 3 Jun 2013 10:13:22 +0000 (12:13 +0200)]
video: xilinxfb: Use driver for Xilinx ARM Zynq

Enable this driver for all Xilinx platforms.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: xilinxfb: Add support for little endian accesses
Michal Simek [Mon, 3 Jun 2013 10:13:21 +0000 (12:13 +0200)]
video: xilinxfb: Add support for little endian accesses

Dynamically detect endianess on IP and use
ioread/iowrite functions instead of powerpc and microblaze
specific out_be32.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: xilinxfb: Group bus initialization
Michal Simek [Mon, 3 Jun 2013 10:13:20 +0000 (12:13 +0200)]
video: xilinxfb: Group bus initialization

Move of_address_to_resource() to xilinxfb_assign()
which simplify driver probing.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: xilinxfb: Use drvdata->regs_phys instead of physaddr
Michal Simek [Mon, 3 Jun 2013 10:13:19 +0000 (12:13 +0200)]
video: xilinxfb: Use drvdata->regs_phys instead of physaddr

physaddr will be remove in the next patch.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: xilinxfb: Rename PLB_ACCESS_FLAG to BUS_ACCESS_FLAG
Michal Simek [Mon, 3 Jun 2013 10:13:18 +0000 (12:13 +0200)]
video: xilinxfb: Rename PLB_ACCESS_FLAG to BUS_ACCESS_FLAG

Using only PLB name is wrong for a long time because
the same access functions are also used for AXI.
s/PLB/BUS/g

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: xilinxfb: Do not name out_be32 in function name
Michal Simek [Mon, 3 Jun 2013 10:13:17 +0000 (12:13 +0200)]
video: xilinxfb: Do not name out_be32 in function name

out_be32 IO function is not supported by ARM.
It is only available for PPC and Microblaze.
Because this driver can be used on ARM let's
remove out_be32 from function name.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agovideo: xilinxfb: Fix OF probing on little-endian systems
Michal Simek [Mon, 3 Jun 2013 10:13:16 +0000 (12:13 +0200)]
video: xilinxfb: Fix OF probing on little-endian systems

DTB is always big-endian that's why it is necessary
to properly convert value (*p).
It is automatically done in of_property_read_u32().

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: panels: add Kconfig comment
Tomi Valkeinen [Mon, 17 Jun 2013 09:28:03 +0000 (12:28 +0300)]
OMAPDSS: panels: add Kconfig comment

Add a comment to Kconfig to clarify the difference between the two
display driver directories.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: Add NEC NL8048HL11 panel driver
Tomi Valkeinen [Fri, 31 May 2013 10:39:31 +0000 (13:39 +0300)]
OMAPDSS: Add NEC NL8048HL11 panel driver

Add NEC NL8048HL11 panel driver which uses the new DSS device model
and DSS ops.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: Add TPO TD043MTEA1 panel driver
Tomi Valkeinen [Fri, 31 May 2013 10:13:44 +0000 (13:13 +0300)]
OMAPDSS: Add TPO TD043MTEA1 panel driver

Add TPO TD043MTEA1 panel driver which uses the new DSS device model
and DSS ops.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tested-by: Grazvydas Ignotas <notasas@gmail.com>
11 years agoOMAPDSS: Add Sharp LS037V7DW01 panel driver
Tomi Valkeinen [Fri, 31 May 2013 09:14:01 +0000 (12:14 +0300)]
OMAPDSS: Add Sharp LS037V7DW01 panel driver

Add Sharp LS037V7DW01 panel driver which uses the new DSS device model
and DSS ops.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: Add LG.Philips LB035Q02 panel driver
Tomi Valkeinen [Tue, 21 May 2013 14:14:29 +0000 (17:14 +0300)]
OMAPDSS: Add LG.Philips LB035Q02 panel driver

Add LG.Philips LB035Q02 panel driver which uses the new DSS device model
and DSS ops.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: Add Sony ACX565AKM panel driver
Tomi Valkeinen [Fri, 24 May 2013 11:22:31 +0000 (14:22 +0300)]
OMAPDSS: Add Sony ACX565AKM panel driver

Add Sony ACX565AKM panel driver which uses the new DSS device model and
DSS ops.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi>
11 years agoOMAPDSS: Add new DSI Command Mode panel driver
Tomi Valkeinen [Fri, 24 May 2013 11:22:20 +0000 (14:22 +0300)]
OMAPDSS: Add new DSI Command Mode panel  driver

Add DSI Command Mode panel driver which uses the new DSS device model
and DSS ops. This driver only supports a very basic set of features
which should be common to all DSI command mode panels.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: Add new simple DPI panel driver
Tomi Valkeinen [Fri, 24 May 2013 11:21:56 +0000 (14:21 +0300)]
OMAPDSS: Add new simple DPI panel driver

Add simple DPI Panel driver which uses the new DSS device model and DSS
ops. A "simple" panel means one that does not require any special setup.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: Add new Analog TV Connector driver
Tomi Valkeinen [Fri, 24 May 2013 11:21:30 +0000 (14:21 +0300)]
OMAPDSS: Add new Analog TV Connector driver

Add Analog TV Connector driver which uses the new DSS device model and
DSS ops.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: Add new HDMI Connector driver
Tomi Valkeinen [Fri, 24 May 2013 11:21:08 +0000 (14:21 +0300)]
OMAPDSS: Add new HDMI Connector driver

Add HDMI Connector driver which uses the new DSS device model and DSS
ops.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: Add new DVI Connector driver
Tomi Valkeinen [Fri, 24 May 2013 11:20:45 +0000 (14:20 +0300)]
OMAPDSS: Add new DVI Connector driver

Add DVI Connector driver which uses the new DSS device model and DSS
ops.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: Add new TPD12S015 Encoder driver
Tomi Valkeinen [Fri, 24 May 2013 11:20:14 +0000 (14:20 +0300)]
OMAPDSS: Add new TPD12S015 Encoder driver

Add TPD12S015 HDMI ESD protection and level shifter encoder driver which
uses the new DSS device model and DSS ops.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: Add new TFP410 Encoder driver
Tomi Valkeinen [Fri, 24 May 2013 11:18:30 +0000 (14:18 +0300)]
OMAPDSS: Add new TFP410 Encoder driver

Add TFP410 DPI-to-DVI Encoder driver which uses the new DSS device
model and DSS ops.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: DSI: Add ops
Tomi Valkeinen [Fri, 24 May 2013 10:20:27 +0000 (13:20 +0300)]
OMAPDSS: DSI: Add ops

Add "ops" style method for using DSI functionality.

Ops style calls will allow us to have arbitrarily long display
pipelines, where each entity can call ops in the previous display
entity.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: HDMI: Add ops
Tomi Valkeinen [Fri, 24 May 2013 10:20:17 +0000 (13:20 +0300)]
OMAPDSS: HDMI: Add ops

Add "ops" style method for using HDMI functionality.

Ops style calls will allow us to have arbitrarily long display
pipelines, where each entity can call ops in the previous display
entity.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: AnalogTV: Add ops
Tomi Valkeinen [Fri, 24 May 2013 10:19:50 +0000 (13:19 +0300)]
OMAPDSS: AnalogTV: Add ops

Add "ops" style method for using analog TV functionality.

Ops style calls will allow us to have arbitrarily long display
pipelines, where each entity can call ops in the previous display
entity.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: DVI: Add ops
Tomi Valkeinen [Fri, 24 May 2013 10:19:30 +0000 (13:19 +0300)]
OMAPDSS: DVI: Add ops

Add "ops" style method for using DVI functionality.

Ops style calls will allow us to have arbitrarily long display
pipelines, where each entity can call ops in the previous display
entity.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: SDI: Add ops
Tomi Valkeinen [Fri, 24 May 2013 10:19:14 +0000 (13:19 +0300)]
OMAPDSS: SDI: Add ops

Add "ops" style method for using SDI functionality.

Ops style calls will allow us to have arbitrarily long display
pipelines, where each entity can call ops in the previous display
entity.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: DPI: Add ops
Tomi Valkeinen [Fri, 24 May 2013 10:18:52 +0000 (13:18 +0300)]
OMAPDSS: DPI: Add ops

Add "ops" style method for using DPI functionality.

Ops style calls will allow us to have arbitrarily long display
pipelines, where each entity can call ops in the previous display
entity.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agodrm/omap: DVI connector fix
Tomi Valkeinen [Tue, 14 May 2013 11:14:15 +0000 (14:14 +0300)]
drm/omap: DVI connector fix

The omapdrm driver currently uses a string comparison to find out if the
display is a DVI display. This is not reliable, and as we now have a
specific display type for DVI, let's use that.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: add OMAP_DISPLAY_TYPE_DVI
Tomi Valkeinen [Mon, 13 May 2013 10:40:33 +0000 (13:40 +0300)]
OMAPDSS: add OMAP_DISPLAY_TYPE_DVI

Add new display bus type for DVI. This is not used by omapdss driver
itself, but is used by external encoder chips that output DVI.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: modify get/find functions to go through the device chain
Tomi Valkeinen [Tue, 23 Apr 2013 11:35:40 +0000 (14:35 +0300)]
OMAPDSS: modify get/find functions to go through the device chain

In the future will have arbitrarily long video pipeline chains, instead
of the current two-entities-per-pipeline model.

This patch changes the affected get/find style functions so that they
properly go through the video pipeline chain, for example when getting
the overlay manager connected to a given display.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: public omapdss_register_output()
Tomi Valkeinen [Wed, 24 Apr 2013 10:32:51 +0000 (13:32 +0300)]
OMAPDSS: public omapdss_register_output()

In order to allow multiple display block in a video pipeline, we need to
give the drivers way to register themselves. For now we have
the omapdss_register_display() which is used to register panels, and
dss_register_output() which is used to register DSS encoders.

This patch makes dss_register_output() public (with the name of
omapdss_register_output), which can be used to register also external
encoders. The distinction between register_output and register_display
is that a "display" is an entity at the end of the videopipeline, and
"output" is something inside the pipeline.

The registration and naming will be made saner in the future, but the
current names and functions are kept to minimize changes during the dss
device model transition.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: gracefully disable overlay at error
Sergey Kibrik [Thu, 25 Apr 2013 08:28:15 +0000 (11:28 +0300)]
OMAPDSS: gracefully disable overlay at error

Disable overlay via ovl->disable() interface, which will
properly set flags in cache and GO bits for managers.
This allows overlay user to re-enable it on next frame,
thus recovering from FIFO underflows.

Signed-off-by: Sergey Kibrik <sergiikibrik@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: Remove kfree for memory allocated with devm_kzalloc
Emil Goode [Wed, 5 Jun 2013 17:29:56 +0000 (19:29 +0200)]
OMAPDSS: Remove kfree for memory allocated with devm_kzalloc

It's not necessary to free memory allocated with devm_kzalloc
in a remove function and using kfree leads to a double free.

Signed-off-by: Emil Goode <emilgoode@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: remove dispc's dependency to VENC/HDMI
Tomi Valkeinen [Thu, 16 May 2013 07:44:13 +0000 (10:44 +0300)]
OMAPDSS: remove dispc's dependency to VENC/HDMI

DISPC needs to know the clock rate for DIGIT (i.e. TV) channel, and this
clock is provided by either VENC or HDMI modules. Currently DISPC will
call a function in VENC/HDMI, asking what the clock rate is. This means
we have a fixed dependency from DISPC to both VENC and HDMI.

To have a more generic approach, and in particular to allow adding OMAP5
HDMI driver, we need to remove this dependency. This patch makes
VENC/HDMI inform DISPC when the their clock changes, thus reversing the
dependency and removing the issue.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: remove unused fields in omap_dss_device
Tomi Valkeinen [Fri, 14 Sep 2012 10:34:50 +0000 (13:34 +0300)]
OMAPDSS: remove unused fields in omap_dss_device

The use of platform callbacks, backlight, DSI TE and reset gpio from the
struct omap_dss_device has been removed. We can thus remove the fields
from omap_dss_device.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: HDMI clean up hpd_gpio
Tomi Valkeinen [Thu, 6 Jun 2013 10:20:37 +0000 (13:20 +0300)]
OMAPDSS: HDMI clean up hpd_gpio

hpd_gpio is no longer used by the OMAP4 HDMI IP driver, and we can thus
remove the unnecessary code.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: HDMI: clean up PHY power handling
Tomi Valkeinen [Thu, 6 Jun 2013 10:08:35 +0000 (13:08 +0300)]
OMAPDSS: HDMI: clean up PHY power handling

The TRM tells to set PHY to TXON only after getting LINK_CONNECT, and to
set PHY to OFF or LDOON after getting LINK_DISCONNECT, in order to avoid
damage to the PHY.

We don't currently do it quite like that. Instead of using the HDMI
interrupts, we use HPD signal. This works, but is not actually quite
correct, as HPD comes at a different time than LINK_CONNECT and
LINK_DISCONNECT interrupts. Also, the HPD GPIO is a property of the TPD
level shifter, not HDMI IP, so handling the GPIO in the HDMI driver is
wrong.

This patch implements the PHY power handling correctly, using the
interrupts.

There is a corner case that causes some additional difficulties: we may
get both LINK_CONNECT and LINK_DISCONNECT interrupts at the same time.
This is handled in the code by retrying: turning off the PHY, clearing
the interrupt status, and re-enabling the PHY. This causes a new
LINK_CONNECT interrupt to happen if a cable is connected.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPFB: use EPROBE_DEFER if default display is not present
Tomi Valkeinen [Thu, 23 May 2013 13:41:25 +0000 (16:41 +0300)]
OMAPFB: use EPROBE_DEFER if default display is not present

Currently omapfb returns EPROBE_DEFER if no displays have been probed at
the time omapfb is probed. However, sometimes some of the displays have
been probed at that time, but not all. We can't return EPROBE_DEFER in
that case, because then one missing driver would cause omapfb to defer
always, preventing any display from working.

However, if the user has defined a default display, we can presume that
the driver for that display is eventually loaded. Thus, this patch
changes omapfb to return EPROBE_DEFER in case default display is not
found.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: output: increase refcount in find_output funcs
Tomi Valkeinen [Thu, 25 Apr 2013 11:53:18 +0000 (14:53 +0300)]
OMAPDSS: output: increase refcount in find_output funcs

Now that omap_dss_output has been combined into omap_dss_device, we can
add ref counting for the relevant output functions also.

This patch adds omap_dss_get_device() calls to the various find_output()
style functions. This, of course, means that the users of those
find_output functions need to do a omap_dss_put_device() after use.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: add THIS_MODULE owner to DSS outputs
Tomi Valkeinen [Fri, 3 May 2013 08:42:18 +0000 (11:42 +0300)]
OMAPDSS: add THIS_MODULE owner to DSS outputs

Setup the owner field for DSS output's omap_dss_device so that module
refcounting works.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: add module_get/put to omap_dss_get/put_device()
Tomi Valkeinen [Fri, 3 May 2013 08:40:54 +0000 (11:40 +0300)]
OMAPDSS: add module_get/put to omap_dss_get/put_device()

omap_dss_get_device() should be called for omap_dss_device before it is
used to increase its refcount. Currently we only increase the refcount
for the underlying device.

This patch adds managing the ref count to the underlying module also,
which contains the ops for the omap_dss_device.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: omapdss.h: add owner field to omap_dss_device
Tomi Valkeinen [Fri, 3 May 2013 08:35:43 +0000 (11:35 +0300)]
OMAPDSS: omapdss.h: add owner field to omap_dss_device

Add struct module *owner field to omap_dss_device, which points to the
module containing the ops for this omap_dss_device. This will be used to
manage the ref count for the module.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: combine omap_dss_output into omap_dss_device
Tomi Valkeinen [Fri, 19 Apr 2013 12:09:34 +0000 (15:09 +0300)]
OMAPDSS: combine omap_dss_output into omap_dss_device

We currently have omap_dss_device, which represents an external display
device, sometimes an external encoder, sometimes a panel. Then we have
omap_dss_output, which represents DSS's output encoder.

In the future with new display device model, we construct a video
pipeline from the display blocks. To accomplish this, all the blocks
need to be presented by the same entity.

Thus, this patch combines omap_dss_output into omap_dss_device. Some of
the fields in omap_dss_output are already found in omap_dss_device, but
some are not. This means we'll have DSS output specific fields in
omap_dss_device, which is not very nice. However, it is easier to just
keep those output specific fields there for now, and after transition to
new display device model is made, they can be cleaned up easier than
could be done now.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: remove omap_dss_start/stop_device()
Tomi Valkeinen [Thu, 25 Apr 2013 10:12:07 +0000 (13:12 +0300)]
OMAPDSS: remove omap_dss_start/stop_device()

The omap_dss_start_device() and omap_dss_stop_device(), called by the
DSS output drivers, are old relics. They originally did something
totally else, but nowadays they increase the module ref count for panels
that are enabled.

This model is quite broken: the panel modules may be used even before
they are enabled. For example, configuring the panel requires calls to
functions located in the panel modules.

In the following patches we try to improve the ref count management for
the modules and display devices. The first step, however, is to remove
the omap_dss_start/stop_device() totally.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: Add panel dev pointer to dssdev
Tomi Valkeinen [Thu, 14 Feb 2013 12:17:28 +0000 (14:17 +0200)]
OMAPDSS: Add panel dev pointer to dssdev

We are about to remove the dss bus support, which also means that the
omap_dss_device won't be a real device anymore. This means that the
embedded "dev" struct needs to be removed from omap_dss_device.

After we've finished the removal of the dss bus, we see the following
changes:

- struct omap_dss_device won't be a real Linux device anymore, but more
  like a "display entity".
- struct omap_dss_driver won't be a Linux device driver, but "display
  entity ops".
- The panel devices/drivers won't be omapdss devices/drivers, but
  platform/i2c/spi/etc devices/drivers, whichever fits the control
  mechanism of the panel.
- The panel drivers will create omap_dss_device and omap_dss_driver,
  fill the required fields, and register the omap_dss_device to
  omapdss.
- omap_dss_device won't have an embedded dev struct anymore, but a
  dev pointer to the actual device that manages the omap_dss_device.

The model described above resembles the model that has been discussed
with CDF (common display framework).

For the duration of the conversion, we temporarily have two devs in the
dssdev, the old "old_dev", which is a full embedded device struct, and the
new "dev", which is a pointer to the device. "old_dev" will be removed
in the future.

For devices belonging to dss bus the dev is initialized to point to
old_dev. This way all the code can just use the dev, for both old and
new style panels.

Both the new and old style panel drivers work during the conversion, and
only after the dss bus support is removed will the old style panels stop
to compile.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: implement display sysfs without dss bus
Tomi Valkeinen [Wed, 13 Feb 2013 11:40:19 +0000 (13:40 +0200)]
OMAPDSS: implement display sysfs without dss bus

We aim to remove the custom omapdss bus totally, as it's quite a strange
construct and won't be compatible with common display framework. One
problem on the road is that we have sysfs files for each display, and
they depend on the omapdss bus.

This patch creates the display sysfs files independent of the omapdss
bus. This gives us backwards compatibility without using the omapdss bus
for the sysfs files.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: don't use dss bus in suspend/resume
Tomi Valkeinen [Fri, 16 Nov 2012 13:45:26 +0000 (15:45 +0200)]
OMAPDSS: don't use dss bus in suspend/resume

We have support functions to suspend and resume all the displays that
are used with system suspend. These functions use the dss bus to iterate
the display devices.

As we aim to remove the custom dss bus totally, this patch removes the
explicit use of dss bus from these functions. Instead the
for_each_dss_dev() macro is used to go through the devices.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: use the panel list in omap_dss_get_next_device
Tomi Valkeinen [Fri, 15 Mar 2013 14:33:29 +0000 (16:33 +0200)]
OMAPDSS: use the panel list in omap_dss_get_next_device

omap_dss_get_next_device() uses the dss bus to iterate over the
displays. This patch changes omap_dss_get_next_device() to use the new
panel list instead.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: add panel list
Tomi Valkeinen [Fri, 16 Nov 2012 13:45:26 +0000 (15:45 +0200)]
OMAPDSS: add panel list

We currently use the omapdss bus (which contains all the available
displays) to iterate the displays. As the omapdss bus is on its way out,
this needs to be changed.

Instead of using the dss bus to iterate displays, this patch adds our
own list of displays which we manage. The panels on the dss bus are
automatically added to this new list.

An "alias" field is also added to omap_dss_device. This field is
set to "display%d", the same way as omap_dss_device's dev name is set.
This alias is later used to keep backward compatibility, when the
embedded dev is no longer used.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: remove dssdev uses in trivial cases
Tomi Valkeinen [Fri, 10 May 2013 12:27:07 +0000 (15:27 +0300)]
OMAPDSS: remove dssdev uses in trivial cases

In the future the "dssdev" parameter passed to output drivers will
change its meaning. Instead of being a pointer to the panel device, it's
a pointer to the output instance.

To make the transition easier, some of the uses for this dssdev
parameter can be easily removed.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: add videomode conversion support
Tomi Valkeinen [Fri, 10 May 2013 10:02:32 +0000 (13:02 +0300)]
OMAPDSS: add videomode conversion support

Add helper functions to convert between omapdss specific video timings
and the common videomode.

Eventually omapdss will be changed to use only the common video timings,
and these helper functions will make the transition easier.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: VENC: clean up regulator init
Tomi Valkeinen [Fri, 17 May 2013 09:48:55 +0000 (12:48 +0300)]
OMAPDSS: VENC: clean up regulator init

Clean up the VENC driver's regulator init to remove the (unused)
omap_dss_device parameter, renaming the function to a more sensible
name, and making the code slightly clearer.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: SDI: fix regulators for DT
Tomi Valkeinen [Tue, 19 Mar 2013 11:46:40 +0000 (13:46 +0200)]
OMAPDSS: SDI: fix regulators for DT

SDI requires a regulator to operate. This regulator is, for some reason,
currently attached to the virtual omapdss device, instead of the SDI
device. This does not work for DT, as the regulator mappings need to be
described in the DT data, and the virtual omapdss device is not present
there.

Fix the issue by acquiring the regulator in the SDI device. To retain
compatibility with the current board files, the old method of getting
the regulator is kept. The old method can be removed when the board
files have been changed to pass the regulator to SDI.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: SDI: clean up regulator init
Tomi Valkeinen [Fri, 17 May 2013 08:00:15 +0000 (11:00 +0300)]
OMAPDSS: SDI: clean up regulator init

Clean up the SDI driver's regulator init to remove the (unused)
omap_dss_device parameter, renaming the function to a more sensible
name, and making the code slightly clearer.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: HDMI: add hdmi_init_regulator
Tomi Valkeinen [Fri, 10 May 2013 12:20:52 +0000 (15:20 +0300)]
OMAPDSS: HDMI: add hdmi_init_regulator

Separate regulator init code into its own function for clarity.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: DPI: fix regulators for DT
Tomi Valkeinen [Tue, 19 Mar 2013 09:33:52 +0000 (11:33 +0200)]
OMAPDSS: DPI: fix regulators for DT

On some platforms DPI requires a regulator to be enabled to power up the
output pins. This regulator is, for some reason, currently attached to
the virtual omapdss device, instead of the DPI device. This does not
work for DT, as the regulator mappings need to be described in the DT
data, and the virtual omapdss device is not present there.

Fix the issue by acquiring the regulator in the DPI device. To retain
compatibility with the current board files, the old method of getting
the regulator is kept. The old method can be removed when the board
files have been changed to pass the regulator to DPI.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: DPI: cleanup pll & regulator init
Tomi Valkeinen [Fri, 19 Apr 2013 13:52:27 +0000 (16:52 +0300)]
OMAPDSS: DPI: cleanup pll & regulator init

Split regulator and DSI PLL init code to their own functions for
clarity.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: DSI: cleanup regulator init
Tomi Valkeinen [Fri, 3 May 2013 10:42:24 +0000 (13:42 +0300)]
OMAPDSS: DSI: cleanup regulator init

Separate the regulator initialization code to its own function, removing
duplicate code.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: CORE: use devm_regulator_get
Tomi Valkeinen [Fri, 3 May 2013 10:35:07 +0000 (13:35 +0300)]
OMAPDSS: CORE: use devm_regulator_get

Use devm_regulator_get() instead of regulator_get() to simplify code.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: Implement display (dis)connect support
Tomi Valkeinen [Wed, 8 May 2013 13:23:32 +0000 (16:23 +0300)]
OMAPDSS: Implement display (dis)connect support

We currently have two steps in panel initialization and startup: probing
and enabling. After the panel has been probed, it's ready and can be
configured and later enabled.

This model is not enough with more complex display pipelines, where we
may have, for example, two panels, of which only one can be used at a
time, connected to the same video output.

To support that kind of scenarios, we need to add new step to the
initialization: connect.

This patch adds support for connecting and disconnecting panels. After
probe, but before connect, no panel ops should be called. When the
connect is called, a proper video pipeline is established, and the panel
is ready for use. If some part in the video pipeline is already
connected (by some other panel), the connect call fails.

One key difference with the old style setup is that connect() handles
also connecting to the overlay manager. This means that the omapfb (or
omapdrm) no longer needs to figure out which overlay manager to use, but
it can just call connect() on the panel, and the proper overlay manager
is connected by omapdss.

This also allows us to add back the support for dynamic switching
between two exclusive panels. However, the current panel device model is
not changed to support this, as the new device model is implemented in
the following patches and the old model will be removed. The new device
model supports dynamic switching.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDRM: fix overlay manager handling
Tomi Valkeinen [Tue, 14 May 2013 07:55:19 +0000 (10:55 +0300)]
OMAPDRM: fix overlay manager handling

Currently omapdrm creates crtcs, which map directly to DSS overlay
managers, only on demand at init time. This would make it difficult to
manage connecting the display entities in the future, as the code cannot
just search for a suitable overlay manager.

We cannot fix this the sane way, which would be to create crtcs for each
overlay manager, because we need an overlay for each crtc. With limited
number of overlays, that's not possible.

So the solution for now is to detach the overlay manager from the crtc.
crtcs are still created on demand at init time, but all overlay managers
are always initialized by the omapdss.

This way we can create and connect whole display pipelines from the
overlay manager to the display, regardless of which crtcs omapdrm would
create.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: split overlay manager creation
Tomi Valkeinen [Tue, 14 May 2013 07:53:21 +0000 (10:53 +0300)]
OMAPDSS: split overlay manager creation

Split the function that creates overlay manager structs into two: one
that creates just the structs, and one that creates the sysfs files for
the manager.

This will help us use the overlay manager structs with omapdrm in the
following patches, while still leaving the sysfs files out.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: add helpers to get mgr or output from display
Tomi Valkeinen [Tue, 23 Apr 2013 12:35:35 +0000 (15:35 +0300)]
OMAPDSS: add helpers to get mgr or output from display

Add two helper functions that can be used to find either the DSS output
or the overlay manager that is connected to the given display.

This hides how the output and the manager are actually connected, making
it easier to change the connections in the future.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: clean up dss_[ovl|mgr]_get_device()
Tomi Valkeinen [Tue, 23 Apr 2013 12:23:42 +0000 (15:23 +0300)]
OMAPDSS: clean up dss_[ovl|mgr]_get_device()

Minor cleanup for the dss_[ovl|mgr]_get_device() functions to make them
more readable.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: fix dss_get_ctx_loss_count for DT
Tomi Valkeinen [Mon, 10 Dec 2012 11:52:55 +0000 (13:52 +0200)]
OMAPDSS: fix dss_get_ctx_loss_count for DT

When using DT, dss device does not have platform data. However,
dss_get_ctx_loss_count() uses dss device's platform data to find the
get_ctx_loss_count function pointer.

To fix this, dss_get_ctx_loss_count() needs to be changed to get the
platform data from the omapdss device, which is a "virtual" device and
always has platform data.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: add omap_dss_find_output_by_node()
Tomi Valkeinen [Wed, 13 Mar 2013 12:22:30 +0000 (14:22 +0200)]
OMAPDSS: add omap_dss_find_output_by_node()

Add a support function to find a DSS output by given DT node. This is
used in later patches to link the panels to DSS outputs.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: add omap_dss_find_output()
Tomi Valkeinen [Wed, 13 Mar 2013 11:56:42 +0000 (13:56 +0200)]
OMAPDSS: add omap_dss_find_output()

Add a support function to find a DSS output by given name. This is used
in later patches to link the panels to DSS outputs.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: only probe pdata if there's one
Tomi Valkeinen [Thu, 14 Mar 2013 13:47:29 +0000 (15:47 +0200)]
OMAPDSS: only probe pdata if there's one

omapdss output drivers always read the platform data. This crashes when
there's no platform data when using DT.

Add a check to read the platform data only if it exists.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: add pdata->default_display_name
Tomi Valkeinen [Fri, 16 Nov 2012 12:59:56 +0000 (14:59 +0200)]
OMAPDSS: add pdata->default_display_name

We can currently set the default display (i.e. the initial display) in
the omapdss platform data by using a pointer to the default
omap_dss_device. Internally omapdss uses the device's name to resolve
the default display.

As it's difficult to get the omap_dss_device pointer in the future,
after we've changed the omapdss device model, this patch adds a new way
to define the default display, by using the name of the display.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Archit Taneja <archit@ti.com>
11 years agoMerge branch 'fbdev-3.11' of git://gitorious.org/linux-omap-dss2/linux into fbdev...
Jean-Christophe PLAGNIOL-VILLARD [Fri, 14 Jun 2013 09:52:18 +0000 (17:52 +0800)]
Merge branch 'fbdev-3.11' of git://gitorious.org/linux-omap-dss2/linux into fbdev/for-next

11 years agoLinux 3.10-rc5
Linus Torvalds [Sun, 9 Jun 2013 00:41:04 +0000 (17:41 -0700)]
Linux 3.10-rc5

11 years agohpfs: fix warnings when the filesystem fills up
Mikulas Patocka [Sat, 8 Jun 2013 23:25:57 +0000 (01:25 +0200)]
hpfs: fix warnings when the filesystem fills up

This patch fixes warnings due to missing lock on write error path.

  WARNING: at fs/hpfs/hpfs_fn.h:353 hpfs_truncate+0x75/0x80 [hpfs]()
  Hardware name: empty
  Pid: 26563, comm: dd Tainted: P           O 3.9.4 #12
  Call Trace:
    hpfs_truncate+0x75/0x80 [hpfs]
    hpfs_write_begin+0x84/0x90 [hpfs]
    _hpfs_bmap+0x10/0x10 [hpfs]
    generic_file_buffered_write+0x121/0x2c0
    __generic_file_aio_write+0x1c7/0x3f0
    generic_file_aio_write+0x7c/0x100
    do_sync_write+0x98/0xd0
    hpfs_file_write+0xd/0x50 [hpfs]
    vfs_write+0xa2/0x160
    sys_write+0x51/0xa0
    page_fault+0x22/0x30
    system_call_fastpath+0x1a/0x1f

Signed-off-by: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
Cc: stable@kernel.org # 2.6.39+
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoMerge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 8 Jun 2013 22:51:21 +0000 (15:51 -0700)]
Merge branch 'timers-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull timer fixes from Thomas Gleixner:

 - Trivial: unused variable removal

 - Posix-timers: Add the clock ID to the new proc interface to make it
   useful.  The interface is new and should be functional when we reach
   the final 3.10 release.

 - Cure a false positive warning in the tick code introduced by the
   overhaul in 3.10

 - Fix for a persistent clock detection regression introduced in this
   cycle

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  timekeeping: Correct run-time detection of persistent_clock.
  ntp: Remove unused variable flags in __hardpps
  posix-timers: Show clock ID in proc file
  tick: Cure broadcast false positive pending bit warning

11 years agoMerge tag 'irqdomain-for-linus' of git://git.secretlab.ca/git/linux
Linus Torvalds [Sat, 8 Jun 2013 22:50:42 +0000 (15:50 -0700)]
Merge tag 'irqdomain-for-linus' of git://git.secretlab.ca/git/linux

Pull irqdomain bug fixes from Grant Likely:
 "This branch contains a set of straight forward bug fixes to the
  irqdomain code and to a couple of drivers that make use of it."

* tag 'irqdomain-for-linus' of git://git.secretlab.ca/git/linux:
  irqchip: Return -EPERM for reserved IRQs
  irqdomain: document the simple domain first_irq
  kernel/irq/irqdomain.c: before use 'irq_data', need check it whether valid.
  irqdomain: export irq_domain_add_simple

11 years agoirqchip: Return -EPERM for reserved IRQs
Grant Likely [Thu, 6 Jun 2013 13:11:38 +0000 (14:11 +0100)]
irqchip: Return -EPERM for reserved IRQs

The irqdomain core will report a log message for any attempted map call
that fails unless the error code is -EPERM. This patch changes the
Versatile irq controller drivers to use -EPERM because it is normal for
a subset of the IRQ inputs to be marked as reserved on the various
Versatile platforms.

Signed-off-by: Grant Likely <grant.likely@linaro.org>
11 years agoirqdomain: document the simple domain first_irq
Linus Walleij [Thu, 6 Jun 2013 11:10:23 +0000 (12:10 +0100)]
irqdomain: document the simple domain first_irq

The first_irq needs to be zero to get a linear domain and that
comes with special semantics. We want to simplify this going
forward but some documentation never hurts.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Grant Likely <grant.likely@linaro.org>
11 years agokernel/irq/irqdomain.c: before use 'irq_data', need check it whether valid.
Chen Gang [Tue, 14 May 2013 11:02:45 +0000 (19:02 +0800)]
kernel/irq/irqdomain.c: before use 'irq_data', need check it whether valid.

Since irq_data may be NULL, if so, we WARN_ON(), and continue, 'hwirq'
which related with 'irq_data' has to initialize later, or it will cause
issue.

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Grant Likely <grant.likely@linaro.org>