Commit Graph

9 Commits

Author SHA1 Message Date
Jing Xiang 24586d8342 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>
2013-09-20 12:52:33 +03:00
Guoqing Li 1f2e42c6c3 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>
2013-09-20 12:52:33 +03:00
Guoqing Li 9a27d5916b 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>
2013-09-20 12:52:32 +03:00
Jean-Christophe PLAGNIOL-VILLARD 19fd7441e9 Various fbdev changes for 3.11
* xilinxfb updates
 * Small cleanups and fixes to multiple drivers
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRy/7gAAoJEPo9qoy8lh71vfEQAKr7rkOCvzXfPjtq5Rh/vpNm
 H/1NU8nBdChwvBk3Anvi0gUpXahT4hItfS5+2/FpAyoI9Kms9kCT4BXck94+Hbjf
 DHkSE6SXN6djbiuXvkR6e9ruL8XSXo6mG1Yu9WzFPVBvUUEvnds/Q0QjwaLPMDhW
 Wajkuk2E0x0NgmdUV3QeapFuTsq6JV3aDLH9Rx8ziiQSkr59+PyJ6bL8P24VqIaR
 MOC4avjUjs1aA81oEsPVo5HJpdkk+/YhYVfCJf2QvtjppyH4mjNbapN9kOyjz6kF
 dslzbjI9/veWvzgvA3ViuflSxp0qsccts+D40YxW7KbMZh5M8gSd51pci3VfQQQt
 Q//FaVSYP0BBhZp7+LHD8h41eKIYNYAstL25bbvTJ6IXPVJWU278+wIK7KpeRqyB
 MKJjJKWjUPSVqsZkA8f97fevjB2nDX2gdriCiGYJysDAUEsgBaseNVUkOEFkd/v3
 npO5NpcqKaOgv2Vplasi4US5jwCgOairraL3LMyjIYdYGkwezqISL8aXO4jipce/
 PfA2Z7OMH1/658gsefDfPCSChksnnF38IxS07cylgxTqsAqFkea+u3ULWwWBvCtN
 eBbxqSZEh+N5SzQYwOJDurCIMeVnFY4fkxZiw+MvcLBzUuqkC/I/pvvmBPAxQFzy
 HTr+YkDY6eUILAbBMHWs
 =KFzn
 -----END PGP SIGNATURE-----

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
2013-06-28 18:01:28 +08:00
Jing Xiang baf9d52cbd 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>
2013-06-27 16:53:14 +08:00
Jing Xiang 265e78c7dc 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>
2013-06-27 16:53:11 +08:00
Jingoo Han e21d2170f3 video: remove unnecessary platform_set_drvdata()
The driver core clears the driver data to NULL after device_release
or on probe failure, since commit 0998d06310
(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>
2013-06-26 14:44:40 +03:00
Zhou Zhu 641b4b1b6a video: mmpdisp: add spi port in display controller
Add spi port support in mmp display controller.  This port is from display
controller and for panel usage.  This driver implemented and registered as
a spi master.

Signed-off-by: Zhou Zhu <zzhu3@marvell.com>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Lisa Du <cldu@marvell.com>
Cc: Guoqing Li <ligq@marvell.com>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21 17:22:17 -08:00
Guoqing Li d63028c389 video: mmp display controller support
Marvell mmp series display controller support in mmpdisp subsystem.

This driver focus on implementation of hardware operations of
path/overlay, which is defined in mmp display subsystem interface.  This
driver registers all pathes to mmp display framework.

Signed-off-by: Guoqing Li <ligq@marvell.com>
Signed-off-by: Lisa Du <cldu@marvell.com>
Signed-off-by: Zhou Zhu <zzhu3@marvell.com>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21 17:22:17 -08:00