1
0
Fork 0
Commit Graph

1290 Commits (c8a4c63f8c136d3368625d640f2dd1cb505f1fea)

Author SHA1 Message Date
Ricardo Neri 46c4a7551d 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>
2013-09-27 09:58:22 +03:00
Ricardo Neri 190d57c950 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>
2013-09-27 09:58:22 +03:00
Ricardo Neri 8a768c8079 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>
2013-09-27 09:58:21 +03:00
Ricardo Neri a798eb7ee8 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>
2013-09-27 09:58:21 +03:00
Ricardo Neri a7e71262af 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>
2013-09-27 09:58:21 +03:00
Ricardo Neri 40e6237710 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>
2013-09-27 09:58:20 +03:00
Mark Brown 633358e9ff OMAPDSS: Add missing dependency on backlight for DSI-CM panel drier
The DSI-CM driver uses the backlight class so needs to build depend on it.

Signed-off-by: Mark Brown <broonie@linaro.org>
Reviewed-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-09-26 11:38:10 +03:00
Peter Senna Tschudin 62a83183c4 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 3db1cd5c05.

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>
2013-09-23 10:34:30 +03:00
Tomi Valkeinen 48664b21ae OMAPDSS: DISPC: set irq_safe for runtime PM
We have a bug with omapdrm, where omapdrm calls dispc's pm_runtime
function in atomic context, and dispc's pm_runtime is not marked as
irq_safe:

BUG: sleeping function called from invalid context at drivers/base/power/runtime.c:952

Dispc's runtime PM callbacks are irq safe, so we can just set the
irq_safe flag to fix the issue.

However, in the long term, I'd rather have omapdrm manage the runtime PM
calls in a better way. Calling get/put for every small operation that
touches the dispc registers is very inefficient. It'd be better and
cleaner to have clear "in-use" and "not-in-use" states for dispc, so
that we don't need to do register context restore for small operations,
only to turn dispc off right afterwards.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-09-19 13:29:40 +03:00
Sathya Prakash M R 0fd9560257 OMAPDSS: Return right error during connector probe
While using HDMI connector driver with sil9022 encoder
came across issue where connector driver is probed first.
This resulted in error. A deffered probe solved this.
Most connector drivers need a encoder driver as their
video source. This patch ensures we do a probe defferal
if video source is not present for connector drivers.

Signed-off-by: Sathya Prakash M R <sathyap@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-09-19 13:29:35 +03:00
Linus Torvalds 9ab073bc45 fbdev changes for 3.12:
* Improvements to da8xx-fb to make it support v2 of the LCDC IP, used e.g. in
   BeagleBone
 * Himax HX8369 controller support
 * Various small fixes and cleanups
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJSKB9vAAoJEPo9qoy8lh71dqkP/AgEljWrEKumJ6KQYLjxGEQM
 RseTYKaNE78TkPX5p4DcA2rJ0Ud/yK/swelZvHfnq+6yTxUiuwsHDAPcgrMf27NM
 yWWTW0gJRrs7jbHF7sIQkPbww56Irjz7uzUfOoNRqajgf51+mB3olAhTUn9tE3Pf
 PW9u5M5b904VnT0VKASEUB9SUtx5izWKP9Yyy7QG8WF++zp4BHfmO7+8kx46cE0l
 WFAQL7JrvtzI2yVcnnkfDRpmHOunbupIGOAT79s3KlK226SHNRi3wd6w6zDTudjj
 sEMJLDpipKYliT+yzwgHmuHfDTi+gx6a36bTMf9lXp+KZKYEjNlWnYKKHdkdtk7Z
 nYlUagu+8tOUsZGy5dOyMkbeYMMfpcBlN1VjMDBIs1kPc0psg15wPznLdnPa5rau
 Ag0Z7GPHvy8ucFBsfqp1Sgsi1QMSqWgkcCh55BAMID58A7ELPhHz9NpaFt9KGMEy
 EKoNPQmTjIosgEQDdbayqjBwBqK1O0Q8MPPFGiDCwX37XppgZ4mflSz3NfDpwN+J
 +J+C3y2Bn2qzYPUzy3vOoohoWvtxsGnteNyX3D/Yrk7I4/4IWdI0maTVMv9yq//D
 /uBt+OxEY0ODkfC+yhhKT6P5zNBqsoWa16fqDdx3WDV7xoCsVq6dKkhaQd/zEr0Z
 Yjtcw3ZRyGLQgX75Zo+B
 =Kr2i
 -----END PGP SIGNATURE-----

Merge tag 'fbdev-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux

