summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/bridge/dw_hdmi.c
Commit message (Collapse)AuthorAgeFilesLines
* 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: 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>
* 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: 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>
* 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>
* drm: bridge/dw_hdmi: request interrupt only after initializing the mutesPhilipp Zabel2015-01-071-6/+6
| | | | | | | Otherwise a spurious interrupt might trigger (and crash) the interrupt handler before probing finished. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* drm: bridge/dw_hdmi: add rockchip rk3288 supportAndy Yan2015-01-071-0/+3
| | | | | | | | | Rockchip RK3288 hdmi is compatible with dw_hdmi Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Tested-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* drm: bridge/dw_hdmi: add function dw_hdmi_phy_enable_spareAndy Yan2015-01-071-0/+7
| | | | | | | | | | RK3288 HDMI will not work without the spare bit of HDMI_PHY_CONF0 enable Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Tested-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* drm: bridge/dw_hdmi: clear i2cmphy_stat0 reg in hdmi_phy_wait_i2c_doneAndy Yan2015-01-071-1/+5
| | | | | | | | | | | | | | HDMI_IH_I2CMPHY_STAT0 is a clear on write register, which indicates i2cm operation status(i2c transfer done or error), every hdmi phy register configuration must check this register to make sure the configuration has complete. But the indication bit should be cleared after check, otherwise the corresponding bit will hold on forever, this may give a wrong signal for next check. Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Tested-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* drm: bridge/dw_hdmi: add mode_valid supportAndy Yan2015-01-071-0/+15
| | | | | | | | | | some platform may not support all the display mode, add mode_valid interface check it Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Tested-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* drm: bridge/dw_hdmi: add support for multi-byte register width accessAndy Yan2015-01-071-2/+42
| | | | | | | | | | | On rockchip rk3288, only word(32-bit) accesses are permitted for hdmi registers. Byte width accesses (writeb, readb) generate an imprecise external abort. Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Tested-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* drm: imx: imx-hdmi: move imx-hdmi to bridge/dw_hdmiAndy Yan2015-01-071-0/+1645
the original imx hdmi driver is under drm/imx/, which depends on imx-drm, so move the imx hdmi driver out to drm/bridge and rename it to dw_hdmi Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Tested-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
OpenPOWER on IntegriCloud