Commit Graph

1058944 Commits

Author SHA1 Message Date
Finley Xiao
ee27d73fed arm64: dts: rockchip: rk3399: add gpu pvtm voltage table
stress test:
1. Antutu, use governor simpleondemand
2. Need for Speed, use governor simpleondemand
3. Glmark2, use userspace, scanning frequency

Change-Id: Ibe27380e582b193d900b0d55da3567ce553c32df
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-07-13 16:55:40 +08:00
Jung Zhao
239c747658 arm64: dts: rockchip: rk3399: add iep device node
Change-Id: I725d4668fd5fa29f94055d8ce36b81bcd29c2d52
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-07-13 16:25:54 +08:00
Lin Jinhan
a421a20a4d arm64: dts: rockchip: add rng node for rk3399
use rng of crypto1

Change-Id: Ic8cd339d43012a356d981284726ac4d8158a2316
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2021-07-13 16:25:36 +08:00
Shengfei xu
7f3b0babc8 arm64: dts: rockchip: add rockchip-suspend node for rk3399
Change-Id: I6af1f487f40c0775102d3b9951617c5d03b884ef
Signed-off-by: Shengfei xu <xsf@rock-chips.com>
2021-07-13 16:25:17 +08:00
Finley Xiao
bee6e65d6a arm64: dts: rockchip: rk3399: Add nocp device node
Change-Id: I9ef68b69a263720aea3d51e854375b51027c94a2
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-07-13 16:24:46 +08:00
Lin Huang
0263166d73 arm64: dts: rockchip: rk3399: add dmc and dfi node
To support ddr frequency scaling function, we need
enable dmc and dfi node.

Change-Id: I84ea6bff679365d86937ff10bcdf466ea31901fb
Signed-off-by: Lin Huang <hl@rock-chips.com>
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-07-13 16:11:18 +08:00
Huibin Hong
87d78c122b fiq_debugger: support module and remove some commands
Change-Id: Ie55f18a22a8270289443c50ab8be4f5c364394a6
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2021-07-12 19:12:32 +08:00
Bian Jin chen
917c14f43e input: touchscreen: add touch screen of gslx680 for rk3399-firefly-edp
Change-Id: Ic4fa205f8f71353c4703d745e96ec9056181c198
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Signed-off-by: Bian Jin chen <kenjc.bian@rock-chips.com>
2021-07-12 18:18:06 +08:00
Finley Xiao
1e41761854 cpufreq: rockchip: Register a system monitor device for cpu
Add support to check initial rate and voltage according to opp table,
limit rate and update voltage according to temperature.

Change-Id: I146787e07be63f9f7eeaf93e8a1594809dcc23e8
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-07-12 15:01:47 +08:00
Sandy Huang
0084647e87 drm/rockchip: drv: update rockchip drm driver version to 3.0
linux 4.4:  1.0
linux 4.19: 2.0
linux 5.10: 3.0

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I8f1d7f53ccbdcfd163343ff179271a466a9cc661
2021-07-12 15:01:19 +08:00
Sandy Huang
c910049be1 drm/rockchip: vop2: add more yuv format
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I30f4ca4ce7b9cfc0c3943bb547a57cb5d7547b6c
2021-07-12 15:01:19 +08:00
Sandy Huang
9fad8c5fa8 drm: drm_fourcc: add NV20 and NV30 format
DRM_FORMAT_NV20 and DRM_FORMAT_NV30 is a 2 plane format suitable for
linear layouts, this two format is similar to NV15 has no padding
between component, but NV15 is 4:2:0 sub-sampling, NV20 is 4:2:2
sub-sampling and NV30 is no-sampling.

The '20' and '30' suffix refers to the optimum effective bits per
pixel which is achieved.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I84da7e03125e675f274c6307128b4b7b307767cc
2021-07-12 15:01:19 +08:00
Guochun Huang
255e14f4b3 drm/bridge: dw-mipi-dsi: the lanes of dual-dsi is twice as much as max_data_lanes
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: I1666a320a08318f555b145281f4fc324893ebc59
2021-07-12 14:56:56 +08:00
Guochun Huang
292f792757 drm/rockchip: dsi: add support dual dsi
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: I6c929771a7f45c778f84f549e28cea74312ad9b8
2021-07-12 14:56:56 +08:00
Simon Xue
c65c0584b6 iommu: rockchip: support building to module
Change-Id: I5ab119b5227c2679ea5b750ed2f78836c9ea8f58
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2021-07-12 09:20:54 +08:00
Sandy Huang
402889ee5f drm/rockchip: vop2: close cluster sub win when main win is closed
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ifad854f2e70fe3487731f6cd1d3c41f2a512087e
2021-07-09 17:21:13 +08:00
Andy Yan
2309468102 drm/rockchip: vop2: Support disable Cluster sub win
Change-Id: Ia2f764992ce51ca61f6ba269083fa643509f58e1
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-07-09 17:21:04 +08:00
Andy Yan
d19ffa72a4 drm/rockchip: vop2: Support set cursor win from dts
for example:

