Commit Graph

844002 Commits

Author SHA1 Message Date
Shixiang Zheng
df2c27cd76 drm/rockchip: vop: workaround a issue of px30 treat rgb888 as bgr888
Change-Id: Ica98fe1ea2d624dd7bd38a531907d6c574046d8d
Signed-off-by: Shixiang Zheng <shixiang.zheng@rock-chips.com>
2019-08-23 08:37:20 +08:00
Shixiang Zheng
262e57349d drm/rockchip: vop: initial enable vop dither up
for rgb565/666 can dither to rgb888

Change-Id: I8936714e6e9cc015f3070111662442b0243d0720
Signed-off-by: Shixiang Zheng <shixiang.zheng@rock-chips.com>
2019-08-22 17:54:27 +08:00
Wyon Bi
92a8db1509 drm/rockchip: rgb: Implement loader protect callback
Change-Id: Iffa5b17de436ad26c718725168b5eab11e4ebbfc
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-08-22 17:50:03 +08:00
Sandy Huang
746ad506c9 drm/rockchip: vop: add connector type for debug
Change-Id: Id2362f5abdb46e199d2e4e0e0976d75a0c04d386
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2019-08-22 17:38:14 +08:00
Tao Huang
89b4c65a87 rk: scripts: update mkbootimg
AOSP 983425fe9480 ("eliminate meaningless non-zero values of second_offset and ramdisk_offset")
Revert 7261bb083a97 ("Check DTB image size for boot image header version 2 and above")
which failed to repack image without dtb.

Change-Id: I3d3b7ebb87f137bcc66dd7d59bac3423c0c33193
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-08-20 14:27:12 +08:00
Sandy Huang
455796818d drm: fix some no need warning
As rockchip maybe appear one crtc connect two connecter,
the conn_state->best_encoder always isn't NULL, so
here no need warning.

Change-Id: I3e4274e64f4c2b4eea5d9700cebffb716425426b
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2019-08-20 11:06:29 +08:00
Sandy Huang
8e4d45272a drm: support drm_get_connector_name
Change-Id: I075d948afc2baa47fb147f9a967844a872171397
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2019-08-19 14:50:30 +08:00
Zheng Yang
2beb3925b7 drm: bridge: dw-hdmi: support Dynamic Range and Mastering Infoframe
The Dynamic Range and Mastering InfoFrame carries data such as
the EOTF and the Static Metadata associated with the dynamic
range of the video stream.

This function is introduced in the 2.11a version.

Change-Id: I279cc0665e34d75209774013882ccc8946ce6da5
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2019-08-19 14:48:00 +08:00
Zheng Yang
97fd2e42b6 drm: Add HDR panel metadata property
HDR_PANEL_METADATA is used to indicate HDR capacity of sink device.

Change-Id: I598a7bb5634f14b57f94135fd3be6b0ad2075116
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2019-08-19 14:48:00 +08:00
Zheng Yang
2391d71d38 drm/rockchip: hdmi: support set eotf and colorimetry
HDMI will set vop eotf and color space according to display mode.

Change-Id: I469d03dd1f14a2bcd75ed5c8e3227cd1d34eb354
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2019-08-19 14:48:00 +08:00
Zheng Yang
d51a8b4d49 drm: rockchip: hdmi: attach HDR_SOURCE_METADATA property
HDR_SOURCE_METADATA property is used to set source hdr metadata,
which will be sent to sink though HDMI DRM infoframe.

Change-Id: If3500cb505c16c2f0caf66b8e64b4d80b93b228f
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2019-08-19 14:48:00 +08:00
Uma Shankar
652af9ff53 UPSTREAM: video/hdmi: Add Unpack function for DRM infoframe
Added unpack function for DRM infoframe for dynamic
range and mastering infoframe readout.

v2: Addressed Ville's review comments.

Change-Id: I153d45876c20986acd09d8df0856316a29fd721a
Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1558015817-12025-12-git-send-email-uma.shankar@intel.com
(cherry picked from commit 270afb37ae)
2019-08-19 14:48:00 +08:00
Ville Syrjälä
ff39b1b828 UPSTREAM: video/hdmi: Pass buffer size to infoframe unpack functions
To make sure the infoframe unpack functions don't end up examining
stack garbage or oopsing, let's pass in the size of the buffer.

v2: Convert tda1997x.c as well (kbuild test robot)

