summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2016-12-14drm/exynos/hdmi: convert to gpiod APIAndrzej Hajda
The patch converts API to gpiod and moves initialization code to hdmi_resources_init. Change-Id: I5136395b16f3f50defa81be6406d137f3c103e35 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2016-12-14drm/exynos/hdmi: fix edid memory leakAndrzej Hajda
edid returned by drm_get_edid should be freed. The patch fixes it. Change-Id: Ied8d60b6a1e12409037defb04be4bcf0c906690d Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2016-12-14drm/exynos/hdmi: remove registry dumpAndrzej Hajda
HDMI registry dump unnecessary spoils console and is not very helpful. Change-Id: I6155d370fa69e3da620c28c86bf41d17a398c6c3 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2016-12-14drm/exynos/hdmi: use optional regulator_get for hdmi-enAndrzej Hajda
hdmi-en is an optional regulator so it should be better handled by devm_regulator_get_optional call. Change-Id: I2cbb12c54c43b10ebac76a00a5ef954c2ae627f6 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2016-12-14drm/exynos/hdmi: use constant size array for regulatorsAndrzej Hajda
Driver always uses the same number of regulators, so there is no point in dynamic allocation. Change-Id: I8227ea4e341c55f1932f1e88e1138bb50271a749 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2016-12-14drm/exynos/hdmi: remove deprecated hdmi_resources structureAndrzej Hajda
hdmi_resources structure was filled by old platform data code and is not necessary anymore. The patch removes it at groups together resource related fields in hdmi_context. The patch is back-ported from mainline. Change-Id: Iab2209a9177749ce526569e32c6695d4b09272dc Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/exynos/hdmi: improve HDMI/ACR related codeAndrzej Hajda
Simple formula can be used to calculate CTS and N coefficients. Additionaly ACR registers have different offsets for different versions of IP. Change-Id: I41be0b432da51651c007428fce7c7c4870ef1cb6 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2016-12-14drm/exynos/hdmi: use mappings for registers with IP dependent addressAndrzej Hajda
Some registers resides at different offsets depending on device version. This patch adds infrastructure for mapping such registers to proper address based on hdmi_type. It adds also mappings to some registers. Change-Id: Ic345e1a4cb398aebea62b50fd86a44f30b5fd1e5 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2016-12-14drm/exynos/hdmi: stop duplicating drv_data fieldsAndrzej Hajda
The patch removes duplicated drv_data fields and simplifies drv_data matching. Change-Id: I78abbd6dfee0d05c7095ae176fc8e080e233fd64 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/exynos/hdmi: refactor struct str_array_specAndrzej Hajda
The patch constifies array and renames symbols to be in sync with mainline. Change-Id: Ife8aa1b6adde978dbf71fc7c57bd18e01f50fdd7 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/exynos/hdmi: stop programming registers with default valuesAndrzej Hajda
There is no point in rewriting default values, as the IP is reset anyway. Change-Id: I9c0856d48be83a36ed4a8741e86715353acbf2d0 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2016-12-14drm/exynos/hdmi: move hdmi_start to hdmi_mode_applyAndrzej Hajda
hdmi_start is called for both variants. Change-Id: I6da89cf21599a760c793121f3ae637eca7cc77ff Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/exynos/hdmi: remove hdmi_v14_conf structAndrzej Hajda
The patch removes intermediate struct for HDMIv14 register configuration, instead registry values are calculated on the fly. Change-Id: Ib440e0ab375f4eafdc5e6d3e06fcf64ce212ad84 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2016-12-14drm/exynos/hdmi: remove hdmi_v13_conf structAndrzej Hajda
The patch removes intermediate struct for HDMIv13 register configuration, instead registry values are calculated on the fly. Change-Id: I4a47b99afda16f9fc928ff3f91359be67c4dc55f Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2016-12-14drm/exynos/hdmi: remove redundant configuration fieldsAndrzej Hajda
The patch removes redundant fields from hdmi_conf_regs. Their values can be calculated from current_mode. This patch is the first step to remove whole hdmi_conf_regs structure. Change-Id: Id40fe15302b2546410f68323e92d136eb93b990a Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2016-12-14drm/exynos/hdmi: add 297MHz pixel clock supportAndrzej Hajda
297MHz is used by UHD modes. Change-Id: I2040adcc3f132dbf1d510309527a9e1574008961 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: synchronize headers with mainlineAndrzej Hajda
This patch does not provide functional change. Its main role is to synchronize header files with mainline. Change-Id: Ia6f338cc3ec1d50728a9e0e946211451f40e7420 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: rename files according to mainlineAndrzej Hajda
The patch synchronizes file names with mainline. Change-Id: I6aa491f2d7858f90055e7ea9bce00e8bb7db50e2 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: coding style fixesAndrzej Hajda
The patch does not provide functional change beside code style fixing and synchronizing driver with mainline. Change-Id: I5dc303ead4af81883c5199e9eaef7e73733a599b Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: use lower-case for i2c_device_idAndrzej Hajda
Linux I2C device use lower-case for identification. Change-Id: I7a86fef880c5c969897658a710c05ead37b74f2b Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: add missing error checkingAndrzej Hajda
The patch adds error checking during initialization and in irq handler. Change-Id: I26777455fb5ff86c91455a683b6cf5642fe2ed31 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: improve on/off sequenceAndrzej Hajda
The patch puts clock management into on/off functions and adds neccessary delay after regulator enable. Change-Id: I4fc052eb21058e787355a8f2dfeb75b05a5d5341 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: fix reset line logicAndrzej Hajda
Reset line is active in low state, previous configuration was incorrect, but it worked because logic was also inverted in the driver. The patch fixes it. To keep bisectability both changes are put into one patch. The patch adjusts also delays. Change-Id: I07d08f763fa5ed4805eb638c1d2bb1ddd3328680 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: remove single-use-only in-linerAndrzej Hajda
sii8620_edid_size is used only once and is simple enough to be removed. Change-Id: Idd53dbccc381722216c81d7a49e284f701435165 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: fix EDID fetch codeAndrzej Hajda
The patch adds handling errors during EDID fetch. Additionally it makes code cleanup. Change-Id: Icb94df6386d4b18ee5f7756991d0419b90763157 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: simplify sii8620_mt_read_devcap codeAndrzej Hajda
Use helper instead of direct allocation. Change-Id: I5137e43f8e6f8ed0614f38969634cd1f5c5aec56 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: stop using macros having NULL valuesAndrzej Hajda
Many VAL_* macros represent single unset bit, ie their value is 0. These macros are confusing and obfuscates the code. The patch removes all uses of such macros, and replaces all uses of single-set-bit VAL_* macros with their BIT_* equivalent. Beside cleaning it makes the driver closer to the mainline. Change-Id: Ib96a329d4023affe3d39bfff746af8773871c6d3 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: improve reading device capabilities functionAndrzej Hajda
This patch adds error checks, improves logging and constifies static array. As a result the function is similar to mainline, except missing sink name reporting which is not yet supported by drm core. Change-Id: Icf7a72f0b9098f74f04e039c8c5dc5dfa3c59e17 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: abstract out common MSC commandAndrzej Hajda
Four different functions share the same code, this patch abstracts out the common part. Change-Id: Ia2c7ccb59863be03bf47d61ec979c72bb3258df6 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: fix message worker functionAndrzej Hajda
Messages should not be handled in error and busy state. Also state should be update on success. Change-Id: Ib6ac51f920cb44f75628cbec78b3bb32774816ff Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: add message queue cleanupAndrzej Hajda
Queue should be cleaned up on disconnect, otherwise we risk misbehavior. Change-Id: I4f212e1c36ac75f6f72102b24a1c5b14a932aeca Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: rename symbol namesAndrzej Hajda
The patch renames variables and defines to match these in mainline. Change-Id: Iec05a4477001d57aa09fc34e1eec2c330f84253d Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: simplify sii8620_mt_msc_cmd_sendAndrzej Hajda
The patch removes cryptic temporary array of parameters. Change-Id: If9233291a0e23e1603ac5d9b6766a0fb2166723f Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: improve transfer logsAndrzej Hajda
Use dev_dbg instead of pr_debug and prettify error logs. Change-Id: I2e7f568ce3fddab8607c83bfa3b6cdfa1af49586 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: use static version of sii8620_write_seq if possibleAndrzej Hajda
Static version should be used whenever arguments are static. Change-Id: I6b5552cf27109cfa483e248cb25d02216672de23 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: re-factor registry access codeAndrzej Hajda
The patch constifies arguments if possible, adds static version of sii8620_write_seq and simplifies sii8620_setbits. All these changes allows to optimize code and synchronize driver with mainline. Change-Id: I7432156e0dbe47b53f012c4f8561c71e587ba9d3 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: use I2C to parse interrupt DT propertiesAndrzej Hajda
Interrupts should be handled by I2C core instead of private gpios. Change-Id: Ib4d3b107f398d77c549d2334c4508f69b26427f9 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: re-factor context fieldsAndrzej Hajda
The patch makes names of some fields more adequate to their function. It replaces also mt state fields with enum. This patch synchronizes fields names with upstream driver. Change-Id: Ia832a687f02124998db77fd6e3cd973b6f00a7af Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/exynos/dsi: mimic indentation of mainline driverAndrzej Hajda
This patch synchronizes indentation from mainline driver. It helps in developing dsi driver in both branches. Change-Id: I3ad3704d0cf9d58a4021cbc8c52ec4201a5f5724 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/exynos/dsi: use of_graph_get_endpoint_by_regs helperPhilipp Zabel
This allows to remove the local of_graph_get_port_by_reg(), of_graph_get_endpoint_by_reg(), and of_get_child_by_name_reg() functions. Change-Id: Ia8d8e6f9f34bbde91a5f8d9c600a2b8fe5d3f80d Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Reviewed-by: Andrzej Hajda <a.hajda@samsung.com> Reviewed-by: Inki Dae <inki.dae@samsung.com>
2016-12-14drm/exynos/dsi: use core helper to create DSI packetAndrzej Hajda
Core provides generic helper to create DSI packet, use it instead of custom code. Change-Id: I365c64ba52b85ac1b39dbdab8bb2ccdf6620b279 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2016-12-14drm/exynos/dsi: constify read-only variablesAndrzej Hajda
Change-Id: Ie9d4cea15e40408ed3a8c8f84002da465c0cae90 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/exynos: support exynos5422 mipi-dsiAndrzej Hajda
This patch supports mipi dsi for exynos5422. The dsi register offsets of the exynos5422 are similar with exynos5433. However, the values of the registers are quite different from the exynos5433. For example, the exynos5422 uses sw reset like previous chips. Change-Id: I82f19afc66c2893a1bfb9d09ea56e631f67921ae Signed-off-by: Chanho Park <chanho61.park@samsung.com> Reviewed-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2016-12-14drm/exynos/dsi: rename variables to match mainline kernelAndrzej Hajda
Decreasing number of differences in tizen and mainline should simplify development of both branches. Change-Id: I7b0ef48f01a9681e4661434916d410e1d173a30d Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/exynos/dsi: replace registry access macros with functionsAndrzej Hajda
Functions are preferred over macros as more type-safe. Change-Id: I24a618d1c8189ad5606db4529178811957b062bb Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/exynos: add trace supportInki Dae
This patch adds trace support and also inserts two trace points, one is win_commit and other is finish_pageflip. These would give us help to trace pageflip operation. Change-Id: I1cd912f03703ae40d3fe45a4b329eddfce5178e4 Signed-off-by: Inki Dae <inki.dae@samsung.com> [squashed with bugfixes and ported to v4.1 Tizen kernel] Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
2016-12-14drm/exynos: fence: add dma fence supportInki Dae
This patch adds DMA fence based DMABUF synchronization feature. The original codes of this feature is a below repository, https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-3.14 Change-Id: I4bcefb1487d6a85530fcd5ea4dde5fba435bb827 Signed-off-by: Inki Dae <inki.dae@samsung.com> [squashed with bugfixes and ported to v4.1 Tizen kernel] Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
2016-12-14drm: add helpers for fence and reservation based dma-buf syncDominik Behr
BUG=chromium:395901 TEST=emerge-veyron chromeos-kernel-3_14, deploy and boot kernel Change-Id: I0cdf6d23e9f4924128d4de77c0f3ed7589766bb8 Signed-off-by: Dominik Behr <dbehr@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/218381 [mszyprow: ported to v4.1 kernel] Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
2016-12-14drm/exynos/hdmi: remove unused hdmiphy_poweron()Seung-Woo Kim
The function hdmiphy_poweron() is not used anymore, so this patch removes it. This patch fixes following build warning. drivers/gpu/drm/exynos/exynos_hdmi.c:1897:13: warning: 'hdmiphy_poweron' defined but not used [-Wunused-function] static void hdmiphy_poweron(struct hdmi_context *hdata) ^ Change-Id: I4c51b45becf8f52ef85020c7e1628d7baad90670 Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2016-12-14drm/exynos: fix types for compilation on 64bit architecturesMarek Szyprowski
This patch fixes compilation warnings (on 64bit architectures) and bugs related to casting pointers through 32bit integers. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com> [backport from mainline to remove remaining build warnings] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Change-Id: I21826b01286c6152be873d2234e14eb1950f3ca9