Commit Graph

1059397 Commits

Author SHA1 Message Date
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
Shunqing Chen
ee1900dfde drm: bridge: dw-hdmi: Fix the issue of EXTCON_DISP_HDMI state error
First, echo off > sys/class/drm/card0-HDMI-A-1/status, the EXTCON_DISP_HDMI state is 0.
Then, echo detect > sys/class/drm/card0-HDMI-A-1/status, the EXTCON_DISP_HDMI state still is 0.
As a result, HDMI has no sound.

Signed-off-by: Shunqing Chen <csq@rock-chips.com>
Change-Id: I6d7904cb75fec21899389dbaba8acbd266dac7cd
2021-08-17 17:54:10 +08:00
Shunqing Chen
52a3be11d0 drm/bridge: synopsys: dw-hdmi: enable clock termination
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
Change-Id: I4927349acfdd94e0dd7b332bbad73defb9ca4f67
2021-08-17 17:54:09 +08:00
Simon Xue
1661c31d26 iommu: dma-iommu: remove unused file
dma-iommu-ops.c is a temporary patch from FROMLIST, now
it is not used anymore, so remove it.

Change-Id: I07dab330311a90a9683f48b645ccfcb6b03322d4
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2021-08-17 09:54:18 +08:00
Jon Lin
143993e798 soc: rockchip: mtd_vendor_storage: Register vendor_storage later
Since storage drivers register in module_init, So the vendor_storage
should be initiated after it.

Change-Id: Icefce56c54713dd56ef992ec527e65fce4f0c977
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-08-13 21:25:56 +08:00
Jon Lin
ff973dbb0e soc: rockchip: mtd_vendor_storage: Change vendor storage item size realloc strategy
Item size is calculated according to the actual space used

Change-Id: I7133368130689f792f05e82fea04ebf16a755a37
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-08-13 21:23:38 +08:00
Jon Lin
0cabb7688e drivers: rkflash: Add some delay after DMA finish
When internal DMA ready, the last spare data may still in fifo.

Change-Id: I1cf670d2008ea62b67b517641e31386fd0877417
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-08-13 14:07:50 +08:00
Shawn Lin
c005a5bfe6 PCI: rockchip: dw: Request perst IO as output-low state
Requesting perst# as high and then drive it low makes some
buggy devices fail to work properly, for instance Biwin SSD.
It's not mandatory to have a high-low transition for perst#
before powering up. So we request it as output-low state directly
and remove redundant code.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: Ib62954f8dccc8a21dd06e7a582263bcf62995f29
2021-08-13 11:36:33 +08:00
Algea Cao
18545b79ed drm: rockchip: dw-hdmi: Fix switch from 4K-60/50Hz to lower resolution failed
The resolution below 4K-60/50Hz don't support YUV420. If switch from
4K-60/50Hz in YUV420 to lower resolution may cause display err.
So if resolution below 4K-60/50Hz, color format should be
RGB/YUV444/YUV422.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: Ib96303f3bef1a1b269a9ac8845951b6a895ec5b8
2021-08-12 18:25:04 +08:00
Sandy Huang
689b1973fb drm/bridge: synopsys: dw-hdmi: destroy connector and encoder
connector and encoder should be removed when bind failed, otherwise will
lead to system panic when enable SLUB and SLUB_DEBUG:

[    1.071801] rockchip-drm display-subsystem: failed to bind ff960000.dsi (ops dw_mipi_dsi_ops): -517
[    1.073943] Unable to handle kernel paging request at virtual address 006b6b6b6b6b6b73
……
[    1.442300] pc : drm_mode_config_cleanup+0x4c/0x2f8
[    1.447179] lr : rockchip_drm_bind+0x610/0x1c38

after enable KASAN, we can see the UAF error:

[    3.862556] BUG: KASAN: use-after-free in rockchip_drm_bind+0x474/0x2b58
[    3.862611] Read of size 4 at addr ffffffc00a21f55c by task swapper/0/1
[    3.862691] CPU: 4 PID: 1 Comm: swapper/0 Not tainted 4.19.101 #1820
[    3.862737] Hardware name: Rockchip rk3368 808 evb board (DT)
[    3.862782] Call trace:
[    3.862853]  dump_backtrace+0x0/0x240
[    3.862905]  show_stack+0x14/0x20
[    3.863146]  kasan_report+0xc/0x18
[    3.863265]  rockchip_drm_bind+0x474/0x2b58
……
[    3.864314] Allocated by task 1:
[    3.864376]  __kasan_kmalloc.isra.0+0x100/0x1b8
[    3.864435]  kasan_slab_alloc+0x14/0x20
[    3.864493]  __kmalloc_track_caller+0x154/0x368
[    3.864550]  devm_kmalloc+0x30/0xb0
[    3.864611]  dw_hdmi_rockchip_bind+0xcc/0xa28
[    3.864668]  component_bind_all+0x1d8/0x450
[    3.864728]  rockchip_drm_bind+0x450/0x2b58
……
[    3.865787] Freed by task 1:
[    3.865851]  __kasan_slab_free+0x118/0x220
[    3.865897]  kasan_slab_free+0x10/0x18
[    3.865952]  kfree+0x7c/0x308
[    3.866012]  release_nodes+0x248/0x4a0
[    3.866070]  devres_release_group+0xd4/0x148
[    3.866127]  component_unbind.isra.7+0x98/0xc8
[    3.866183]  component_bind_all+0x3b0/0x450
[    3.866247]  rockchip_drm_bind+0x450/0x2b58

Change-Id: I6378bf34d8b953fb770badfafdd3fe44628505f7
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2021-08-12 18:25:04 +08:00
Jianqun Xu
d4258036e8 drm/rockchip: dw_hdmi fix crash caused by null pointer
Change-Id: I7d5ada5f09d2081440d0098782df6200a83ca2b1
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-08-12 18:25:04 +08:00
Nickey Yang
8e6b3fd314 drm/bridge: synopsys: dw-hdmi: set scrambler bypassed when hdmi1.4
Set resolution to 4K when connect an HDMI2.0 monitor
will enable scrambler feature.
At this time, change to connect an hdmi1.4 monitor will
cause black screen because we do not set scrambler feature bypassed.
So fix this.

Change-Id: Ic14b683719c8234c316dc1cacaa62c72a38e0294
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
2021-08-12 18:25:04 +08:00
xuhuicong
0910a82e12 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>
2021-08-12 18:25:04 +08:00
Algea Cao
e7b983189b drm/bridge: synopsys: Delete set device name
There is not need to set dev name without address.

Fixes: 76f27bdd76 ("drm: bridge: dw-hdmi: using extcon instead of switch")
Change-Id: I2c23e29ad8f7b4a0b05b2237ae319e14c69a1cb1
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2021-08-12 18:25:04 +08:00
Zheng Yang
4370e835be drm/bridge: synopsys: dw-hdmi: fix kernel logo flash when output YCbCr422 mode
On rockchip platform, hdmi input format is YCbCr444 when output mode
is YCbCr422. Then the value of HDMI_TX_INVID0 on YCbCr422 is same as
the value of YCbCr444, both is 0x09/0x0b. This make enc_out_bus_format
stroed in struct hdmi_data is wrong, which is MEDIA_BUS_FMT_YUV8_1X24
or MEDIA_BUS_FMT_YUV10_1X30.

When android set enc_out_bus_format to YCbCr422, dw_hdmi_setup will be
called and logo will flash.

This patch use colorspace restored in HDMI_FC_AVICONF0 to distinguish them.

Change-Id: I6b913951b58fb47628617c11d6059bc1be4e370a
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2021-08-12 18:25:04 +08:00
Zheng Yang
b0dc8a579f drm: bridge: dw-hdmi: fix VP_PR_CD pixel repetition factor configuration
The configured value sets H13T PHY PLL to multiply pixel clock by the
factor in order to obtain the desired repetition clock. For the CEA
modes some are already defined with pixel repetition in the input video.
So for CEA modes this shall be always 0.