Change-Id: I3512b43a35f18d9a44b643ce257436b3348f5e6a
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Hans Verkuil <hans.verkuil@cisco.com>
Cc: linux-media@vger.kernel.org
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180920185145.1912-3-ville.syrjala@linux.intel.com
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
(cherry picked from commit 480b8b3e42)
2019-08-19 14:48:00 +08:00
Ville Syrjälä
297653683f UPSTREAM: video/hdmi: Constify 'buffer' to the unpack functions
The unpack functions just read from the passed in buffer,
so make it const.

Change-Id: Idcce85511d2eba8cb6e2d7a8eb03d741daaad796
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Hans Verkuil <hans.verkuil@cisco.com>
Cc: linux-media@vger.kernel.org
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180920185145.1912-2-ville.syrjala@linux.intel.com
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
(cherry picked from commit f26e1de5ec)
2019-08-19 14:48:00 +08:00
Ville Syrjälä
1e5987a815 UPSTREAM: drm: Add HLG EOTF
ADD HLG EOTF to the list of EOTF transfer functions supported.
Hybrid Log-Gamma (HLG) is a high dynamic range (HDR) standard.
HLG defines a nonlinear transfer function in which the lower
half of the signal values use a gamma curve and the upper half
of the signal values use a logarithmic curve.

v2: Rebase

v3: Fixed a warning message

v4: Addressed Shashank's review comments

v5: Addressed Jonas Karlman's review comment and dropped the i915
tag from header.

Change-Id: I6542cb0cb6cfccb92f76aa98df5d054fc1e908d8
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Reviewed-by: Shashank Sharma <shashank.sharma@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1558015817-12025-8-git-send-email-uma.shankar@intel.com
(cherry picked from commit b5e3eed1ee)
2019-08-19 14:48:00 +08:00
Uma Shankar
7ffbba0d86 UPSTREAM: drm: Enable HDR infoframe support
Enable Dynamic Range and Mastering Infoframe for HDR
content, which is defined in CEA 861.3 spec.

The metadata will be computed based on blending
policy in userspace compositors and passed as a connector
property blob to driver. The same will be sent as infoframe
to panel which support HDR.

Added the const version of infoframe for DRM metadata
for HDR.

v2: Rebase and added Ville's POC changes.

v3: No Change

v4: Addressed Shashank's review comments and merged the
patch making drm infoframe function arguments as constant.

v5: Rebase

v6: Fixed checkpatch warnings with --strict option. Addressed
Shashank's review comments and added his RB.

v7: Addressed Brian Starkey's review comments. Merged 2 patches
into one.

v8: Addressed Jonas Karlman review comments.

v9: Addressed Jonas Karlman review comments.

v10: Addressed Ville's review comments.

v11: Added BUILD_BUG_ON and sizeof instead of magic numbers as
per Ville's comments.

Change-Id: I9f64d3df1a62afb83a5075662d96964c4dd3c2be
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Reviewed-by: Shashank Sharma <shashank.sharma@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1558015817-12025-5-git-send-email-uma.shankar@intel.com
(cherry picked from commit 2cdbfd66a8)
2019-08-19 14:48:00 +08:00
Ville Syrjälä
82fa7bd48f UPSTREAM: video/hdmi: Constify infoframe passed to the pack functions
Let's make the infoframe pack functions usable with a const infoframe
structure. This allows us to precompute the infoframe earlier, and still
pack it later when we're no longer allowed to modify the structure.
So now we end up with a _check()+_pack_only() or _pack() functions
depending on whether you want to precompute the infoframes or not.
The names aren't great but I was lazy and didn't want to change all the
drivers.

v2: Deal with exynos churn
    Actually export the new funcs
v3: Fix various documentation fails (Hans)

Change-Id: I5a74363af0e985ffa4f7698c9eef486b69882961
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Hans Verkuil <hans.verkuil@cisco.com>
Cc: linux-media@vger.kernel.org
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180921143332.28970-1-ville.syrjala@linux.intel.com
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
(cherry picked from commit c5e69ab35c)
2019-08-19 14:48:00 +08:00
Uma Shankar
7115e31171 UPSTREAM: drm: Parse HDR metadata info from EDID
HDR metadata block is introduced in CEA-861.3 spec.
Parsing the same to get the panel's HDR metadata.

v2: Rebase and added Ville's POC changes to the patch.

v3: No Change

v4: Addressed Shashank's review comments

v5: Addressed Shashank's comment and added his RB.

v6: Addressed Jonas Karlman review comments.

v7: Adressed Ville's review comments and fixed the issue
with length handling.

v8: Put the length check as per the convention followed in
existing code, as suggested by Ville.