Pull fbdev changes from Tomi Valkeinen:
 - Improvements to da8xx-fb to make it support v2 of the LCDC IP, used
   eg in BeagleBone
 - Himax HX8369 controller support
 - Various small fixes and cleanups

* tag 'fbdev-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (42 commits)
  video: da8xx-fb: fix the polarities of the hsync/vsync pulse
  video: da8xx-fb: support lcdc v2 timing register expansion
  video: da8xx-fb: fixing timing off by one errors
  video: da8xx-fb fixing incorrect porch mappings
  video: xilinxfb: replace devm_request_and_ioremap by devm_ioremap_resource
  fbmem: move EXPORT_SYMBOL annotation next to symbol declarations
  drivers: video: fbcmap: remove the redundency and incorrect checkings
  video: mxsfb: simplify use of devm_ioremap_resource
  Release efifb's colormap in efifb_destroy()
  at91/avr32/atmel_lcdfb: prepare clk before calling enable
  video: exynos: Ensure definitions match prototypes
  OMAPDSS: fix WARN_ON in 'alpha_blending_enabled' sysfs file
  OMAPDSS: HDMI: Fix possible NULL reference
  video: da8xx-fb: adding am33xx as dependency
  video: da8xx-fb: let compiler decide what to inline
  video: da8xx-fb: make clock naming consistent
  video: da8xx-fb: set upstream clock rate (if reqd)
  video: da8xx-fb: reorganize panel detection
  video: da8xx-fb: ensure non-null cfg in pdata
  video: da8xx-fb: use devres
  ...
2013-09-05 09:49:32 -07:00
Linus Torvalds eced5a0a5a OMAP specific fbdev changes for 3.12:
* Change the OMAP board files to use the new OMAP display drivers
 * Remove all the old drivers, and the related auxiliary code.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJSKCBzAAoJEPo9qoy8lh71yy4QAIONKG1wqN93oGqhWlcSHWIe
 Lg9YIqYk7FDfroTVunGtm0nImJmJ9yEVkxAXBRJbVb5gwvlWhpUIrhc6OahksXP8
 rVxuwb+U9LdwWkskamv0UsstvIMMSPgtsuvAKeBaBz9jm0Yu+TbrZvnCv0AyKlKE
 IscOlDycG9ENbUrhIzu9utPNlvE03hqqgn8RVYvjoj4hQ8BmOBSOGGfuofbITJAS
 8wY4nAoRwU+rV3dWQgNAvFyQ/dvsnZ4nYNLJhnf6eaB9HzpfdtFUrOF/rAlJU8nG
 RrMt5oykQT9a6VKxNryoFqih2q+FPrXBARVDvGWxn6w+q2RHrw5eteGcemegzTga
 OSGyhLpGbT/5cvbQtfaHX/Rcrdy9CNj1FMy6Y/xMvkHeqiy+0Eo6l+Nh70cvHzrx
 b+vonkSornngymt6QSXyQwXkP1PbO9ZEsZbeK+wjrqrRKL5KRvQ/HGz3uYv7CiMX
 A6Q51RHDCDoelVAn9JORIEDQukh3R78XNwPbrjdRB1pNE3Z51rmSpolKsQbmPF9m
 073p4wQ91qOji4eIdxPhuN7NuAexs42iAIZNQnZ2gMFWWSwHLlNinaY2Uu+Fs2it
 wLyKabqvi1AeFHcARzYDuHzVPrRb+6exHokud6998M9zEvFAGCoKFcsxoEvvL5/u
 gwRjFHmMzz4caPVct0UU
 =Hj7U
 -----END PGP SIGNATURE-----

Merge tag 'fbdev-3.12-omap-legacy-removal' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux

Pull OMAP specific fbdev changes from Tomi Valkeinen:
 "I've got this pull request separate from the main fbdev pull request,
  as this contains a bunch of OMAP board file changes and thus could
  possibly be rejected in case of bad conflicts.

  The removal of the old display drivers depend on the board file
  changes, so Tony Lindgren suggested taking them together via fbdev
  tree.  These are in linux-next, and also Tony didn't see any conflicts
  with any of the branches he had, so they should go in clean.

   - Change the OMAP board files to use the new OMAP display drivers

   - Remove all the old drivers, and the related auxiliary code"

