Commit Graph

4206 Commits

Author SHA1 Message Date
Algea Cao
e836764568 drm/bridge: synopsys: dw-hdmi-qp: Optimize HDMI resolution switching process
1.Support phy pll clk enable/disable is separated from
phy signal output.

2.Add avmute set/clear in resolution switching process.

3.To comply with the timing requirements of the HDMI protocol,
HDMI must be enabled in tmds mode according to the following process:

disable FRL -> enable/disable scramble —> power up phy

4.Optimize flt process

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I5f48b3292b434b26ab28a4e7238a87c8d64d5a33
2022-08-16 10:53:51 +08:00
Algea Cao
37b7830dd3 drm/rockchip: dw_hdmi: Get uboot hdmi color format
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I06bbd4a8888716a4b209a81f219309304a18420f
2022-07-14 14:25:59 +08:00
Algea Cao
dbad11d42f drm/bridge: synopsys: dw-hdmi-qp: Support multiple HDMI debugfs nodes
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: Ib7be546cba2130a84fe4a82194800d143cdb61d9
2022-04-26 15:43:24 +08:00
Wyon Bi
43f938cfbb drm/rockchip: analogix_dp: Support DP connector
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I338ed6b0478bc1bfd702ed4676384f5fd88fb194
2022-03-24 19:03:30 +08:00
Sugar Zhang
d27ca5b359 drm/bridge: synopsys: dw-hdmi-qp: Fix audio infoframe
AUDI_CONTENTS0: { RSV, HB2, HB1, RSV }
AUDI_CONTENTS1: { PB3, PB2, PB1, PB0 }
AUDI_CONTENTS2: { PB7, PB6, PB5, PB4 }

PB0: CheckSum
PB1: | CT3    | CT2  | CT1  | CT0  | F13  | CC2 | CC1 | CC0 |
PB2: | F27    | F26  | F25  | SF2  | SF1  | SF0 | SS1 | SS0 |
PB3: | F37    | F36  | F35  | F34  | F33  | F32 | F31 | F30 |
PB4: | CA7    | CA6  | CA5  | CA4  | CA3  | CA2 | CA1 | CA0 |
PB5: | DM_INH | LSV3 | LSV2 | LSV1 | LSV0 | F52 | F51 | F50 |
PB6~PB10: Reserved

AUDI_CONTENTS0 default value defined by HDMI specification,
and shall only be changed for debug purposes.
So, we only configure payload byte from PB0~PB7(2 word total).

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Idfbb34ff7f7069af4e73c6995f32eefa798a9450
2022-03-12 16:29:28 +08:00
Sugar Zhang
ea0f840194 drm/bridge: synopsys: dw-hdmi-qp: Fix channel status
* LPCM: BPCUV insertion by hw
* NLPCM/HBR: BPCUV insertion from stream

when BPCUV is from stream, we should not enable hw channel
status override which will replace CS with the hw one.
This fixes DD+ bitstream.

when BPCUV generated from HW, PBIT_FORCE_EN should be set
for Parity bit calculated internally.
This fixes no sound on some display devices.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I3aa0390d9dd7d217853394c74576749c36b84720
2022-03-12 16:29:22 +08:00
Algea Cao
de16913c3b drm/rockchip: dw_hdmi: Make sure dclk is enabled when set audio registers
Change-Id: Idb62c2c9ea0d75d7090ec3e35c7742b0d42b3e43
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2022-03-12 16:29:07 +08:00
Algea Cao
5efa70a0f1 drm/rockchip: dw_hdmi: Support hdmi split mode
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I71c5785ecfb9480f9569d3c55dd634579a5176fb
2022-03-09 16:45:03 +08:00
Algea Cao
a92ed4afa9 drm/edid: add config option of edid function
rv1126 does not support display interface which need to
read and parse edid, such as hdmi and dp, so add config
option to reduce memory usage.

./ksize.sh  drivers/gpu/drm/

