summaryrefslogtreecommitdiff
path: root/drivers/video/omap2
AgeCommit message (Collapse)Author
2013-05-29Merge branch 'fbdev-3.10-fixes' of git://gitorious.org/linux-omap-dss2/linux ↵Jean-Christophe PLAGNIOL-VILLARD
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-23OMAPDSS: Fix crash with DT bootTomi Valkeinen
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-18drivers/video/omap2/dss: don't check resource with devm_ioremap_resourceWolfram Sang
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-18drivers/video/omap2: don't check resource with devm_ioremap_resourceWolfram Sang
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-03Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds
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-02OMAPDSS: TFP410: return EPROBE_DEFER if the i2c adapter not foundTomi Valkeinen
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-02OMAPDSS: VENC: Add error handling for venc_probe_pdataTomi Valkeinen
Add proper error handling for venc_probe_pdata(). This will cause EPROBE_DEFER to be properly passed upwards, causing the VENC driver to be probed again later if a resource was missing. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-05-02OMAPDSS: HDMI: Add error handling for hdmi_probe_pdataTomi Valkeinen
Add proper error handling for hdmi_probe_pdata(). This will cause EPROBE_DEFER to be properly passed upwards, causing the HDMI driver to be probed again later if a resource was missing. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-05-02OMAPDSS: RFBI: Add error handling for rfbi_probe_pdataTomi Valkeinen
Add proper error handling for rfbi_probe_pdata(). This will cause EPROBE_DEFER to be properly passed upwards, causing the RFBI driver to be probed again later if a resource was missing. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-05-02OMAPDSS: DSI: Add error handling for dsi_probe_pdataTomi Valkeinen
Add proper error handling for dsi_probe_pdata(). This will cause EPROBE_DEFER to be properly passed upwards, causing the DSI driver to be probed again later if a resource was missing. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-05-02OMAPDSS: SDI: Add error handling for sdi_probe_pdataTomi Valkeinen
Add proper error handling for sdi_probe_pdata(). This will cause EPROBE_DEFER to be properly passed upwards, causing the SDI driver to be probed again later if a resource was missing. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-05-02OMAPDSS: DPI: Add error handling for dpi_probe_pdataTomi Valkeinen
Add proper error handling for dpi_probe_pdata(). This will cause EPROBE_DEFER to be properly passed upwards, causing the DPI driver to be probed again later if a resource was missing. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-05-02OMAPDSS: VENC: use platform_driver_register()Tomi Valkeinen
Use platform_driver_register() instead of platform_driver_probe() so that we can support EPROBE_DEFER. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-05-02OMAPDSS: HDMI: use platform_driver_register()Tomi Valkeinen
Use platform_driver_register() instead of platform_driver_probe() so that we can support EPROBE_DEFER. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-05-02OMAPDSS: RFBI: use platform_driver_register()Tomi Valkeinen
Use platform_driver_register() instead of platform_driver_probe() so that we can support EPROBE_DEFER. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-05-02OMAPDSS: DSI: use platform_driver_register()Tomi Valkeinen
Use platform_driver_register() instead of platform_driver_probe() so that we can support EPROBE_DEFER. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-05-02OMAPDSS: SDI: use platform_driver_register()Tomi Valkeinen
Use platform_driver_register() instead of platform_driver_probe() so that we can support EPROBE_DEFER. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-05-02OMAPDSS: DPI: use platform_driver_register()Tomi Valkeinen
Use platform_driver_register() instead of platform_driver_probe() so that we can support EPROBE_DEFER. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-05-02OMAPFB: defer probe if no displaysTomi Valkeinen
omapfb requires the panel drivers to have been probed when omapfb is initialized. omapfb does not support insertion of new panels after its probe. This causes a problem in case omapdss or the panel probes have been deferred due to EPROBE_DEFER error, as omapfb won't find any displays. As a quick fix, this patch changes the omapfb probe so that if omapfb does not find any displays, it'll return EPROBE_DEFER. This is not perfect, as with a board with no displays, omapfb will get deferred forever. Also, if the board has multiple displays, but only some of them have been probed, omapfb will start and leave the unprobed displays out. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-05-02OMAPFB: use module_platform_driver()Tomi Valkeinen
Instead of using platform_driver_probe(), use module_platform_driver() so that we can support deferred probing. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-05-02OMAPDSS: Makefile: move omapfb after panelsTomi Valkeinen
omapfb requires the panels to have been probed before omapfb's probe. We currently manage that by having omapfb in late initcall level. However, a much simpler way is to just change the makefile so that omapfb is after the panel drivers. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-05-02OMAPDSS: DPI: fix compilation if DSI not compiled inTomi Valkeinen
Commit 100c826235793345efe06b3558cc9d36166b1e26 (OMAPDSS: DPI: use new clock calculation code) breaks dpi.c compilation if DSI is not enabled in the kernel configuration. Fix compilation by adding dummy inline functions for the ones that dpi.c references. The functions will never be called, as dpi.c knows that there is no DSI device available. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-04-26Merge branch '3.10/fb-mmap' into for-nextTomi Valkeinen
Merge topic branch to get vm_iomap_memory into use. Conflicts: drivers/video/fbmon.c
2013-04-24fbdev/omapfb: use vm_iomap_memory()Tomi Valkeinen
Use vm_iomap_memory() instead of [io_]remap_pfn_range(). vm_iomap_memory() gives us much simpler API to map memory to userspace, and reduces possibilities for bugs. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-04-15OMAPDSS: Merge omapdss topic branchesTomi Valkeinen
2013-04-11OMAPDSS: DPI: widen the pck search when using dss fckTomi Valkeinen
When not using DSI PLL to generate the pixel clock, but DSS FCK, the possible pixel clock rates are rather limited. DSS FCK is currently used on OMAP2 and OMAP3. When using Beagleboard with a monitor that supports high resolutions, the clock rates do not match (at least for me) for the monitor's pixel clocks within the current threshold in the code, which is +/- 1MHz. This patch widens the search up to +/- 15MHz. The search is done in steps, i.e. it first tries to find a rather exact clock, than a bit less exact, etc. so this should not change the cases where a clock was already found. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-04-11OMAPDSS: fix dss_fck clock rate roundingTomi Valkeinen
DSS func clock is calculated with prate / div * m. However, the current omapdss code calculates it with prate * m / div, which yields a slightly different result when there's a remainder. For example, 432000000 / 14 * 2 = 61714284, but 432000000 * 2 / 14 = 61714285. In addition to that, the clock framework wants the clock rate given with clk_set_rate to be higher than the actual (truncated) end result. So, if prate is 432000000, and div is 14, the real result is 30857142.8571... We need to call clk_set_rate with 30857143, which gives us a clock of 30857142. That's why we need to use DIV_ROUND_UP() when calling clk_set_rate. This patch fixes the clock calculation. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-04-10drivers: video: use module_platform_driver_probe()Fabio Porcedda
This patch converts the drivers to use the module_platform_driver_probe() macro which makes the code smaller and a bit simpler. Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com> Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> # atmel_lcdfb.c Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: David Howells <dhowells@redhat.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> # amifb.c Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-04-10omapdss: use devm_clk_get()Archit Taneja
Use devm_clk_get() instead of clk_get() for dss, and for outputs hdmi and venc. This reduces code and simplifies error handling. Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-04-10OMAPDSS: nec-nl8048 panel: Use dev_pm_opsLars-Peter Clausen
Use dev_pm_ops instead of the deprecated legacy suspend/resume callbacks. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-04-10OMAPDSS: DISPC: Revert to older DISPC Smart Standby mechanism for OMAP5Archit Taneja
DISPC on OMAP5 has a more optimised mechanism of asserting Mstandby to achieve more power savings when DISPC is configured in Smart Standby mode. This mechanism leads to underflows when multiple DISPC pipes are enabled. There is a register field which can let us revert to the older mechanism of asserting Mstandby. Configure this field to prevent underflows. Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-04-10OMAPDSS: DISPC: Configure doublestride for NV12 when using 2D Tiler buffersArchit Taneja
When using a DISPC video pipeline to a fetch a NV12 buffer in a 2D container, we need to set set a doublestride bit in the video pipe's ATTRIBUTES register. This is needed because the stride for the UV plane(using a 16 bit Tiler container) is double the stride for the Y plane(using a 8 bit Tiler container) for the 0 or 180 degree views. The ROW_INC register is meant for the Y plane, and the HW will calculate the row increment needed for the UV plane by using double the stride value based on whether this bit is set or not. Set the bit when we are using a 2D Tiler buffer and when rotation is 0 or 180 degrees. The stride value is the same for 90 and 270 degree Tiler views, hence the bit shouldn't be set. Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-04-10omapdss: Features: Fix some parameter rangesArchit Taneja
Increase the DSS_FCLK and DSI_FCLK max supported frequencies, these come because some frequencies were increased from OMAP5 ES1 to OMAP5 ES2. We support only OMAP5 ES2 in the kernel, so replace the ES1 values with ES2 values. Increase the DSI PLL Fint range, this was previously just copied from the OMAP4 param range struct. Fix the maximum DSS_FCLK on OMAP2, it's 133 Mhz according to the TRM. Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-04-10omapdss: DISPC: add max pixel clock limits for LCD and TV managersArchit Taneja
Each version of OMAP has a limitation on the maximum pixel clock frequency supported by an overlay manager. This limit isn't checked by omapdss. Add dispc feats for lcd and tv managers and check whether the target timings can be supported or not. The pixel clock limitations are actually more complex. They depend on which OPP OMAP is in, and they also depend on which encoder is the manager connected to. The OPP dependence is ignored as DSS forces the PM framework to be on OPP100 when DSS is enabled, and the encoder dependencies are ignored by DISPC for now. These limits should come from the encoder driver. The OMAP2 TRM doesn't mention the maximum pixel clock limit. This value is left as half of DSS_FCLK, as OMAP2 requires the PCD to be atleast 2. Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-04-10OMAPDSS: DSI: Use devm_clk_get()Sachin Kamat
Using devm_clk_get cleans up some code. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-04-10drivers: video: omap2: dss: Use PTR_RET functionAlexandru Gheorghiu
Use PTR_RET function instead of IS_ERR and PTR_ERR. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu <gheorghiuandru@gmail.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-04-03OMAPDSS: VENC: remove platform_enable/disable callsArchit Taneja
The platform_enable/disable callbacks in board files for VENC omap_dss_device instances don't do anything. Hence, we can remove these callbacks from the VENC driver. Signed-off-by: Archit Taneja <archit@ti.com>
2013-04-03OMAPDSS: n8x0 panel: remove use of platform_enable/disableArchit Taneja
The n8x0 panel driver now manages the gpios required to configure the panel. This was previously done in panel_n8x0_data's platform_enable/disable callbacks defined in board files using this panel. All the board files using this panel now pass the gpio information as platform data via the panel_n8x0_data struct, which is needed by the panel driver to configure the gpios connected to the panel. Hence, the uses of platform_enable/disable ops can be safely removed now. Signed-off-by: Archit Taneja <archit@ti.com>
2013-04-03OMAPDSS: n8x0 panel: handle gpio data in panel driverArchit Taneja
The n8x0 panel driver leaves gpio configurations to the platform_enable and disable calls in the platform's board file. These should happen in the panel driver itself. A platform data struct called panel_n8x0_data already exists to hold gpio numbers and other platform data. However, the gpio requests are expected to be done in the board file and not the panel driver. Request all the gpios in the panel driver so that the board files which use the the panel don't need to do it. This will help in removing the need for the panel drivers to have platform related callbacks. Signed-off-by: Archit Taneja <archit@ti.com>
2013-04-03OMAPDSS: picodlp panel: remove platform_enable/disable callbacksArchit Taneja
The picodlp panel driver now manages the gpios required to configure the panel. This was previously done in omap_dss_device's platform_enable/disable callbacks defined in board files using this panel. All the board files using this panel now pass the gpio information as platform data via the panel_generic_dpi_data struct, which is needed by the panel driver to configure the gpios connected to the panel. Hence, the platform_enable/disable ops can be safely removed now. Signed-off-by: Archit Taneja <archit@ti.com>
2013-04-03OMAPDSS: picodlp panel: handle gpio data in panel driverArchit Taneja
The picodlp panel driver leaves gpio requests to the platform's board file. These should happen in the panel driver itself. A platform data struct called picodlp_panel_data already exists to hold gpio numbers and other platform data. Request all the gpios in the panel driver so that the board files which use the the panel don't need to do it. This will help in removing the need for the panel drivers to have platform related callbacks. Signed-off-by: Archit Taneja <archit@ti.com>
2013-04-03OMAPDSS: tpo-td043: remove platform_enable/disable callbacksArchit Taneja
The tpo-td043 panel driver now manages the gpios required to configure the panel. This was previously done in omap_dss_device's platform_enable/disable callbacks defined in board files using this panel. All the board files using this panel now pass the gpio information as platform data via the panel_tpo_td043_data struct, which is needed by the panel driver to configure the gpios connected to the panel. Hence, the platform_enable/disable ops can be safely removed now. Signed-off-by: Archit Taneja <archit@ti.com>
2013-04-03OMAPDSS: tpo-td043 panel: handle gpios in panel driverArchit Taneja
The tpo-td043mtea1 panel driver leaves gpio configurations to the platform_enable and disable calls in the platform's board file. These should happen in the panel driver itself. Create a platform data struct for the panel, this contains the reset gpio number used by the panel driver, this struct will be passed to the panel driver as platform data. The driver will request and configure the reset gpio rather than leaving it to platform callbacks in board files. This will help in removing the need for the panel drivers to have platform related callbacks. Signed-off-by: Archit Taneja <archit@ti.com>
2013-04-03OMAPDSS: nec-nl8048 panel: remove platform_enable/disable callbacksArchit Taneja
The nec-nl8048 panel driver now manages the gpios required to configure the panel. This was previously done in omap_dss_device's platform_enable/disable callbacks defined in board files using this panel. All the board files using this panel now pass the gpio information as platform data via the panel_nec_nl8048_data struct, which is needed by the panel driver to configure the gpios connected to the panel. Hence, the platform_enable/disable ops can be safely removed now. Signed-off-by: Archit Taneja <archit@ti.com>
2013-04-03OMAPDSS: nec-nl8048 panel: handle gpios in panel driverArchit Taneja
The nec-nl8048hl11-01 panel driver leaves gpio configurations to the platform_enable and disable calls in the platform's board file. These should happen in the panel driver itself. Create a platform data struct for the panel, this contains the gpio numbers used by the panel driver, this struct will be passed to the panel driver as platform data. The driver will request and configure these gpios rather than leaving it to platform callbacks in board files. This will help in removing the need for the panel drivers to have platform related callbacks. Signed-off-by: Archit Taneja <archit@ti.com>
2013-04-03OMAPDSS: acx565akm panel: handle gpios in panel driverArchit Taneja
The acx565akm panel driver leaves gpio configurations to the platform_enable and disable calls in the platform's board file. These should happen in the panel driver itself. Create a platform data struct for the panel, this contains the reset gpio number used by the panel driver, this struct will be passed to the panel driver as platform data. The driver will request and configure the reset gpio rather than leaving it to platform callbacks in board files. This will help in removing the need for the panel drivers to have platform related callbacks. Signed-off-by: Archit Taneja <archit@ti.com>
2013-04-03OMAPDSS: sharp-ls panel: remove platform_enable/disable callbacksArchit Taneja
The sharp-ls panel driver now manages the gpios required to configure the panel. This was previously done in omap_dss_device's platform_enable/disable callbacks defined in board files using this panel. All the board files using this panel now pass the gpio information as platform data via the panel_sharp_ls037v7dw01_data struct, which is needed by the panel driver to configure the gpios connected to the panel. Hence, the platform_enable/disable ops can be safely removed now. Signed-off-by: Archit Taneja <archit@ti.com>
2013-04-03OMAPDSS: LS037V7DW01: handle gpios in panel driverTomi Valkeinen
Move the GPIO handling from board file's platform callbacks to the panel driver, which gets the gpios via platform data. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-04-03OMAPDSS: generic dpi panel: remove uses of platform_enable/disable opsArchit Taneja
The generic dpi panel driver now sets the gpios required to configure the panel. This was previously done in platform_enable/disable callbacks in board files. All the board files using generic dpi panel now correctly pass the gpio related information as platform data, which is needed by the panel driver to configure the panel. Hence, the platform_enable/disable ops can be safely removed now. Signed-off-by: Archit Taneja <archit@ti.com>
2013-04-03OMAPDSS: lb035q02 panel: remove platform_enable/disable callbacksArchit Taneja
The lgphilips panel driver now manages the gpios required to configure the panel. This was previously done in omap_dss_device's platform_enable/disable callbacks defined in board files using this panel. All the board files using this panel now pass the gpio information as platform data via the panel_generic_dpi_data struct, which is needed by the panel driver to configure the gpios connected to the panel. Hence, the platform_enable/disable ops can be safely removed now. Signed-off-by: Archit Taneja <archit@ti.com>