Commit Graph

1059436 Commits

Author SHA1 Message Date
Kever Yang
9e4a0694c8 arm64: dts: rockchip: Rename rk3588.dtsi to rk3588s.dtsi
rk3588s is a small package version of rk3588, which have less
peripherial interface, so we use it as base version and rk3588 will be
the full version.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: I56418768af54e76db3d751f3151ff056109b7f18
2021-08-23 16:09:48 +08:00
Kever Yang
0d390428b5 arm64: dts: rockchip: Add base dts for rk3588 soc
This initialize version support single core cpu, timer, uart and gic.
Add dmac device nodes.
Add cru device node.
Add sdhci node, rk3588 is using dwcmshc controller as eMMC controller.
The controller is different from that of rk3568 and the driver
needs to be identified and handled specially.
Add sdmmc0 node. Use temp xin24m clock, will need to update to smci clock
which is not ready for now.

Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: I7fadb39ddb1827bdd5a816149f6e129b94ae2395
2021-08-20 15:16:54 +08:00
Elaine Zhang
d6eaf349d6 clk: rockchip: Add clock controller for the RK3588
Add the clock tree definition for the new RK3588 SoC.

Change-Id: I055dafbe1587606c56a5553cbb3d4772bd84f97b
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-08-20 15:11:16 +08:00
Elaine Zhang
9a7bdd5455 clk: rockchip: add dt-binding header for rk3588
Add the dt-bindings header for the rk3588, that gets shared between
the clock controller and the clock references in the dts.
Add softreset ID for rk3588.

Change-Id: I9fa9d27a187a6951c5c1cf210b0eff988a41457e
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-08-20 15:11:16 +08:00
Elaine Zhang
a8657b15fa clk: rockchip: clk-cpu: add mux setting for cpu change frequency
In order to improve the main frequency of CPU, the clock path of CPU is
simplified as follows:
                         |--\
                         |   \            |--\
 --apll--|\              |    \           |   \
         | |--apll_core--|     \          |    \
 --24M---|/              |mux1 |--[gate]--|mux2|---clk_core
                         |     /          |    /
 --gpll--|\              |    /    |------|   /
         | |--gpll_core--|   /     |      |--/
 --24M---|/              |--/      |
                                   |
 -------apll_directly--------------|

When the CPU requests high frequency, we want to use MUX2 select the
"apll_directly".
At low frequencies use MUX1 to select “apll_core" and then MUX2 to
select "apll_core_gate".

However, in this way, the CPU frequency conversion needs to be
in the following order:
1. MUX2 select to "apll_core_gate", MUX1 select "gpll_core"
2. Apll sets slow_mode, sets APLL parameters, locks APLL, and then APLL
sets normal_mode
3. MUX1 select "apll_core", MUX2 select "apll_directly"

So add pre_muxs and post_muxs to cover this special requirements.

Change-Id: I944c22f774f5f9c4edaf28099b6c2926076d4749
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-08-20 15:04:02 +08:00
Elaine Zhang
58c1fa2ef2 clk: rockchip: add pll type for RK3588
add pll_rk3588 and pll_rk3588_core type for RK3588 Soc.

Change-Id: Ie84adcb1ff8fe59efc212feee3ed872bb318fc8b
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-08-20 15:03:29 +08:00
Elaine Zhang
1d4d01d6ed dt-binding: clock: Document rockchip,rk3588-cru bindings
Document the device tree bindings of the rockchip Rk3588 SoC
clock driver in
Documentation/devicetree/bindings/clock/rockchip,rk3588-cru.yaml.

Change-Id: Ic5b5bbb017c477658d3ae0119c8ec22685daa837
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-08-20 10:20:13 +08:00
Elaine Zhang
2d49bdb0be clk: rockchip: add register offset of the cores select parent
The cores select parent register is special on RK3588.

Change-Id: I1cfd07064ae7092030a6b9d234049e6cf07a23e8
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-08-20 10:19:47 +08:00
Simon Xue
7af20071ed iio: adc: rockchip_saradc: add support rk3588 new saradc
Refactor conversion operation to support new saradc, separate
start, read, powerdown in respective hooks.

Change-Id: Iacb043d14f7867b45bf0c4c74c2bedd21d398944
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2021-08-20 08:50:18 +08:00
Elaine Zhang
72e7a18f4a arm64: configs: rockchip_defconfig: enable CPU_RK3588
Change-Id: I4962dfbd805901c8b1111756e8522ec0f93ee458
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-08-19 18:54:01 +08:00
Kever Yang
0e2d4b0759 soc: rockchip: Adds CPU_RK3588 config
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: I02ddb0b8404602c9bd0fa390f87f44dc379e808f
2021-08-19 18:53:56 +08:00
Herman Chen
9fb6c91e42 video: rockchip: mpp: rkvdec2: Add link mode flow
rkvdec2 link mode use a new serialized work flow.