Change-Id: Iea4a00247f25c134dbd67ba77c00eb4393622385
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2021-08-12 18:25:04 +08:00
Huicong Xu
be496ad4e1 drm: bridge: dw-hdmi: add debugfs_remove_recursive when unbind
On RK3328, dw-hdmi driver is reloaded after bind and unbind
then it will use the first register debugfs address if no run
debugfs_remove_recursive, and cause system crash.

Change-Id: Iafa6b4059962b62c79157a9cf6c3e1d56df48f03
Signed-off-by: Huicong Xu <xhc@rock-chips.com>
2021-08-12 18:24:50 +08:00
Algea Cao
6e144e13c0 drm: bridge: dw-hdmi: fixup kernel crash when reboot with hdmi connected
when other devices bind failed,drm will unbind and re-bind all devices.
if don't cancel the delayed work but flush and destroy workqueue directly,
kernel point is likely to become NULL.

Change-Id: Ib48704186ee298cbd4daac1cdbbac5fb3906b6bb
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2021-08-12 18:24:30 +08:00
Zheng Yang
3627c826d7 drm: rockchip: dw-hdmi: fix 10bit not work when booting up with uboot logo
Default value of hdmi->colordepth is defined by input color mode,
so there is no need to set value again when color depth property
is created.

Change-Id: I2e242fabdaadc0c3b41e48f806cbded5f619c455
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2021-08-12 10:48:27 +08:00
Algea Cao
40d2bd7d50 drm: bridge: synopsys: dw-hdmi: Fix kernel logo flash
Filling in the missing parts from:
'commit d7f22ab4c1 ("drm: bridge: dw-hdmi: fix wrong color if get
edid error at bootup")'

Change-Id: I92b690dcc332e9f9e50ef7d457734952a9f1ef2a
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2021-08-12 10:47:02 +08:00
Zheng Yang
09eb6ec86c drm: rockchip: dw-hdmi: fix colorimetry bt2020 value
To differentiate extend colorimetry and normal colorimetry, we
add the offset HDMI_COLORIMETRY_EXTENDED in colorimetry property.
It should use same value in dw_hdmi_rockchip_select_output.

Change-Id: I13e10b6e8211e7a2634dbd4b6c5310bc129bfa8d
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2021-08-12 10:41:03 +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
Algea Cao
c1f9ea51ed drm/rockchip: dw-hdmi: Set 4K x 2k 60Hz/50Hz color to YUV420 if tmdsclk over the limit
When 4K x 2k 60Hz/50Hz tmds clock is above the max tmds clock, setting its
color to YUV420. A few TV edid declare that they can't support
4K x 2k 60Hz/50Hz YUV420, we still set color to YUV420 or 4K x 2k 60Hz/50Hz
tmds clock will over the limit.

Change-Id: Id57c9313ab52973927c578d0eb2a7b1b30cb9ec1
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2021-08-11 18:30:51 +08:00
Algea Cao
131b1dd6a1 drm/rockchip: dw_hdmi-rockchip: get phy config from dts
Change-Id: I6903f3b9498be32f9d4936beb2d6d2aa5db43d09
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2021-08-11 18:30:51 +08:00
Huicong Xu
1632b640a8 drm: bridge: dw-hdmi: set hdcp1x_enable in the dts so uboot can visit
Change-Id: Ibaf91c5beac2355e5c270f1edb69a63795dbff6a
Signed-off-by: Huicong Xu <xhc@rock-chips.com>
2021-08-11 18:30:30 +08:00
Huicong Xu
6aa721d00e drm: bridge: dw-hdmi: add hdcp1.4 support
First, write hdcp key by "ProvisioningTool" if you want to
enable hdcp function, or else will auth fail.