before ksize: 380303 Bytes
after  kszie: 325509 Bytes
save   about:  54794 Bytes

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I0c3813711cfdb4a38ec66136569ca826c94c6c58
2022-02-24 16:20:22 +08:00
Wyon Bi
1a4c9d772a drm/bridge: analogix_dp: Rework irq handling
Tested on RK3588.

Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: Iee8bbe592ea89e29b5e412727312398d3cfb3924
2022-02-22 14:53:17 +08:00
Algea Cao
c2af125780 drm/rockchip: dw_hdmi: set rk3588 hdmi grf reg after phy power on
RK3588 dclk is required to access hdmi grf register.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: Ia7a2f2ab18d8734696b9493340f206aad0168d4c
2022-01-15 19:48:17 +08:00
Tao Huang
f6909c028f Merge tag 'ASB-2021-12-05_12-5.10' of https://android.googlesource.com/kernel/common
https://source.android.com/security/bulletin/2021-12-01
CVE-2021-33909
CVE-2021-38204
CVE-2021-0961

* tag 'ASB-2021-12-05_12-5.10': (3010 commits)
  ANDROID: workqueue: export symbol of the function wq_worker_comm()
  ANDROID: GKI: Update symbols to symbol list
  ANDROID: vendor_hooks: Add hooks for binder proc transaction
  ANDROID: GKI: Add symbols abi for USB IP kernel modules.
  ANDROID: GKI: Fix file mode on mtk abi file
  UPSTREAM: erofs: fix deadlock when shrink erofs slab
  ANDROID: init_task: Init android vendor and oem data
  UPSTREAM: sched/core: Mitigate race cpus_share_cache()/update_top_cache_domain()
  ANDROID: Update symbol list for mtk
  UPSTREAM: erofs: fix unsafe pagevec reuse of hooked pclusters
  UPSTREAM: erofs: remove the occupied parameter from z_erofs_pagevec_enqueue()
  UPSTREAM: usb: dwc3: gadget: Fix null pointer exception
  ANDROID: fips140: support "evaluation testing" builds via build.sh
  FROMGIT: sched/scs: Reset task stack state in bringup_cpu()
  ANDROID: dma-buf: heaps: fix dma-buf heap pool pages stat
  ANDROID: ABI: Add several spi_mem related symbols
  UPSTREAM: spi: spi-mem: add spi_mem_dtr_supports_op()
  ANDROID: gki_defconfig: enable CONFIG_SPI_MEM
  ANDROID: ABI: Add several iio related symbols
  ANDROID: ABI: Update symbol list for IMX
  ...

Change-Id: I09cddc92fa34553b944e62cc5cbbba94a84e5437

Conflicts:
	arch/arm/boot/dts/rk322x.dtsi
	arch/arm64/boot/dts/rockchip/rk3399.dtsi
	drivers/dma-buf/heaps/system_heap.c
	drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
	drivers/gpu/drm/rockchip/rockchip_drm_vop.c
	drivers/gpu/drm/rockchip/rockchip_lvds.c
	drivers/gpu/drm/rockchip/rockchip_vop_reg.c
	drivers/mtd/nand/spi/core.c
	drivers/pci/controller/pcie-rockchip-host.c
	drivers/soc/rockchip/Kconfig
	drivers/usb/dwc3/core.c
	drivers/usb/dwc3/core.h
2021-12-14 17:09:02 +08:00
Algea Cao
b53d1f9467 drm/rockchip: dw_hdmi: Support 8K HDMI output
Support hdmi frl mode and dsc function.
Support max 8K-60Hz RGB 10bit output.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: Ibc2d48e2b25bc94e4be7ffa9703c400436bdee36
2021-12-08 11:26:13 +08:00
Sugar Zhang
5260237497 Revert "drm/bridge: synopsys: Fix register access panic when PD off"
This reverts commit 6b7fb9a6c9.

The audio regbank of hdmi-qp is drived by audio interface clk, and had
fixed by commits as follows:

[1] 3a7f369b5c ("arm64: dts: rockchip: rk3588: Add aud clk for hdmi nodes")
[2] e108ff9f6f ("drm/rockchip: dw_hdmi: Handle aud clk for hdmi qp")

OTOH, to make android hal happy, we still allow to access hdmi audio even
hdmi is plugged out.

  "hdmi-audio-codec: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19"

Android/Linux should reopen hdmi sound card depends on HPD plug event
to bring back to normal state.

