summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/sti/sti_hdmi.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* drm/sti: remove stih415-416 platform supportVincent Abriou2016-09-201-20/+0
| | | | | | | | | stih415 and stih416 platform are obsolete and no more supported. Only stih407 and stih410 platform are maintained. Signed-off-by: Vincent Abriou <vincent.abriou@st.com> Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Acked-by: Peter Griffin <peter.griffin@linaro.org>
* drm/sti: fix debug logsFabien Dessenne2016-09-201-1/+1
| | | | | | | Add some missing \n in logs. Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com> Acked-by: Vincent Abriou <vincent.abriou@st.com>
* drm/sti: dpms function missing for HDMI connectorVincent Abriou2016-09-201-0/+1
| | | | | Signed-off-by: Vincent Abriou <vincent.abriou@st.com> Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
* drm: sti: fix coccicheck warningsBenjamin Gaignard2016-09-201-4/+4
| | | | | | | Fix four warnings shown by coccicheck. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Acked-by: Vincent Abriou <vincent.abriou@st.com>
* Merge tag 'asoc-hdmi-codec-pdata' of ↵Dave Airlie2016-07-051-3/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into drm-next ASoC: Add private data for HDMI CODEC callbacks Allow the HDMI CODECs to get private data passed in in callbacks. [airlied: Add STI/mediatek patches from Arnd for drivers merged later in drm tree.] Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Dave Airlie <airlied@redhat.com> * tag 'asoc-hdmi-codec-pdata' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound: ASoC: hdmi-codec: callback function will be called with private data
* | drm: sti: Add ASoC generic hdmi codec support.Arnaud Pouliquen2016-07-011-17/+277
| | | | | | | | | | | | Add the interface needed by audio hdmi-codec driver. Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
* | drm: sti: rework init sequenceBenjamin Gaignard2016-06-211-19/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Use drm_dev_alloc() and drm_dev_register() instead of .load() To simplify init sequence only create fbdev when requested in output_poll_changed(). version 2: remove call to drm_connector_unregister_all() and drm_dev_set_unique() Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1466514580-15194-4-git-send-email-benjamin.gaignard@linaro.org
* | drm: sti: use late_register and early_unregister callbacksBenjamin Gaignard2016-06-211-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sti driver use register callback to move debugfs initialization out of sub-components creation. This will allow to convert driver .load() to drm_dev_alloc() and drm_dev_register(). sti_compositor bring up 2 crtc but only one debugfs init is needed so use drm_crtc_index to do it on the first one. This can't be done in sti_drv because only sti_compositor have access to the devices. It is almost the same for sti_encoder which handle multiple encoder while one only debugfs entry is needed so add a boolean to avoid multiple debugfs initialization Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1466514580-15194-3-git-send-email-benjamin.gaignard@linaro.org
* | drm: sti: Rely on the default ->best_encoder() behaviorBoris Brezillon2016-06-091-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | All outputs have a 1:1 relationship between connectors and encoders and the driver is relying on the atomic helpers: we can drop the custom ->best_encoder() implementations and let the core call drm_atomic_helper_best_encoder() for us. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Vincent Abriou <vincent.abriou@st.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1465300095-16971-12-git-send-email-boris.brezillon@free-electrons.com
* | drm: sti: remove useless call to dev->struct_mutexBenjamin Gaignard2016-06-011-7/+0
|/ | | | | | | | No need to protect debugfs functions with dev->struct_mutex Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1464630800-30786-19-git-send-email-daniel.vetter@ffwll.ch
* drm/sti: add debugfs entries for HDMI connectorVincent Abriou2016-02-261-1/+174
| | | | | Signed-off-by: Vincent Abriou <vincent.abriou@st.com> Reviewed-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
* drm/sti: add hdmi_mode property for HDMI connectorVincent Abriou2016-02-261-2/+28
| | | | | | | | Configures the framer of the HDMI connection. By default starts in HDMI mode and can be swtich to DVI. Signed-off-by: Vincent Abriou <vincent.abriou@st.com> Reviewed-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
* drm/sti: add colorspace property to the HDMI connectorVincent Abriou2016-02-261-1/+67
| | | | | | | | Make the value of the colorspace of the HDMI infoframe configurable. HDMI colorspace could be: RGB, YUV422 or YUV444 Signed-off-by: Vincent Abriou <vincent.abriou@st.com> Reviewed-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
* drm/sti: add HDMI vendor specific infoframeVincent Abriou2016-02-261-9/+73
| | | | | | | | Vendor specific infoframe is mandatory for 4K2K resolution. Without this, the HDMI protocol compliance fails. Signed-off-by: Vincent Abriou <vincent.abriou@st.com> Reviewed-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
* drm/sti: reset infoframe transmission when HDMI is stoppedVincent Abriou2016-02-261-0/+43
| | | | | | | Clear all infoframe registers when the HDMI link is stopped. Signed-off-by: Vincent Abriou <vincent.abriou@st.com> Reviewed-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
* drm/sti: HDMI infoframe transmission mode not take into accountVincent Abriou2016-02-261-1/+1
| | | | | | | | Set the infoframe transmission mode according to the type of the infoframe. Signed-off-by: Vincent Abriou <vincent.abriou@st.com> Reviewed-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
* drm/sti: hdmi use of_get_i2c_adapter_by_node interfaceVladimir Zapolskiy2015-11-031-11/+6
| | | | | | | | | This change is needed to properly lock I2C bus device and driver, which serve DDC lines. Without this change I2C bus driver module may gone in runtime and this won't be noticed by the driver. Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com> Reviewed-by: Vincent Abriou <vincent.abriou@st.com>
* drm/sti: hdmi fix i2c adapter device refcountingVladimir Zapolskiy2015-11-031-18/+31
| | | | | | | | | | | | The commit 53bdcf5f026c ("drm: sti: fix sub-components bind") moves i2c adapter search and locking from .bind() to .probe(), however proper error path in the modified .probe() is not implemented and leftover of the related error path in .bind() remains. This change fixes these issues. Fixes: 53bdcf5f026c ("drm: sti: fix sub-components bind") Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com> Reviewed-by: Vincent Abriou <vincent.abriou@st.com>
* drm/sti: Build monolithic driverThierry Reding2015-11-031-2/+0
| | | | | | | | | | | There's no use building the individual drivers as separate modules because they are all only useful if combined into a single DRM/KMS device. Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org> Cc: Vincent Abriou <vincent.abriou@st.com> Signed-off-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Vincent Abriou <vincent.abriou@st.com>
* drm/sti: Constify function pointer structsVille Syrjälä2015-11-031-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moves a bunch of junk to .rodata from .data. drivers/gpu/drm/sti/sticompositor.ko: -.text 12216 +.text 12212 -.rodata 1284 +.rodata 1400 -.data 488 +.data 372 drivers/gpu/drm/sti/sti_drv.ko: -.rodata 516 +.rodata 544 -.data 368 +.data 340 drivers/gpu/drm/sti/stidvo.ko: -.text 3356 +.text 3348 -.rodata 188 +.rodata 256 -.data 572 +.data 504 drivers/gpu/drm/sti/sti_hda.ko: -.text 3008 +.text 3004 -.rodata 2820 +.rodata 2888 -.data 684 +.data 616 drivers/gpu/drm/sti/stihdmi.ko: -.text 6988 +.text 6980 -.rodata 1340 +.rodata 1408 -.data 176 +.data 108 Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
* drm/sti: code clean upVincent Abriou2015-08-031-1/+1
| | | | | | | | | | Purpose is to simplify the STI driver: - remove layer structure - consider video subdev as part of the compositor (like mixer subdev) - remove useless STI_VID0 and STI_VID1 enum Signed-off-by: Vincent Abriou <vincent.abriou@st.com> Reviewed-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
* drm: sti: fix sub-components bindBenjamin Gaignard2015-08-031-13/+12
| | | | | | | | | | | Fix misunderstanding in how use component framework. drm_platform_init() is now call only when all the sub-components are register themselves instead of the previous broken two stages mechanism. Update bindings documentation. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
* drm/sti: hdmi fix CEA-861E video format timing errorVincent Abriou2015-06-081-2/+2
| | | | | | | | | | HDMI analyzer tests showed that Vsync and Hsync signal were not compliant with the HDMI protocol. The first active pixel of a line is defined by HDMI_ACTIVE_VID_XMIN. The last active pixel of a line is defined by HDMI_ACTIVE_VID_XMAX. Signed-off-by: Vincent Abriou <vincent.abriou@st.com>
* drm: sti: convert driver to atomic modesetBenjamin Gaignard2015-03-191-1/+5
| | | | | | | | | v1: This patch does the minimum to make sti driver use atomic helpers. No big bang, only adapt some functions to new call order. v2: Use dpms and page flip atomic helpers Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
* drm: sti: HDMI add audio infoframeArnaud Pouliquen2015-02-051-42/+137
| | | | | | Add a default audio infoframe for HDMI compliance Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
* drm/bridge: make bridge registration independent of drm flowAjay Kumar2015-01-281-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: sti: fix hdmi avi infoframeBenjamin Gaignard2014-12-111-16/+17
| | | | | | | The hardware expect to have the infoframe checksum in the first byte. In consequence shift all infoframe on one byte. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
* drm: sti: remove gpio for HDMI hot plug detectionBenjamin Gaignard2014-12-111-9/+2
| | | | | | | | gpio used for HDMI hot plug detection is useless, HDMI_STI register contains an hot plug detection status bit. Fix binding documentation. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
* drm: sti: allow to change hdmi ddc i2c adapterBenjamin Gaignard2014-12-111-13/+27
| | | | | | | Depending of the board configuration i2c for ddc could change, this patch allow to use a phandle to specify which i2c controller to use. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
* drm: sti: do not iterate over the info frame arrayBenjamin Gaignard2014-09-171-1/+0
| | | | | | | avi infoframe is a 13 bytes array, do not read after this limite. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: sti: Make of_device_id array constKiran Padwal2014-08-261-1/+1
| | | | | | Make of_device_id array const, because all OF functions handle it as const. Signed-off-by: Kiran Padwal <kiran.padwal@smartplayin.com>
* drm: sti: hdmi: fix return value check in sti_hdmi_probe()Wei Yongjun2014-08-261-4/+4
| | | | | | | | In case of error, the function devm_ioremap_nocache() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
* drm: sti: add HDMI driverBenjamin Gaignard2014-07-301-0/+810
Add driver for HDMI output. HDMI PHY registers are mixed into HDMI device registers and their is only one IRQ for all this hardware block. That is why PHYs aren't using phy framework but only a thin hdmi_phy_ops structure with start and stop functions. HDMI driver is mapped on drm_bridge and drm_connector structures. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Reviewed-by: Rob Clark <robdclark@gmail.com>