* tag 'fbdev-3.12-omap-legacy-removal' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (35 commits)
  OMAPDSS: rename omap_dss_device's 'device' field to 'dst'
  OMAPDSS: rename omap_dss_device's 'output' to 'src'
  OMAPDSS: DSS: remove legacy dss bus support
  OMAPDSS: RFBI: remove code related to old panel model
  OMAPDSS: VENC: remove code related to old panel model
  OMAPDSS: SDI: remove code related to old panel model
  OMAPDSS: DSI: remove code related to old panel model
  OMAPDSS: HDMI: remove code related to old panel model
  OMAPDSS: DPI: remove code related to old panel model
  OMAPDSS: remove all old panel drivers
  OMAPDSS: DPI: change regulator handling
  OMAPDSS: SDI: change regulator handling
  OMAPDSS: fix DPI and SDI device ids
  OMAPDSS: remove omap_dss_device->channel field
  OMAPDSS: RFBI: Mark RFBI as broken
  ARM: OMAP2+: Remove old display drivers from omap2plus_defconfig
  ARM: OMAP: AM3517EVM: use new display drivers
  ARM: OMAP: Zoom: use new display drivers
  ARM: OMAP: Pandora: use new display drivers
  ARM: OMAP: OMAP3EVM: use new display drivers
  ...
2013-09-05 09:44:03 -07:00
Linus Torvalds 27703bb4a6 PTR_RET() is a weird name, and led to some confusing usage. We ended
up with PTR_ERR_OR_ZERO(), and replacing or fixing all the usages.
 
 This has been sitting in linux-next for a whole cycle.
 
 Thanks,
 Rusty.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJSJo+1AAoJENkgDmzRrbjxIC4QALJK95o8AUXuwUkl+2fmFkUt
 hh2/PJ1vDYgk4Xt0J6hyoK7XMa0H1RkbBrROuDdsBnorMFpEsGcgdkUZte9ufoAS
 97Bg+7N0KPbTB/S8vOwtW1vbERTJIVPN2uf6h1Wqm9Xc2puCh3HbMMr1AWMGu0WQ
 NqY5+Zz8zecy1UOrMhEP6H1CjeQcL1w1DO6YM5ydeqlKNzAz+JMfDXriLPDwiE7+
 XFPDF/O3Vtd2ckA7L70Lio7hfHwxV5U4WwFVfiwls98XB4jcZqDKIoh1r8z4SRgR
 +0Rae2DN3BaOabGMr//5XdrzQVpwJTh5m2w8BAOHJvCJ9HR7Sq29UIN4u+TowZBy
 L2xYo4dvFxkympwu5zEd3c7vHYWKIaqmSq5PIjr4gF/uIo2OeOTrpPIK782ZEYb7
 e+qUgOEM05V9AmQZCrSZeP9u474Sj8ow3sCtWxfdRtwNfoEIcUXsNNJd/zDHlVtW
 cEtXqc2xXIpcuUJQWlSaGp8fmRQjVZPzrLKYLM2m39ZcOOJbf5rzQAYS7hHPosIa
 SK+YVux/+Zzi+Xo/vXq1OlM/SruCr5S7JOgCxLowoQ88vupgXME6uPyC8EO+QQ50
 GsrHes5ZNLbk0uVsfcexIyojkUnyvDmmnDpv+1zdC6RgZLJQn8OXp5yNhHhnhrFT
 BiHX6YFWtDDqRlVv8Q0F
 =LeaW
 -----END PGP SIGNATURE-----

Merge tag 'PTR_RET-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux

Pull PTR_RET() removal patches from Rusty Russell:
 "PTR_RET() is a weird name, and led to some confusing usage.  We ended
  up with PTR_ERR_OR_ZERO(), and replacing or fixing all the usages.

  This has been sitting in linux-next for a whole cycle"

[ There are still some PTR_RET users scattered about, with some of them
  possibly being new, but most of them existing in Rusty's tree too.  We
  have that

      #define PTR_RET(p) PTR_ERR_OR_ZERO(p)

  thing in <linux/err.h>, so they continue to work for now  - Linus ]

* tag 'PTR_RET-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
  GFS2: Replace PTR_RET with PTR_ERR_OR_ZERO
  Btrfs: volume: Replace PTR_RET with PTR_ERR_OR_ZERO
  drm/cma: Replace PTR_RET with PTR_ERR_OR_ZERO
  sh_veu: Replace PTR_RET with PTR_ERR_OR_ZERO
  dma-buf: Replace PTR_RET with PTR_ERR_OR_ZERO
  drivers/rtc: Replace PTR_RET with PTR_ERR_OR_ZERO
  mm/oom_kill: remove weird use of ERR_PTR()/PTR_ERR().
  staging/zcache: don't use PTR_RET().
  remoteproc: don't use PTR_RET().
  pinctrl: don't use PTR_RET().
  acpi: Replace weird use of PTR_RET.
  s390: Replace weird use of PTR_RET.
  PTR_RET is now PTR_ERR_OR_ZERO(): Replace most.
  PTR_RET is now PTR_ERR_OR_ZERO