This process is for link mode decoder in RK356x.
The new flow run async with hardware and use multiple trigger event to
run the work thread. All task operation, power operation and reset
operation are serialzed in one thread with certain order.
This is mainly for runtime debug and it will simplify the system design.

rkvdec2 link mode use two sets of counters to control the hardware io:
1. write / read task for preparing link mode task to ddr.
2. send / recv task for sending / receiving task from hardware.

All the operations are serialized in single work thread. So only a few
of lock and atomic is required.

The decoded counter and total counter are the synchronization method
between driver and hardware.

NOTE:
1. link mode reset should use sip_reset.
2. link mode should not change hardware frequency or power off when
there is still task running.
3. link mode should not access hardware when there is an error happen.
4. link mode should reserve a stuff task for H.264 decode task.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I7736d54a64225089cd6d1b6522f660ce4481d437
2021-08-19 15:39:20 +08:00
Herman Chen
832f54d650 video: rockchip: mpp: rkvdec2: code cleanup
1. Remove unused state
The link mode process will be moved to new function.
2. Remove reduce frequency function
The future link mode process should not reduce hardware frequency.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I173912e149e68aca97d5367ce92facf1af05eda7
2021-08-19 15:39:20 +08:00
Herman Chen
8af1944d60 video: rockchip: mpp: Add process/wait/worker
Add new function pointer for process task, wait task result and task
worker thread.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ib0b23c90083b9acab6a8eec8db0871304dbb72ca
2021-08-19 15:39:20 +08:00
Yandong Lin
d61acc2e76 video: rockchip: mpp: fix failed to enable jpegd issue
Failed to enable jpeg dec hw when the soft-reset of
the previous frame has not been completed.
So we have to manually trigger to do soft-reset when checking
that the soft-reset of this frame is not completed

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ib4cbb3c8a42af9d7235bcf41194f5b9ea7c9e207
2021-08-19 15:39:20 +08:00
Yandong Lin
584adb9822 video: rockchip: mpp: Fix 3568 cabac/cavlc switch issue
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ifd54d76470889e4d76d97cd33b2a4af26c7af6ab
2021-08-19 15:39:20 +08:00
Herman Chen
fd763c3274 video: rockchip: mpp: Fix mpp_free_task crash
Due to hardware timeout the session may be released before the remaining
task is alll finished. So mpp_free_task could run after mpp_dev_release.
Then the session used in mpp_free_task could be invalid and crash the
thread.

So we attach session to the mpp_taskqueue and let the work thread to
destroy and release session later.

NOTE: the session is created in mpp_dev_open and attached to
corresponding taskqueue on client init. So when we release the session in
mpp_dev_release if the session is not attached to certain taskqueue just
release it immediately.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I9d4b2358154522e6bcde6e688592c0058781529a
2021-08-19 15:39:20 +08:00
Herman Chen
e956ff7216 video: rockchip: mpp: Use kthread to process task
The kthread has less context switch overhead comparing to workqueue.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I509d8cd86c0966a2bfee8cb8459753368050b2b3
2021-08-19 15:39:20 +08:00
Ding Wei
ed9fd83aae video: rockchip: mpp: rkvdec2: add rcb-min-width info for rcb usage
tips:
    for rk356x, when image width less than 512, it may occur very
small probability for sram read and write.

Change-Id: I57bdfeb776dc0762870f3d7a3a6d81a1c146240d
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-08-19 15:39:20 +08:00
Ding Wei
98eaf1a78a video: rockchip: mpp: Optimize kref_get within mem_regions
tips:
1. If fd has imported, then just copy mem_regiony struct.
2. Task is the unit for running, and mem_region is the
   internal element of task.
3. In mem_regions, it can only kref_get once with the same fd,
   instead of all fds which the same fd.

Change-Id: I7236803a5a263d6e79256036caf580b5ac2c35e9
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-08-19 15:39:20 +08:00
Ding Wei
0d6170d606 video: rockchip: mpp: remove ktime_get within a task processing
reason: mem_regions are within a task, and the differ time between
mem_region can be ignore. Thus, it can be remove when attach task fds.

