Commit Graph

17 Commits

Author SHA1 Message Date
Algea Cao 00997ff116 edid: Move functions of sorting modes to edid.c
Not only does dw-hdmi use these functions, but others
need to use them, such as inno-hdmi.

Change-Id: I1ced6e30b7634511fecbbfb39c24ede78894dd1d
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2020-07-06 19:40:40 +08:00
Algea Cao d34efd258b edid: Complete hdmi infoframe
Complete hdmi infoframe interfaces.

Change-Id: I4a5408c83d08fb13dc1123a87d9037d4d9dc96da
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2020-07-06 19:40:40 +08:00
Algea Cao b5016cf2d5 drm/rockchip: dw-hdmi: Support hdmi quantization range setting
Adding hdmi quantization range switching function. The current
version use default quant range, subsequent version will keep consistent
with the kernel Setting.

Change-Id: Ibb93f7c08d72322caa15f12b1d6e1f901371b27b
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2019-07-18 14:59:49 +08:00
Alexey Brodkin 28386b6dc6 UPSTREAM: lib: Add hexdump
Often during debugging session it's very interesting to see
what data we were dealing with. For example what we write or read
to/from memory or peripherals.

This change introduces functions that allow to dump binary
data with one simple function invocation like:
------------------->8----------------
print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, buf, len);
------------------->8----------------

which gives us the following:
------------------->8----------------
00000000: f2 b7 c9 88 62 61 75 64 72 61 74 65 3d 31 31 35  ....baudrate=115
00000010: 32 30 30 00 62 6f 6f 74 61 72 67 73 3d 63 6f 6e  200.bootargs=con
00000020: 73 6f 6c 65 3d 74 74 79 53 33 2c 31 31 35 32 30  sole=ttyS3,11520
00000030: 30 6e 38 00 62 6f 6f 74 64 65 6c 61 79 3d 33 00  0n8.bootdelay=3.
00000040: 62 6f 6f 74 66 69 6c 65 3d 75 49 6d 61 67 65 00  bootfile=uImage.
00000050: 66 64 74 63 6f 6e 74 72 6f 6c 61 64 64 72 3d 39  fdtcontroladdr=9
00000060: 66 66 62 31 62 61 30 00 6c 6f 61 64 61 64 64 72  ffb1ba0.loadaddr
00000070: 3d 30 78 38 32 30 30 30 30 30 30 00 73 74 64 65  =0x82000000.stde
00000080: 72 72 3d 73 65 72 69 61 6c 30 40 65 30 30 32 32  rr=serial0@e0022
00000090: 30 30 30 00 73 74 64 69 6e 3d 73 65 72 69 61 6c  000.stdin=serial
000000a0: 30 40 65 30 30 32 32 30 30 30 00 73 74 64 6f 75  0@e0022000.stdou
000000b0: 74 3d 73 65 72 69 61 6c 30 40 65 30 30 32 32 30  t=serial0@e00220
000000c0: 30 30 00 00 00 00 00 00 00 00 00 00 00 00 00 00  00..............
...
------------------->8----------------

Source of hexdump.c was copied from Linux kernel v4.7-rc2.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Mario Six <mario.six@gdsys.cc>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
Cc: Stefan Roese <sr@denx.de>

Change-Id: I038b41f51d45d1b853da499578bf8ef384a63730
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit f8c987f8f127f867d96ca74bcd1fcb11d8265b67)
2019-07-05 19:33:39 +08:00
Algea Cao 8e2bab3fc5 drm: Transplant dw-hdmi code from rkdevelop
1.Updating edid parse method.
2.New hdmi i2c control method.
3.Adding mode filter.
4.Adding color select method.
5.Support hdmi 2.0.
6.Adding baseparameter reading.
7.Support HDCP 1.4.

Tested in rk3399/rk3229/rk3128h/rk3328.

Change-Id: I2b3b1fb0079e97ba4b737781356e920548d6ad75
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2018-08-15 10:10:19 +08:00
Kever Yang 7f732f5f7a rockchip: remove no use BITS_PER_LONG
Change-Id: I838bdab8fba05d784dce06cde11e492e225b23d7
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-01-17 15:49:28 +08:00
Algea Cao f337c9f715 common: edid: Fix some warning
Change-Id: I65483b598fa89bd871913f58ad00935f6dadaa95
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2017-11-20 19:17:14 +08:00
Algea Cao 21016d27c5 common: edid: Add more detailed edid parsing
The original edid parsing methods are too simple. The
new parsing methods are carried from kernel.

Change-Id: I28b9b14e1bc76c38366f41d23f0e01ac779780d0
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2017-11-20 11:54:16 +08:00
Mark Yao b9e63a962a edid: support decode edid to drm modes
Change-Id: I38f82586d81177a4e6f5c20815af5480b40d2ff8
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-10-11 15:55:17 +08:00
Simon Glass 66a1b30d14 edid: Use sizeof() in cea_is_hdmi_vsdb_present()
We should not use an open-coded value here. Use sizeof() instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Coverity (CID: 163252)
Fixes: 43c6bdd0 (edid: Add HDMI flag to timing info)
2017-06-12 08:38:06 -04:00
Jernej Skrabec bdc906dba9 edid: Fix gcc 7.1 warning
This commit fixes the warning produced by gcc 7.1.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-06-09 15:29:59 +02:00
Jernej Skrabec 43c6bdd020 edid: Add HDMI flag to timing info
Some DVI monitors don't show anything in HDMI mode since audio stream
confuses them. To solve this situation, this commit adds HDMI flag in
timing data and sets it accordingly during edid parsing.

First existence of extension block is checked. If it exists and it is
CEA861 extension, then data blocks are checked for presence of HDMI
vendor specific data block. If it is present, HDMI flag is set.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-15 20:32:12 +02:00
Jernej Skrabec dc8cae4df3 edid: Set timings flags according to edid
Timing flags are never set, so they may contain garbage. Since some
drivers check them, video output may be broken on those drivers.

Initialize them to 0 and check for few common flags.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-15 20:28:12 +02:00
Simon Glass 00cf1167bb edid: Add a function to read detailed monitor timings
For digital displays (such as EDP LCDs) we would like to read the EDID
information and use that to set display timings. Provide a function to do
this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2015-05-13 09:24:10 -07:00
Hans de Goede e745d064b4 edid: Add an edid_check_checksum() helper function
Add a helper function to check the checksum of an EDID data block.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Anatolij Gustschin <agust@denx.de>
2015-01-14 14:56:38 +01:00
Wolfgang Denk 1a4596601f Add GPL-2.0+ SPDX-License-Identifier to source files
Signed-off-by: Wolfgang Denk <wd@denx.de>
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini <trini@ti.com>
2013-07-24 09:44:38 -04:00
Tom Wai-Hong Tam d46b5f7dcb edid: Library of EDID decode and print
This implements a library for accessing EDID data from an LCD panel.
This is used to obtain information about the panel such as its
resolution and type.

This is a tidied-up version of the original code pulled from
https://github.com/ynezz/u-boot-edid.

The changes we made are:
 - removed bit fields in the struct;
 - removed endianness cases in the struct;
 - fixed some wrong definitions;
 - fixed to fit 80 columns;
 - fixed some code styles.

Signed-off-by: Tom Wai-Hong Tam <waihong@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
2012-12-11 13:17:34 -07:00