2013-09-04 17:31:11 -07:00
Tomi Valkeinen 9560dc1059 OMAPDSS: rename omap_dss_device's 'device' field to 'dst'
In the old panel device model we had omap_dss_output entities,
representing the encoders in the DSS block. This entity had "device"
field, which pointed to the panel that was using the omap_dss_output.

With the new panel device model, the omap_dss_output is integrated into
omap_dss_device, which now represents a "display entity". Thus the "device"
field, now in omap_dss_device, points to the next entity in the display
entity-chain.

This patch renames the "device" field to "dst", which much better tells
what the field points to.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Archit Taneja <archit@ti.com>
2013-08-30 08:51:11 +03:00
Tomi Valkeinen a73fdc6474 OMAPDSS: rename omap_dss_device's 'output' to 'src'
In the old panel device model we had "outputs", which were the encoders
inside OMAP DSS block, and panel devices (omap_dss_device). The panel
devices had a reference to the source of the video data, i.e. reference
to an "output", in a field named "output".

That was somewhat confusing even in the old panel device model, but even
more so with the panel device model where we can have longer chains of
display entities.

This patch renames the "output" field to "src", which much better tells
what the field points to.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Archit Taneja <archit@ti.com>
2013-08-30 08:51:10 +03:00
Tomi Valkeinen b3864299c1 OMAPDSS: DSS: remove legacy dss bus support
With all the old panels removed and all the old panel model APIs removed
from the DSS encoders, we can now remove the custom omapdss-bus which
was used in the old panel model.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Archit Taneja <archit@ti.com>
2013-08-30 08:51:10 +03:00
Tomi Valkeinen 3825ce5a9b OMAPDSS: fix WARN_ON in 'alpha_blending_enabled' sysfs file
The code handling 'alpha_blending_enabled' sysfs file contains WARN_ONs
in case the feature is not supported on the current platform. Even
though only root can write to the file, anyone can read it, thus causing
the kernel to get tainted and printing an ugly warning.