Change-Id: I5986d2dca6eff41d6c6a8fa3f037e183b102e63c
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-08-19 15:39:20 +08:00
Ding Wei
2dec1b3bd0 video: rockchip: mpp: rkvdec2: rcb_info move to session->priv
if rcb_info not change, then the infos will not ioctl from userspace.
thus, it needs to restore infos in session.

Change-Id: I4ff3b5bcc22b033b1d7549866af7c253bf46945c
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-08-19 15:39:20 +08:00
Alpha Lin
8040e871f3 rockchip: video: iep: enable blending and intra interp
Enable blending and intra interpolation by default.

Change-Id: I3f304714d630b4aab677ab6d09cfea514b03d7b1
Signed-off-by: Alpha Lin <alpha.lin@rock-chips.com>
2021-08-19 15:39:20 +08:00
Ding Wei
70dfc38bd3 video: rockchip: mpp: Add property for disable freq set
if property set, then it will skip get/set/reduce freq.

Change-Id: I56f641807327e9e63b8ebc0c91e79ffb19680b1c
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-08-19 15:39:20 +08:00
Tao Huang
db4f1ce5a0 video: rockchip: mpp: rkvdec2: Fix compile warning on ARM
drivers/video/rockchip/mpp/mpp_rkvdec2.c:1029:16: warning:
format '%llx' expects argument of type 'long long unsigned int',
but argument 3 has type 'resource_size_t {aka unsigned int}' [-Wformat=]

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I5bb3ac3a2d5d2d41c802e42ed6a26efb5219d0aa
2021-08-19 15:39:20 +08:00
Ding Wei
aaa1290bc5 video: rockchip: mpp: when meet unknown cmd, not return error.
reason: when kernel version later than mpp which user space, then
it will meet unknow cmd. however, it should not return error, and
let it continue instead.

Change-Id: I1209c27ef8de98f25b47700bc48dfcff305e0c0e
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-08-19 15:39:20 +08:00
Ding Wei
404fd28390 video: rockchip: mpp: Reduce frequent malloc/free for memory region
tips: In the whole process, task is the unit, and it can only be
one state. And mem_region is an internal element, so no lock is
required.

Change-Id: I07955d0d7064c3c6aec6968d0d38d6e0ad378289
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-08-19 15:39:20 +08:00
Ding Wei
4e227a971c video: rockchip: mpp: Encapsulate the rw lock of IOMMU as functions
Change-Id: I5e176bbcdc33bacafeaa8c3b80b5f8337d13bb9a
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-08-19 15:39:20 +08:00
Herman Chen
0fec113a61 video: rockchip: mpp: workaround patch for rv1126 iommu issue
tips:
rv1126/rv1109 use mmu-v1 which may trigger bug, and log shown below.

[  150.542230] rk_iommu ffb80480.iommu: Page fault at 0x02176000 of type write
[  150.542264] rk_iommu ffb80480.iommu: iova = 0x02176000: dte_index: 0x8 pte_index: 0x176 page_offset: 0x0
[  150.542277] rk_iommu ffb80480.iommu: mmu_dte_addr: 0x3ebaf000 dte@0x3ebaf020: 0x375df001 valid: 1 pte@0x375df5d8: 0x10957007 valid: 1 page@0x10957000 flags: 0x6
[  150.542288] mpp_rkvdec ffb80000.rkvdec: fault addr 0x02176000 status ab
[  150.542296] mpp_task_dump_mem_region:1546: --- dump mem region ---
[  150.542304] mpp_task_dump_mem_region:1552: reg[  0]: 0x00000000, size 1000
[  150.542311] mpp_task_dump_mem_region:1552: reg[  4]: 0x0041e000, size 200000
[  150.542319] mpp_task_dump_mem_region:1552: reg[  6]: 0x00201000, size 1000
[  150.542326] mpp_task_dump_mem_region:1552: reg[  7]: 0x02176000, size 1f4000
[  150.542333] mpp_task_dump_mem_region:1552: reg[ 10]: 0x011d6000, size 1f4000
[  150.542340] mpp_task_dump_mem_region:1552: reg[ 11]: 0x013ca000, size 1f4000
[  150.542347] mpp_task_dump_mem_region:1552: reg[ 12]: 0x01b9a000, size 1f4000
[  150.542354] mpp_task_dump_mem_region:1552: reg[ 13]: 0x01b9a000, size 1f4000
[  150.542361] mpp_task_dump_mem_region:1552: reg[ 14]: 0x01b9a000, size 1f4000
[  150.542368] mpp_task_dump_mem_region:1552: reg[ 15]: 0x01b9a000, size 1f4000
[  150.542375] mpp_task_dump_mem_region:1552: reg[ 16]: 0x01b9a000, size 1f4000
[  150.542382] mpp_task_dump_mem_region:1552: reg[ 17]: 0x01b9a000, size 1f4000

