Commit graph

605,849 commits

Author SHA1 Message Date
Chen-Yu Tsai
438ccb3de4 UPSTREAM: drm/bridge: dumb-vga-dac: Support a VDD regulator supply
Some dumb VGA DACs are active components which require external power.
Add support for specifying a regulator as its power supply.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: http://patchwork.freedesktop.org/patch/msgid/20161116154232.872-2-wens@csie.org
(cherry picked from commit af948a25ec)

Change-Id: I711e3b444f72e04ee09e8ca4bfa8c04c3640039b
Signed-off-by: Jerry Xu <xbl@rock-chips.com>
2018-01-23 14:27:05 +08:00
Maxime Ripard
beea87e387 UPSTREAM: drm/bridge: Add RGB to VGA bridge support
Some boards have an entirely passive RGB to VGA bridge, based on DACs
implemented by resistor ladders.

Those might or might not have an i2c bus routed to the VGA connector in
order to access the screen EDIDs.

Add a bridge that doesn't do anything but expose the modes available on the
screen, either based on the EDIDs if available, or based on the XGA
standards.

Acked-by: Rob Herring <robh@kernel.org>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: http://patchwork.freedesktop.org/patch/msgid/20160930143709.1388-3-maxime.ripard@free-electrons.com
(cherry picked from commit 56fe8b6f49)

Conflicts:
  drivers/gpu/drm/bridge/Kconfig
  drivers/gpu/drm/bridge/Makefile

Change-Id: I481b7115b0401c14d990a7574e41b6c76b7d48d6
Signed-off-by: Jerry Xu <xbl@rock-chips.com>
2018-01-23 14:27:05 +08:00
Boris Brezillon
416271c452 UPSTREAM: drm/atomic: Fix remaining places where !funcs->best_encoder is valid
Adapt drm_pick_crtcs() and update_connector_routing() to fallback to
drm_atomic_helper_best_encoder() if funcs->best_encoder() is NULL so
that DRM drivers can leave this hook unassigned if they know they want
to use drm_atomic_helper_best_encoder().

Update the vtables documentation accordingly.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1465300095-16971-2-git-send-email-boris.brezillon@free-electrons.com
(cherry picked from commit c61b93fe51)

Conflicts:
      include/drm/drm_modeset_helper_vtables.h

Change-Id: If27c471552026da17d22ee0e77b28b65b2c811ef
Signed-off-by: Jerry Xu <xbl@rock-chips.com>
2018-01-23 14:27:05 +08:00
Noralf Trønnes
9728403491 UPSTREAM: drm/atomic: Add drm_atomic_helper_best_encoder()
Add (struct drm_connector_helper_funcs *)->best_encoder callback helper
for connectors that support exactly 1 encoder, statically determined at
driver init time.

Change-Id: Iddcf190e2a08a768dc8d5bb52a1e4572b1ce51d1
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1462982962-10530-6-git-send-email-noralf@tronnes.org
Signed-off-by: Jerry Xu <xbl@rock-chips.com>
(cherry picked from commit 9ecb549867)
2018-01-23 14:27:05 +08:00
Meng Dongyang
de69a67f15 usb: dwc_otg_310: remove warning
Remove check tool warning of jenkins, smatch and coccinelle in
the dwc_otg_310 driver.