Change-Id: Ia13317764bab48f95e9fffd5f9bce7e9d64853ba
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Reviewed-by: Shashank Sharma <shashank.sharma@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1558015817-12025-4-git-send-email-uma.shankar@intel.com
(cherry picked from commit e85959d6cb)
2019-08-19 14:48:00 +08:00
Jonas Karlman
03b7704c74 UPSTREAM: drm: Add reference counting on HDR metadata blob
This adds reference count for HDR metadata blob,
handled as part of duplicate and destroy connector
state functions.

v2: Removed the hdr_metadata_changed initialization as
the variable is dropped and not required.

Change-Id: I923953b182ec7ce826a47558de0e0d2c84197daa
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1558015817-12025-3-git-send-email-uma.shankar@intel.com
(cherry picked from commit c0b0ebb171)
2019-08-19 14:48:00 +08:00
Uma Shankar
e8c011b989 UPSTREAM: drm: Add HDR source metadata property
This patch adds a blob property to get HDR metadata
information from userspace. This will be send as part
of AVI Infoframe to panel.

It also implements get() and set() functions for HDR output
metadata property.The blob data is received from userspace and
saved in connector state, the same is returned as blob in get
property call to userspace.

v2: Rebase and modified the metadata structure elements
as per Ville's POC changes.

v3: No Change

v4: Addressed Shashank's review comments

v5: Rebase.

v6: Addressed Brian Starkey's review comments, defined
new structure with header for dynamic metadata scalability.
Merge get/set property functions for metadata in this patch.

v7: Addressed Jonas Karlman review comments and defined separate
structure for infoframe to better align with CTA 861.G spec. Added
Shashank's RB.

v8: Addressed Ville's review comments. Moved sink metadata structure
out of uapi headers as suggested by Jonas Karlman.

v9: Rebase and addressed Jonas Karlman review comments.

v10: Addressed Ville's review comments, dropped the metdata_changed
state variable as its not needed anymore.

Change-Id: I5dc8882f8e9dd488140e2747195c278f94b1e1fa
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Reviewed-by: Shashank Sharma <shashank.sharma@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1558015817-12025-2-git-send-email-uma.shankar@intel.com
(cherry picked from commit fbb5d0353c)
2019-08-19 14:48:00 +08:00
Algea Cao
06d1797efd drm/rockchip: dw-hdmi: Fix hdmi timing err when switch color mode
When switch color new hdmi phy config may not be set because hdmi phy
is already on in upstream code.
So we should power down hdmi phy first before power on hdmi phy when
set new hdmi phy config.

Change-Id: Icb1cf29931f1084cc70b0b320137260491497771
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2019-08-19 14:48:00 +08:00
Huicong Xu
a8b73f4251 drm/bridge/synopsys: initialize hdmi variable when bootup with hdmi plugin
if bootup with hdmi plugin initialize mtmdsclock to modify voicelessness
and set bridge_is_on true to modify green screen when reboot from recovery

Change-Id: I0ed9f956d62ab4087cb42a54dafba6a0fc9e5a7e
Signed-off-by: Huicong Xu <xhc@rock-chips.com>
2019-08-19 14:48:00 +08:00
Zheng Yang
3af99af494 drm: bridge: dw-hdmi: support deep color mode
Introduce mtmdsclock to record tmds clock, which is different
to mpixelclock in deep color mode. Use this variable to select
synopsys phy curr_ctrl/phy_config, and audio N/CTS.

Change-Id: Ia78dee9c4901d2f1ca7f339dfb030d65bbf6861d
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2019-08-19 14:48:00 +08:00
Huicong Xu
73d0b88323 drm: bridge: dw-hdmi: fix wrong color if get edid error at bootup
if get edid error at bootup the input bus format will be set as
rgb and hdmi is no reinit, so hdmi color will be wrong if set yuv
in uboot, now reinit hdmi in this case.

Change-Id: I8d117b6e241079ceab44793f6566adf91e9d84c6
Signed-off-by: Huicong Xu <xhc@rock-chips.com>
2019-08-19 14:48:00 +08:00
Huicong Xu
5927635664 drm/bridge/synopsys: restore bus_width as 8 when disable hdmi encoder
to modify bus width error sometime plug out hdmi and switch cvbs output

Change-Id: Iaa7914fbccc99991fbfbc5495ba647f97997c8ba
Signed-off-by: Huicong Xu <xhc@rock-chips.com>
2019-08-19 14:48:00 +08:00
Zheng Yang
37290843b4 drm/rockchip: dw-hdmi: fix 3328/3228 phy bus width
If HDMI output corlor mode is YCbCr422, the tmds clock is same
to YCbCr444 8bit, phy bus width should be set to 8.

