summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/bridge
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'drm-dwhdmi-devel' of git://ftp.arm.linux.org.uk/~rmk/linux-arm ↵Dave Airlie2015-08-272-174/+221
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into drm-next Here are some development updates for the Synopsis Designware HDMI driver, which clean up some of the code, and start preparing to add audio support to the driver. This series of patches are based on a couple of dependent commits from the ALSA tree. Briefly, the updates are: - move comments which should have moved with the phy values to the IMX part of the driver. - clean up the phy configuration: to all lookups before starting to program the phy. - clean up the HDMI clock regenerator code - use the drm_hdmi_avi_infoframe_from_display_mode() helper which allows the code to be subsequently simplified - remove the unused 'regmap' pointer in struct dw_hdmi - use the bridge drm device rather than the connector (we're the bridge code) - remove private hsync/vsync/interlaced flags, getting them from the DRM mode structure instead. - implement interface functions to support audio - setting the audio sample rate, and enabling the audio clocks. - removal of broken pixel repetition support - cleanup DVI vs HDMI sink handling - enable audio only if connected device supports audio - avoid double-enabling bridge in the sink path (once in mode_set, and again in commit) - rename mis-named dw_hdmi_phy_enable_power() - fix bridge enable/disable handing, so a plug-in event doesn't reconfigure the bridge if DRM has disabled the output - fix from Vladimir Zapolskiy for the I2CM_ADDRESS macro name These are primerily preparitory patches for the AHB audio driver and the I2S audio driver (from Rockchip) for this IP. * 'drm-dwhdmi-devel' of git://ftp.arm.linux.org.uk/~rmk/linux-arm: drm: bridge/dw_hdmi: fix register I2CM_ADDRESS register name drm: bridge/dw_hdmi: fix phy enable/disable handling drm: bridge/dw_hdmi: rename dw_hdmi_phy_enable_power() drm: bridge/dw_hdmi: avoid enabling interface in mode_set drm: bridge/dw_hdmi: enable audio only if sink supports audio drm: bridge/dw_hdmi: clean up HDMI vs DVI mode handling drm: bridge/dw_hdmi: don't support any pixel doubled modes drm: bridge/dw_hdmi: remove pixel repetition setting for all VICs drm: bridge/dw_hdmi: introduce interfaces to enable and disable audio drm: bridge/dw_hdmi: introduce interface to setting sample rate drm: bridge/dw_hdmi: remove mhsyncpolarity/mvsyncpolarity/minterlaced drm: bridge/dw_hdmi: use our own drm_device drm: bridge/dw_hdmi: remove unused 'regmap' struct member drm: bridge/dw_hdmi: simplify hdmi_config_AVI() a little drm: bridge/dw_hdmi: use drm_hdmi_avi_infoframe_from_display_mode() drm: bridge/dw_hdmi: clean up hdmi_set_clk_regenerator() drm: bridge/dw_hdmi: clean up phy configuration drm: imx/dw_hdmi: move phy comments drm/edid: add function to help find SADs
| * drm: bridge/dw_hdmi: fix register I2CM_ADDRESS register nameVladimir Zapolskiy2015-08-181-4/+4
| | | | | | | | | | | | | | | | I2CM_ADDRESS became a MESS, fix it, also change guarding define to __DW_HDMI_H__ , since the driver is not IMX specific. Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * drm: bridge/dw_hdmi: fix phy enable/disable handlingRussell King2015-08-181-7/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dw_hdmi enable/disable handling is particularly weak in several regards: * The hotplug interrupt could call hdmi_poweron() or hdmi_poweroff() while DRM is setting a mode, which could race with a mode being set. * Hotplug will always re-enable the phy whenever it detects an active hotplug signal, even if DRM has disabled the output. Resolve all of these by introducing a mutex to prevent races, and a state-tracking bool so we know whether DRM wishes the output to be enabled. We choose to use our own mutex rather than ->struct_mutex so that we can still process interrupts in a timely fashion. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * drm: bridge/dw_hdmi: rename dw_hdmi_phy_enable_power()Russell King2015-08-181-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dw_hdmi_phy_enable_power() is not about enabling and disabling power. It is about allowing or preventing power-down mode being entered - the register is documented as "Power-down enable (active low 0b)." This can be seen as the bit has no effect when the HDMI phy is operational on iMX6 hardware. Rename the function to dw_hdmi_phy_enable_powerdown() to reflect the documentation, make it take a bool for the 'enable' argument, and invert the value to be written. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * drm: bridge/dw_hdmi: avoid enabling interface in mode_setRussell King2015-08-181-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On a mode set, DRM makes the following sequence of calls: * for_each_encoder * bridge mode_fixup * encoder mode_fixup * crtc mode_fixup * for_each_encoder * bridge disable * encoder prepare * bridge post_disable * disable unused encoders * crtc prepare * crtc mode_set * for_each_encoder * encoder mode_set * bridge mode_set * crtc commit * for_each_encoder * bridge pre_enable * encoder commit * bridge enable dw_hdmi enables the HDMI output in both the bridge mode_set() and also the bridge enable() step. This is duplicated work - we can avoid the setup in mode_set() and just do it in the enable() stage. This simplifies the code a little. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * drm: bridge/dw_hdmi: enable audio only if sink supports audioRussell King2015-08-181-3/+9
| | | | | | | | | | | | | | | | Only enable audio support if the sink supports audio in some form, as defined via its EDID. We discover this capability using the generic drm_detect_monitor_audio() function. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * drm: bridge/dw_hdmi: clean up HDMI vs DVI mode handlingRussell King2015-08-181-14/+12
| | | | | | | | | | | | | | | | | | | | | | | | The FSL kernel detects the HDMI vendor id, and uses this to set hdmi->edid_cfg.hdmi_cap, which is then used to set mdvi appropriately, rather than detecting whether we are outputting a CEA mode. Update the dw_hdmi code to use this logic, but lets eliminate the mdvi variable, prefering the more verbose "hdmi->sink_is_hdmi" instead. Use the generic drm_detect_hdmi_monitor() to detect a HDMI sink. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * drm: bridge/dw_hdmi: don't support any pixel doubled modesRussell King2015-08-181-0/+4
| | | | | | | | | | | | | | | | | | As mentioned in the previous commit, the dw-hdmi driver does not support pixel doubled modes at present; it does not configure the PLL correctly for these modes. Therefore, filter out the double-clocked modes as we presently are unable to support them. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * drm: bridge/dw_hdmi: remove pixel repetition setting for all VICsRussell King2015-08-181-12/+1
| | | | | | | | | | | | | | | | | | | | | | | | dw_hdmi sets a pixel repetition factor of 1 for VICs 10-15, 25-30 and 35-38. However, DRM uses their native resolutions in its timing information. For example, VIC 14 can be 1440x480 with no repetition, or 720x480 with one pixel repetition. As DRM uses 1440 pixels per line for this video mode, we need no pixel repetition. In any case, pixel repetition appears broken in dw_hdmi. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * drm: bridge/dw_hdmi: introduce interfaces to enable and disable audioRussell King2015-08-181-1/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | iMX6 devices suffer from an errata (ERR005174) where the audio FIFO can be emptied while it is partially full, resulting in misalignment of the audio samples. To prevent this, the errata workaround recommends writing N as zero until the audio FIFO has been loaded by DMA. Writing N=0 prevents the HDMI bridge from reading from the audio FIFO, effectively disabling audio. This means we need to provide the audio driver with a pair of functions to enable/disable audio. These are dw_hdmi_audio_enable() and dw_hdmi_audio_disable(). A spinlock is introduced to ensure that setting the CTS/N values can't race, ensuring that the audio driver calling the enable/disable functions (which are called in an atomic context) can't race with a modeset. Tested-by: Yakir Yang <ykk@rock-chips.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * drm: bridge/dw_hdmi: introduce interface to setting sample rateRussell King2015-08-181-0/+10
| | | | | | | | | | | | | | | | Introduce dw_hdmi_set_sample_rate(), which allows us to configure the audio sample rate, setting the CTS/N values appropriately. Tested-by: Yakir Yang <ykk@rock-chips.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * drm: bridge/dw_hdmi: remove mhsyncpolarity/mvsyncpolarity/minterlacedRussell King2015-08-181-14/+8
| | | | | | | | | | | | | | | | Remove the struct hdmi_vmode mhsyncpolarity/mvsyncpolarity/minterlaced members, which are only used within a single function. We can directly reference the appropriate mode->flags instead. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * drm: bridge/dw_hdmi: use our own drm_deviceRussell King2015-08-181-1/+1
| | | | | | | | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * drm: bridge/dw_hdmi: remove unused 'regmap' struct memberRussell King2015-08-181-1/+0
| | | | | | | | | | | | | | This driver does not make use of regmaps, let's remove this unnecessary structure member. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * drm: bridge/dw_hdmi: simplify hdmi_config_AVI() a littleRussell King2015-08-181-4/+1
| | | | | | | | | | | | | | | | When a YCBCR format is selected, we can merely copy the colorimetry information directly as we use the same definitions for both the unpacked AVI info frame and the hdmi_data_info structure. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * drm: bridge/dw_hdmi: use drm_hdmi_avi_infoframe_from_display_mode()Russell King2015-08-181-59/+67
| | | | | | | | | | | | | | Use drm_hdmi_avi_infoframe_from_display_mode() to compose the AVI frame. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * drm: bridge/dw_hdmi: clean up hdmi_set_clk_regenerator()Russell King2015-08-181-17/+15
| | | | | | | | | | | | | | | | | | | | Clean up hdmi_set_clk_regenerator() by allowing it to take the audio sample rate and ratio directly, rather than hiding it inside the function. Raise the unsupported pixel clock/sample rate message from debug to error level as this results in audio not working correctly. Tested-by: Yakir Yang <ykk@rock-chips.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * drm: bridge/dw_hdmi: clean up phy configurationRussell King2015-08-181-33/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The phy configuration is dependent on the SoC, and we look up values for some of the registers in SoC specific data. However, we had partially programmed the phy before we had successfully looked up the clock rate. Also, we were only checking that we had a valid configuration for the currctrl register. Move all these lookups to the start of this function instead, so we can check that all lookups were successful before beginning to program the phy. Tested-by: Yakir Yang <ykk@rock-chips.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * drm: imx/dw_hdmi: move phy commentsRussell King2015-08-181-3/+0
| | | | | | | | | | | | | | The phy comments in dw_hdmi.c applied to the iMX6 version. Move these comments to the iMX6 dw_hdmi-imx data along side the data. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* | drm/bridge: Put Kconfig entries in a separate menuThierry Reding2015-08-141-3/+11
| | | | | | | | | | | | | | | | | | | | Put the Kconfig entries for bridge drivers into a separate menu so that they are automatically grouped and don't clutter up the top-level menu. While at it, move the bridge menu towards the end of the top-level menu where the panel menu is already located. Signed-off-by: Thierry Reding <treding@nvidia.com>
* | drm/bridge: Add vendor prefixesThierry Reding2015-08-144-7/+7
| | | | | | | | | | | | | | | | | | | | Use vendor prefixes for Kconfig symbols and filenames. This should make it easier to identify the various bridge drivers and to organize the directory. v2: fix object name for dw-hdmi (Fabio Estevam) Signed-off-by: Thierry Reding <treding@nvidia.com>
* | drm/exynos: atomic dpms supportGustavo Padovan2015-06-202-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Run dpms operations through the atomic intefaces. This basically removes the .dpms() callback from econders and crtcs and use .disable() and .enable() to turn the crtc on and off. v2: Address comments by Joonyoung: - make hdmi code call ->disable() instead of ->dpms() - do not use WARN_ON on crtc enable/disable v3: - Fix build failure after the hdmi change in v2 - Change dpms helper of ptn3460 bridge v4: - remove win_commit() call from .enable() v5: - move .atomic_check() to the atomic PageFlip patch, and transform it in .atomic_begin() Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com> Tested-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Signed-off-by: Inki Dae <inki.dae@samsung.com>
* | drm/exynos: atomic phase 2: wire up state reset(), duplicate() and destroy()Gustavo Padovan2015-06-202-0/+8
| | | | | | | | | | | | | | | | | | | | | | Set CRTC, planes and connectors to use the default implementations from the atomic helper library. The helpers will work to keep track of state for each DRM object. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com> Tested-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Signed-off-by: Inki Dae <inki.dae@samsung.com>
* | drm/bridge: Remove stale ptn3460.h includeThierry Reding2015-06-051-2/+0
| | | | | | | | | | | | | | This header file declares prototypes of functions that are no longer used. Remove this file and all references to it. Signed-off-by: Thierry Reding <treding@nvidia.com>
* | drm/bridge: ps8622: Include linux/gpio/consumer.hGeert Uytterhoeven2015-06-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If GPIOLIB=n and asm-generic/gpio.h is not used: drivers/gpu/drm/bridge/ps8622.c: In function ‘ps8622_pre_enable’: drivers/gpu/drm/bridge/ps8622.c:368: error: implicit declaration of function ‘gpiod_set_value’ drivers/gpu/drm/bridge/ps8622.c: In function ‘ps8622_probe’: drivers/gpu/drm/bridge/ps8622.c:584: error: implicit declaration of function ‘devm_gpiod_get’ drivers/gpu/drm/bridge/ps8622.c:584: warning: assignment makes pointer from integer without a cast drivers/gpu/drm/bridge/ps8622.c:590: error: implicit declaration of function ‘gpiod_direction_output’ drivers/gpu/drm/bridge/ps8622.c:596: warning: assignment makes pointer from integer without a cast Add the missing #include <linux/gpio/consumer.h> to fix this. Fixes: f1336e6afb ("drm/bridge: Add I2C based driver for ps8622/ps8625 bridge") Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: David Airlie <airlied@linux.ie> Cc: dri-devel@lists.freedesktop.org Signed-off-by: Thierry Reding <treding@nvidia.com>
* | drm/bridge: ptn3460: Include linux/gpio/consumer.hGeert Uytterhoeven2015-06-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If GPIOLIB=n and asm-generic/gpio.h is not used: drivers/gpu/drm/bridge/ptn3460.c: In function ‘ptn3460_pre_enable’: drivers/gpu/drm/bridge/ptn3460.c:135: error: implicit declaration of function ‘gpiod_set_value’ drivers/gpu/drm/bridge/ptn3460.c: In function ‘ptn3460_probe’: drivers/gpu/drm/bridge/ptn3460.c:333: error: implicit declaration of function ‘devm_gpiod_get’ drivers/gpu/drm/bridge/ptn3460.c:333: warning: assignment makes pointer from integer without a cast drivers/gpu/drm/bridge/ptn3460.c:340: error: implicit declaration of function ‘gpiod_direction_output’ drivers/gpu/drm/bridge/ptn3460.c:346: warning: assignment makes pointer from integer without a cast Add the missing #include <linux/gpio/consumer.h> to fix this. Fixes: af478d8823 ("drm/bridge: ptn3460: use gpiod interface") Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: David Airlie <airlied@linux.ie> Cc: dri-devel@lists.freedesktop.org Signed-off-by: Thierry Reding <treding@nvidia.com>
* | drm/bridge: dw-hdmi: Return number of EDID modesDoug Anderson2015-06-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The dw_hdmi_connector_get_modes() function accidentally forgets to return the number of modes it added, although it has this information stored in a local variable. Let's fix that. Without this fix, drm_helper_probe_single_connector_modes_merge_bits() could get confused and always call drm_add_modes_noedid(). That's not right. Signed-off-by: Doug Anderson <dianders@chromium.org> Tested-by: Yakir Yang <ykk@rock-chips.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
* | drm/bridge: ptn3460: Pass flags to devm_gpiod_get()Uwe Kleine-König2015-05-191-16/+7
| | | | | | | | | | | | | | | | | | | | | | | | Since 39b2bbe3d715 (gpio: add flags argument to gpiod_get*() functions) which appeared in v3.17-rc1, the gpiod_get* functions take an additional parameter that allows to specify direction and initial value for output. Use this to simplify the driver. Furthermore this is one caller less that stops us making the flags argument to gpiod_get*() mandatory. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Thierry Reding <treding@nvidia.com>
* | drm/bridge: ps8622: Pass flags to devm_gpiod_get()Uwe Kleine-König2015-05-191-15/+5
| | | | | | | | | | | | | | | | | | | | | | | | Since 39b2bbe3d715 (gpio: add flags argument to gpiod_get*() functions) which appeared in v3.17-rc1, the gpiod_get* functions take an additional parameter that allows to specify direction and initial value for output. Use this to simplify the driver. Furthermore this is one caller less that stops us making the flags argument to gpiod_get*() mandatory. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Thierry Reding <treding@nvidia.com>
* | drm/bridge: ptn3460: Fix I2C ID table to match the reported modaliasJavier Martinez Canillas2015-05-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I2C drivers that support OF, have both an I2C and OF device ID tables that are used to fill the supported module aliases. But currently the I2C core only uses the OF table to match a device with a driver and the aliases information are always reported in the form i2c:<name>. The client->name is used as the name postfix and when booting with OF this is obtained with of_modalias_node() which drops the compatible string vendor prefix. So for I2C drivers, the I2C and OF device ID tables should be keep in sync in order to make module auto-loading to work but the I2C device entries shouldn't have the vendor prefix since that is not reported. Before this patch: MODALIAS=i2c:ptn3460 $ modinfo | grep alias alias: i2c:nxp,ptn3460 alias: of:N*T*Cnxp,ptn3460* After this patch: MODALIAS=i2c:ptn3460 $ modinfo | grep alias alias: i2c:ptn3460 alias: of:N*T*Cnxp,ptn3460* Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Reviewed-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Thierry Reding <treding@nvidia.com>
* | drm/bridge: dw-hdmi: Staticize dw_hdmi_bridge_funcsFabio Estevam2015-05-151-1/+1
|/ | | | | | | | | Staticize dw_hdmi_bridge_funcs to fix the following sparse warning: drivers/gpu/drm/bridge/dw_hdmi.c:1458:25: warning: symbol 'dw_hdmi_bridge_funcs' was not declared. Should it be static? Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
* Merge branch 'drm-dwhdmi-devel' of git://ftp.arm.linux.org.uk/~rmk/linux-arm ↵Dave Airlie2015-04-161-25/+29
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into drm-next This set of patches adjust the setup of the HDMI CTS/N values for audio support to be compliant with the work-around given in the iMX6 errata documentation as part of the preparation for integrating audio support for this driver, and also update the HDMI phy configuration for Rockchip devices to improve the HDMI eye pattern. * 'drm-dwhdmi-devel' of git://ftp.arm.linux.org.uk/~rmk/linux-arm: drm: rockchip/dw_hdmi-rockchip: improve for HDMI electrical test drm: bridge/dw_hdmi: separate VLEVCTRL settting into platform driver drm: bridge/dw_hdmi: fixed codec style drm: bridge/dw_hdmi: adjust n/cts setting order drm: bridge/dw_hdmi: protect n/cts setting with a mutex drm: bridge/dw_hdmi: combine hdmi_set_clock_regenerator_n() and hdmi_regenerate_cts() Conflicts: drivers/gpu/drm/imx/dw_hdmi-imx.c
| * drm: bridge/dw_hdmi: separate VLEVCTRL settting into platform driverYakir Yang2015-04-011-7/+7
| | | | | | | | | | | | | | | | | | | | Because of iMX6 & Rockchip have differnet mpll config parameter, the VLEVCTRL parameter would be different. In this case we should separate VLEVCTRL setting from the common dw_hdmi driver, config this parameter in platform driver(dw_hdmi-imx and dw_hdmi-rockchip) Signed-off-by: Yakir Yang <ykk@rock-chips.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * drm: bridge/dw_hdmi: fixed codec styleYakir Yang2015-04-011-4/+4
| | | | | | | | | | | | | | | | | | Using a local struct pointer to reduce one level of indirection makes the code slightly more readable. Signed-off-by: Yakir Yang <ykk@rock-chips.com> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * drm: bridge/dw_hdmi: adjust n/cts setting orderRussell King2015-03-301-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch derived from one from Yakir Yang. Yakir Yang says: For Designerware HDMI, the following write sequence is recommended: 1. aud_n3 (set bit ncts_atomic_write if desired) 2. aud_cts3 (set CTS_manual and CTS value if desired/enabled) 3. aud_cts2 (required in CTS_manual) 4. aud_cts1 (required in CTS_manual) 5. aud_n3 (bit ncts_atomic_write with same value as in step 1.) 6. aud_n2 7. aud_n1 However, avoid the ncts_atomic_write_bit and CTS_manual settings in this patch, both of which are marked reserved in the iMX6 documentation. All iMX6 code in the wild seems to want CTS_manual cleared. Having requested clarification from FSL, it appears that neither of these bits are implemented in their version of the IP. Acked-by: Philipp Zabel <p.zabel@pengutronix.de> Tested-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Andy Yan <andy.yan@rock-chips.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * drm: bridge/dw_hdmi: protect n/cts setting with a mutexRussell King2015-03-301-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The HDMI n/cts settings need to be updated whenever the audio sample rate or the video pixel clock changes. This needs to be protected against concurrency as there is no synchronisation between these two operations. Introduce a mutex (called audio_mutex) to protect against two threads trying to update the video clock rate and pixel clock simultaneously. Acked-by: Philipp Zabel <p.zabel@pengutronix.de> Tested-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Andy Yan <andy.yan@rock-chips.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * drm: bridge/dw_hdmi: combine hdmi_set_clock_regenerator_n() and ↵Russell King2015-03-301-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | hdmi_regenerate_cts() Combine these two functions into a single implementation. These two functions are called consecutively anyway. Idea from a patch by Yakir Yang. Acked-by: Philipp Zabel <p.zabel@pengutronix.de> Tested-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Andy Yan <andy.yan@rock-chips.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* | drm/bridge: ptn3460: Fix sparse warningsThierry Reding2015-03-241-1/+1
| | | | | | | | | | | | | | The ptn3460_bridge_attach symbol is never used outside this file, so it should be static. Signed-off-by: Thierry Reding <treding@nvidia.com>
* | drm/bridge: ps8622: Fix sparse warningsThierry Reding2015-03-241-2/+2
| | | | | | | | | | | | | | The ps8622_attach and ps8522_driver symbols are never used outside this file, so they should be static. Signed-off-by: Thierry Reding <treding@nvidia.com>
* | drm/bridge: Add I2C based driver for ps8622/ps8625 bridgeVincent Palatin2015-03-243-0/+696
|/ | | | | | | | | | | | | | | | | | This patch adds drm_bridge driver for parade DisplayPort to LVDS bridge chip. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> Signed-off-by: Andrew Bresticker <abrestic@chromium.org> Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com> Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com> Acked-by: Inki Dae <inki.dae@samsung.com> Tested-by: Rahul Sharma <rahul.sharma@samsung.com> Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Tested-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Tested-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> [treding@nvidia.com: break cyclic dependency, add KMS helper dependency] Signed-off-by: Thierry Reding <treding@nvidia.com>
* drm/bridge: dw-hdmi: Adapt to bridge API changeFabio Estevam2015-01-281-9/+2
| | | | | | | | | | | | | | | | Commit fbc4572e9c48e45b ("drm/bridge: make bridge registration independent of drm flow") introduced some drm/bridge API modifications. Make the necessary changes so that we can avoid the build breakage: drivers/gpu/drm/bridge/dw_hdmi.c: In function 'dw_hdmi_bridge_destroy': drivers/gpu/drm/bridge/dw_hdmi.c:1378:2: error: implicit declaration of function 'drm_bridge_cleanup' [-Werror=implicit-function-declaration] drivers/gpu/drm/bridge/dw_hdmi.c: At top level: drivers/gpu/drm/bridge/dw_hdmi.c:1471:2: error: unknown field 'destroy' specified in initializer drivers/gpu/drm/bridge/dw_hdmi.c: In function 'dw_hdmi_register': drivers/gpu/drm/bridge/dw_hdmi.c:1535:2: error: implicit declaration of function 'drm_bridge_init' [-Werror=implicit-function-declaration] Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
* drm/bridge: dw-hdmi: Fix return error pathFabio Estevam2015-01-281-1/+1
| | | | | | | | | If devm_request_threaded_irq() fails we should jump to 'err_iahb' label that will disable the clocks that were previously enabled. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Thierry Reding <treding@nvidia.com>
* drm/bridge: ptn3460: use gpiod interfaceAjay Kumar2015-01-281-52/+36
| | | | | | | | | | | | Modify driver to support gpiod interface. Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com> Acked-by: Inki Dae <inki.dae@samsung.com> Tested-by: Rahul Sharma <rahul.sharma@samsung.com> Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Tested-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Tested-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Signed-off-by: Thierry Reding <treding@nvidia.com>
* drm/bridge: ptn3460: probe connector at the end of bridge attachAjay Kumar2015-01-281-0/+3
| | | | | | | | | | | | | Force bridge connector detection at the end of the bridge attach. This is needed to detect the bridge connector early. Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com> Acked-by: Inki Dae <inki.dae@samsung.com> Tested-by: Rahul Sharma <rahul.sharma@samsung.com> Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Tested-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Tested-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Signed-off-by: Thierry Reding <treding@nvidia.com>
* drm/bridge: ptn3460: support drm_panelAjay Kumar2015-01-282-0/+43
| | | | | | | | | | | | | Add drm_panel calls to the driver to make the panel and bridge work together in tandem. Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com> Acked-by: Inki Dae <inki.dae@samsung.com> Tested-by: Rahul Sharma <rahul.sharma@samsung.com> Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Tested-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Tested-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Signed-off-by: Thierry Reding <treding@nvidia.com>
* drm/bridge: ptn3460: Convert to I2C driver modelAjay Kumar2015-01-282-45/+91
| | | | | | | | | | | | | Use drm_bridge helpers to modify the driver to support I2C driver model. Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com> Acked-by: Inki Dae <inki.dae@samsung.com> Tested-by: Rahul Sharma <rahul.sharma@samsung.com> Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Tested-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Tested-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> [treding@nvidia.com: remove recursive dependency on I2C] Signed-off-by: Thierry Reding <treding@nvidia.com>
* drm/bridge: make bridge registration independent of drm flowAjay Kumar2015-01-281-14/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, third party bridge drivers(ptn3460) are dependent on the corresponding encoder driver init, since bridge driver needs a drm_device pointer to finish drm initializations. The encoder driver passes the drm_device pointer to the bridge driver. Because of this dependency, third party drivers like ptn3460 doesn't adhere to the driver model. In this patch, we reframe the bridge registration framework so that bridge initialization is split into 2 steps, and bridge registration happens independent of drm flow: --Step 1: gather all the bridge settings independent of drm and add the bridge onto a global list of bridges. --Step 2: when the encoder driver is probed, call drm_bridge_attach for the corresponding bridge so that the bridge receives drm_device pointer and continues with connector and other drm initializations. The old set of bridge helpers are removed, and a set of new helpers are added to accomplish the 2 step initialization. The bridge devices register themselves onto global list of bridges when they get probed by calling "drm_bridge_add". The parent encoder driver waits till the bridge is available in the lookup table(by calling "of_drm_find_bridge") and then continues with its initialization. The encoder driver should also call "drm_bridge_attach" to pass on the drm_device to the bridge object. drm_bridge_attach inturn calls "bridge->funcs->attach" so that bridge can continue with drm related initializations. Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com> Acked-by: Inki Dae <inki.dae@samsung.com> Tested-by: Rahul Sharma <rahul.sharma@samsung.com> Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Tested-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Tested-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Signed-off-by: Thierry Reding <treding@nvidia.com>
* drm/bridge: do not pass drm_bridge_funcs to drm_bridge_initAjay Kumar2015-01-281-1/+2
| | | | | | | | | | | | | | | | | Assign the pointer to bridge ops structure(drm_bridge_funcs) in the bridge driver itself, instead of passing it to drm_bridge_init. This will allow bridge driver developer to pack bridge private information inside the bridge object and pass only the drm-relevant information to drm_bridge_init. Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com> Acked-by: Inki Dae <inki.dae@samsung.com> Tested-by: Rahul Sharma <rahul.sharma@samsung.com> Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Tested-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Tested-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Signed-off-by: Thierry Reding <treding@nvidia.com>
* drm/bridge: ptn3460: Few trivial cleanupsAjay Kumar2015-01-281-47/+48
| | | | | | | | | | | | | | | | | | This patch does the following changes: -- Use usleep_range instead of udelay. -- Remove driver_private member from ptn3460 structure. -- Make all possible functions and structures static. -- Use dev_err for non-DRM errors. -- Arrange header files alphabetically. -- s/edid/EDID in all error messages. Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com> Acked-by: Inki Dae <inki.dae@samsung.com> Tested-by: Rahul Sharma <rahul.sharma@samsung.com> Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Tested-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Tested-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Signed-off-by: Thierry Reding <treding@nvidia.com>
* imx-drm: encoder prepare/mode_set must use adjusted modeSteve Longerbeam2015-01-071-2/+2
| | | | | | | | The encoder ->prepare() and ->mode_set() methods need to use the hw adjusted mode, not the original mode. Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
OpenPOWER on IntegriCloud