aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/EDID
diff options
context:
space:
mode:
authorChristoph Niedermaier <cniedermaier@dh-electronics.de>2018-11-05 03:48:35 -0500
committerJonathan Corbet <corbet@lwn.net>2018-11-06 09:36:22 -0500
commit8bed5a5cfc3317217f4b4ddad8044cbdd13d5a20 (patch)
tree17192f617896cd0afc7bbd22e84d01eaaa2f01b2 /Documentation/EDID
parentd2f112a5681078aa2150f218074f76617fea4d74 (diff)
Docs/EDID: Calculate CRC while building the code
The previous version made it necessary to first generate an EDID data set without correct CRC and then to fix the CRC in a second step. This patch adds the CRC calculation to the makefile in such a way that a correct EDID data set is generated in a single build step. Successfully tested with all existing and a couple of new data sets. Signed-off-by: Christoph Niedermaier <cniedermaier@dh-electronics.de> Reviewed-by: Carsten Emde <C.Emde@osadl.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'Documentation/EDID')
-rw-r--r--Documentation/EDID/1024x768.S1
-rw-r--r--Documentation/EDID/1280x1024.S1
-rw-r--r--Documentation/EDID/1600x1200.S1
-rw-r--r--Documentation/EDID/1680x1050.S1
-rw-r--r--Documentation/EDID/1920x1080.S1
-rw-r--r--Documentation/EDID/800x600.S1
-rw-r--r--Documentation/EDID/HOWTO.txt9
-rw-r--r--Documentation/EDID/Makefile15
8 files changed, 13 insertions, 17 deletions
diff --git a/Documentation/EDID/1024x768.S b/Documentation/EDID/1024x768.S
index ff4013e5fa49..4aed3f9ab88a 100644
--- a/Documentation/EDID/1024x768.S
+++ b/Documentation/EDID/1024x768.S
@@ -39,6 +39,5 @@
39#define ESTABLISHED_TIMING2_BITS 0x08 /* Bit 3 -> 1024x768 @60 Hz */ 39#define ESTABLISHED_TIMING2_BITS 0x08 /* Bit 3 -> 1024x768 @60 Hz */
40#define HSYNC_POL 0 40#define HSYNC_POL 0
41#define VSYNC_POL 0 41#define VSYNC_POL 0
42#define CRC 0x55
43 42
44#include "edid.S" 43#include "edid.S"
diff --git a/Documentation/EDID/1280x1024.S b/Documentation/EDID/1280x1024.S
index ce0e85be379e..b26dd424cad7 100644
--- a/Documentation/EDID/1280x1024.S
+++ b/Documentation/EDID/1280x1024.S
@@ -39,6 +39,5 @@
39/* No ESTABLISHED_TIMINGx_BITS */ 39/* No ESTABLISHED_TIMINGx_BITS */
40#define HSYNC_POL 1 40#define HSYNC_POL 1
41#define VSYNC_POL 1 41#define VSYNC_POL 1
42#define CRC 0xa0
43 42
44#include "edid.S" 43#include "edid.S"
diff --git a/Documentation/EDID/1600x1200.S b/Documentation/EDID/1600x1200.S
index 5eeb751ebe1b..0d091b282768 100644
--- a/Documentation/EDID/1600x1200.S
+++ b/Documentation/EDID/1600x1200.S
@@ -39,6 +39,5 @@
39/* No ESTABLISHED_TIMINGx_BITS */ 39/* No ESTABLISHED_TIMINGx_BITS */
40#define HSYNC_POL 1 40#define HSYNC_POL 1
41#define VSYNC_POL 1 41#define VSYNC_POL 1
42#define CRC 0x9d
43 42
44#include "edid.S" 43#include "edid.S"
diff --git a/Documentation/EDID/1680x1050.S b/Documentation/EDID/1680x1050.S
index ec679507e33b..7dfed9a33eab 100644
--- a/Documentation/EDID/1680x1050.S
+++ b/Documentation/EDID/1680x1050.S
@@ -39,6 +39,5 @@
39/* No ESTABLISHED_TIMINGx_BITS */ 39/* No ESTABLISHED_TIMINGx_BITS */
40#define HSYNC_POL 1 40#define HSYNC_POL 1
41#define VSYNC_POL 1 41#define VSYNC_POL 1
42#define CRC 0x26
43 42
44#include "edid.S" 43#include "edid.S"
diff --git a/Documentation/EDID/1920x1080.S b/Documentation/EDID/1920x1080.S
index e0657af801dd..d6ffbba28e95 100644
--- a/Documentation/EDID/1920x1080.S
+++ b/Documentation/EDID/1920x1080.S
@@ -39,6 +39,5 @@
39/* No ESTABLISHED_TIMINGx_BITS */ 39/* No ESTABLISHED_TIMINGx_BITS */
40#define HSYNC_POL 1 40#define HSYNC_POL 1
41#define VSYNC_POL 1 41#define VSYNC_POL 1
42#define CRC 0x05
43 42
44#include "edid.S" 43#include "edid.S"
diff --git a/Documentation/EDID/800x600.S b/Documentation/EDID/800x600.S
index b6853b2db869..a5616588de08 100644
--- a/Documentation/EDID/800x600.S
+++ b/Documentation/EDID/800x600.S
@@ -36,6 +36,5 @@
36#define ESTABLISHED_TIMING1_BITS 0x01 /* Bit 0: 800x600 @ 60Hz */ 36#define ESTABLISHED_TIMING1_BITS 0x01 /* Bit 0: 800x600 @ 60Hz */
37#define HSYNC_POL 1 37#define HSYNC_POL 1
38#define VSYNC_POL 1 38#define VSYNC_POL 1
39#define CRC 0xc2
40 39
41#include "edid.S" 40#include "edid.S"
diff --git a/Documentation/EDID/HOWTO.txt b/Documentation/EDID/HOWTO.txt
index 7d05a7d30a79..539871c3b785 100644
--- a/Documentation/EDID/HOWTO.txt
+++ b/Documentation/EDID/HOWTO.txt
@@ -47,12 +47,3 @@ EDID:
47#define YBLANK vtotal-vdisp 47#define YBLANK vtotal-vdisp
48#define YOFFSET vsyncstart-vdisp 48#define YOFFSET vsyncstart-vdisp
49#define YPULSE vsyncend-vsyncstart 49#define YPULSE vsyncend-vsyncstart
50
51The CRC value in the last line
52 #define CRC 0x55
53also is a bit tricky. After a first version of the binary data set is
54created, it must be checked with the "edid-decode" utility which will
55most probably complain about a wrong CRC. Fortunately, the utility also
56displays the correct CRC which must then be inserted into the source
57file. After the make procedure is repeated, the EDID data set is ready
58to be used.
diff --git a/Documentation/EDID/Makefile b/Documentation/EDID/Makefile
index 17763ca3f12b..85a927dfab02 100644
--- a/Documentation/EDID/Makefile
+++ b/Documentation/EDID/Makefile
@@ -15,10 +15,21 @@ clean:
15%.o: %.S 15%.o: %.S
16 @cc -c $^ 16 @cc -c $^
17 17
18%.bin: %.o 18%.bin.nocrc: %.o
19 @objcopy -Obinary $^ $@ 19 @objcopy -Obinary $^ $@
20 20
21%.bin.ihex: %.o 21%.crc: %.bin.nocrc
22 @list=$$(for i in `seq 1 127`; do head -c$$i $^ | tail -c1 \
23 | hexdump -v -e '/1 "%02X+"'; done); \
24 echo "ibase=16;100-($${list%?})%100" | bc >$@
25
26%.p: %.crc %.S
27 @cc -c -DCRC="$$(cat $*.crc)" -o $@ $*.S
28
29%.bin: %.p
30 @objcopy -Obinary $^ $@
31
32%.bin.ihex: %.p
22 @objcopy -Oihex $^ $@ 33 @objcopy -Oihex $^ $@
23 @dos2unix $@ 2>/dev/null 34 @dos2unix $@ 2>/dev/null
24 35