Change-Id: I6e844e676a6315ae0cb88b0bd8456f0e27fa5e0c
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2019-08-19 14:48:00 +08:00
Tao Huang
fbbb55cb30 OP-TEE: fix clang warning
security/optee_linuxdriver/core/tee_session.c:683:22: error: address of array 'cmd_io->op->params' will always evaluate to 'true'
      [-Werror,-Wpointer-bool-conversion]
        BUG_ON(!cmd_io->op->params);
               ~~~~~~~~~~~~~^~~~~~
/security/optee_linuxdriver/core/tee_kernel_api.c:85:18: error: address of array 'context->devname' will always evaluate to 'true'
      [-Werror,-Wpointer-bool-conversion]
                                 && context->devname) ? context->devname : "");
                                 ~~ ~~~~~~~~~^~~~~~~

Change-Id: I6fa7e26fa620b48a0a255393b4279ff1cf1700c3
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-08-19 08:52:08 +08:00
Huibin Hong
9a9b5bb34a ARM64: kernel: dump kernel addresses larger than VA_START
The arm64 virtual addresses of kernel are like:
VA_START < MODULES_VADDR < KIMAGE_VADDR < PAGE_OFFSET.
PAGE_OFFSET is the virtual address of the start of the linear map.
And the vmalloc, kernel code and so on are between VA_START and
PAGE_OFFSET, so it is necessary to expand dump addresses to VA_START,
instead of PAGE_OFFSET.

Change-Id: I810ed216862de4c6e68b92d483de4aa68da532b8
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2019-08-17 14:27:27 +08:00
Greg Hackmann
a56b1d9202 ANDROID: arm64: process: dump memory around registers when displaying regs
A port of 8608d7c441 to ARM64.  Both the
original code and this port are limited to dumping kernel addresses, so
don't bother if the registers are from a userspace process.

Change-Id: Idc76804c54efaaeb70311cbb500c54db6dac4525
Signed-off-by: Greg Hackmann <ghackmann@google.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-08-17 14:27:27 +08:00
Liang Chen
f2c2ffca8f PM / devfreq: rockchip_bus: support soc bus devfreq
Change-Id: Iba750d4522b99e88c16c8e4a77d3367fbb2a0d82
Signed-off-by: Tony Xie <tony.xie@rock-chips.com>
Signed-off-by: Liang Chen <cl@rock-chips.com>
2019-08-17 10:33:49 +08:00
Jon Lin
0afeae23f2 drivers: rkflash: support snor_disable_QE for new devices
Change-Id: I67dcf1791097a7742f8396eb42a59f932b89d4ba
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2019-08-16 11:22:08 +08:00
Jon Lin
d637bfe7db drivers: rkflash: add new SPI Nor flash
1. add MXC devices.
2. Improve readability

Change-Id: I478ef5948d1a4ff1f93b5370b14c8155faae55e6
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2019-08-16 11:22:08 +08:00
Jon Lin
258dd7d3a8 drivers: rkflash: add new SPI Nannd flash
GD5F1GQ4R

Change-Id: I652526171576bd51d10dc8923bbb5e2c69f28975
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2019-08-16 11:22:08 +08:00
Jon Lin
f73668a6c4 rkflash: add new SPI Nand flash
FM25S01, HYF1GQ4UPACAE, EM73E044SNA-G, GD5F2GQ5UEYIG

Change-Id: Id6f50b06a27631cf14e1df6deb39cf0600866bec
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2019-08-16 11:22:08 +08:00
Jon Lin
7e32b05fe3 drivers: rkflash: adjust rkflash_debug print
unicom debug print of rkflash.