Use CLuster0 as cursor win for vp0.

&vp0 {
	cursor-win-id = <ROCKCHIP_VOP2_CLUSTER0>;
};

Change-Id: I10f7921928fbf7ff803c55a95cbce62df658fbed
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-07-09 17:20:54 +08:00
Sandy Huang
30dd06d9b2 drm/rockchip: vop2: check plane state before check plane oetf
We have some plane not registered to drm core(Such as cluster
plane on some linux system), so they don't have pstate.

And also we don't need to check plane state for oetf for
a inactived plane(has no fb).

Change-Id: I909b665397c3df530ff0f466e0d654dcbb3f1a40
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-07-09 17:20:45 +08:00
Sandy Huang
93f2587f47 drm/rockchip: vop2: only when have active win then need to wait win close
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ieaf6497a8597d5d6d3f4a0eb0169fba55c93b4e2
2021-07-09 17:20:37 +08:00
Sandy Huang
91b41a2818 drm/rockchip: vop2: use default sdr2hdr(1000nit) curve
keep sdr2hdr result consistent between VOP and GPU

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I3ef6b289978d4b0c083d99e93d97a95b2e7f0b25
2021-07-09 17:20:24 +08:00
Sandy Huang
088fa736f9 drm/rockchip: vop2: fix csc config error when at hdr mode
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ide5b9deb13882a561765a2e2be660e3463d1764f
2021-07-09 17:18:29 +08:00
Sandy Huang
0f7ea21642 drm/rockchip: vop2: add more sdr2hdr scene
maybe appear the following scene for sdr2hdr:
1. one sdr layer      -> vop[sdr2hdr]   -> hdr output
2. one hdr layer      -> vop[bypass]  |
                                      | -> hdr output
   one/more sdr layer -> vop[sdr2hdr] |

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I042baf68d36f6f9a089d81928c783e52a2b21499
2021-07-09 17:17:23 +08:00
Andy Yan
cab0d20056 drm/rockchip: vop2: Support set background color from userspace
Add a BACKGROUND property for each crtc.
8 bit for every color channel(r/g/b/y/u/v).

Change-Id: I9439bf16a8142e936508e843cc25b6263e2f661d
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-07-09 17:16:34 +08:00
Andy Yan
e4c73bca35 drm/rockchip: vop2: Fix color key shift to 10bit
Fixes: 8c59d20b75 ("drm/rockchip: vop2: Add color key support")
Change-Id: I449f32eb9e69297b2c37feb85611a550310f2304
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-07-09 17:16:01 +08:00
Sandy Huang
fd219584a9 drm/rockchip: vop2: add more debug info
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I9277ff4a0f363fdb53aed88a33007a31e6f47f4c
2021-07-09 17:14:47 +08:00
Sandy Huang
49dc2e264f drm/rockchip: vop2: use wait done bit instead of fs raw bit
the fs raw bit will be cleared by vop2_isr() fs irq and lead to
vop2_wait_for_fs_by_raw_status() time out, so we use
vop2_wait_for_fs_by_done_bit_status() to wait done bit from 1 to 0 is
more reliable.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ice35fb9bfe6c2ef7a49496b15b9f58bf93e95d4e
2021-07-09 17:13:51 +08:00
Andy Yan
d9aca94d74 drm/rockchip: vop2: Enable sd2hdr when we have a sdr plane but hdr output
We thought when userspace switch hdmi to hdr mode, it must
give vop a hdr plane, but We meet a case: composer give
vop only one sdr plane, but switch hdmi to hdr mode.

so we don't check the plane number for sdr2hdr_en;

Change-Id: I4804a88321af84328735d6499ac9df610bf2cb85
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-07-09 17:13:25 +08:00
Andy Yan
dd815d2e64 drm/rockchip: vop2: Add option to disable afbc window
Change-Id: I115a1671c0bf3a6e7af541a376fbdafa33bbb439
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-07-09 17:12:14 +08:00
Andy Yan
96cba3c6bb drm/rockchip: vop2: check win_mask for each plane on crtc
win_mask is more safe than plane_mask on crtc_state,
because crtc_state may changed by many interface.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I886c8e1e1c0505e46292721de05d9be7c167d956
2021-07-09 17:11:25 +08:00
Sandy Huang
c0b3b7be82 drm/rockchip: vop2: add consider three display pending done bit
Change-Id: I9e2fe62cff31153a1b16faaaa11f9a49b8051975
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2021-07-09 17:08:00 +08:00
Sandy Huang
11110fed75 drm/rockchip: vop2: add parse plane mask policy from uboot or dts file
Change-Id: I8608dfeb44ab02717d64da151aefe1f9548c936b
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2021-07-09 16:39:39 +08:00
Sandy Huang
e0dda1124f drm/rockchip: vop2: add to get more bus format from dri sunmmary
Change-Id: I58d505fb5abe9f71ab7dd747a0345b226aa46855
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2021-07-09 16:30:41 +08:00
Andy Yan
f674b60549 drm/rockchip: vop2: skip fist frame when port_mux is changed
we must make sure the port_mux configuration is take effet
before configure a window that is moved from another VP.

