aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2
Commit message (Collapse)AuthorAge
* OMAP: DSS2: DISPC: Fix minimum PCD valueTomi Valkeinen2012-08-17
| | | | | | | | | | | | | | | | | | | | | | The current driver had a hardcoded minimum value of 2 for pixel clock divisor (PCD). This doesn't seem to be right. OMAP4 TRM says that PCD can be 1 when not downscaling, and inverted pixel clock (IPC) is off. OMAP3 TRM says the same, but also in the register descriptions that PCD value 1 is invalid. OMAP2 TRM says PCD 2 is the minimum. OMAP2 is still untested, but for both OMAP3 and OMAP4 PCD of 1 seems to work fine. This patch adds a new DSS feature, FEAT_PARAM_DSS_PCD, which is used to find the minimum and maximum PCD. The minimum is set to 2 for OMAP2, and 1 for OMAP3/4. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: HDMI: change regn definitionTomi Valkeinen2012-08-17
| | | | | | | | | | | | | | regn divider is currently programmed to the registers without change, but when calculating clock frequencies it is used as regn+1. To make this similar to how DSI handles the dividers this patch changes the regn value to be used as such for calculations, but the value programmed to registers is regn-1. This simplifies the clock frequency calculations, makes it similar to DSI, and also allows us to use regn value 0 as undefined. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: HDMI: use default dividersTomi Valkeinen2012-08-17
| | | | | | | Use default regn and regm2 dividers in the hdmi driver if the board file does not define them. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* Add omap drm display driverRob Clark2012-08-17
| | | | | | | | | | | | | | | A DSS based DRM display driver, which provides a plugin interface for 3d/2d accelerators to register. The core driver handles construction of CRTC/encoder/connectors to represent the hardware, and support KMS. This driver replaces omapfb. The omap drm driver allocates framebuffer memory and implements (with the help of drm_fb_helper) the legacy fbdev interface. The driver maps CRTCs to overlays, encoders to overlay-managers, and connectors to dssdev's. Signed-off-by: Rob Clark <rob@ti.com> Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com>
* OMAP: DSS: HDMI: tame hdmi driverRob Clark2012-08-17
| | | | | | | Main change is to avoid automatically picking timings. Now the driver defaults to a safe 640x480, and leaves it to the upper layer (drm driver) to pick the desired resolution based on what the user selects and the drm infrastucture's parsing of the EDID.
* debug dssAndy Green2012-08-17
| | | | Signed-off-by: Andy Green <andy.green@linaro.org>
* omap dss use correct codec nameAndy Green2012-08-17
| | | | Signed-off-by: Andy Green <andy.green@linaro.org>
* omap dss unable to bring up hdmi nonfatalAndy Green2012-08-17
| | | | | | | | | | If the HDMI connector isn't in, the generic enable_panel callback fails and the omap framebuffer code fails probe wholesale. This swallows the error if the display was unable to be enabled; the box can still work as headless then. Signed-off-by: Andy Green <andy.green@linaro.org>
* OMAP: DSS: ensure default panel is enabledAndy Doan2012-08-17
| | | | | | | | | | In the event a panel is not probable (no i2c_bus_num), we should make sure that the default panel passed to the kernel marked enabled Adapted to be more paranoid and work in Panda case. Signed-off-by: Andy Doan <andy.doan@linaro.org> Signed-off-by: Andy Green <andy.green@linaro.org>
* OMAP DSS: allow discovery of default displayAndy Doan2012-08-17
| | | | | | | | Enable code outside of DSS core to find out the default display that was passed to the kernel Signed-off-by: Andy Doan <andy.doan@linaro.org> Signed-off-by: Andy Green <andy.green@linaro.org>
* Subject: [PATCH] omap4: dss: hdmi: find best matching resolutionZach Pfeffer2012-08-17
| | | | | | | | | | | | | | | | | | | Based off: "OMAP4:DSS:HDMI: Patch to add seperate edid.c" Commited by: Ricardo Perez Olivares <x0081762@ti.com> Written by: Mythri P K <mythripk@ti.com> EDID parsing for DVI Monitor from: Rob Clark <rob@ti.com> Some of the ENUM's and structure derived from hdmi.h from: Yong Zhi <y-zhi@ti.com> Signed-off-by: Zach Pfeffer <zach.pfeffer@linaro.org>
* Subject: [PATCH 18/21] Subject: [PATCH 17/19] OMAPFB: re-allocate FB if ↵Sebastien Jan2012-08-17
| | | | | | | | | | | | | needed on resize notification Note that re-allocating can fragment vram, so to avoid re-allocation, pre-assign FB size with kernel bootargs like: omapfb.vram=0:8M,1:8M Note: prevent the console accessing the FB while re-allocation is running. Other early FB users would be an issue as well. Signed-off-by: Sebastien Jan <s-jan@ti.com>
* Subject: [PATCH 17/21] Subject: [PATCH 15/19] OMAP2: HDMI: Assume EDID read ↵Jassi Brar2012-08-17
| | | | | | | | | | | | success as detection Some class of hdmi displays never make the bit(2) of HDMI_CORE_SYS_SYS_STAT set. EDID is read before calls to is_detected callback, so if reading EDID succeeded that implies we do have HDMI connected. In that case skip reading/waiting on the second bit. Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
* Subject: [PATCH 16/21] Subject: [PATCH 13/19] OMAP4: DSS2: HDMI: adding a ↵Ricardo Salveti de Araujo2012-08-17
| | | | | | | | | | workaround for LG monitors Some monitors report a disconnect just after a connect, so if force is enabled, give some time and check at least one more time. This is a needed workaround to make the driver work with LG monitors. Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com>
* Subject: [PATCH 14/21] Subject: [PATCH 16/19] OMAP4: OMAPFB: register ↵Sebastien Jan2012-08-17
| | | | | | | | | | | callback to get notified of resolution change Protect fb_set_var() with console-sem to avoid making console driver unhappy. Supports more than one framebuffer. This is a port from Rob Clark <rob@ti.com> patch. Signed-off-by: Sebastien Jan <s-jan@ti.com>
* Subject: [PATCH 13/21] Subject: [PATCH 14/19] OMAP2: DSS: HDMI: removing ↵Ricardo Salveti de Araujo2012-08-17
| | | | | | | | | | | error msg from check_timing The check_timing call is used to validate the timing before actually appling it, so it's expected to treat unsupported timings. It makes no sense to print an error message for the user saying that the timing could not be applied (it's not even being applied by this function). Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com>
* Subject: [PATCH 12/21] Subject: [PATCH 12/19] hdmi add notificationAndy Green2012-08-17
| | | | Signed-off-by: Andy Green <andy.green@linaro.org>
* Subject: [PATCH 11/21] Subject: [PATCH 11/19] OMAP4: DSS: add generic ↵Sebastien Jan2012-08-17
| | | | | | | | | | | | | | | | notifier mechanism A callback can be registered by the dssdev client in order to be notified of resolution changes, for example an external monitor that is hot-plugged. Multiple clients can now register for notification from one dssdev, and the notification mechanism can be extended in the future to add other events. This is a port of Rob Clark's <rob@ti.com> original patch. Signed-off-by: Sebastien Jan <s-jan@ti.com>
* Subject: [PATCH 10/21] Subject: [PATCH 10/19] OMAP: DSS2: handle null ↵Andy Doan2012-08-17
| | | | | | | pointer for no attached panel A null pointer error occurs when a board file configures a panel (LCD in my case) but doesn't have one attached
* Subject: [PATCH 09/21] Subject: [PATCH 09/19] OMAP: DSS2: Avoid enabling ↵Ricardo Salveti de Araujo2012-08-17
| | | | | | panel if none is around Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com>
* Subject: [PATCH 08/21] Subject: [PATCH 08/19] OMAP: DSS2: adding force ↵Jassi Brar2012-08-17
| | | | | | | | | | | argument to is_detected() Force is available from (*detect) at drm_connector_funcs, and can be used by the driver to avoid expensive, destructive operations during automated probing. Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
* Subject: [PATCH 07/21] Subject: [PATCH 07/19] OMAP: DSS2: add get_edid and ↵Ricardo Salveti de Araujo2012-08-17
| | | | | | is_detected support Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com>
* Subject: [PATCH 06/21] Subject: [PATCH 06/19] OMAP: DSS2: HDMI: Adding ↵Ricardo Salveti de Araujo2012-08-17
| | | | | | | | is_detected callback support This is a port from Rob Clark <rob@ti.com> patch. Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com>
* Subject: [PATCH 05/21] Subject: [PATCH 04/19] OMAP: DSS2: Add is_detected() ↵Jassi Brar2012-08-17
| | | | | | | | | | | | | driver API The API should return whether the device is detected, and if applicable whether the cable is plugged in. For non-hot-plug devices, it simply means "is the display/panel present". For hot-plug devices it means "is the cable plugged in". Signed-off-by: Rob Clark <rob@ti.com> Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
* Subject: [PATCH 03/21] Subject: [PATCH 03/19] OMAP: DSS2: Add default ↵Jassi Brar2012-08-17
| | | | | | | | get/check timings functions Signed-off-by: Rob Clark <rob@ti.com> Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
* Subject: [PATCH 02/21] Subject: [PATCH 01/19] OMAP4: DSS: add generic ↵Jassi Brar2012-08-17
| | | | | | | | | | | | | | | | | notifier mechanism A callback can be registered by the dssdev client in order to be notified of resolution changes, for example an external monitor that is hot-plugged. Multiple clients can now register for notification from one dssdev, and the notification mechanism can be extended in the future to add other events. This is a port of Rob Clark's <rob@ti.com> original patch. Signed-off-by: Sebastien Jan <s-jan@ti.com> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
* config omap2plus dss enable sdi dss omap4Andy Green2012-08-17
| | | | Signed-off-by: Andy Green <andy.green@linaro.org>
* After resume the HDMI/DVI output was still blank. It turns out thatKan-Ru Chen2012-08-17
| | | | | | framebuffers have to be reconfigured so the output is activated again. Signed-off-by: Kan-Ru Chen <kanru@0xlab.org>
* OMAPDSS: HDMI: PHY burnout fixTomi Valkeinen2012-03-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BugLink: http://bugs.launchpad.net/bugs/954576 commit c49d005b6cc8491fad5b24f82805be2d6bcbd3dd upstream. A hardware bug in the OMAP4 HDMI PHY causes physical damage to the board if the HDMI PHY is kept powered on when the cable is not connected. This patch solves the problem by adding hot-plug-detection into the HDMI IP driver. This is not a real HPD support in the sense that nobody else than the IP driver gets to know about the HPD events, but is only meant to fix the HW bug. The strategy is simple: If the display device is turned off by the user, the PHY power is set to OFF. When the display device is turned on by the user, the PHY power is set either to LDOON or TXON, depending on whether the HDMI cable is connected. The reason to avoid PHY OFF when the display device is on, but the cable is disconnected, is that when the PHY is turned OFF, the HDMI IP is not "ticking" and thus the DISPC does not receive pixel clock from the HDMI IP. This would, for example, prevent any VSYNCs from happening, and would thus affect the users of omapdss. By using LDOON when the cable is disconnected we'll avoid the HW bug, but keep the HDMI working as usual from the user's point of view. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* OMAP: DSS2: HDMI: use default dividersTomi Valkeinen2012-03-26
| | | | | | | | | | | | | | BugLink: http://bugs.launchpad.net/bugs/954576 commit 8d88767a4377171752c22ac39bcb2b505eb751da upstream. Use default regn and regm2 dividers in the hdmi driver if the board file does not define them. Cc: Mythri P K <mythripk@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Revert "UBUNTU: SAUCE: OMAP: DSS2: check for both cpu type and revision, ↵Leann Ogasawara2011-08-30
| | | | | | | | rather than just revision" This reverts commit f9c5baa2a6f1cbaa587840a5acbccf1e750ee333. Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
* Revert "UBUNTU: SAUCE: OMAP: DSS2: enable hsclk in dsi_pll_init for OMAP36XX"Leann Ogasawara2011-08-30
| | | | | | This reverts commit d360158cc2b48727a2215ebc1e78c3b1d171335e. Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
* UBUNTU: SAUCE: OMAP: DSS2: enable hsclk in dsi_pll_init for OMAP36XXLee Jones2011-08-30
| | | | | | | | | | | | BugLink: http://bugs.launchpad.net/bugs/608095 This helps provide the required setup to enable USB Ethernet (usb0) and USB host on the XM Beagleboard (A rev). This will be submitted upstream by Steve Sakoman. Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Lee Jones <lee.jones@canonical.com> Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
* UBUNTU: SAUCE: OMAP: DSS2: check for both cpu type and revision, rather than ↵Lee Jones2011-08-30
| | | | | | | | | | | | | | just revision BugLink: http://bugs.launchpad.net/bugs/608095 This helps provide the required setup to enable USB Ethernet (usb0) and USB host on the XM Beagleboard (A rev). This will be submitted upstream by Steve Sakoman. Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Lee Jones <lee.jones@canonical.com> Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
* OMAP: DSS2: Add support for NV12 formatAmber Jain2011-05-23
| | | | | | | | | | | | | | | | | | | | Add the support for NV12 color format. Configure base address for UV component of NV12 color format. Change the way chroma scaling is handled for YUV formats on OMAP4 by enabling chroma-resampling for video pipeline and hence using FIR2 register set for scaling UV. Changes to _dispc_set_scaling(), because of the reason above, are: - call _dispc_set_scaling_common() to handle scaling for all color formats except for OMAP4 where it only handles scaling for RGB or Y-component - call _dispc_set_scaling_uv() for special handling required for UV component on OMAP4. - dispc_set_scaling_uv() also resets chroma-resampling bit for RGB color modes. Contains chroma scaling (_dispc_set_scaling_uv) design and implemented by Lajos Molnar <molnar@ti.com> Signed-off-by: Amber Jain <amber@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: Add new registers for NV12 supportAmber Jain2011-05-23
| | | | | | | | | | | | | | | | | Add new registers specific to UV color component that are introduced in OMAP4. Add simple helper functions to configure the newly added registers. These new registers are mainly: - UV base address registers used specifically for NV12 color-format - FIR registers used for UV-color-component scaling on OMAP4 - Accumulator registers used for UV-color-component scaling Add these new registers to save/restore and DUMPREG functions. Also add two new features for OMAP4: - FEAT_HANDLE_UV_SEPARATE - this is used on OMAP4 as UV color-component requires separate handling. - FEAT_ATTR2 - this is used on OMAP4 to configure new ATTRIBUTES2 register. Signed-off-by: Amber Jain <amber@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: Use for loop where ever possible in SR(), RR()Amber Jain2011-05-23
| | | | | | | | Use for loop instead of individual entries for OVL_FIR_COEF_H, OVL_FIR_COEF_HV, OVL_FIR_COEF_V and OVL_CONV_COEF in SR() and RR(). Signed-off-by: Amber Jain <amber@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: Ensure non-zero FIR values are configuredAmber Jain2011-05-23
| | | | | | | | | | | | | FIR values can never be zero as per TRM, and the current code writes zero when scaling is not used. It was not causing any problem as scaling was disabled when zero was written. Its still safer to not write zero to it in any case. Now we configure correct FIR values even when scaling is not used (i.e. set FIR to 1024 when scaling is not used), but the scaling enable bits are still kept off if the scaling is not needed. Signed-off-by: Amber Jain <amber@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: Add new color formats for OMAP4Amber Jain2011-05-23
| | | | | | | | | Add new color formats supported by OMAP4: NV12, RGBA16, RGBX16, ARGB16_1555, XRGB16_1555. NV12 color format is defined here, its support in DSS will be added separately. Signed-off-by: Amber Jain <amber@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP4: DSS2: HDMI: Implement ASoC Codec driver for HDMI audioRicardo Neri2011-05-19
| | | | | | | | | | | | | | Implement an ASoC Codec Driver to handle audio configuration. The implementation offers an interface for audio configuration and control to be exposed to ALSA while hidding the HDMI details. The ASoC driver supports the Basic Audio configuration as described in CEA-861-D: 2-channel linear PCM with 32, 44.1 and 48kHz sample rates and 16 bits/sample. It additionally supports 24 bit/sample in 32-bit words. Signed-off-by: Ricardo Neri <ricardo.neri@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP4: DSS2: HDMI: Add functionality for audio configurationRicardo Neri2011-05-19
| | | | | | | | | | Add functionality for relevant audio configuration. Functions to configure the audio FIFO and DMA as well as functions for the audio core and Audio Info frame are included. This functionality is to be used by the ASoC HDMI audio codec. Signed-off-by: Ricardo Neri <ricardo.neri@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP4: DSS2: HDMI: Add enums and structures for audioRicardo Neri2011-05-19
| | | | | | | | Add enurations and structures for audio configuration. This includes enumerations for the Audio InfoFrame, I2S, audio FIFO and audio core. Signed-off-by: Ricardo Neri <ricardo.neri@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP4: DSS2: HDMI: Add DSS feature for CTS calculationRicardo Neri2011-05-19
| | | | | | | | | | | | CTS and N parameters are used to regenerate the audio clock from the TMDS clock at the HDMI sink. In OMAP4430 ES1.0 version the calculation of the CTS parameter is done by the HDMI IP (hardware mode) while in others it must be done by the HDMI driver (software mode). A DSS feature is used to indicate the HDMI driver which mode is used. Signed-off-by: Ricardo Neri <ricardo.neri@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP4: DSS2: Create a DSS features structure for OMAP4430 ES1.0Ricardo Neri2011-05-19
| | | | | | | | | | | | | | Create a separate DSS features structure for OMAP4430 ES1.0. This structure is used to expose features only present in such silicon version. Specifically, this is required to handle how the HDMI IP calculates the CTS parameter for audio clock regeneration packets. OMAP4430 ES1.0 is the only one that supports computation of the CTS parameter by the HDMI IP (hardware mode). The rest of the revisions require the HDMI driver to perform the computation. Signed-off-by: Ricardo Neri <ricardo.neri@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: DSI: Get line buffer size from DSI_GNQ registerArchit Taneja2011-05-16
| | | | | | | | | The line buffer sizes vary across DSI modules, create a function dsi_get_line_buf_size() using DSI_GNQ register to get the size of line buffer used for the DISPC video port data. Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: DSI: Get number of DSI data lanes using DSI_GNQ registerArchit Taneja2011-05-16
| | | | | | | | | | | | | | On OMAP3, the DSI module has 2 data lanes. On OMAP4, DSI1 has 4 data lanes and DSI2 has 2 data lanes. Introduce function dsi_get_num_data_lanes() which returns the number of data lanes on the dsi interface, introduce function dsi_get_num_data_lanes_dssdev() which returns the number of data lanes used by the omap_dss_device connected to the lanes. Use the DSI_GNQ register on OMAP4 to get the number of data lanes, modify dsi.c to use the number of lanes and the extra data lanes on DSI1. Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: DSI: Use system workqueue for delayed work instead of a private ↵Archit Taneja2011-05-16
| | | | | | | | | | | | | | workqueue In the previous DSI driver design, a private workqueue was needed to prevent a deadlock as explained in the commit : 0f16aa0ae6b84d7ae72fbe8999e6a94cb78edd4e . In the current design, the workqueue is only used for queueing delayed work in the case where we don't get a FRAMEDONE interrupt for 250 milliseconds. It is safe to remove the private workqueue amd use the system workqueue instead to schedule the delayed work with the new design where the deadlock can't occur. Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: DSI: Remove DISPC pixel clock related info in dsi_dump_clocks()Archit Taneja2011-05-16
| | | | | | | | | dsi_dump_clocks() prints lck and pck rates for the DISPC channel which it is connected to. Remove this since it is already printed by dispc_dump_clocks() in debugfs. Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: OMAPFB: Reduce stack usageTomi Valkeinen2011-05-12
| | | | | | | | | | omapfb_mode_to_timings() had struct fb_info, struct fb_var and struct fb_ops allocated from stack. This caused the stack usage grow quite high. Use kzalloc to allocate the structs instead. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: OMAPFB: remove dead codeTomi Valkeinen2011-05-12
| | | | | | Remove old unused code lying inside #if 0. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>