Commit Graph

600400 Commits

Author SHA1 Message Date
Zheng Yang
d4686ea76b FROMLIST: drm: Add HDMI 2.0 VIC support for AVI info-frames
HDMI 1.4b support the CEA video modes as per range of CEA-861-D (VIC 1-64).
For any other mode, the VIC filed in AVI infoframes should be 0.
HDMI 2.0 sinks, support video modes range as per CEA-861-F spec, which is
extended to (VIC 1-107).

This patch adds a bool input variable, which indicates if the connected
sink is a HDMI 2.0 sink or not. This will make sure that we don't pass a
HDMI 2.0 VIC to a HDMI 1.4 sink.

This patch touches all drm drivers, who are callers of this function
drm_hdmi_avi_infoframe_from_display_mode but to make sure there is
no change in current behavior, is_hdmi2 is kept as false.

In case of I915 driver, this patch checks the connector->display_info
to check if the connected display is HDMI 2.0.

Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: Jose Abreu <jose.abreu@synopsys.com>
Cc: Andrzej Hajda <a.hajda@samsung.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>

PS: This patch touches a few lines in few files, which were
already above 80 char, so checkpatch gives 80 char warning again.
- gpu/drm/omapdrm/omap_encoder.c
- gpu/drm/i915/intel_sdvo.c

Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>
(am from https://patchwork.kernel.org/patch/9641449)
Change-Id: I364cd0aed7eea0384ea9eddfff20c3fa86eb9ba2
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-03-29 10:49:54 +08:00
Viresh Kumar
7c08334e41 UPSTREAM: devfreq: rk3399_dmc: Remove dangling rcu_read_unlock()
This call never had the rcu_read_lock() counterpart. Remove the unlock
part as well.

Change-Id: Ifc5abfd7cea9a245b6edc0f50e362963ac045b7f
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
(cherry picked from commit d8323de3d4)
2017-03-29 10:42:52 +08:00
Chanwoo Choi
07e5bac825 UPSTREAM: PM / devfreq: rk3399_dmc: Use the resource-managed function to add devfreq dev
This patch uses the resource-managed to add the devfreq device.
This function will make it easy to handle the devfreq device.

- struct devfreq *devm_devfreq_add_device(struct device *dev,
				  struct devfreq_dev_profile *profile,
				  const char *governor_name,
				  void *data);

Conflicts:
        drivers/devfreq/rk3399_dmc.c

Change-Id: I2ba2779a1b944931dc240f0593824f0316d11985
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
(cherry picked from commit 927b75a628)
2017-03-29 10:41:33 +08:00
Javier Martinez Canillas
c7f2c5a670 UPSTREAM: PM / devfreq: rk3399_dmc: Fix module autoload
If the driver is built as a module, autoload won't work because the module
alias information is not filled. So user-space can't match the registered
device with the corresponding module.

Export the module alias information using the MODULE_DEVICE_TABLE() macro.

Before this patch:

$ modinfo drivers/devfreq/rk3399_dmc.ko | grep alias
$

After this patch:

$ modinfo drivers/devfreq/rk3399_dmc.ko | grep alias
alias:          of:N*T*Crockchip,rk3399-dmcC*
alias:          of:N*T*Crockchip,rk3399-dmc

Change-Id: I4bffd86067bb487619ce8365532123938a0ca964
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
(cherry picked from commit 2f3f1a261c)
2017-03-29 10:33:13 +08:00
Axel Lin
aa28f75e56 UPSTREAM: PM / devfreq: rk3399_dmc: Remove explictly regulator_put call in .remove
Current code uses devm_regulator_get() in .probe so a regulator_put() will
be automatically called when unload the module. Remove the explictly
regulator_put() call and then we can also remove rk3399_dmcfreq_remove().

Change-Id: I56a62a76f06403aff9ad0478e7701862084a90b3
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
(cherry picked from commit da4a64481b)
2017-03-29 10:24:17 +08:00
Frank Wang
696b3f25a2 clk: rockchip: rk3288: add gate id of hclk_usb_peri for usb otg
Change-Id: Ib45f6d97ec81329ec9a4a19e9e836efa0ea61fe2
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2017-03-28 17:27:01 +08:00
Zheng Yang
3034764350 drm: bridge: dw-hdmi-i2s-audio: enable INSERT_PCUV bit for LPCM
dw-hdmi introduced insert_pcuv bit in version 2.10a. When
set (1'b1), this bit enables the insertion of the PCUV
(Parity, Channel Status, User bit and Validity) bits on the
incoming audio stream (support limited to Linear PCM audio).

Change-Id: Ib12a50bf7064ac78dbf143f1ea35d7f68f861877
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-03-28 15:48:36 +08:00
William Wu
c0bb035a35 ARM: rockchip_defconfig: enable dwc2 driver
Change-Id: Ie84fb1d496f18114da988f52e1a9e4b240013844
Signed-off-by: William Wu <wulf@rock-chips.com>
2017-03-28 15:24:20 +08:00
hero.huang
978876cc44 arm64: rockchip_linux_defconfig: enable PCIe config
Change-Id: I7be6a725eb0043d135d166939ecde3c6f47b24f9
Signed-off-by: hero.huang <hero.huang@rock-chips.com>
2017-03-28 11:16:57 +08:00
Elaine Zhang
3a45555460 rk808: rtc: set rtc stopped by default
set rtc stopped by default, start rtc in rtc device probe.
add rtc node, whether RTC need to initialize.

Change-Id: Ifab269786f316d33149a50a18e23af1b6206d57d
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2017-03-28 11:14:53 +08:00
hero.huang
70b8fe2af3 arm64: dts: rockchip: enable pcie_phy for Sapphire board
Change-Id: Ia59a697ee27d4f4848f3fceb344f362b7fdcae73
Signed-off-by: hero.huang <hero.huang@rock-chips.com>
2017-03-28 11:14:19 +08:00
Huang, Tao
9ac22e5d44 arm64: rockchip_defconfig: update by savedefconfig
Change-Id: I642605f12bb453b9b09dea3d199923a314fec844
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2017-03-28 11:08:32 +08:00
WeiYong Bi
1cba569fb5 phy: rockchip-dp: fix unexpected reset 24m clock
Reset_control_assert/reset_control_deassert will not check whether
the incoming pointer is NULL, so we need to check it before using it.

Change-Id: Ib2aeeefcb2d5d7429031bc21bf7e3df1d897a6c9
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
2017-03-28 09:53:31 +08:00
Jianqun Xu
54be7ce59b arm: dts: rk3288-evb: add ion support
Change-Id: Icbdba5ef01681e4ab107a5af295cfa9e51215288
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2017-03-28 09:40:44 +08:00
Jacob Chen
ef2c18d228 drm/rockchip: rga: replace primitive api with dma sync api
Since rga is a dma-coherent device, we have to use drm bus
 device to call sync api.

Change-Id: Ia12062293fabba083c8ab9c4f7457e3167807bb9
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-03-27 19:00:41 +08:00
William Wu
267df77d1d usb: dwc_otg_310: remove unused configs
The USB20_HOST_EN and USB20_OTG_EN configs are used
for rockchip dwc2 legacy driver, they are not needed
for dwc_otg_310 driver.

Change-Id: I4c16f0be5276b3c07429ab88cb063508b34ce007
Signed-off-by: William Wu <wulf@rock-chips.com>
2017-03-27 18:32:51 +08:00
Frank Wang
737d3f335a arm: rockchip_defconfig: enable dwc_otg_310 usb driver
This adds enable dwc_otg_310 driver for dwc otg and host.

Change-Id: I779c663992b270015515d45a94e3fa4187368a93
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2017-03-27 18:32:15 +08:00
Frank Wang
c2897ccc70 usb: dwc_otg_310: fixed compilation error
Change-Id: I5f501184c11d25493f6855d994e32c1043371161
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2017-03-27 18:31:46 +08:00
Chen Liang
ae1b1b362d ARM64: dts: rockchip: configure EAS data for rk3368
Change-Id: I3154b1ae060553b7919c213420782f7a1f5d36fc
Signed-off-by: Chen Liang <cl@rock-chips.com>
2017-03-27 18:07:55 +08:00
WeiYong Bi
35416e15a4 arm64: dts: rk3368-android: Add eDP route node
Change-Id: I824d7a1c15cf7cddcb2e3f080498bd23e269be40
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
2017-03-27 17:59:04 +08:00
WeiYong Bi
a381e19663 arm64: dts: rockchip: Add eDP node for rk3368
Change-Id: I0fa5ddc12cdbb2bf1d9fb0667222ead15071bdec
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
2017-03-27 17:43:11 +08:00
WeiYong Bi
2404f87aa5 phy: rockchip-dp: Add support for rk3368 Display Port PHY
Change-Id: Ic2134ba719dadba121dc2fcc944662ef06b2ecfa
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
2017-03-27 17:40:39 +08:00
WeiYong Bi
d6fdc92e0c drm/rockchip: analogix_dp: Add support for RK3368 eDP
Change-Id: I738ddf122776081cf41adef2921644ddfc6e07dd
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
2017-03-27 17:38:47 +08:00
Elaine Zhang
5fa933c874 clk: rockchip: rk3368: set hclk_vio_noc as critical clock
to fix up the display shaking when uboot to kernel show.

Change-Id: I5f85028921d76a2dea752aafe7420b05b041bc8e
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2017-03-27 17:28:04 +08:00
Jianqun Xu
f1616f236f arm: dts: rk3288-evb: add support for GSL3673
GSL3673 is a touchscreen device, let support it.

Change-Id: I4bf302c395491ca49a1874c8984caa0b49cfb326
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2017-03-27 17:13:10 +08:00
Jianqun Xu
5211012f3b arm: dts: rk3288: move i2c0 to the front of other i2c
Change-Id: I822622fc1f1ed41729851294858246cf6da8c202
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2017-03-27 16:53:34 +08:00
Nickey Yang
e8ecbcdd84 FROMLIST: drm: bridge: dw-hdmi: add HDMI vendor specific infoframe config
Vendor specific infoframe is mandatory for 4K2K resolution
and stereoscopic 3D mode.
Without this, the HDMI protocol compliance fails.
(am from https://patchwork.kernel.org/patch/9636115/)

Change-Id: I97ebe1b139eff7fe69cc9f393b40426134588b91
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
Reviewed-by: Jose Abreu <joabreu@synopsys.com>
2017-03-27 14:52:22 +08:00
Rocky Hao
ecb2effba7 arm64: dts: rockchip: update thermal config and add gpu's parameters for rk3368
add both static and dynamic power coefficient for gpu
module, and add gpu as a cooling device in the thermal zone.
rename the thermal zone's config and make it more readable.
update temperature pooling interval and make the temperature
control more effective.

Change-Id: I6e0939fe26ece9c611151ffbbb55e62b824a602f
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
2017-03-27 12:54:56 +08:00
Zorro Liu
12670bf5fd arm64: dts: rk3368-p9: fix backlight polarity err
Change-Id: I3dc9376b60f3c6acba67cfb379944c7c969b2ffc
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2017-03-27 10:21:49 +08:00
Mark Yao
89e06cd3b0 drm/rockchip: vop: correct rk3368/rk3366 feature
RK3368/RK3366 not support 10bit output

Change-Id: Ib5cdab237828236e7867ce784d0e7b208aeb1ed0
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-03-27 09:59:38 +08:00
Jianqun Xu
471947d6ff arm: dts: rk3288-evb: use rockchip_key to replace adc_key
Change-Id: I46df35c489bf15a159eb64a2d5e3d0b3510f6bef
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2017-03-27 09:40:00 +08:00
Jianqun Xu
8502633ed8 Input: add document for rockchip keys
Change-Id: I3f8f4522e6279e3f5faf3f293936c835ce8fc6b7
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2017-03-27 09:39:44 +08:00
Huang, Tao
be3abb6107 ARM: rockchip_defconfig: update defconfig
Change-Id: I594981b15c098d78313c4c17572cfbab643dbc9a
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2017-03-25 13:23:11 +08:00
Huang, Tao
c2b7f944b6 video/rockchip: rga2: fix compilation warning
Change-Id: I92c2034da63cc8db2dac9a55cb654d4af21a7cf8
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2017-03-25 13:22:57 +08:00
Huang, Tao
94e602741d rk: Makefile set default CROSS_COMPILE for arm
Change-Id: I44a0dfe1a1f3bbad6f6c21001d2e4d668ff0db8a
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2017-03-25 13:11:06 +08:00
Jianqun Xu
f33c5b9d6e usb: otg: modify default to n for usb2.0
Change-Id: I6dc85a9fbf89b35afe67fc119f0d60a130691317
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2017-03-25 10:32:33 +08:00
Mark Yao
09eb60c109 arm64: dts: rk3399-box: fix dp and hdmi dclk parents
Change-Id: Iebe0bfe248bf4ca6f61dafe1eb86a34dc6346e6f
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-03-25 09:06:17 +08:00
Jianqun Xu
31e823d95d arm64: dts: rk3368: modify rksdmmc to dwmmc
Modify rksdmmc to dwmmc, sync with upstream.

Change-Id: I0aabcf47a5fe1b1f564bde2f719d8c1c48debc90
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2017-03-24 19:55:49 +08:00
Mark Yao
17f8b65e5c staging: ion: dup sg_table when map_dma_buffer
Change-Id: Ib57df4e7f972a8e46b6c8e8c82e314e04cc3b349
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-03-24 18:36:30 +08:00
Elaine Zhang
21b4bfc5aa arm64: dts: rockchip: rk3399: add aclk/hclk_vop init freq
to fix up the display error when no uboot logo show.

Change-Id: I6227391a3c0d015a5fa6ae916d849659d5957077
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2017-03-24 18:36:07 +08:00
Zikim,Wei
7ce80d0297 video/rga: fix rga support flip
Change-Id: Ib5283779e08d1e58ff8a1fb5e3eb662aa8f0d130
Signed-off-by: Zikim,Wei <wzq@rock-chips.com>
(cherry picked from commit 7318eabddc3799460319181f9ffd34f2116a9e46)
2017-03-24 18:35:34 +08:00
Jianqun Xu
b9eeaf94f6 video/rockchip: rga: replace system_nrt_wq with system_wq
Change-Id: Id79ba17575b5844c329391a6e33e0f2f0c4353ff
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2017-03-24 16:49:35 +08:00
Jung Zhao
b9bc2efe94 video: rockchip: vpu: alloc & mmap iova inside drm allocator
since on 3368 platform, hevc & vpu share the same hardware
resource, but have two independent mmu. and only one mmu can
be attached at the same time. I have to alloc and mmap iova
outside mmu attached status, otherwise it will cause mmu reset
error.

fix bugs:
1. hevc & vpu can work at the same time now. on 3368 platform,
vpu_mmu and hevc_mmu share the same irq with their respective
master device, we can not detach mmu during irq context.
2. fix copy_sgt offset and lenght invalide value

Change-Id: I9d02aa0b85a6d0690832c7869a260953f5a5baab
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2017-03-24 14:50:42 +08:00
Huang, Tao
90ad8256b6 mmc: rm rk_sdmmc.c
Change-Id: Id48880a140a8055d30dafb42ad3e1aef973ae5c6
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2017-03-24 14:45:45 +08:00
Jung Zhao
2909a86c7b video: rockchip: vpu: add rk3368 support
3368 is vpu & hevc combo platform which have a virtual master device
and two sub devcie - vpu_service & hevc_service. There is a flag in
grf, driver need write or erase this flag when switch mode.

since shutdown function only be called on virtual master device, we
need to call into both vpu and hevc device.

Change-Id: I56ad28dbbc7cc380204fb7d0da11d93b5ace9469
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2017-03-24 14:04:22 +08:00
Jung Zhao
f8dc9a61c5 ARM64: dts: rk3368-android: enable vpu_combo default
Change-Id: I7b130e3d0787c441f862030f8a935063af818e01
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2017-03-24 14:01:40 +08:00
Jung Zhao
25f0664f67 ARM64: dts: rk3368: add vpu & hevc node
Change-Id: Iee8fb808ad0c929be8fa5db8164fd6e05321b352
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2017-03-24 14:01:11 +08:00
Jianqun Xu
f7f4bdd020 arm: dts: rk3288-evb: disable uart 1/3/4
Uart3 has been iomux to gpio, for vcc_3g regulator, which is designed
on rk3288 evb main board.

Disable unused uarts to fix gpio request blaim during system booting.

Change-Id: I2eb79ae63a6f226255c12fc3da9ba95ec4219d32
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2017-03-24 13:39:15 +08:00
Jianqun Xu
2eaa4d2cca arm: dts: rk3288-evb: fix regulator 'No configuration' error
SYR827/SYR828 regulators complain "No configuration", which caused by
lacking of regulator-state-mem.

Change-Id: Id113c05abb8fb095bf09979b5eb8ea1c4891037b
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2017-03-24 11:43:41 +08:00
Mark Yao
88f3f82414 staging: ion: add dma_map_sg/dma_umap_sg to map_dma_buf
Change-Id: Ibb1da3afd35a4411f096e8cbd7a17d35fc216cba
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-03-24 10:57:03 +08:00