Change-Id: I4ca581292e08ef30cc4b6eb47aef02e678f38a66
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-07-09 16:30:35 +08:00
Andy Yan
3655480f00 drm/rockchip: vop2: Change port_mux must make sure previous configuration is done
port_mux register is shared by all the three(four on rk3588)
video ports, and the config done vsync is controlled by
layer_sel_regdone_sel bits.

We must make sure the previous configuration is take
effect, when change port_mux for another vp.

Change-Id: Ic4bd58f52760080f2f264f37cc6f01a9cd58939f
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-07-09 16:26:35 +08:00
Andy Yan
edd004cdf5 drm/rockchip: vop2: wb cfg done also should read than write
wb cfg done bit may override vp config bits.

Change-Id: Ib315ab93fce5ba6d3dcdd635595a239a86e6e62f
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-07-09 11:42:42 +08:00
Andy Yan
a3cf987cb1 drm/rockchip: vop2: counter vsync by writeback job
There maybe a case a new wb commit is commit when
the last wb has not completed, this may override
the fs_vsync_cnt.

So counter vsync for every wb job independently.

Change-Id: I8e8c527a49252dcc4b0b1ff591523de5a33ae5ba
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-07-09 11:42:42 +08:00
Sandy Huang
3f1eadc48e drm/rockchip: vop2: add support yvyu and vyuy format
Change-Id: I0ed523a57b562a6d2aabcebf6d68a0e77cd31eeb
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2021-07-09 11:42:42 +08:00
Sandy Huang
c495f593fe drm/rockchip: vop2: disable layer mix when it's unused
If the layer pass through layer mix is unused, we need to disable alpha,
at this time, the layer mix only used to transfer alpha to next mix.

Change-Id: Ibd469b4fb61b41480297bc20c346e9ceefa61fc7
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2021-07-09 11:42:42 +08:00
Andy Yan
3d6f4474dc drm/rockchip: vop2: Add vop2_standby
This is for mipi dsi on rk356x: there
is a hold signal from mipi dsi to
vop.

Mipi dsi may trigger the hold signal
when send dsi command or switch between
video mode and command mode.

vop may run into an unexpected situation if this hold
signal is rise when vop is running.

So when mipi dsi switch between video mode
or command mode, or send a dsi command, it
should set vop in stanby state.

Change-Id: I80e456d3416518436045ae8e0eec215c22b111a3
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-07-09 11:42:42 +08:00
Sandy Huang
241f13f049 drm/rockchip: vop2: alpha value need transfer to next mix
Change-Id: I2f00b8f834cd93a206643c0faaf557d38c238a13
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2021-07-09 11:42:42 +08:00
Sandy Huang
aed22eb670 drm/rockchip: vop2: fix start mixer id error
Change-Id: I6e6287d43d375f8a8be47fe00cbe39764ffe6ee3
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2021-07-09 11:42:42 +08:00
Zhixiong Lin
f5fe9966d4 GPU: Kconfig: add gpu Kconfig to video Kconfig
Change-Id: I9938fe0377fc57e030c9e5109c216d6c62dbeef0
Signed-off-by: Zhixiong Lin <zhixiong.lin@rock-chips.com>
2021-07-09 09:26:18 +08:00
Zhen Chen
f5f907a67f MALI: mali400: Fix all compile errors under kernel 5.10
Change-Id: Iee1e5bc609e703de0c1e7c1f781ba7059c4aa6ae
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2021-07-09 09:26:18 +08:00
Zhen Chen
970017f88e MALI: midgard: Fix all compile errors under kernel 5.10
Change-Id: I8672520b7c7118ab7622032481802eae72349f81
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2021-07-09 09:26:17 +08:00
Tao Huang
fcb101fe62 arm64: rockchip_linux_defconfig: Enable CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND
GPU drivers should select this config.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I967547f19473f7617c127ef94310655f66a92510
2021-07-09 09:26:17 +08:00
Tao Huang
07bf6d1a58 ARM: rockchip_linux_defconfig: Enable CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND
GPU drivers should select this config.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I5acced3f823c5865aa0cd316f0d60ed8a0a028a5
2021-07-09 09:26:17 +08:00
Guochun Huang
fe9341a608 drm/rockchip: dsi: add dphy timing for possible external dphy
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: I94e16fe908558edeb0919b64621f7a8c1c58c6a4
2021-07-08 20:32:53 +08:00
Guochun Huang
c39319e998 drm/rockchip: dsi: support lane_rate can be specified manually
Change-Id: Ib0db1a80737410c65440f4ac3b888f43a44bdd9c
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2021-07-08 20:31:59 +08:00
Sandy Huang
c945c0476d drm/rockchip: don't mask possible_crtcs if remote-point is disabled
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Id8bb14fdb025f43da5d10626b660c2fcad490e39
2021-07-08 20:30:35 +08:00