Change-Id: I654fe18a04b750f57c8bd52ef4948a476bc1fa50
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-12-01 16:43:15 +08:00
Jiajian Wu
d34e75ac1e drm/bridge: synopsys: Add hook_plugged_cb for dw-hdmi-qp reporting connector status
Signed-off-by: Jiajian Wu <jair.wu@rock-chips.com>
Change-Id: I3103df9f379dfe98a4eb54dc5d3ce9f407038d8c
2021-11-30 18:37:26 +08:00
Wyon Bi
80db5a7bc7 drm/rockchip: analogix_dp: Add support for split mode
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I7be492886ddd595a01415d92ce4a56ce9d69b21b
2021-11-25 16:59:40 +08:00
Sugar Zhang
6b7fb9a6c9 drm/bridge: synopsys: Fix register access panic when PD off
Internal error: synchronous external abort: 96000010 [#1] SMP
Modules linked in: bcmdhd
CPU: 3 PID: 958 Comm: aplay Not tainted 5.10.43 #275
Hardware name: Rockchip RK3588 EVB1 LP4 V10 Board (DT)
pstate: 20400089 (nzCv daIf +PAN -UAO -TCO BTYPE=--)
pc : regmap_mmio_read32le+0x18/0x34
lr : regmap_mmio_read+0x50/0x7c
sp : ffffffc013f7b6e0
x29: ffffffc013f7b6e0 x28: ffffff8406dc9200
x27: 0000000000000000 x26: 0000000000000000
x25: 0000000000000000 x24: 0000000000008106
x23: 0000000000000000 x22: ffffff84013c1400
x21: 0000000000000aa8 x20: ffffff8402478200
x19: ffffffc013f7b764 x18: 0000000000000000
x17: 0000000000000000 x16: ffffff84026a6844
x15: 0000000000000000 x14: 0000000000000000
x13: 0000000000000000 x12: 0000000000000008
x11: ffffffc010c2d150 x10: 0000000000000000
x9 : ffffffc01081bc80 x8 : ffffffc0136a0aa8
x7 : 0000000000000000 x6 : 0000000000000000
x5 : 0000000000000000 x4 : 0000000000000000
x3 : 0000000000000000 x2 : ffffffc013f7b764
x1 : 0000000000000aa8 x0 : ffffff8402478200
Call trace:
 regmap_mmio_read32le+0x18/0x34
 _regmap_bus_reg_read+0x24/0x30
 _regmap_read+0x94/0x14c
 _regmap_update_bits+0x98/0x110
 regmap_update_bits_base+0x70/0xa0
 hdmi_modb+0x38/0x44
 dw_hdmi_qp_i2s_hw_params+0x88/0x1ec
 hdmi_codec_hw_params+0x148/0x214
 snd_soc_dai_hw_params+0x68/0xbc
 soc_pcm_hw_params+0x28c/0x508
 snd_pcm_hw_params+0x140/0x3a0
 snd_pcm_common_ioctl+0x1284/0x1a40
 snd_pcm_ioctl+0x3c/0x54
 __arm64_sys_ioctl+0x84/0xbc
 el0_svc_common+0xac/0x184
 do_el0_svc+0x88/0x94
 el0_svc+0x10/0x1c
 el0_sync_handler+0x80/0x134
 el0_sync+0x1a0/0x1c0

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I85117d4375e6f32800188b37f432b9d1a41e738d
2021-11-25 14:19:13 +08:00
Sugar Zhang
b1662f1291 drm/bridge: synopsys: Add audio support for dw-hdmi-qp
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I41ceead79d46e08d5022bc1cc536af89437003a3
2021-11-18 16:55:24 +08:00
Algea Cao
b73433e36e drm/rockchip: Add dw-hdmi-qp driver
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I6ac976dc3693bfdac1ac09570f2c4d0efb87fe9e
2021-11-17 18:01:49 +08:00
Wyon Bi
332551a8c2 drm/rockchip: analogix_dp: Add support for rk3588
This patch adds support for Analogix eDP TX IP used on RK3588 SoC.

Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I362489fb294673512b6de1913aa2e0b855a98926
2021-11-14 10:24:44 +08:00
Algea Cao
4bfe307edf drm/rockchip: dw_hdmi: Add next hdr sink data property
Add property to transfer next hdr sink data to userspace.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I926ec6553bdb0b1730a7ca578f46f36926860ebd
2021-11-09 18:32:27 +08:00
Algea Cao
60d1c80f6b drm/rockchip: dw_hdmi: Add get edid dsc info interface
To support the rk3588 dsc function, add get edid dsc
info interface.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I33cc4b60183484e7cd15b519cec4c32d7be53deb
2021-11-09 18:32:27 +08:00
Algea Cao
a7c8450f79 drm/rockchip: dw_hdmi: Call get yuv422 format interface in dw_hdmi-rockchip.c
To be compatible with GKI, dw-hdmi driver can't call interfaces in
rockchip-drm directly. In order for dp to be usable, get yuv422
format interface should define in rockchip-drm. So hdmi call
get yuv422 format interface in dw_hdmi-rockchip.c.

Fixes: dbd228a254 ("drm/bridge: synopsys: dw-hdmi: Get edid yuv422 info independently")
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: Icc879ff4420357a6becba84371b9e3317583960b
2021-10-26 10:50:21 +08:00
Zhang Yubing
82a87fa40a drm/rockchip: Add support for out-of-band hotplug notification
Add a new drm_connector_oob_hotplug_event() function and
oob_hotplug_event drm_connector_funcs member.

On some hardware a hotplug event notification may come from outside the
display driver / device. An example of this is some USB Type-C setups
where the hardware muxes the DisplayPort data and aux-lines but does
not pass the altmode HPD status bit to the GPU's DP HPD pin.

In cases like this the new drm_connector_oob_hotplug_event() function can
be used to report these out-of-band events.

Avoid the conflict of GKI, the drm_connector_oob_hotplug_event() is be
completed in rockchip drm driver, not the drm framework.

Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I5b1428daa83b0fdb7cf88e95d0b8fde2548d43d8
2021-10-19 11:31:00 +08:00
Guochun Huang
31e9f77c4b drm/bridge: dw-mipi-dsi: remove the pclk which can be managed in runtime pm
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: Ib5287e452c0f40ab0bdaddf5a8f61f9d7abdb45a
2021-09-03 17:48:03 +08:00
Algea Cao
3972b45872 drm/rockchip: dw_hdmi: Add property to show whether sink is DVI
Add property output_type_capacity:
enums: DVI=0 HDMI=1

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: Iad09b386b55c52e21b01f98e81fadfd5aa1a42d3
2021-08-27 15:50:26 +08:00
Algea Cao
9905ae2b79 drm/rockchip: dw_hdmi: Add property to switch HDMI/DVI mode
Add property output_hdmi_dvi:
enums: auto=0 force_hdmi=1 force_dvi=2

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: Ic048fb5c004f332b60bbbeca857de4abe9c0ca08
2021-08-27 15:50:26 +08:00
Algea Cao
2fbd84454a drm/rockchip: dw_hdmi: Support set quant range take effect immediately
When set property hdmi_quant_range, quant range was changed immediately.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: Ib8c14404cc3dde645012399b6155d047b4e9609a
2021-08-27 15:50:26 +08:00
Wyon Bi
48fb554efc drm/rockchip: analogix_dp: Protect kernel logo with loader_protect callback
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I16a1653aac3f6475f898390e83b09c93b706429e
2021-08-26 15:03:04 +08:00
Algea Cao
d5e6b96ce0 drm: rockchip: dw-hdmi: Change HDR_PANEL_METADATA to private property
For compatibility with GKI, HDR_PANEL_METADATA can't be a global
property. So change HDR_PANEL_METADATA to Rockchip private property.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I7926683a5dc6274e6cab2151e476344fa897b66c
2021-08-25 17:23:20 +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
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
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
Algea Cao
5fe797153d drm: bridge: dw-hdmi: Support report cec hpd
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I45a5a45623f2eaf3f66a87dcd35c9fbeb20f7c77
2021-08-11 18:30:51 +08:00
Sandy Huang
7c95c85b18 drm/bridge: synopsys: dw-hdmi: update for remove connector port
Change-Id: Ia0ca8c2fddf89f29bf4ac5703d8f4d0f68d6446a
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2021-08-05 09:36:46 +08:00
Algea Cao
207a1ee79c drm/bridge: synopsys: dw-hdmi: Support set RGB quantization range
1.Filling the HDMI AVI infoframe quantization range information.
2.If output is limited enable color space conversion to convert.

Change-Id: I75f666424f00f3f6ec695047f7851824e89cd1a5
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2021-08-05 09:36:45 +08:00
xuhuicong
dd387a422c drm/bridge: dw-hdmi: fix display shaking when uboot to kernel show
Change-Id: I899bb0dde7111fe97dd2c89d20afb09562d31300
Signed-off-by: xuhuicong <xhc@rock-chips.com>
2021-08-05 09:36:45 +08:00
Zheng Yang
8a67fdbcfe drm: bridge: dw-hdmi: support attach property
Introduce struct dw_hdmi_property_ops in plat_data to attach
vendor connector property.

Change-Id: I3d23e40e9d342b22ca47f723b3f81057b58010e8
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2021-07-29 20:48:42 +08:00
Algea Cao
a07b4b5edd drm/rockchip: hdmi: Add hdmi drv_data features
Hdmi features vary on different platforms:
1.max_tmdsclk:hdmi max tmds clock.
2.unsupported_yuv_input:hdmi only support rgb input.
3.unsupported_deep_color:deep color mode is unsupported.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I77468b21960c49596c45bfef037fc5bfb3545b61
2021-07-29 20:48:42 +08:00
Greg Kroah-Hartman
e4cac2c332 This is the 5.10.54 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmEBT00ACgkQONu9yGCS
 aT7svA/9HCRwW+pK3UpK1+0FK7gGH8DA3jSONj775zVEKhboDZNIwZsDqG0Ly+jm
 /JejWXPKZlekaDXgzBfZY3H59xgij/VwYHe8p7cdxfi1TlhmAQwFjLNZnWav8as6
 IyNkpsDJn8fMXmfHDi2u3cb8wrVi/aQDzTlwu88cUtREyZCaaYlo0Fdv9MJyhww/
 p6LWPYQoZ8TmFY+Y/2ORVxFos2UVuU0hhhMdGt9LrX2WNEGRNUZUqmbhcXYfdsX0
 ckSHbijIcWdcka3nQ6yOvdxw75rTqd8c/bP0y+yAteeJ0CykjVnI2cdK+M2ZEi4j
 /JqpGJrRWhsZf5MiO8b3k+I1K62JDa1GYBQ9Amp8FKKzjYLPTNeFAP9IsMyDc4oi
 oW98XM7XzoSEU9t/FSAIGT0hYK9k+lnPxw623LhxD6x3VPynnNAnQsLr+HirOgG6
 mZ79L4ZFu3lUvVsCuCgKn/uxwDopUNlhqo5B2/4M2kSWwe2Xu5bExpGc2bT9xCOP
 6fF9DmvmpG1UPGCXrOqaxemyEPmHqmyjKJpxDt6vZqlOL9vqHez4WmEEM1C+E2NZ
 5VKKbBk/KZDxNX9EiFOtI2HRFb1cghoI2Hcb/QjRoB9Dv3a6cHgjxDl0eKm8SiDN
 +1ytV0IFH3fT4aRiXJ7I3GBwkjKcDaX0sjYwtnCx9s5XZmm9PRQ=
 =HAyL
 -----END PGP SIGNATURE-----

Merge 5.10.54 into android12-5.10-lts

Changes in 5.10.54
	igc: Fix use-after-free error during reset
	igb: Fix use-after-free error during reset
	igc: change default return of igc_read_phy_reg()
	ixgbe: Fix an error handling path in 'ixgbe_probe()'
	igc: Fix an error handling path in 'igc_probe()'
	igb: Fix an error handling path in 'igb_probe()'
	fm10k: Fix an error handling path in 'fm10k_probe()'
	e1000e: Fix an error handling path in 'e1000_probe()'
	iavf: Fix an error handling path in 'iavf_probe()'
	igb: Check if num of q_vectors is smaller than max before array access
	igb: Fix position of assignment to *ring
	gve: Fix an error handling path in 'gve_probe()'
	net: add kcov handle to skb extensions
	bonding: fix suspicious RCU usage in bond_ipsec_add_sa()
	bonding: fix null dereference in bond_ipsec_add_sa()
	ixgbevf: use xso.real_dev instead of xso.dev in callback functions of struct xfrmdev_ops
	bonding: fix suspicious RCU usage in bond_ipsec_del_sa()
	bonding: disallow setting nested bonding + ipsec offload
	bonding: Add struct bond_ipesc to manage SA
	bonding: fix suspicious RCU usage in bond_ipsec_offload_ok()
	bonding: fix incorrect return value of bond_ipsec_offload_ok()
	ipv6: fix 'disable_policy' for fwd packets
	stmmac: platform: Fix signedness bug in stmmac_probe_config_dt()
	selftests: icmp_redirect: remove from checking for IPv6 route get
	selftests: icmp_redirect: IPv6 PMTU info should be cleared after redirect
	pwm: sprd: Ensure configuring period and duty_cycle isn't wrongly skipped
	cxgb4: fix IRQ free race during driver unload
	mptcp: fix warning in __skb_flow_dissect() when do syn cookie for subflow join
	nvme-pci: do not call nvme_dev_remove_admin from nvme_remove
	KVM: x86/pmu: Clear anythread deprecated bit when 0xa leaf is unsupported on the SVM
	perf inject: Fix dso->nsinfo refcounting
	perf map: Fix dso->nsinfo refcounting
	perf probe: Fix dso->nsinfo refcounting
	perf env: Fix sibling_dies memory leak
	perf test session_topology: Delete session->evlist
	perf test event_update: Fix memory leak of evlist
	perf dso: Fix memory leak in dso__new_map()
	perf test maps__merge_in: Fix memory leak of maps
	perf env: Fix memory leak of cpu_pmu_caps
	perf report: Free generated help strings for sort option
	perf script: Fix memory 'threads' and 'cpus' leaks on exit
	perf lzma: Close lzma stream on exit
	perf probe-file: Delete namelist in del_events() on the error path
	perf data: Close all files in close_dir()
	perf sched: Fix record failure when CONFIG_SCHEDSTATS is not set
	ASoC: wm_adsp: Correct wm_coeff_tlv_get handling
	spi: imx: add a check for speed_hz before calculating the clock
	spi: stm32: fixes pm_runtime calls in probe/remove
	regulator: hi6421: Use correct variable type for regmap api val argument
	regulator: hi6421: Fix getting wrong drvdata
	spi: mediatek: fix fifo rx mode
	ASoC: rt5631: Fix regcache sync errors on resume
	bpf, test: fix NULL pointer dereference on invalid expected_attach_type
	bpf: Fix tail_call_reachable rejection for interpreter when jit failed
	xdp, net: Fix use-after-free in bpf_xdp_link_release
	timers: Fix get_next_timer_interrupt() with no timers pending
	liquidio: Fix unintentional sign extension issue on left shift of u16
	s390/bpf: Perform r1 range checking before accessing jit->seen_reg[r1]
	bpf, sockmap: Fix potential memory leak on unlikely error case
	bpf, sockmap, tcp: sk_prot needs inuse_idx set for proc stats
	bpf, sockmap, udp: sk_prot needs inuse_idx set for proc stats
	bpftool: Check malloc return value in mount_bpffs_for_pin
	net: fix uninit-value in caif_seqpkt_sendmsg
	usb: hso: fix error handling code of hso_create_net_device
	dma-mapping: handle vmalloc addresses in dma_common_{mmap,get_sgtable}
	efi/tpm: Differentiate missing and invalid final event log table.
	net: decnet: Fix sleeping inside in af_decnet
	KVM: PPC: Book3S: Fix CONFIG_TRANSACTIONAL_MEM=n crash
	KVM: PPC: Fix kvm_arch_vcpu_ioctl vcpu_load leak
	net: sched: fix memory leak in tcindex_partial_destroy_work
	sctp: trim optlen when it's a huge value in sctp_setsockopt
	netrom: Decrease sock refcount when sock timers expire
	scsi: iscsi: Fix iface sysfs attr detection
	scsi: target: Fix protect handling in WRITE SAME(32)
	spi: cadence: Correct initialisation of runtime PM again
	ACPI: Kconfig: Fix table override from built-in initrd
	bnxt_en: don't disable an already disabled PCI device
	bnxt_en: Refresh RoCE capabilities in bnxt_ulp_probe()
	bnxt_en: Add missing check for BNXT_STATE_ABORT_ERR in bnxt_fw_rset_task()
	bnxt_en: Validate vlan protocol ID on RX packets
	bnxt_en: Check abort error state in bnxt_half_open_nic()
	net: hisilicon: rename CACHE_LINE_MASK to avoid redefinition
	net/tcp_fastopen: fix data races around tfo_active_disable_stamp
	ALSA: hda: intel-dsp-cfg: add missing ElkhartLake PCI ID
	net: hns3: fix possible mismatches resp of mailbox
	net: hns3: fix rx VLAN offload state inconsistent issue
	spi: spi-bcm2835: Fix deadlock
	net/sched: act_skbmod: Skip non-Ethernet packets
	ipv6: fix another slab-out-of-bounds in fib6_nh_flush_exceptions
	ceph: don't WARN if we're still opening a session to an MDS
	nvme-pci: don't WARN_ON in nvme_reset_work if ctrl.state is not RESETTING
	Revert "USB: quirks: ignore remote wake-up on Fibocom L850-GL LTE modem"
	afs: Fix tracepoint string placement with built-in AFS
	r8169: Avoid duplicate sysfs entry creation error
	nvme: set the PRACT bit when using Write Zeroes with T10 PI
	sctp: update active_key for asoc when old key is being replaced
	tcp: disable TFO blackhole logic by default
	net: dsa: sja1105: make VID 4095 a bridge VLAN too
	net: sched: cls_api: Fix the the wrong parameter
	drm/panel: raspberrypi-touchscreen: Prevent double-free
	cifs: only write 64kb at a time when fallocating a small region of a file
	cifs: fix fallocate when trying to allocate a hole.
	proc: Avoid mixing integer types in mem_rw()
	mmc: core: Don't allocate IDA for OF aliases
	s390/ftrace: fix ftrace_update_ftrace_func implementation
	s390/boot: fix use of expolines in the DMA code
	ALSA: usb-audio: Add missing proc text entry for BESPOKEN type
	ALSA: usb-audio: Add registration quirk for JBL Quantum headsets
	ALSA: sb: Fix potential ABBA deadlock in CSP driver
	ALSA: hda/realtek: Fix pop noise and 2 Front Mic issues on a machine
	ALSA: hdmi: Expose all pins on MSI MS-7C94 board
	ALSA: pcm: Call substream ack() method upon compat mmap commit
	ALSA: pcm: Fix mmap capability check
	Revert "usb: renesas-xhci: Fix handling of unknown ROM state"
	usb: xhci: avoid renesas_usb_fw.mem when it's unusable
	xhci: Fix lost USB 2 remote wake
	KVM: PPC: Book3S: Fix H_RTAS rets buffer overflow
	KVM: PPC: Book3S HV Nested: Sanitise H_ENTER_NESTED TM state
	usb: hub: Disable USB 3 device initiated lpm if exit latency is too high
	usb: hub: Fix link power management max exit latency (MEL) calculations
	USB: usb-storage: Add LaCie Rugged USB3-FW to IGNORE_UAS
	usb: max-3421: Prevent corruption of freed memory
	usb: renesas_usbhs: Fix superfluous irqs happen after usb_pkt_pop()
	USB: serial: option: add support for u-blox LARA-R6 family
	USB: serial: cp210x: fix comments for GE CS1000
	USB: serial: cp210x: add ID for CEL EM3588 USB ZigBee stick
	usb: gadget: Fix Unbalanced pm_runtime_enable in tegra_xudc_probe
	usb: dwc2: gadget: Fix GOUTNAK flow for Slave mode.
	usb: dwc2: gadget: Fix sending zero length packet in DDMA mode.
	usb: typec: stusb160x: register role switch before interrupt registration
	firmware/efi: Tell memblock about EFI iomem reservations
	tracepoints: Update static_call before tp_funcs when adding a tracepoint
	tracing/histogram: Rename "cpu" to "common_cpu"
	tracing: Fix bug in rb_per_cpu_empty() that might cause deadloop.
	tracing: Synthetic event field_pos is an index not a boolean
	btrfs: check for missing device in btrfs_trim_fs
	media: ngene: Fix out-of-bounds bug in ngene_command_config_free_buf()
	ixgbe: Fix packet corruption due to missing DMA sync
	bus: mhi: core: Validate channel ID when processing command completions
	posix-cpu-timers: Fix rearm racing against process tick
	selftest: use mmap instead of posix_memalign to allocate memory
	io_uring: explicitly count entries for poll reqs
	io_uring: remove double poll entry on arm failure
	userfaultfd: do not untag user pointers
	memblock: make for_each_mem_range() traverse MEMBLOCK_HOTPLUG regions
	hugetlbfs: fix mount mode command line processing
	rbd: don't hold lock_rwsem while running_list is being drained
	rbd: always kick acquire on "acquired" and "released" notifications
	misc: eeprom: at24: Always append device id even if label property is set.
	nds32: fix up stack guard gap
	driver core: Prevent warning when removing a device link from unregistered consumer
	drm: Return -ENOTTY for non-drm ioctls
	drm/amdgpu: update golden setting for sienna_cichlid
	net: dsa: mv88e6xxx: enable SerDes RX stats for Topaz
	net: dsa: mv88e6xxx: enable SerDes PCS register dump via ethtool -d on Topaz
	PCI: Mark AMD Navi14 GPU ATS as broken
	bonding: fix build issue
	skbuff: Release nfct refcount on napi stolen or re-used skbs
	Documentation: Fix intiramfs script name
	perf inject: Close inject.output on exit
	usb: ehci: Prevent missed ehci interrupts with edge-triggered MSI
	drm/i915/gvt: Clear d3_entered on elsp cmd submission.
	sfc: ensure correct number of XDP queues
	xhci: add xhci_get_virt_ep() helper
	skbuff: Fix build with SKB extensions disabled
	Linux 5.10.54

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ifd2823b47ab1544cd1f168b138624ffe060a471e
2021-07-28 15:23:47 +02:00
Charles Baylis
69a603aa17 drm: Return -ENOTTY for non-drm ioctls
commit 3abab27c32 upstream.

drm: Return -ENOTTY for non-drm ioctls

Return -ENOTTY from drm_ioctl() when userspace passes in a cmd number
which doesn't relate to the drm subsystem.

Glibc uses the TCGETS ioctl to implement isatty(), and without this
change isatty() returns it incorrectly returns true for drm devices.

To test run this command:
$ if [ -t 0 ]; then echo is a tty; fi < /dev/dri/card0
which shows "is a tty" without this patch.

This may also modify memory which the userspace application is not
expecting.

Signed-off-by: Charles Baylis <cb-kernel@fishzet.co.uk>
Cc: stable@vger.kernel.org
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/YPG3IBlzaMhfPqCr@stando.fishzet.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-28 14:35:47 +02:00
Algea Cao
7b29b5f295 drm/rockchip: dw_hdmi: Support HDMI 2.0 YCbCr 4:2:0
Some old code has too many conflicts with the upstream code,
so recombine and commit these changes.

Including these changes:
1.Support yuv420.
2.Limit rk3229/rk3328 max output resolution.
3.Support dynamically get input/out color info.
4.Introduce mpll_cfg_420.
5.use drm_mode_is_420 instead of DRM_MODE_FLAG_420_MASK.

Change-Id: I42462284b16f26b7adef0e9455903ee5fc71e432
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2021-07-27 17:42:15 +08:00
Algea Cao
0a52ff8181 drm/rockchip: dw_hdmi: check display mode with crtc mode valid
Change-Id: I23470e46b97169da0b59153dfc0835833f1aa549
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2021-07-27 17:42:15 +08:00
Yakir Yang
9dd3cb3411 CHROMIUM: drm: bridge/dw_hdmi: improved the hdmi audio N/CTS cacluate math
The original math would bring some inaccurate to N/CTS that would
caused those magic number won't fit the HDMI 1.4 Spec request:
	128 * SampleRate = Tmds * N / CTS;

So this time we try to improved to math of N that would find the
minimal inaccurate with the HDMI 1.4 Spec.

Change-Id: Ied3cde3c352d955ae6f15d5e7fb172e92316c2a5
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/315424
Reviewed-by: Douglas Anderson <dianders@chromium.org>
2021-07-27 17:42:15 +08:00
Sandy Huang
e78097e89b drm/bridge: dw-mipi-dsi: add api to get connector
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Id024b178bf936f0af3a782fe2c54fde661cce0da
2021-07-23 11:36:15 +08:00
Bin Yang
901d4890ec drm/bridge: dw_hdmi: clear ih_mute register when system resume
HDMI PD is power off when system suspend, so ih_mute register
bit0 mute_all_interrupt will be reset to 1 when system resume.
HPD interrupt will be mask, that would cause hdmi plugin could
not be detected.

Change-Id: I3bf2e6116e902cd516a7ac69fbe8569ca943e853
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2021-07-23 09:57:01 +08:00
Wyon Bi
0d0f8a70ae drm/rockchip: analogix_dp: Add audio support
Change-Id: Ib611037f497a0758bd2b6a312155562a719fe15f
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2021-07-05 15:27:53 +08:00
Wyon Bi
0173eec295 drm/rockchip: analogix_dp: Add support for rk3568
This patch adds support for Analogix eDP TX IP used on RK3568 SoC.

Change-Id: Ieb89906cba5bc569ed8c476fecd00f6035a7f582
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2021-07-05 15:26:37 +08:00