aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/exynos/exynos_hdmi.c
AgeCommit message (Collapse)Author
2015-01-18drm/exynos: fix reset codes for memory mapped hdmi phyJoonyoung Shim
This fixes reset codes to support memory mapped hdmi phy as well as hdmi phy dedicated i2c lines. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-11-24drm/exynos/hdmi: stop using display->ctx pointerAndrzej Hajda
The patch replaces accesses to display->ctx pointer by container_of construct. It will allow to remove ctx field in the future. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-11-24drm/exynos/hdmi: embed display into private contextAndrzej Hajda
exynos_drm_display is used by internal Exynos DRM framework for representing encoder:connector pair. As it should be mapped 1:1 to hdmi private context it seems more reasonable to embed it directly in that context. As a result further code simplification will be possible. Moreover it will be possible to handle multiple hdmi devices in the system. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-11-03drm/exynos: remove explicit encoder/connector de-initializationAndrzej Hajda
All KMS objects are destroyed by drm_mode_config_cleanup in proper order so component drivers should not care about it. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-09-20drm/exynos/hdmi: unregister connector on removalAndrzej Hajda
During component removal driver should unregister connector. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-08-04drm/exynos: hdmi: add null check for hdmiphy_portSeung-Woo Kim
The hdmiphy can be apb and hdmiphy_port can be null. So before accessing hdmiphy_port, it should be checked. Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-08-04drm/exynos: Add MODULE_DEVICE_TABLE entries for various componentsSjoerd Simons
Add MODULE_DEVICE_TABLE calls for the various OF match tables that currently don't have one. This allows the module to be autoloaded based on devicetree information. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-08-03drm/exynos: hdmi: enable exynos 4210 and 4x12 soc supportMarek Szyprowski
Configuration sets for Exynos 4210 and 4x12 SoC were already defined in Exynos HDMI and Mixed drivers, but they lacked proper linking to device tree 'compatible' values. This patch fixes this issue adding support for following compatible values: samsung,exynos4210-mixer, samsung,exynos4212-mixer and samsung,exynos4210-hdmi. It also corrects access to sclk_mixer clock, which is available only on Exynos 4210. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-08-03drm/exynos: hdmi: make 'hdmi-en' regulator optional and keep it enabledMarek Szyprowski
HDMI_EN regulator is additional regulator for providing voltage source for DCC lines available on HDMI connector. When there is no power provided for DDC epprom, some TV-sets do not pulls up HPD (hot plug detect) line, what causes HDMI block to stay turned off. This patch enables HDMI_EN regulator (if available) on driver probe and keep it enabled all the time to let TV-set correctly signal HPD event. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-08-03drm/exynos: Remove unused variable from exynos_hdmi.cSachin Kamat
'frame_size_code' is not used in the function. Remove it. Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-07-08Merge tag 'topic/core-stuff-2014-06-30' of ↵Dave Airlie
git://anongit.freedesktop.org/drm-intel into drm-next misc core patches picked up by Daniel and Jani. * tag 'topic/core-stuff-2014-06-30' of git://anongit.freedesktop.org/drm-intel: drm/fb-helper: Remove unnecessary list empty check in drm_fb_helper_debug_enter() drm/fb-helper: Redundant info->fix.type_aux setting in drm_fb_helper_fill_fix() drm/debugfs: add an "edid_override" file per connector drm/debugfs: add a "force" file per connector drm: add register and unregister functions for connectors drm: fix uninitialized acquire_ctx fields (v2) drm: Driver-specific ioctls range from 0x40 to 0x9f drm: Don't export internal module variables
2014-06-24drm/exynos: hdmi: fix power order issueInki Dae
This patch resolves page fault issue of Mixer when disabled. The SFRs of VP and Mixer are updated by Vertical Sync of Timing generator which is a part of HDMI so the sequence to disable TV Subsystem should be as following: VP -> Mixer -> HDMI For this, this patch disables Mixer and VP (if used) prior to disabling HDMI. Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-06-19drm: add register and unregister functions for connectorsThomas Wood
Introduce generic functions to register and unregister connectors. This provides a common place to add and remove associated user space interfaces. Signed-off-by: Thomas Wood <thomas.wood@intel.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-06-02drm/exynos: consider deferred probe caseInki Dae
This patch makes sure that exynos drm framework handles deferred probe case correctly. Sub drivers could be probed before resources, clock, regulator, phy or panel, are ready for them so we should make sure that exynos drm core waits until all resources are ready and sub drivers are probed correctly. Chagelog v2: - Make sure that exynos drm core tries to bind sub drivers only in case that they have a pair: crtc and encoder/connector components should be a pair. - Remove unnecessary patch: drm/exynos: mipi-dsi: consider panel driver-deferred probe - Return error type correctly. Signed-off-by: Inki Dae <inki.dae@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
2014-06-02drm/exynos: add hdmiphy power on/off sequenceShirish S
This patch implements the power on/off sequence of HDMI PHY in exynos5420 and exynos5250 as provided by the hardware team. This has been verified for mulitple iterations of S2R. Signed-off-by: Shirish S <s.shirish@samsung.com> Signed-off-by: Rahul Sharma <Rahul.Sharma@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-06-02drm/exynos: Staticize local symbols in exynos_hdmi.cSachin Kamat
These symbols are local to this file. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-06-02drm/exynos: Remove duplicate inclusion of i2c.hSachin Kamat
i2c.h was included twice. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-06-02drm/exynos: use regmap interface to set hdmiphy control bit in pmuRahul Sharma
Exynos drm hdmi driver used to get dummy hdmiphy clock to control the PMU bit for hdmiphy. This bit needs to be set before setting any resolution to hdmi hardware. This was handled using dummy hdmiphy clock which is removed here. PMU is already defined as system controller for exynos SoCs. Hdmi driver is modified to control the phy enable bit inside PMU using regmap interfaces. Devicetree binding document for hdmi is also updated. Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-06-02drm/exynos: hdmi: consider legacy dt bindingInki Dae
This patch considers legacy dt binding, and resolves the issue that the use of existing dtb is broken. To resove the dt broken issue, this path tries to get legacy dt nodes from existing dtb directly prior to getting new dt nodes. Signed-off-by: Inki Dae <inki.dae@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
2014-06-02drm/exynos: restore core HDMI settingsShirish S
In DVI mode the video preamble and Guard band should be disabled whereas it should be applied in HDMI mode, the re-applying of preamble and guard band was missing, which resulted in display failures when switched to HDMI mode from DVI mode. This patch ensures the setting is applied in HDMI mode. Signed-off-by: Shirish S <s.shirish@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-06-02drm/exynos: enable support for exynos5420 hdmi deviceRahul Sharma
Enable support for hdmi for exynos5420 hdmiphy. Add compatible string in the of_match table. Also added hdmiphy configuration values for exynos5420. Signed-off-by: Rahul Sharma <Rahul.Sharma@samsung.com> Signed-off-by: Shirish S <s.shirish@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-06-02drm/exynos: add support for apb mapped phys in hdmi driverRahul Sharma
Previous SoCs have hdmi phys which are accessible through dedicated i2c lines. Newer SoCs have Apb mapped hdmi phys. Hdmi driver is modified to support apb mapped phys. Signed-off-by: Rahul Sharma <Rahul.Sharma@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-06-02drm/exynos: remove unnecessary read for phy configuration valuesRahul Sharma
Cleaning up unnecessary i2c read call after hdmiphy configuration. This check is redundant since check for hdmiphy pll lock status confirms the correct settings for phy. Signed-off-by: Rahul Sharma <Rahul.Sharma@samsung.com> Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Reviewed-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-06-02drm/exynos: replace hdmi reset with hdmi disableRahul Sharma
Before setting the core and timing generation registers, hdmi driver resets the whole hdmi hardware, which also resets the audio related registers. Hdmi reset is replaced by hdmi disable which is called just before setting the core and timing registers. It also ensure that audio settings are not changed. Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com> Signed-off-by: Shirish S <s.shirish@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-06-02drm/exynos: Read hpd gpio in is_connected callbackSean Paul
This patch adds a gpio read of hpd during the is_connected callback. This fixes the case where hdmi is off going into suspend and the cable is plugged in while suspended. In this case, the hpd interrupt does not fire and is_connected will return false. Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Rahul Sharma <Rahul.Sharma@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-06-02drm/exynos: hdmi: remove unnecessary memsetDaniel Kurtz
Our resources were just zalloc'ed as part of hdata. They are already 0. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Rahul Sharma <Rahul.Sharma@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-06-02drm/exynos: check for null pointers in error handlingPaul Taysom
Smatch error from arm build: drivers/gpu/drm/exynos/ exynos_hdmi.c:2374 hdmi_probe() error: potential NULL dereference 'hdata->hdmiphy_port'. Added check for hdata->hdmiphy_port that it is not NULL. Signed-off-by: Paul Taysom <taysom@chromium.org> Signed-off-by: Rahul Sharma <Rahul.Sharma@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-06-02drm/exynos: Debounce HDMI hotplug interruptsSean Paul
This patch debounces hotplug interrupts generated by the HDMI hotplug gpio. The reason this is needed is that we get multiple (5) interrupts every time a monitor is inserted which causes us to needlessly enable and disable the IP block. Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Rahul Sharma <Rahul.Sharma@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-06-02drm/exynos: Don't reset hdmiphy on hdmi offSean Paul
This patch removes the hdmiphy reset in hdmi_poweroff. The hdmiphy reset was added to take advantage of exynos clockgating, doing it would gate the entire TV domain. Unfortunately, mixer is included in the TV domain and its vsync interrupts are stopped when TV is gated. Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Rahul Sharma <Rahul.Sharma@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-06-02drm/exynos: update phy settings for RB resolutionsShirish S
This patch updates phy settings of the below mentioned pixel clocks in Exynos5250 and removes support for 88.75MHz, for it is not supported. 71 MHz - 1280x800@60Hz RB 73.25 MHz - 800x600@120Hz RB 115.5 MHz - 1024x768@120Hz RB 119 MHz - 1680x1050@60Hz RB Signed-off-by: Shirish S <s.shirish@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-06-02drm/exynos: add component framework supportInki Dae
This patch adds component framework support to resolve the probe order issue. Until now, exynos drm had used codes specific to exynos drm to resolve that issue so with this patch, the specific codes are removed. Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-06-02drm/exynos: hdmi: make local symbols staticJingoo Han
Make local symbols static, because these are used only in this file. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-03-24drm/exynos: hdmi: use i2c_adapter instead of i2c_clientInki Dae
This patch changes i2c_client for ddc to i2c_adapter because ddc needs only i2c_adapter. Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2014-03-24drm/exynos: hdmi: consider APB PHYInki Dae
This patch returns error in case of using APB PHY. Exynos5420 SoC and maybe later would use APB PHY instead of I2C PHY so such case should be considered. Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2014-03-24drm/exynos: Implement drm_connector in hdmi directlySean Paul
This patch implements drm_connector in the hdmi driver directly, instead of using exynos_drm_connector. Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-03-24drm/exynos: Consolidate suspend/resume in drm_drvSean Paul
This patch removes all of the suspend/resume logic from the individual drivers and consolidates it in drm_drv. This consolidation reduces the number of functions which enable/disable the hardware to just one -- the dpms callback. This ensures that we always power up/down in a consistent manner. Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-03-24drm/exynos: Use drm_mode_copy to copy modesSean Paul
This patch changes the manual copying of mode to adjusted_mode in mode_fixup to use drm_mode_copy instead of handling things manually. Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-03-24drm/exynos: Remove exynos_drm_hdmi shimSean Paul
This patch trims exynos_drm_hdmi out of the driver. The reason it existed in the first place was to make up for the mixture of display/overlay/manager ops being spread across hdmi and mixer. With that code now rationalized, mixer and hdmi map directly to exynos_drm_crtc and exynos_drm_encoder, respectively. Since there is a 1:1 mapping, we no longer need this layer. Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-03-24drm/exynos: hdmi: remove the i2c drivers and useDaniel Kurtz
The i2c client was previously being passed into the hdmi driver via a dedicated i2c driver, and then a global variable. This patch removes all of that and just uses the device tree to get the i2c_client. This patch also properly references the client so we don't lose it before we're done with it. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> [seanpaul changed to phandle lookup instead of using of node name] Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-03-24drm/exynos: Rename display_op power_on to dpmsSean Paul
This patch renames the display_op power_on to dpms to accurately reflect what the function does. The side-effect of this patch is that the new hdmi dpms callback is now invoked twice in the dpms path. This is safe and will be dealt with when the exynos_drm shim goes away. Signed-off-by: Sean Paul <seanpaul@chromium.org> Reviewed-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-03-24drm/exynos: Remove apply manager callbackSean Paul
This patch removes the apply() manager callback in favor of putting the relevant commits in the individual drivers. This will mitigate some of the difference between the suspend/resume path and the dpms path Signed-off-by: Sean Paul <seanpaul@chromium.org> Reviewed-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-03-24drm/exynos: hdmi: Implement initialize op for hdmiSean Paul
This patch implements the initialize callback in the hdmi and mixer manager. This allows us to get rid of drm_dev in the drm_hdmi level and track it in the mixer and hdmi drivers. This is one of the things holding back the complete removal of the drm_hdmi layer. Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-03-24drm/exynos: set the active aspect ratio as per modeShirish S
Now that the drm_display_mode also provides aspect ratio for all resolutions, this patch adds its usage to set the active aspect ratio of AVI info frame packets as per CEA-861-D standard's Table 9. This is also needed to abide by the 7-27 compliance test of HDMI. Signed-off-by: Shirish S <s.shirish@samsung.com> Reviewed-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-03-24drm/exynos: add phy settings for RB resolutionsShirish S
This patch adds support for the below mentioned pixel clocks in Exynos5250. Without them, following display modes won¡¯t be supported: 71 MHz - 1280x800@60Hz RB 73.25 MHz - 800x600@120Hz RB 88.75 MHz - 1440x900@60Hz RB 115.5 MHz - 1024x768@120Hz RB 119 MHz - 1680x1050@60Hz RB Signed-off-by: Shirish S <s.shirish@samsung.com> Reviewed-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-02-07drm/exynos: Convert to use the standard hdmi.h headerSachin Kamat
Remove local definitions and use the ones provided by hdmi.h. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-09-05drm/exynos: Remove non-DT support in exynos_hdmiSachin Kamat
Since commit 383ffda2fa ("ARM: EXYNOS: no more support non-DT for EXYNOS SoCs"), Exynos platform is DT only. Hence remove all the conditional macros and make the driver DT only. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-09-05drm/exynos: Remove redundant error messagesSachin Kamat
kzalloc already has built-in error messages. Hence remove additional ones. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-09-05drm/exynos: Add missing of.h header includeSachin Kamat
Add of.h explicitly for of_* APIs. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-07-30drm/exynos: Remove module.h header inclusionSachin Kamat
Remove module.h header file inclusion from files since they do not use/refer to any code from that file. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-06-28drm/exynos: add new compatible strings for hdmi subsystemRahul Sharma
This patch adds new combatible strings for hdmi, mixer, ddc and hdmiphy. It follows the convention of using compatible string which represent the SoC in which the IP was added for the first time. Drivers continue to support the previous compatible strings but further addition of these compatible strings in device tree is deprecated. Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com> Reviewed-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>