method:
    Flush extra iommu tlb before running a task.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ic1a501bab6583e87c1c340c54e06dc7d021e99fc
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-08-19 15:39:20 +08:00
Ding Wei
e3781f86cd video: rockchip: mpp: Reduce frequent malloc/free for dma buffer
Change-Id: I5474dad5b1ba08d05edce8d35765abc13d453a9b
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-08-19 15:39:20 +08:00
Ding Wei
9867e44d38 video: rockchip: mpp: printf session fix to %8p
Change-Id: Ide0b15ed64afe577bac48bbb60986dc6b11dbd2b
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-08-19 15:39:20 +08:00
Herman Chen
f1a9ec5fe2 video: rockchip: mpp: Add device task capacity
1. Add mpp_dev task capacity and default is 1.
   The task capacity is the task queue length that hardware can accept.
   Default 1 means normal hardware can only accept one task at once.

2. Attach mpp_dev to mpp_taskqueue for status probe. The task queue
   capacity is the minimum task capacity of all the attached mpp_dev.

Change-Id: I8cafe806ec9399902237418d2bbcb088240ed415
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-08-19 15:39:20 +08:00
Herman Chen
ffde99e689 video: rockchip: mpp: Add session index
Change-Id: I1b55227b0692e84ee28a1b229b38a1ad118b1e5b
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-08-19 15:39:20 +08:00
Herman Chen
e2d8ad5075 video: rockchip: mpp: common: remove work_lock
Remove work_lock in mpp_taskqueue.

Change-Id: Ideda9e23acae5df9aa91136d9d4678d9ee4e2c7e
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-08-19 15:39:20 +08:00
Guochun Huang
3b04a7c0b8 phy/rockchip: inno-dsidphy: add phy_ops init/exit helper
Change-Id: Id7db9cd6a8948837be3be771af6698e9fbe06f8c
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2021-08-18 17:01:28 +08:00
Guochun Huang
5d53193394 drm/rockchip: dsi: Add support for rockchip kernel logo
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: Id5c8911d5d444aaca9fdbfd1996bc8b9e6d2b685
2021-08-18 16:44:28 +08:00
Guochun Huang
7a34356e24 drm/bridge: dw-mipi-dsi: add support for rockchip kernel logo
Change-Id: I3ebbec2cd9f1ab7b643144034be67ade4aa81580
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2021-08-18 16:44:28 +08:00
Sandy Huang
f0d2c7be96 drm/rockchip: drv: add support kernel logo display
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I30afec5114bbad9893a9fb9be4e1ba214a5fccad
2021-08-18 16:44:17 +08:00
Sandy Huang
697bbdf85b drm/panel: simple: Add support loader protect and power invert
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I4abb3739144b5a3c99fd57d76e0ff87ccb664667
2021-08-18 16:44:02 +08:00
Jianqun Xu
55aa440fb8 pinctrl: rockchip: fix mux route error for RK3568
Fixes: 6c671b92dd ("FROMLIST: pinctrl: rockchip: add support for rk3568")

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: Ie4f30c83f5328db277b544dfbbed921381fe9afa
2021-08-17 21:10:48 +08:00
Ankit Nautiyal
1f53369558 UPSTREAM: drm/edid: Parse DSC1.2 cap fields from HFVSDB block
This patch parses HFVSDB fields for DSC1.2 capabilities of an
HDMI2.1 sink. These fields are required by a source to understand the
DSC capability of the sink, to set appropriate PPS parameters,
before transmitting compressed data stream.

v2: Addressed following issues as suggested by Uma Shankar:
-Added a new struct for hdmi dsc cap
-Fixed bugs in macros usage.

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
[Jani: Fixed checkpatch PARENTHESIS_ALIGNMENT.]
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201218103723.30844-4-ankit.k.nautiyal@intel.com
(cherry picked from commit 76ee7b9056)
Change-Id: I02d96954736a9dae33cc31e06f411f2ffffddc35
2021-08-17 17:56:20 +08:00
Swati Sharma
4db0f4adfc UPSTREAM: drm/edid: Parse MAX_FRL field from HFVSDB block
This patch parses MAX_FRL field to get the MAX rate in Gbps that
the HDMI 2.1 panel can support in FRL mode. Source need this
field to determine the optimal rate between the source and sink
during FRL training.