To check whether the hdcp is enable or not
  #cat /sys/class/misc/hdmi_hdcp1x/enable
  0:hdcp is disabled
  1:hdcp is enabled, hdmi screen will be pink if it is failed;
  2:hdcp is enabled, hdmi screen will be normal if it is failed;

Enable or disable hdcp function
  #echo 0 > /sys/class/misc/hdmi_hdcp1x/enable
  #echo 1 > /sys/class/misc/hdmi_hdcp1x/enable
  #echo 2 > /sys/class/misc/hdmi_hdcp1x/enable

Get the status of hdcp
  #cat /sys/class/misc/hdmi_hdcp1x/status
  The result will be one of the follow list:
    hdcp disable;
    hdcp_auth_start
    hdcp_auth_success;
    hdcp_auth_fail;
    unknown status.

Change-Id: Iac6c7d6a1196ce9cf2869d7916bbe6c8941ec13b
Signed-off-by: Huicong Xu <xhc@rock-chips.com>
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2021-08-11 18:28:37 +08:00
Algea Cao
40052a9330 drm: bridge: dw-hdmi: Check whether hdmi is initialized when hdmi suspend or resume
Hdmi suspend or resume may be called before hdmi initialization. We must
verify that hdmi is initialized first.

Change-Id: I2a680209e64b9c1aebc2d9ee19d543927137afd0
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2021-08-11 18:24:07 +08:00
Algea Cao
e9d76faff7 drm/bridge: synopsys: dw-hdmi: Fix crush when system suspend
If HDMI HPD detect delayed work won't be cancel, system will
crush because clk and PD has been disabled. So HDMI HPD detect
workqueue should be flushed when system suspend.

Change-Id: Idb8018c2efcffc3aee5fd80872f1270360809235
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2021-08-11 18:24:07 +08:00
Algea Cao
edf6f3ed59 drm: bridge: dw-hdmi: enable 3d mode
Change-Id: I45c4b0ded4aeaf24122d5cc6eb49b6bc72afc060
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2021-08-11 18:24:07 +08:00
Algea Cao
cf754a978d drm/bridge: synopsys: dw-hdmi: Clear color depth mask and format if get edid failed
If edid can't be got when hdmi plug in, hdmi color depth mask and format
won't be updated. The color list in the setting are those of the previous
TV. This commit fix the error.