Change-Id: I59a04f6fdc9219f33fb37723851e87c55ace1f86
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2019-08-16 11:22:08 +08:00
Liang Chen
9618d18f84 cpufreq: rockchip: add rk3326 and px30 projects into blacklist
Change-Id: I83692ea51922c2e9993403629feff653d5cab868
Signed-off-by: Liang Chen <cl@rock-chips.com>
2019-08-16 11:20:56 +08:00
Sandy Huang
cdc1b19e18 drm/rockchip: driver: add support rockchip TVE
Change-Id: I40cce413d738ad16473eb35ce6c2adf4897380d6
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2019-08-16 11:20:11 +08:00
Sandy Huang
0f2f64e27c drm/rockchip: tve: porting to linux 4.19
Change-Id: I059808111bfa96724eb629b6fc37915a4852e234
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2019-08-16 09:14:47 +08:00
Sandy Huang
cf928240a6 drm/panel: simple: add support SPI and MCU init panel
Change-Id: I4582cc98619f7b7327af68c266ba0de1163a1b63
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2019-08-13 20:26:23 +08:00
Sandy Huang
dab71decfd dt-bindings: panel: Document more property
Change-Id: Ib21420375b333cf42ab715c126e91d90a37373ab
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2019-08-13 20:26:08 +08:00
Sandy Huang
6dd99e4e6f drm/rockchip: driver: add support more function
Change-Id: I4175947340647891dd7422b6ab30af23fb47876e
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2019-08-13 20:26:01 +08:00
Sandy Huang
e7c00ffb91 arm64: dts: rockchip: rk3399-sapphire-excavator-edp: enable uboot logo
Change-Id: I288ac57b79752269e771138c900b008e7a9a4bca
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2019-08-09 15:11:46 +08:00
Sandy Huang
862a59c0dc drm/rockchip: driver: crtc primary fb is for non atomic driver
meaningful for non-atomic drivers, for atomic drivers this is
forced to be NULL.

Change-Id: Ic3591c4f4c3ee6de53f89d0b4f230829b1ed056d
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2019-08-09 15:11:30 +08:00
Algea Cao
f4af517045 drm/rockchip: dw_hdmi: Support switch hdmi quantization range
Add property hdmi_quant_range to switch hdmi quantization range.

Change-Id: I084cd2e1ccb46ed9757fe39802b90eedfbe466b4
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2019-08-09 14:31:33 +08:00
Algea Cao
415f90e967 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>
2019-08-09 14:28:56 +08:00
Liang Chen
97225bafb3 arm64: dts: rockchip: rk3328: limit max-frequency of emmc to 150M
Change-Id: I68d3937180243a1c3e71aac8e82c452c7ec55bf8
Signed-off-by: Liang Chen <cl@rock-chips.com>
2019-08-08 18:55:21 +08:00
Liang Chen
bacee35694 nvmem: rockchip-efuse: clear efuse timing after read
Clear efuse timing after read to avoid efuse misoperation.

Change-Id: I459d01af9c9a84ab6c621e5e5cf3f01213b4f7f9
Signed-off-by: Liang Chen <cl@rock-chips.com>
2019-08-08 18:54:54 +08:00
xuhuicong
10c8ed8db0 drm/bridge: dw-hdmi: fix display shaking when uboot to kernel show
Change-Id: I899bb0dde7111fe97dd2c89d20afb09562d31300
Signed-off-by: xuhuicong <xhc@rock-chips.com>
2019-08-08 18:47:38 +08:00
Zheng Yang
8b8f1e2092 drm: dw-hdmi: fix RK3328/RK3229 phy abnormal enabling
Under the following conditions, phy will be abnormally enabled.

1. HDMI is enabled in uboot.

2. disabled/bridge_is_on/phy.enabled/mc_clkdis were updated to
   work when probe.

3. HDMI is disconnected.

4. drm_helper_probe_single_connector_modes update connector->status
   to disconnected and power off phy by dw_hdmi_update_power. But the
   polled type of HDMI is DRM_CONNECTOR_POLL_HPD, output_poll_execute
   will not process this disconnection, and dw_hdmi_bridge_disable is
   not called, hdmi->disabled is still false.

5. vop will be switch to Tv encoder, and dclk is 27MHz.

6. HDMI is connected.

7. dw_hdmi_update_power is called in dw_hdmi_irq, for hdmi->disabled
   is false, then phy is powered up with parameter of 27MHz, and
   bridge_is_on is set to on.

8. VOP switch to HDMI mode, set the new dclk rate.

9. dw_hdmi_bridge_enable is called, but the bridge_is_on is already on,
   phy will not set again, still maintain the parameters that do not
   conform to the new dclk rate.

This patch introduced an variable initialized to indicate hdmi is
initialized before probe, e.g. uboot. When power off hdmi, initialized
and disabled is updated.

Change-Id: I163967ac02e7f29ab586acbfd25d5a15679470c8
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2019-08-08 18:47:20 +08:00
Zheng Yang
42537c5ca8 drm/bridge: synopsys: dw-hdmi: disable phy in dw_hdmi_bind
If hdmi is enabled in uboot and pluged out when booting kernel,
the hdmi phy is still enabled. It's better to disable it to
match the real status.

Change-Id: Ia1c5ede6499ee277d08c35a85c50e3257305f90f
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2019-08-08 18:47:07 +08:00