summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2017-02-13drm/exynos: dsi: Remove bridge node reference in removaltizen/tizenHoegeun Kwon
Since bridge node is referenced during in the probe, it should be released on removal. Change-Id: I54c0759098d44eff327889e6c21d6a8e585bbb38 Suggested-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
2017-02-07Revert "usb: core: lpm: set lpm_capable for root hub device"Marek Szyprowski
After a rebase onto 4.1.36 xHCI ports on OdroidXU4 stopped working. This has been caused by commit e951f84074b84a3f5aecbffd01da74576e0068d5 applied in mainline. This patch reverts it to get xHCI ports working again. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Change-Id: I86feaf60472efaf6c045b4f1ecb28f9ab936a01f
2017-02-01[media] uvcvideo: Add video formats for Intel real sense F200 cameraDaniel Patrick Johnson
This patch adds video format support for Intel real sense F200 camera. Multimedia team requested me to support this. Signed-off-by: Daniel Patrick Johnson <teknotus@teknot.us> [Port from https://github.com/teknotus/depthview/tree/kernelpatchfmt] Signed-off-by: Inki Dae <inki.dae@samsung.com> Change-Id: I48de58feb46fc1a91fcee449213c03bdbbcbb905
2017-01-16net: bcm4358: fix not to check same value in macroSeung-Woo Kim
When BCMBUSTYPE is not defined, then BUSTYPE(bustype) is just bustype. So comparing bustype and BUSTYPE(bustype) is not necessary. This patch removes following build warning with gcc 6. drivers/net/wireless/bcmdhd4358/siutils.c: In function 'si_doattach': drivers/net/wireless/bcmdhd4358/siutils.c:512:14: warning: self-comparison always evaluates to false [-Wtautological-compare] if (bustype != BUSTYPE(bustype)) { ^~ Change-Id: I1cac3dd31bcb86983469830013a1093ed9ceaa89 Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2017-01-16Revert "Revert "[media] s4p-mfc: set allow_zero_bytesused flag for ↵Seung-Woo Kim
vb2_queue_init"" This reverts commit d5c117ccdde0b9a25161ea033364dbed479a1d55. Without allow_zero_byteused flag, during decoding the last EOS buffer with zero bytesused from userspace is not properly processed, so stream is stuck without finishing all queued buffer. Change-Id: I5725d3514885c104febb12adb44b13ae9b527817 Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2016-12-14mmc: sdhci-s3c: add spin_unlock_irq() before calling clk_round_rateJaehoon Chung
Before calling clk_round_rate(), put the spin_unlock_irq() in sdhci_s3c_consider_clock() function. Change-Id: Ifedfb52d0c32eadae77b7fe3fd3040ed486a5080 Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2016-12-14pwm: samsung: Fix to use lowest div for large enough modulation bitsSeung-Woo Kim
From pwm_samsung_calc_tin(), there is routine to find the lowest divider possible to generate lower frequency than requested one. But it is always possible to generate requested frequency with large enough modulation bits except on s3c24xx, so this patch fixes to use lowest div for the case. This patch removes following UBSAN warning: UBSAN: Undefined behaviour in drivers/pwm/pwm-samsung.c:197:13 shift exponent 32 is too large for 32-bit type 'long unsigned int' [...] [<c0670248>] (ubsan_epilogue) from [<c06707b4>] (__ubsan_handle_shift_out_of_bounds+0xd8/0x120) [<c06707b4>] (__ubsan_handle_shift_out_of_bounds) from [<c0694b28>] (pwm_samsung_config+0x508/0x6a4) [<c0694b28>] (pwm_samsung_config) from [<c069286c>] (pwm_apply_state+0x174/0x40c) [<c069286c>] (pwm_apply_state) from [<c0b2e070>] (pwm_fan_probe+0xc8/0x488) [<c0b2e070>] (pwm_fan_probe) from [<c07ba8b0>] (platform_drv_probe+0x70/0x150) [...] Cc: Tomasz Figa <tomasz.figa@gmail.com> Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com> [Backport from mainline to remove UBSAN warning] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Change-Id: Idf20ea7ccb2d20d0317e5c82498dd1e7fa3656cc
2016-12-14drm/exynos/hdmi: fix PLL for 27MHz settingsAndrzej Hajda
Current settings for 27MHz and 27.027MHz do not work. Use the settings from vendor code instead. Change-Id: I701555eff3fca430736664e0f628fc50d9a6dc4f Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: enable interlace modesAndrzej Hajda
Bug in DECON(CRTC) driver prevented interlace modes from proper work. Since DECON is fixed interlace modes can be enabled in MHL. Change-Id: Ifdebbf921e173a1c10af36d678aa6f8e2921e74a Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/exynos/decon5433: do not stop DECON before resetAndrzej Hajda
DECON fails to stop in reasonable time in case of interlaced mode. But since device is reset anyway this step can be safely omitted. Change-Id: I15a78685c9573b9799ac63b7810ff3655763e461 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/exynos/decon5433: fix porch calculation in interlaced modeAndrzej Hajda
Interlaced mode requires different porch calculation in DECON. Change-Id: I1bfc2554cd3204ebb270ab2e4a396d0f69f5a7f4 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/exynos/decon5433: signal vblank only on odd fieldsAndrzej Hajda
In case of interlace mode irq is generated for odd and even fields, but vblank should be signaled only for the last emitted field. Change-Id: Icfae5a6729a0168b4f565e79825083b39cce5ca3 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: enable MHL3 mode if possibleAndrzej Hajda
Since all sub-protocols of MHL3 are already supported MHL3 mode can be enabled. With this patch it is possible to use packed pixel modes and clocks up to 300MHz - 1920x1080@60Hz and 4K modes. Change-Id: I04ade01bff1af0cd0c44818bd4be45a33acf2ecd Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: add HSIC initialization codeAndrzej Hajda
In case of MHL3 HSIC should be initialized. Change-Id: Ieda42af182300d0f2f9c8da1bfb9f5b6a0c014ef Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: improve gen2 write burst IRQ routineAndrzej Hajda
The patch adds code to report back feature complete IRQ, and code to read and drop burst writes from peer. Change-Id: I19df1e7d08c43661896aced305fe32e88b919a09 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: send EMSC features on requestAndrzej Hajda
Device should report to the peer which features are really supported. Change-Id: I6aeeef9bfdf28bc38a7026f4289a89cbabd62544 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: rewrite hdmi start sequenceAndrzej Hajda
MHL3 protocol requires registry adjustments depending on chosen video mode. Necessary information is gathered in mode_fixup callback. In case of HDMI video modes driver should also send special AVI and MHL infoframes. Change-Id: I418f79aef2e2b58c5baf8052db5645c873a2c0b2 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: fix disconnect sequenceAndrzej Hajda
The patch allows to avoid rare cases when discovery fails. Change-Id: I29094f719f8a2ec23a74b0c7981bf80e9a6200d3 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: fix peer re-initialization in CBUS modeAndrzej Hajda
In CBUS mode peer should be re-intialized the same way as in MHL3. Change-Id: Ie631511037929b5c034750a2cdd017367b9ba004 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: split EDID read and write codeAndrzej Hajda
MHL3 requires that after reading EDID from the sink source should ask peer for features. To make both protocols happy the patch splits code accordingly. Change-Id: I367a05e4c4aac0b0de31692027da117ec56ff039 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: add delay during cbus resetAndrzej Hajda
Without delay CBUS sometimes was not reset properly. Change-Id: I4392297d13c9f9b8551e292fa4e2c070202d7e7f Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: do not stop MHL output when TMDS input is stoppedAndrzej Hajda
Stopping output causes full re-detection of the sink and slows down the process. Change-Id: I2089437635a6df5ba2a75a45a31b7431c365a861 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: make local functions staticsAndrzej Hajda
These functions are not exported. Change-Id: If0660466cf41f2e7c281970f05402429537fb3e2 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: set gen2 write burst before sending MSC commandAndrzej Hajda
Write burst should be enabled for MHL_INT_RC_FEAT_REQ and disabled for other commands. The patch moves functions up and adds delay setting for MHL3 burst mode. Change-Id: Id554364c9156eac720672363fd5437b029efbd26 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: abstract out sink detection codeAndrzej Hajda
MHL1 and MHL3 have different initialization paths. To make both protocols happy sink detection is put into continuation after link mode enablement. Change-Id: I739fd47dce782b151e9a498364ed42de9223996b Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: fix initialization sequence for MHL2 receiversAndrzej Hajda
MHL2 receiver require disabling transmitter on initialization. Change-Id: I85fa2c3c7a8dc2ed39d8b012a7d017a7fd55addd Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: fix MSC message removalAndrzej Hajda
Messages queue can be cleaned up by message callbacks, to avoid premature removal of current message it should be removed from the queue before calling these callbacks. Change-Id: Ie95c291d27a1be52291cc2cd1b7dead8f24560b4 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: fix CBUS bring-up sequenceAndrzej Hajda
In case of MHL3 CBUS is bring-up already in sii8620_got_ecbus_speed. Change-Id: I4abafa944113528eb6cc71799a35f4215aeac428 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: fix peer device capabilities read codeAndrzej Hajda
Peer capabilities should be read differently depending on protocol version. Change-Id: I3344af6068da07ccc7842a6e8affc63ee31a33a0 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: respond to feature requestsAndrzej Hajda
MHL3 protocol requires device to respond to feature request from peer. This minimal answer fulfills the requirement and allows to continue negotiation. Change-Id: Ifa2ed4d4db2cd29e50eef8144eef3eeb16aa2d72 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: add support for burst eMSC transmissionsAndrzej Hajda
Burst transmissions are used in MHL3 mode negotiation. Change-Id: Iec7261a46c9743ef95fae0e8e921aeee11cf0cc4 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: initial support for eCBUS-S modeAndrzej Hajda
The Single-ended eCBUS Mode (eCBUS-S) mode provides 60 Mb/s full-duplex bidirectional traffic for three channels: - CBUS data (CBUS1 channel), - High-bandwidth MHL data (eMSC channel), - tunneling data (T-CBUS channel). It is required to fully support MHL3 dongles. Change-Id: I64f78981126cc30033b2b4330df042feccd6ffe0 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: add continuations to messagesAndrzej Hajda
Due to asynchronous nature of MHL flow of execution is dispersed. Logical continuation of some actions happens after response of peer, i.e in interrupt handler. To simplify coding continuation mechanism has been added - it is now possible to provide continuation callback, which will be called after peer responds to given action. Change-Id: I93a9d25912e17787dd9856b65d1fc75b2644b940 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: add reading device capability registersAndrzej Hajda
This functionality is necessary to implement MHL3 modes. Change-Id: I267d27815527403ace25470f620cb4e5600a2520 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: simplify MHL3 mode settingAndrzej Hajda
It is not necessary to set REG_COC_CTL0, REG_MHL_COC_CTL1 registers. Change-Id: Id363df66baffe0be9f96e61597bc04a16bf42aad Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/bridge/sii8620: limit supported modes to MHL1/2 modesAndrzej Hajda
MHL3 modes are unstable on MHL3 dongle working in compatibility mode. The patch denies them until full MHL3 mode is supported. Change-Id: I0e18ce16e6194c346dde8a67a864feb452cf7b12 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/exynos/hdmi: fix VSI infoframe registersAndrzej Hajda
VSI infoframe registers address space is non-contiguous, so infoframe write should be split into two chunks. Change-Id: I40b4598dd64ec205d85a6f99828e2f22ae568918 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm: exynos: Remove unreachable codeSylwester Nawrocki
This patch reworks function arguments testing to avoid unreachable code as pointed out with an SVACE warning: * UNREACHABLE_CODE: This statement in the source code might be unreachable during program execution. [unreachable] unreachable at drivers/gpu/drm/exynos/exynos_drm_ipp.c:1442 [The condition property == 0 is always false because at this program point the variable property is always not equal to 0] The condition property == 0 is always false because at this program point the variable property is always not equal to 0 at drivers/gpu/drm/exynos/exynos_drm_ipp.c:1441 * UNREACHABLE_CODE: This statement in the source code might be unreachable during program execution. [unreachable] unreachable at drivers/gpu/drm/exynos/exynos_drm_ipp.c:1569 [The condition event_work == 0 is always false because at this program point the variable event_work is always not equal to 0] The condition event_work == 0 is always false because at this program point the variable event_work is always not equal to 0 at drivers/gpu/drm/exynos/exynos_drm_ipp.c:1568 Change-Id: I2a9426685c87047bf5ec3ee88b6cce4d1d7d6158 Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2016-12-14drm/exynos: fix error handling in exynos_drm_subdrv_openArnd Bergmann
gcc-6 warns about a pointless loop in exynos_drm_subdrv_open: drivers/gpu/drm/exynos/exynos_drm_core.c: In function 'exynos_drm_subdrv_open': drivers/gpu/drm/exynos/exynos_drm_core.c:104:199: error: self-comparison always evaluates to false [-Werror=tautological-compare] list_for_each_entry_reverse(subdrv, &subdrv->list, list) { Here, the list_for_each_entry_reverse immediately terminates because the subdrv pointer is compared to itself as the loop end condition. If we were to take the current subdrv pointer as the start of the list (as we would do if list_for_each_entry_reverse() was not a macro), we would iterate backwards over the &exynos_drm_subdrv_list anchor, which would be even worse. Instead, we need to use list_for_each_entry_continue_reverse() to go back over each subdrv that was successfully opened until the first entry. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Inki Dae <inki.dae@samsung.com> [Backport from mainline to fix build warning with gcc6] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Change-Id: Iee4b9078f0bd521507716521a339b37ea5dd8776
2016-12-14drm/exynos/hdmi: Don't print error on deferral due to regulatorsJavier Martinez Canillas
The regulators may not be available just because their driver's probe function was just not executed and so the regulators not registered. So, in this case the Exynos HDMI driver should not print logs since a -EPROBE_DEFER is not really an error and that will just pollute the kernel log and confuse users. This patch prevents the following misleading messages to be printed: [ 1.443638] [drm:hdmi_probe] *ERROR* failed to get regulators [ 1.449326] [drm:hdmi_probe] *ERROR* hdmi_resources_init failed Change-Id: Ib23cf62b86f9aacb6e23b64b7716a77d96da83f8 Reported-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2016-12-14gpu: drm: exynos_hdmi: Remove duplicate initialization of regulator bulk ↵Andrzej Hajda
consumer The helper, devm_regulator_bulk_get() initializes the consumer as NULL, so this code can be ignored. Change-Id: Ib23cf62b86f9aacb6e23b64b7716a77d96da87f8 Signed-off-by: Milo Kim <woogyom.kim@gmail.com> Reviewed-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2016-12-14gpu: drm: exynos_hdmi: Move PHY logic into single functionAndrzej Hajda
Paring DT properties and getting PHY IO (memory mapped or I2C) in one function. Change-Id: Ibc94c66df85a81a8f5239b5d4f334686b6ae863d Signed-off-by: Milo Kim <woogyom.kim@gmail.com> Reviewed-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2016-12-14gpu: drm: exynos_hdmi: Move DDC logic into single functionAndrzej Hajda
Paring DT properties and getting the I2C adapter in one function. Change-Id: I1df1b6294f61013110bcddb223a3b35fb5c17169 Signed-off-by: Milo Kim <woogyom.kim@gmail.com> Reviewed-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2016-12-14drm/exynos/hdmi: improve infoframe configurationAndrzej Hajda
Use core helpers to generate infoframes and add VSI frame generation for UHD modes. Change-Id: Ibea33cff20c6c4fa6b07a8e206770708a36fe53f Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/exynos/hdmi: always set PHY_POWER_OFF_EN bitAndrzej Hajda
The bit is present in all variants (its default value only differs). The patch makes the code in-sync with mainline. Change-Id: I6a2a8fcf9d7f8a5616f64eafec7722a4bf1675fa Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/exynos/hdmi: remove unused fieldAndrzej Hajda
The patch removes unused hdmi_context field. Change-Id: Id8836961b6dca7c2a09f7d4a99c3455c96057eb6 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: use array specifier for HDMI-PHY configurationsAndrzej Hajda
HDMI-PHY configurations are stored as array pointer and count pair, we can re-use existing helpers to simplify their initialization. Change-Id: Ie387a23428711edc5c027661ac0b1c623c19c468 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2016-12-14drm/exynos/hdmi: synchronize sysreg code with mainlineAndrzej Hajda
There are no other users of sysreg besides 5433. The code can be simplified. The patch synchronizes the code with mainline. Change-Id: Ie6996e69388b2ea5afece292b56317d60caa91b0 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/exynos/hdmi: improve clock routinesAndrzej Hajda
The patch: - adds unwind code to hdmi_clk_enable_gates, - simplifies code, - moves routines up, to match mainline. Change-Id: I79055471688400b6f449c87d210ae698166acb68 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2016-12-14drm/exynos/hdmi: constify global variablesAndrzej Hajda
These variables should not be modified. Change-Id: I9cef5d79465e24d3bc1d825afb94cccc09ff1756 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>