Change-Id: I5ed4be5efa2a69be0b58489f58a3af5de9912292
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2021-08-11 18:24:07 +08:00
Yakir Yang
4240b810a9 CHROMIUM: drm: bridge/dw_hdmi: fix i2cm standard mode setting error
I have uploaded a patch to switch DDC to standard mode in
(https://chromium-review.googlesource.com/298270), but that change
have influence the "spare register" in I2CM_DIV, I know this haven't
cause some know bug, but we need to fix it.

BUG=chrome-os-partner:34741
TEST=None

Change-Id: Iff678fb49828db9b8026422e302a03f687a7c862
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/302751
Commit-Ready: Douglas Anderson <dianders@chromium.org>
Tested-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
2021-08-11 18:24:07 +08:00
Zheng Yang
eebdd21044 drm: bridge: dw-hdmi: fix GCP default phase in deep color mode
According to HDMI 1.4b specification: If the transmitted video
format has timing such that the phase of the first pixel of
every Video Data Period corresponds to pixel packing phase 0
(e.g. 10P0, 12P0, 16P0), the Source may set the Default_Phase
bit in the GCP. The Sink may use this bit to optimize its filtering
or handling of the PP field.

This means that for 10-bit mode the Htotal must be dividable by 4;
for 12-bit mode, the Htotal must be divisible by 2.

Change-Id: I02e632d095141cbabcba06dc1321ae0dc69dc736
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2021-08-11 18:24:07 +08:00
Yakir Yang
66512f6dc7 CHROMIUM: drm: bridge/dw_hdmi: assign CD field to zero
When the color depth is 24 bits per pixel video, the CD
field in General Control Packet should be "Color Depth
not indicated", then the colordepth in register vp_pr_cd
& csc_scale should assign to zero.

BUG=chrome-os-partner:38212
TEST=speedy board, Test with Agilent Technologies U4002A
     HDMI Protocal Analyzer

Change-Id: Ifd5767d339fdbff11e234ec0891c8f3df1dd66a5
Reviewed-on: https://chromium-review.googlesource.com/261850
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Yakir Yang <ykk@rock-chips.com>
Commit-Queue: Yakir Yang <ykk@rock-chips.com>
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2021-08-11 18:24:07 +08:00
Algea Cao
2f7bde9c4c drm/bridge: synopsys: dw-hdmi: Select formula1 for csc decimation
Formula3 and Formula2 for csc decimation will cause hdmi yuv422
display err.

Formula3:
The pixel color of left 0-14 columns and right 0-12 columns is
err.

Formula2:
The pixel color of left 0-2 columns is err.

Change-Id: I94fdd5fd962a24fde02dde1fe3ac10437ad117ad
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2021-08-11 18:24:07 +08:00
Zheng Yang
ae989813d6 drm/bridge: synopsys: dw-hdmi: update rxsense status in repo_hpd_event
Under following processes, rxsense will be not match the real
signal status.
1. HDMI plug in, irq is triggered.

2. HDMI irq is mute in dw_hdmi_hardirq, bring up dw_hdmi_irq.

3. For HDMI connection is not stable, phy_stat read in
   dw_hdmi_irq may be zero, then hdmi->rxsense will be false.

4. Connection fallback to stable, but dw_hdmi_irq had not
   unmute the irq, irq is not triggered again, and hdmi->rxsense
   keep false.

5. repo_hpd_event inform HDMI is pluggned in, dw_hdmi_bridge_enable
   is called to enable HDMI. For rxsense is flase, bridge is not
   powered up.

When repo_hpd_event is called, we think HDMI connection is stable,
updating rxsense is reliable.

Change-Id: Ie1f52f65b15e9a603dad9200529202053528a390
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2021-08-11 18:24:07 +08:00
Zheng Yang
b4c413f25c drm: bridge: dw-hdmi: add hdmi status debugfs node
Introduce status node in debugfs to show HDMI output status,
such as phy status, color and eotf.

Here is a sample log:

PHY enabled                     Mode: HDMI
Pixel Clk: 594000000Hz          TMDS Clk: 594000000Hz
Color Format: YUV422            Color Depth: 10 bit
Colorimetry: ITU.BT2020         EOTF: ST2084
x0: 0                           y0: 0
x1: 0                           y1: 0
x2: 0                           y2: 0
white x: 0                      white y: 0
max lum: 0                      min lum: 0
max cll: 0                      max fall: 0

Change-Id: I5d458b633dd3bd9aab67cc91f1695621937e58f5
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2021-08-11 18:24:06 +08:00
Tao Huang
be59f3fa15 dt-bindings: sound: rockchip: Remove unused rockchip-audio.txt
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I66906fd849b5bcb58cab24640ad7c59f22551b0b
2021-08-11 18:23:41 +08:00
Tao Huang
40162557b4 input: touchscreen: vtl_ts: remove unused fw dat files
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I8f8ea8d4797dede8f3eb61f4a16bacffb23c3257
2021-08-11 17:55:44 +08:00
Tao Huang
7bb4143b2a Revert "NFC: Add to support ap6441 & ap6493 nfc function."
This reverts commit 384134cb60.

bcm2079x is unused.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ibbc1b18fbadc1de9fa66915348b3382533ad1621
2021-08-11 16:32:39 +08:00
Tao Huang
873b9928a5 Revert "new add bmp logo for factorytool"
This reverts commit 170a300423.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I2a9701d3d175ee3e74e57df2395c792227e33c4b
2021-08-11 16:32:39 +08:00