v2: Fixed minor bugs, and removed extra wrapper function (Uma Shankar)

Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
[Jani: Fixed checkpatch FROM_SIGN_OFF_MISMATCH, PARENTHESIS_ALIGNMENT.]
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201218103723.30844-3-ankit.k.nautiyal@intel.com
(cherry picked from commit 4499d488f6)
Change-Id: I34cec87592960398eb04e9c2437b9352c14cdf3e
2021-08-17 17:54:11 +08:00
Swati Sharma
f848013c42 UPSTREAM: drm/edid: Add additional HFVSDB fields for HDMI2.1
The HDMI2.1 extends HFVSDB (HDMI Forum Vendor Specific
Data block) to have fields related to newly defined methods of FRL
(Fixed Rate Link) levels, number of lanes supported, DSC Color bit
depth, VRR min/max, FVA (Fast Vactive), ALLM etc.

This patch adds the new HFVSDB fields that are required for
HDMI2.1.

v2: Minor fixes + consistent naming for DPCD register masks
(Uma Shankar)

Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
[Jani: Fixed checkpatch FROM_SIGN_OFF_MISMATCH.]
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201218103723.30844-2-ankit.k.nautiyal@intel.com
(cherry picked from commit 9bb85a6e29)
Change-Id: Ibbdea12806897cab0f95d13847b7e3d8bea1931d
2021-08-17 17:54:11 +08:00
Algea Cao
1aadeb7b2d drm/bridge: synopsys: dw-hdmi: Fix cec timeout when resume
Unmute cec irq when resume

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: Ic3d83ab7721fcf525d64ac08c970af3e51ecee88
2021-08-17 17:54:10 +08:00
Sandy Huang
b1e11053d6 drm/rockchip: dw-hdmi: attach CONNECTOR_ID prop to identify multi HDMI
Change-Id: I10efb880a050b5db54571f8041d5841ac368488d
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2021-08-17 17:54:10 +08:00
Algea Cao
9986819280 drm: rockchip: dw-hdmi: Clean output_if when hdmi disable
To support multi-display output_if must be clean when
hdmi disable.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: Ic4205a59ce1adab7f4ac6f673c740a14556fdeae
2021-08-17 17:54:10 +08:00
Shunqing Chen
fb7d5b0d6b drm/bridge: synopsys: dw-hdmi: fix no display between kernel logo and android logo
def_mode picture_aspect_ratio is no HDMI_PICTURE_ASPECT_NONE,
but Android set mode, the picture_aspect_ratio is HDMI_PICTURE_ASPECT_NONE,
When comparing the new mode with the old mode, the two are inconsistent,
so the mode will be changed.

Signed-off-by: Shunqing Chen <csq@rock-chips.com>
Change-Id: Ide07f9f7251a4ad22d4c27136005be77f1dfd4e2
2021-08-17 17:54:10 +08:00
Algea Cao
299266141e drm/bridge: synopsys: dw-hdmi: Check whether color has changed in connector atomic_check
For compatibility with GKI, connector atomic_begin/atomic_flush should
be removed. If hdmi color format has changed, set flag mode_changed
true and start a modeset to config hdmi.

We check whether color format has changed in
dw_hdmi_connector_atomic_check(), but color format variable update in
dw_hdmi_rockchip_encoder_atomic_check(), It runs after
dw_hdmi_connector_atomic_check(). That will lead to misjudgments when
determining whether color format has changed.

To solve this problem, we introduce get_color_changed(). When color
properties are set and color format is changed, get_color_changed()
return true.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: Id1fbe80171856f91efa5ae40a0e0608a92ebcbf7
2021-08-17 17:54:10 +08:00
Nickey Yang
d2e5de5116 drm/bridge: synopsys: dw-hdmi: check hdmi status in resume
HDMI status maybe incorrect in the following condition:
HDMI plug in -> system sleep ->  HDMI plug out -> system wake up.
At this time, cat /sys/class/drm/card 0-HDMI-A-1/status is connected.
There is no hpd interrupt, because HDMI is powerdown during suspend.
So we need check the current HDMI status in this case.
Test on rk3288 & rk3399.

Change-Id: I2fbafd1d80b59628bca65e9e45760a24d1668241
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
2021-08-17 17:54:10 +08:00
Shunqing Chen
bca4620737 drm: rockchip: dw-hdmi: add YCbCr420 support for RK3288W
Change-Id: I47621ca905b9e32550f0274efe6dc35df0490e3a
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
2021-08-17 17:54:10 +08:00