[smatch] drivers/usb/dwc_otg_310/dwc_otg_attr.c:407
error: we previously assumed 'pdev' could be null (see line 404)
[smatch] drivers/usb/dwc_otg_310/dwc_otg_attr.c:415
error: we previously assumed 'pdev' could be null (see line 412)
[coccinelle] drivers/usb/dwc_otg_310/dwc_otg_attr.c:468
WARNING comparing pointer to 0
[coccinelle] drivers/usb/dwc_otg_310/dwc_otg_attr.c:501
WARNING comparing pointer to 0
[smatch] drivers/usb/dwc_otg_310/dwc_otg_cil.c:778
error: buffer overflow 'core_if->core_global_regs->dtxfsiz' 15 <= 15
[smatch] drivers/usb/dwc_otg_310/dwc_otg_cil.c:938
error: buffer overflow 'core_if->core_global_regs->dtxfsiz' 15 <= 15
[coccinelle] drivers/usb/dwc_otg_310/dwc_otg_cil.c:3687
WARNING: possible condition with no effect (if == else)
[smatch] drivers/usb/dwc_otg_310/dwc_otg_cil.c:4182
warn: impossible condition '(deptsiz.b.pktcnt > 1023) => (0-1023 > 1023)'
[smatch] drivers/usb/dwc_otg_310/dwc_otg_cil.c:4316
warn: impossible condition '(deptsiz.b.pktcnt > 1023) => (0-1023 > 1023)'
[coccinelle] drivers/usb/dwc_otg_310/dwc_otg_cil_intr.c:329
Unneeded semicolon
[smatch] drivers/usb/dwc_otg_310/dwc_otg_cil_intr.c:829
warn: was && intended here instead of ||?
[smatch] drivers/usb/dwc_otg_310/dwc_otg_cil_intr.c:949
error: uninitialized symbol 'retval'.
[smatch] drivers/usb/dwc_otg_310/dwc_otg_cil_intr.c:1344
warn: we tested 'core_if->otg_ver == 1' before and it was 'true'
[coccinelle] drivers/usb/dwc_otg_310/dwc_otg_driver.c:555
WARNING: possible condition with no effect (if == else)
[smatch] drivers/usb/dwc_otg_310/dwc_otg_hcd_linux.c:480
error: potential null dereference 'hcd'.  (usb_create_hcd returns null)
[smatch] drivers/usb/dwc_otg_310/dwc_otg_hcd_linux.c:484
warn: variable dereferenced before check 'hcd' (see line 480)
[smatch] drivers/usb/dwc_otg_310/dwc_otg_hcd_linux.c:571
error: potential null dereference 'hcd'.  (usb_create_hcd returns null)
[smatch] drivers/usb/dwc_otg_310/dwc_otg_hcd_linux.c:575
warn: variable dereferenced before check 'hcd' (see line 571)
[coccinelle] drivers/usb/dwc_otg_310/dwc_otg_hcd_linux.c:815
Unneeded semicolon
[smatch] drivers/usb/dwc_otg_310/dwc_otg_pcd.c:1490
warn: this array is probably non-NULL. 'desc->wMaxPacketSize'
[coccinelle] drivers/usb/dwc_otg_310/dwc_otg_pcd.c:2277
WARNING comparing pointer to 0
[coccinelle] drivers/usb/dwc_otg_310/dwc_otg_pcd.c:2277
WARNING comparing pointer to 0
[coccinelle] drivers/usb/dwc_otg_310/usbdev_bc.c:102
WARNING: casting value returned by memory allocation function to
(uoc_field_t *) is useless.
[smatch] drivers/usb/dwc_otg_310/usbdev_bc.c:105
error: potential null dereference 'pBC_UOC_FIELDS'.  (kzalloc returns null)
[coccinelle] drivers/usb/dwc_otg_310/usbdev_bc.c:
WARNING: casting value returned by memory allocation function to
(uoc_field_t *) is useless.
[smatch] drivers/usb/dwc_otg_310/usbdev_bc.c:126
error: potential null dereference 'pBC_UOC_FIELDS'.  (kzalloc returns null)
[coccinelle] drivers/usb/dwc_otg_310/usbdev_bc.c:137 uoc_init_inno()
WARNING: casting value returned by memory allocation function to
(uoc_field_t *) is useless.
[smatch] drivers/usb/dwc_otg_310/usbdev_bc.c:141
error: potential null dereference 'pBC_UOC_FIELDS'.  (kzalloc returns null)
CHECK: Avoid CamelCase: <pBC_UOC_FIELDS>
+	pBC_UOC_FIELDS = kzalloc(SYNOP_BC_MAX * sizeof(uoc_field_t),
WARNING: Prefer kcalloc over kzalloc with multiply
+	pBC_UOC_FIELDS = kzalloc(SYNOP_BC_MAX * sizeof(uoc_field_t),
+				 GFP_ATOMIC);

Change-Id: If4831151464eeaf0e399a4be3c179c4a56e28dde
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
2018-01-23 14:24:05 +08:00
Finley Xiao
db52b49619 clk: rockchip: px30: Fix parent clk for nand, sdio and emmc
Change-Id: I5723e114871d03d271a398a55af97474e08a61e1
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-01-23 14:22:18 +08:00
Finley Xiao
c5cb615df3 arm64: dts: rockchip: px30: Add qos node
Change-Id: I09401584f211d97c64f3c351cb54b6b1e184f1e2
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-01-23 14:21:46 +08:00
Rocky Hao
4fd2924a2b ARM64: dts: rk3399: add dmc config for VOP
Change-Id: I1b07ca19c5f6529361630ac49ba8922ba0e32db2
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
2018-01-23 14:20:37 +08:00
Rocky Hao
33b1e41afd PM / devfreq: rockchip_dmc: pass a pointer to devfreq in bandwidth request/update actions
By passing a pointer to struct devfreq, we can fix global data abuse issue.

Change-Id: I17f6264b86549f67d61d03f38da0127e666eee3c
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
2018-01-23 14:18:50 +08:00
Sandy Huang
8228a831e1 drm/rockchip: lvds: add support RGB565 output mode
Change-Id: Ia1cea573d88d00b85564db4d8f2fb4f7c3ff1209
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-01-22 19:53:29 +08:00
Huibin Hong
34be2cf467 dmaengine: pl330: flush before first loop
This makes sure dma can get peripheral request.

Change-Id: I85feb4ade8796490e5d53cd4c9e610775cfd0175
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2018-01-22 19:38:40 +08:00
Huibin Hong
98753e172d dmaengine: pl330: fix 2 bursts transfer when dma flushes
When dma executes flush instruction, it may issue two
continuous bursts, and fill peripheral fifo too much
data, which causes fifo overrun.

Change-Id: Ie91205d400e33d7599b7a065d99712e4faebbba8
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2018-01-22 19:38:32 +08:00
Meng Dongyang
a1aacd7186 arm64: dts: rockchip: rk3326-evb-lp3-v10: enable USB controllers
Enable DWC2 controller, EHCI controller, OHCI controller and
USB PHY.

Change-Id: I6c1fe5f9f074352f2a18db6337a855cf7d8089f2
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
2018-01-22 19:28:42 +08:00
Meng Dongyang
86c51b0eac arm64: dts: rockchip: px30: add nodes of USB controllers
Add DWC2 controller, EHCI controller, OHCI controller and USB
PHY nodes to support USB.

Change-Id: If5dfb7c18cdc369d92eff5c8ddcc2f0dde01cc36
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
2018-01-22 19:28:42 +08:00
Meng Dongyang
0a4de3c3e0 dt-bindings: rockchip: usb: Document for px30
Change-Id: I3d1ca71cad98226999dd115f515df4a31b095ee1
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
2018-01-22 19:28:42 +08:00
Zhen Chen
0a3542b89b soc: rockchip: rockchip_opp_select: export some functions
Needed by Midgard device driver.

Change-Id: Iea12eb2691846b4282393a8b76d5b522a5e248dd
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2018-01-22 19:09:51 +08:00
Zhen Chen
be966d15df soc: rockchip: pvtm: Export rockchip_get_pvtm_value
Change-Id: Icfda32f2d14d293024eec863007fdeffe7fa5cb1
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2018-01-22 18:50:52 +08:00
Sandy Huang
8f33da67f5 arm64: dts: rockchip: rk3328-evb-android: set logo mode to fullscreen
Change-Id: I4cb8e2c6bd2c4b09beaad11f9a3860f9c5ec16f6
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-01-22 17:48:35 +08:00
Sandy Huang
3e1367c6ce drm/rockchip: vop: add support overscan
Change-Id: I608aa9fe98f8dadab8c649baa15545cd5e81cf69
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-01-22 17:48:35 +08:00
Sandy Huang
967c40b5a2 drm/rockchip: vop: line flag num config according to interlace
Change-Id: Ie6b80d7584a152981f119cfbaea16f6030ada8f4
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-01-22 17:48:35 +08:00
Sandy Huang
2e102b15ed drm/rockchip: make sure timing config take effect
if mode update, we make sure close all win and timing config take
effect, otherwise will appear get fs time out and lead to iommu
enable pagefault.

Change-Id: I18364d699a351c01e8fb1b03973d20c7cdee7c45
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-01-22 17:48:29 +08:00
Finley Xiao
15dbb651be arm64: dts: rockchip: px30: Add pvtm node
Change-Id: I652d40663a425ad9daaaba944d46f9b7523e0dfc
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-01-22 15:22:04 +08:00
Finley Xiao
49e6525982 soc: rockchip: pvtm: Add support for PX30 SoCs
This adds the necessary data for handling pvtm on the px30.

Change-Id: Ida01e8363f8349c379e10d6a4637eb893591789d
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-01-22 15:21:56 +08:00
Sandy Huang
adce2f1b1f drm/rockchip: rk3036 vop: add support win1 scale config
Change-Id: I3c76a63fc47f68c10128727f7eb6b8bcbf498323
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-01-22 14:05:39 +08:00
Jacob Chen
c1df7dec16 media: rk-isp10: grab a copy of userspace headers
Change-Id: I75ceb19f0f4c9a420440ae73538f030aaf49fb95
Signed-off-by: Jacob Chen <cc@rock-chips.com>
2018-01-20 15:26:04 +08:00
Algea Cao
294aaccba0 drm/rockchip: Update cvbs timing
Fix up cvbs timing.

Change-Id: I5ebc7e1fa9ced791901493ccbe22e7791179cf31
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2018-01-20 15:25:22 +08:00
Algea Cao
d9bb4b5cc1 drm/bridge/synopsys: Get mc_clkdis value from uboot.
When uboot logo is enabled, hdmi will not be setup again.
In this case, kernel driver will set wrong mc_clkdis value
when cec enable. So mc_clkdis should be got from uboot.

Change-Id: Idb9984d981489287966f2719f6ed4c729a183b58
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2018-01-20 15:25:14 +08:00
Jung Zhao
72e811bb5c video: rockchip: vpu: fix kfree bug
there is a global session which use devm_kzalloc when
vpu probe, and each open function will create a session
use kzalloc. now use kzalloc to malloc for both of them
to avoid kfree bug.

Change-Id: I4012463cea5b3becaf2640b407f1ba93c9766008
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2018-01-20 15:23:42 +08:00
Algea Cao
824179b35e drm/bridge/synopsys: Report hdmi HPD to userspace for cec
When hdmi HPD is occurred, call cec_notifier_repo_cec_hpd.

Change-Id: If2047121c8ccf55e9a49fa4c3c4ec2187248a593
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2018-01-20 15:21:24 +08:00
Jung Zhao
92cd6903dc video: rockchip: vpu: stride err for jpeg encode
Change-Id: Ife4d21c8361275d8832e0c1e3439c945c236d625
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2018-01-19 18:06:00 +08:00
Finley Xiao
ed28e4ee25 ARM: dts: rockchip: rk322x: Add rkvdec and vpu qos node
The rkvdec and vpu qos registers need to save and restore when reset.

Change-Id: I2c335a0df922463d2ecf37fe1ee250aadc3b7c54
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-01-19 14:46:04 +08:00
Finley Xiao
ae862e081b ARM: dts: rockchip: rk322x: add power domain node for RK322x Soc
Change-Id: Iffc561003818d2190a4d9c9ac4196aa9437c5d7e
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-01-19 14:45:31 +08:00
Finley Xiao
6d64d2dc10 soc: rockchip: power-domain: Modify power domain driver for rk3228
This driver is modified to support RK3228 SoC.
RK3228 SoC is only support idle.

Change-Id: I1c3e942de13fd241e3893818e2584c25bad69b27
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-01-19 14:44:34 +08:00
Liang Chen
e41e830c25 arm64: dts: rockchip: correct irq trigger type of timer for px30
Change-Id: I36b430cc718f9a7625d1fba2d2393500fdb7a9d6
Signed-off-by: Liang Chen <cl@rock-chips.com>
2018-01-19 14:26:09 +08:00
Zhou weixin
cc4cba8694 arm64: rockchip_defconfig: enable CONFIG_TOUCHSCREEN_GT1X for px30/3326 evb
Change-Id: I6b2b7a1f8e0a5dbbe498062b4bf65313382dce7c
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
2018-01-19 14:25:09 +08:00
Jung Zhao
ab898a38ba video: rockchip: vpu: fix shutdown mutex_unlock bug
unlocking reset_lock is not necessary at vcodec_shutdown.

Change-Id: Id8331fead9db0968779ef19602f4a24fc9446a7d
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2018-01-19 08:23:33 +08:00
Jung Zhao
5abf157e56 video: rockchip: vpu: add VCODEC_RUNNING_MODE_HEVC for hevc
first version of rkvdec is called hevc, and it is dev_mode
is 1, add this value inside get_hw_info function

Change-Id: I0471d167029274848c00a806f0f6f0ea9f0308df
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2018-01-19 08:18:53 +08:00
Zhou weixin
9d44f5ccfc input: touchscreen: add gt1x driver
Change-Id: Ic4c5abf51c3dd5383bdc91029afbc7c903c2093a
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
2018-01-18 18:14:34 +08:00
Finley Xiao
d51addcefb arm64: dts: rockchip: rk3328: Add devfreq property for rkvdec
Change-Id: I819a2c950b8b0a31207f85029c61c5efb5afe622
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-01-18 16:55:24 +08:00
Algea Cao
e764efb524 media: cec: Set kernel not do retransmit
HDMI protocol does not allow retransmit more than
five times when send cec message failed. In android
system, we do retransmit in framework only.

Change-Id: I7bd1a4aa48874be11e4948d60e0c36077268c1c9
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2018-01-18 16:54:35 +08:00
Algea Cao
cef745a23a media: cec: Add an interface for hdmi report HPD
Add cec-notifier interface that hdmi can call it when
HPD is occurred.

Change-Id: I0087a879bf3ba65e300c3db3a67ddaa7e22f16ad
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2018-01-18 16:53:37 +08:00
Algea Cao
f968cdb99b arm64: rockchip_defconfig: enable hdmi cec
Change-Id: Iab18a140f11045362dafef9e1d724a3fae6137a0
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2018-01-18 16:53:04 +08:00
Finley Xiao
8b31d4d2da clk: rockchip: px30: Modify clk tree according to latest document
Change-Id: Ib8d983509792b13c1cc84c78af0f572b89053cc7
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-01-18 16:52:22 +08:00
Finley Xiao
886cb9ab59 video: rockchip: vpu: Add support to register devfreq notifier
Change-Id: I4eb90e61103784b55d7d3bdcfd31d1353174499c
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-01-18 16:47:55 +08:00
Jung Zhao
9e51a32245 video: rockchip: vpu: avoid dead lock
1. when doing vpu_reset and now a ioctl to get reg come,
maybe cause dead lock.
2. remove unused code in try_set_reg function

Change-Id: Ied1f3b606767faa4ccdb9926679df765af258795
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2018-01-18 14:30:00 +08:00
Rocky Hao
fa427f4dbf arm64: dts: rockchip: px30: add tsadc node
Change-Id: I7b5d63b37b3c3de19e95e56856dff4ed51089b3f
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
2018-01-18 14:24:25 +08:00
Rocky Hao
b7dca1ff57 thermal: rockchip: add tsadc support for px30
Change-Id: I46ac8ebd4a92367acb610fb96c18a487c67602d4
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
2018-01-18 14:24:19 +08:00
xuhuicong
0181dc0e9c drm: bridge: dw-hdmi: disable scamble when tmdsclk less than 340Mhz
to Improve signal compatibility disable scamble when tmdsclk less than
340Mhz by default. and can enable it by define "scramble-low-rates;"
in dts file.

Change-Id: I0bd5d8e2ea4df065d84018615d4c39cac7ac441a
Signed-off-by: xuhuicong <xhc@rock-chips.com>
2018-01-18 10:03:23 +08:00
xuhuicong
15939ad840 drm: bridge: dw-hdmi: enable prepclk to fix 480i and 576i no display
Change-Id: Ie2fc362c4a3c6ce65d247898342f59977c48ab44
Signed-off-by: xuhuicong <xhc@rock-chips.com>
2018-01-18 10:04:29 +08:00
Sandy Huang
75f953253b drm/rockchip: implement shutdown function
implement shutdown to make sure display will be closed
when box product power off.

Change-Id: I860a768a061082bf35bcd53c7dde153e6109f42d
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-01-17 19:26:26 +08:00