Instead of having WARN_ONs, return a proper error if the feature is not
supported.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reported-by: Russell King - ARM Linux <linux@arm.linux.org.uk>
2013-08-29 16:43:47 +03:00
Tomi Valkeinen db680c6515 OMAPDSS: HDMI: Fix possible NULL reference
Commit 5391e87d12 (OMAPDSS: remove dispc's dependency to VENC/HDMI)
introduced a possible NULL reference bug in the HDMI driver when setting
timings. In practice the bug shouldn't happen, as the timings have been
verified earlier, and thus the timings should always be ok.

Fix the possible issue by moving the use of the timings pointer inside
the NULL check.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
2013-08-29 16:43:43 +03:00
Tomi Valkeinen c1e4535d43 OMAPDSS: RFBI: remove code related to old panel model
Now that the old panel drivers have been removed, we can remove the
old-model API and related code from the DSS encoder drivers.

This patch removes the code from the RFBI driver.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Archit Taneja <archit@ti.com>
2013-08-29 16:21:53 +03:00
Tomi Valkeinen 09d2e7cdeb OMAPDSS: VENC: remove code related to old panel model
Now that the old panel drivers have been removed, we can remove the
old-model API and related code from the DSS encoder drivers.

This patch removes the code from the VENC driver.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Archit Taneja <archit@ti.com>
2013-08-29 16:21:53 +03:00
Tomi Valkeinen cd6e915b36 OMAPDSS: SDI: remove code related to old panel model
Now that the old panel drivers have been removed, we can remove the
old-model API and related code from the DSS encoder drivers.

This patch removes the code from the SDI driver.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Archit Taneja <archit@ti.com>
2013-08-29 16:21:53 +03:00
Tomi Valkeinen 5cfc1c3cb6 OMAPDSS: DSI: remove code related to old panel model
Now that the old panel drivers have been removed, we can remove the
old-model API and related code from the DSS encoder drivers.

This patch removes the code from the DSI driver.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Archit Taneja <archit@ti.com>
2013-08-29 16:21:52 +03:00
Tomi Valkeinen 164ebdd110 OMAPDSS: HDMI: remove code related to old panel model
Now that the old panel drivers have been removed, we can remove the
old-model API and related code from the DSS encoder drivers.

This patch removes the code from the HDMI driver.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Archit Taneja <archit@ti.com>
2013-08-29 16:21:52 +03:00
Tomi Valkeinen 86a3efe150 OMAPDSS: DPI: remove code related to old panel model
Now that the old panel drivers have been removed, we can remove the
old-model API and related code from the DSS encoder drivers.

This patch removes the code from the DPI driver.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Archit Taneja <archit@ti.com>
2013-08-29 16:21:52 +03:00
Tomi Valkeinen 05cefbe2f2 OMAPDSS: remove all old panel drivers
The board files now use the new panel drivers, making the old panel
drivers obsolete.

Remove the old panel drivers, Kconfig and Makefile entries, and the
panels' platform data structs.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Archit Taneja <archit@ti.com>
2013-08-29 16:21:52 +03:00
Tomi Valkeinen 4123de2138 OMAPDSS: DPI: change regulator handling
Regulator handling for DPI and SDI is currently handled in the core.c,
using the 'virtual' omapdss platform device. Nowadays we have proper
devices for both DPI and SDI, and so we can handle the regulators inside
the respective drivers.

This patch moves the regulator handling for DPI into dpi.c.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Archit Taneja <archit@ti.com>
2013-08-29 16:21:52 +03:00
Tomi Valkeinen 349c3d95f5 OMAPDSS: SDI: change regulator handling
Regulator handling for DPI and SDI is currently handled in the core.c,
using the 'virtual' omapdss platform device. Nowadays we have proper
devices for both DPI and SDI, and so we can handle the regulators inside
the respective drivers.

This patch moves the regulator handling for SDI into sdi.c.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Archit Taneja <archit@ti.com>
2013-08-29 16:21:52 +03:00
Tomi Valkeinen 883f537a92 OMAPDSS: RFBI: Mark RFBI as broken
OMAPDSS's RFBI encoder driver has not been working for some time. The
Nokia N800 is the only board in the mainline that uses RFBI, but it has
never been fully functional.

The RFBI driver needs to be updated to the new panel model, but as
the driver is rather unmaintained and there's no way to test the
changes, let's mark the driver as broken.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Archit Taneja <archit@ti.com>
2013-08-29 16:21:51 +03:00
Mythri P K fd3cd7ee12 OMAPDSS: HDMI: Fix AVI infoframe bug
ti_hdmi_4xxx_basic_configure() is supposed to initialize the AVI
infoframe data in the ip_data container. However, the function actually
takes a copy of the infoframe from the ip_data, and then goes on
initializing that copy. The initialized data is never copied back to the
ip_data container, thus the infoframe in ip_data is left always zero.

Afaik, this doesn't really cause any issues in the current mainline, as
we don't use the advanced features offered by the AVI infoframe.

This patch fixes the initialization of the AVI infoframe.

Signed-off-by: Mythri P K <mythripk@ti.com>
[tomi.valkeinen@ti.com: updated the description]
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-08-06 14:55:06 +03:00
Tomi Valkeinen 005358c8c0 OMAPDSS: analog-tv-connector: compile fix
connector-analog-tv.c uses omap_dss_pal_timings, defined in omapdss's
venc.c, for default timings. omap_dss_pal_timings only exists when VENC
is enabled in the kernel config, so disabling VENC breaks
omap_dss_pal_timings connector-analog-tv compilation.

Instead of adding dependency to VENC, add internal default timings to
the connector driver, because the connector driver should not depend on
VENC, and it can be used with any other analog TV encoder.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-08-02 13:03:21 +03:00
Rusty Russell 8c6ffba0ed PTR_RET is now PTR_ERR_OR_ZERO(): Replace most.
Sweep of the simple cases.

Cc: netdev@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: David S. Miller <davem@davemloft.net>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-07-15 11:25:01 +09:30
Linus Torvalds 5f097cd249 Various fbdev changes for 3.11
* xilinxfb updates
  * Small cleanups and fixes to multiple drivers
  * OMAP display subsystem bug updates
  * imxfb dt support
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJR2nxAAAoJEOrjwV5ZMRf2YYcP+gIc2j4so9c4gMp5UaWtyzU8
 q5rG0WtRghvVHupYTampm8+xCMcAKAAcUUhVMNbN3X7QHUAlbYQiL2Gddmo42nSw
 bjzYoodiuXQIgcp53UGG1bl1zmd8GhmTc8NRYQEBXUqZ4nLGlauQ5O9ZNr4V4dOQ
 vh5bfV61x9FBUay05cHLG8FIxV9Zcg0wUKCIHHtOkj+twk7wdnAKtOZChiXD0RVC
 lPXc8+xIvwu1q2R88XTvMrNVIy52tq1iIwohdwqKjpc8ndusC5DUi9DI7icUBg8B
 0D81tZvCny8/HFVt8tQPW/htT1KsWlnL+qM1IMM8DRAfcAQFxXSxWITXRtOxZHIs
 rW5ocWxqUmS2A7wjXctDv3EbAuj/gjpZ52hDzb2B9C1KuRsj9Rp42CU2HN+KqviG
 YNtZV86w9Kv3Q+GLrPtWarrHW5YpOEK+ADU5PgNdrfzl22+I+Caja5IfHHNbIvr7
 mBv6NlsGYHZxV75gcxvSpy33OxP4UY7F7RmtFQSXGojAE9Qwkvgca3Ug9KcTIyYs
 SEzBDMXlaKVn+YzpZpHeFRSm19wkU3fRyeD15r4L3orVj2jwp7fQihrX3UWyj6lh
 SLjr5C+YYI/leWZd5p5gjrtStyGrIXCv9EX255OkR2VA2ZS1t32/sbIKlNnyichX
 4ZAPuBMCW70BxR3RZvJ1
 =G+Vu
 -----END PGP SIGNATURE-----

Merge tag 'fbdev-for-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/plagnioj/linux-fbdev

Pull fbdev update from Jean-Christophe PLAGNIOL-VILLARD:
 "Various fbdev changes for 3.11
   - xilinxfb updates
   - Small cleanups and fixes to multiple drivers
   - OMAP display subsystem bug updates
   - imxfb dt support"

* tag 'fbdev-for-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/plagnioj/linux-fbdev: (95 commits)
  video: imxfb: Add DT support
  video: i740fb: Make i740fb_init static
  fb: make fp_get_options name argument const
  video: mmp: fix graphics/video layer enable/mask swap issue
  video: mmp: fix memcpy wrong size for mmp_addr issue
  radeon: use pdev->pm_cap instead of pci_find_capability(..,PCI_CAP_ID_PM)
  aty128fb: use pdev->pm_cap instead of pci_find_capability(..,PCI_CAP_ID_PM)
  video: of_display_timing.h: Declare 'display_timing'
  fbdev: bfin-lq035q1-fb: Use dev_pm_ops
  fbmem: return -EFAULT on copy_to_user() failure
  OMAPDSS: DPI: Fix wrong pixel clock limit
  video: replace strict_strtoul() with kstrtoul()
  uvesafb: Correct/simplify warning message
  fb: fix atyfb unused data warnings
  fb: fix atyfb build warning
  video: imxfb: Make local symbols static
  video: udlfb: Make local symbol static
  video: udlfb: Use NULL instead of 0
  video: smscufx: Use NULL instead of 0
  video: remove unnecessary platform_set_drvdata()
  ...
2013-07-09 15:51:32 -07:00
Linus Torvalds 80cc38b163 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
Pull trivial tree updates from Jiri Kosina:
 "The usual stuff from trivial tree"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (34 commits)
  treewide: relase -> release
  Documentation/cgroups/memory.txt: fix stat file documentation
  sysctl/net.txt: delete reference to obsolete 2.4.x kernel
  spinlock_api_smp.h: fix preprocessor comments
  treewide: Fix typo in printk
  doc: device tree: clarify stuff in usage-model.txt.
  open firmware: "/aliasas" -> "/aliases"
  md: bcache: Fixed a typo with the word 'arithmetic'
  irq/generic-chip: fix a few kernel-doc entries
  frv: Convert use of typedef ctl_table to struct ctl_table
  sgi: xpc: Convert use of typedef ctl_table to struct ctl_table
  doc: clk: Fix incorrect wording
  Documentation/arm/IXP4xx fix a typo
  Documentation/networking/ieee802154 fix a typo
  Documentation/DocBook/media/v4l fix a typo
  Documentation/video4linux/si476x.txt fix a typo
  Documentation/virtual/kvm/api.txt fix a typo
  Documentation/early-userspace/README fix a typo
  Documentation/video4linux/soc-camera.txt fix a typo
  lguest: fix CONFIG_PAE -> CONFIG_x86_PAE in comment
  ...
2013-07-04 11:40:58 -07: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
Tomi Valkeinen 72e5512ade 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>
2013-06-26 15:56:06 +03:00
Jingoo Han f5725af59c 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>
2013-06-26 15:19:48 +03:00
Tomi Valkeinen c545b59515 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>
2013-06-17 14:33:21 +03:00
Tomi Valkeinen 6077ce8d59 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>
2013-06-17 14:33:18 +03:00
Tomi Valkeinen 2e1def0c21 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>
2013-06-17 14:33:04 +03:00
Tomi Valkeinen 922ae890a9 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>
2013-06-17 14:32:51 +03:00
Tomi Valkeinen f92f168f8d 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>
2013-06-17 14:32:37 +03:00
Tomi Valkeinen 84192742d9 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>
2013-06-17 14:32:25 +03:00
Tomi Valkeinen dbc23840b4 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>
2013-06-17 14:32:11 +03:00
Tomi Valkeinen 04f0ff022d 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>
2013-06-17 14:31:36 +03:00
Tomi Valkeinen 61a7f24a3f 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>
2013-06-17 14:30:50 +03:00
Tomi Valkeinen 3cb07ee66b 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>
2013-06-17 14:30:33 +03:00
Tomi Valkeinen 348077b154 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>
2013-06-17 14:30:03 +03:00
Tomi Valkeinen a0ee577fa2 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>
2013-06-17 14:16:04 +03:00
Tomi Valkeinen 2773fefbd7 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>
2013-06-17 14:16:03 +03:00
Tomi Valkeinen deb16df884 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>
2013-06-17 14:01:01 +03:00
Tomi Valkeinen 0b450c3131 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>
2013-06-17 14:01:00 +03:00
Tomi Valkeinen fb8efa4966 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>
2013-06-17 14:01:00 +03:00
Tomi Valkeinen b1082dfd61 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>
2013-06-17 14:00:59 +03:00
Tomi Valkeinen 0b24edb1c7 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>
2013-06-17 14:00:59 +03:00
Tomi Valkeinen bc24b8b6d7 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>
2013-06-17 14:00:58 +03:00
Tomi Valkeinen efedce1425 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>
2013-06-17 14:00:57 +03:00
Tomi Valkeinen 5d47dbc852 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>
2013-06-17 14:00:57 +03:00
Sergey Kibrik 595470a785 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>
2013-06-17 14:00:56 +03:00
Emil Goode b0e449ce65 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>
2013-06-17 14:00:56 +03:00
Tomi Valkeinen 5391e87d12 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>
2013-06-17 14:00:55 +03:00
Tomi Valkeinen 29356be1e0 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>
2013-06-17 14:00:54 +03:00
Tomi Valkeinen ddb1d5ca99 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>
2013-06-17 14:00:54 +03:00
Tomi Valkeinen e9f322b491 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>
2013-06-17 14:00:54 +03:00
Tomi Valkeinen 820caabf68 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>
2013-06-17 14:00:53 +03:00
Tomi Valkeinen b7328e1459 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>
2013-06-17 14:00:53 +03:00
Tomi Valkeinen d35317a42d 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>
2013-06-17 14:00:52 +03:00
Tomi Valkeinen 1f68d9c4b6 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>
2013-06-17 14:00:51 +03:00
Tomi Valkeinen d392393393 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>
2013-06-17 14:00:51 +03:00
Tomi Valkeinen ecc8b37089 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>
2013-06-17 14:00:50 +03:00
Tomi Valkeinen 94140f0d22 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>
2013-06-17 14:00:50 +03:00
Tomi Valkeinen a65c8bdab9 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>
2013-06-17 14:00:49 +03:00
Tomi Valkeinen 67b23ca1b6 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>
2013-06-17 14:00:49 +03:00
Tomi Valkeinen 2e7e3dc794 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>
2013-06-17 14:00:48 +03:00
Tomi Valkeinen 7ae9a71e09 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>
2013-06-17 14:00:48 +03:00
Tomi Valkeinen 6fcd485b04 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>
2013-06-17 14:00:47 +03:00
Tomi Valkeinen 7e436bb2e3 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>
2013-06-17 14:00:47 +03:00
Tomi Valkeinen 46c4b64516 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>
2013-06-17 14:00:47 +03:00
Tomi Valkeinen d37801b3a2 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>
2013-06-17 14:00:46 +03:00
Tomi Valkeinen e25001d8be 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>
2013-06-17 14:00:46 +03:00
Tomi Valkeinen 00df43b822 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>
2013-06-17 14:00:45 +03:00
Tomi Valkeinen 2795f646a7 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>
2013-06-17 14:00:45 +03:00
Tomi Valkeinen b2541c40aa 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>
2013-06-17 14:00:44 +03:00
Tomi Valkeinen 51930bba8e 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>
2013-06-17 14:00:44 +03:00
Tomi Valkeinen a7e71e7f9f 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>
2013-06-17 14:00:43 +03:00
Tomi Valkeinen 04b1fc0291 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>
2013-06-17 14:00:43 +03:00
Tomi Valkeinen 7f7cdbd688 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>
2013-06-17 14:00:42 +03:00
Tomi Valkeinen be8e8e1c62 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>
2013-06-17 14:00:42 +03:00
Tomi Valkeinen e724366498 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>
2013-06-17 14:00:41 +03:00
Tomi Valkeinen 679852dbee 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>
2013-06-17 14:00:41 +03:00
Tomi Valkeinen 12ca755ba1 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>
2013-06-17 14:00:40 +03:00
Tomi Valkeinen 805cc2d19c 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>
2013-06-17 14:00:40 +03:00
Tomi Valkeinen c6ca5b2201 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>
2013-06-17 14:00:39 +03:00
Tomi Valkeinen 0a20012605 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>
2013-06-17 14:00:26 +03:00
Jean-Christophe PLAGNIOL-VILLARD 2436e8aa8a Merge branch 'fbdev-3.10-fixes' of git://gitorious.org/linux-omap-dss2/linux into linux-fbdev/for-3.10-fixes
Pull Tomi fixes for ps3fb and omap2

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2013-05-29 17:00:34 +08:00
Masanari Iida 8b513d0cf6 treewide: Fix typo in printk
Correct spelling typo in various part of drivers

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2013-05-28 12:02:13 +02:00
Tomi Valkeinen 591a0ac7f1 OMAPDSS: Fix crash with DT boot
When booting with DT, there's a crash when omapfb is probed. This is
caused by the fact that omapdss+DT is not yet supported, and thus
omapdss is not probed at all. On the other hand, omapfb is always
probed. When omapfb tries to use omapdss, there's a NULL pointer
dereference crash. The same error should most likely happen with omapdrm
and omap_vout also.

To fix this, add an "initialized" state to omapdss. When omapdss has
been probed, it's marked as initialized. omapfb, omapdrm and omap_vout
check this state when they are probed to see that omapdss is actually
there.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
2013-05-23 12:54:21 +03:00
Wolfram Sang ffc0775be1 drivers/video/omap2/dss: don't check resource with devm_ioremap_resource
devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2013-05-18 11:58:02 +02:00
Wolfram Sang dc83d05b10 drivers/video/omap2: don't check resource with devm_ioremap_resource
devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2013-05-18 11:58:01 +02:00
Linus Torvalds 20a2078ce7 Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux
Pull drm updates from Dave Airlie:
 "This is the main drm pull request for 3.10.

  Wierd bits:
   - OMAP drm changes required OMAP dss changes, in drivers/video, so I
     took them in here.
   - one more fbcon fix for font handover
   - VT switch avoidance in pm code
   - scatterlist helpers for gpu drivers - have acks from akpm

  Highlights:
   - qxl kms driver - driver for the spice qxl virtual GPU

  Nouveau:
   - fermi/kepler VRAM compression
   - GK110/nvf0 modesetting support.

  Tegra:
   - host1x core merged with 2D engine support

  i915:
   - vt switchless resume
   - more valleyview support
   - vblank fixes
   - modesetting pipe config rework

  radeon:
   - UVD engine support
   - SI chip tiling support
   - GPU registers initialisation from golden values.

  exynos:
   - device tree changes
   - fimc block support

  Otherwise:
   - bunches of fixes all over the place."

* 'drm-next' of git://people.freedesktop.org/~airlied/linux: (513 commits)
  qxl: update to new idr interfaces.
  drm/nouveau: fix build with nv50->nvc0
  drm/radeon: fix handling of v6 power tables
  drm/radeon: clarify family checks in pm table parsing
  drm/radeon: consolidate UVD clock programming
  drm/radeon: fix UPLL_REF_DIV_MASK definition
  radeon: add bo tracking debugfs
  drm/radeon: add new richland pci ids
  drm/radeon: add some new SI PCI ids
  drm/radeon: fix scratch reg handling for UVD fence
  drm/radeon: allocate SA bo in the requested domain
  drm/radeon: fix possible segfault when parsing pm tables
  drm/radeon: fix endian bugs in atom_allocate_fb_scratch()
  OMAPDSS: TFP410: return EPROBE_DEFER if the i2c adapter not found
  OMAPDSS: VENC: Add error handling for venc_probe_pdata
  OMAPDSS: HDMI: Add error handling for hdmi_probe_pdata
  OMAPDSS: RFBI: Add error handling for rfbi_probe_pdata
  OMAPDSS: DSI: Add error handling for dsi_probe_pdata
  OMAPDSS: SDI: Add error handling for sdi_probe_pdata
  OMAPDSS: DPI: Add error handling for dpi_probe_pdata
  ...
2013-05-02 19:40:34 -07:00
Tomi Valkeinen bca3913034 OMAPDSS: TFP410: return EPROBE_DEFER if the i2c adapter not found
If the I2C adapter needed by the TFP410 device is not available yet,
return EPROBE_DEFER so that the device will get probed again.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-05-02 12:25:44 +03:00