Редактирование EDID матриц

Скучная предыстория.
Недавно столкнулся с проблемой при замене матрицы на ноутбуке Samsung: с новой матрицей некорректно работала клавиатура. Оригинальная матрица: Samsung LTN173KT01, новая LG LP173WF1-TLA2 (FullHD).

Прочитал много тем на форумах по ремонту, просмотрел кучу решений и обсуждений, начиная с замены клавиатуры и заканчивая югом. Самым разумным мне показалась прошивка EDID из старой матрицы. В моём случае прошивка не помогла, полагаю, матрицы слишком разные. В нужную сторону меня подтолкнул пост с этого форума про определение EC Micom типа клавиатуры по информации о размере матрицы из EDID. Итак, ближе к делу!

Проблема: “Некорректно работает клавиатура при замене матрицы на ноутбуке Samsung с EC Micom”.
Суть: “Micom некорректно определяет размер и тип клавиатуры по данным EDID из матрицы”.
Решение: “Отредактировать EDID новой матрицы”.

Редактирование EDID матрицы.
Я не буду рассказывать как считать и записать EDID из матрицы, т.к. всё есть на форуме. Это обычная процедура прошивки SPI EEPROM типа 24cXX. Для удобства можно шить переходником из шлейфа матрицы.

“Структура EDID v1.3”

Bytes Description
0–19 Header information
0–7 Fixed header pattern: 00 FF FF FF FF FF FF 00
8–9 Manufacturer ID. These IDs are assigned by Microsoft, they are PNP IDs "00001=A”; “00010=B”; ... “11010=Z”. Bit 7 (at address 08h) is 0, the first character (letter) is located at bits 6 → 2 (at address 08h), the second character (letter) is located at bits 1 & 0 (at address 08h) and bits 7 → 5 (at address 09h), and the third character (letter) is located at bits 4 → 0 (at address 09h).
Bit 15 (Reserved, always 0)
Bits 14–10 First letter of manufacturer ID (byte 8, bits 6–2)
Bits 9–5 Second letter of manufacturer ID (byte 8, bit 1 through byte 9 bit 5)
Bits 4–0 Third letter of manufacturer ID (byte 9 bits 4–0)
10–11 Manufacturer product code. 16-bit number, little-endian.
12–15 Serial number. 32 bits, little endian.
16 Week of manufacture. Week numbering is not consistent between manufacturers.
17 Year of manufacture, less 1990. (1990–2245). If week=255, it is the model year instead.
18 EDID version, usually 1 (for 1.3)
19 EDID revision, usually 3 (for 1.3)
20–24 Basic display parameters.
20 Video input parameters bitmap
Bit 7=1 Digital input. If set, the following bit definitions apply:
Bits 6–1 Reserved, must be 0
Bit 0 Signal is compatible with VESA DFP 1.x TMDS CRGB, 1 pixel per clock, up to 8 bits per color, MSB aligned,
Bit 7=0 Analog input. If clear, the following bit definitions apply:
Bits 6–5 Video white and sync levels, relative to blank: 00=+0.7/−0.3 V; 01=+0.714/−0.286 V; 10=+1.0/−0.4 V; 11=+0.7/0 V
Bit 4 Blank-to-black setup (pedestal) expected
Bit 3 Separate sync supported
Bit 2 Composite sync (on HSync) supported
Bit 1 Sync on green supported
Bit 0 VSync pulse must be serrated when composite or sync-on-green is used.
21 Maximum horizontal image size, in centimetres (max 292 cm/115 in at 16:9 aspect ratio)
22 Maximum vertical image size, in centimetres. If either byte is 0, undefined (e.g. projector)
23 Display gamma, datavalue = (gamma*100)-100 (range 1.00–3.54)
24 Supported features bitmap
Bit 7 DPMS standby supported
Bit 6 DPMS suspend supported
Bit 5 DPMS active-off supported
Bits 4–3 Display type (digital): 00 = RGB 4:4:4; 01 = RGB 4:4:4 + YCrCb 4:4:4; 10 = RGB 4:4:4 + YCrCb 4:2:2; 11 = RGB 4:4:4 + YCrCb 4:4:4 + YCrCb 4:2:2
Bits 4-3 Display type (analog): 00 = Monochrome or Grayscale; 01 = RGB color; 10 = Non-RGB color; 11 = Undefined
Bit 2 Standard sRGB colour space. Bytes 25–34 must contain sRGB standard values.
Bit 1 Preferred timing mode specified in descriptor block 1. For EDID 1.3+ the preferred timing mode is always in the first Detailed Timing Descriptor. In that case, this bit specifies whether the preferred timing mode includes native pixel format and refresh rate.
Bit 0 GTF supported with default parameter values.
25–34 Chromaticity coordinates.
10-bit CIE xy coordinates for red, green, blue, and white. [0–1023/1024].
25 Red and green least-significant bits
Bits 7–6 Red x value least-significant 2 bits
Bits 5–4 Red y value least-significant 2 bits
Bits 3–2 Green x value least-significant 2 bits
Bits 1–0 Green y value least-significant 2 bits
26 Blue and white least-significant 2 bits
27 Red x value most significant 8 bits. 0–255 encodes 0–0.996 (255/256); 0–0.999 (1023/1024) with lsbits
28 Red y value most significant 8 bits
29–30 Green x and y value most significant 8 bits
31–32 Blue x and y value most significant 8 bits
33–34 Default white point x and y value most significant 8 bits
35–37 Established timing bitmap. Supported bitmap for (formerly) very common timing modes.
35 Bit 7 720×400 @ 70 Hz
Bit 6 720×400 @ 88 Hz
Bit 5 640×480 @ 60 Hz
Bit 4 640×480 @ 67 Hz
Bit 3 640×480 @ 72 Hz
Bit 2 640×480 @ 75 Hz
Bit 1 800×600 @ 56 Hz
Bit 0 800×600 @ 60 Hz
36 Bit 7 800×600 @ 72 Hz
Bit 6 800×600 @ 75 Hz
Bit 5 832×624 @ 75 Hz
Bit 4 1024×768 @ 87 Hz, interlaced (1024×768i)
Bit 3 1024×768 @ 60 Hz
Bit 2 1024×768 @ 72 Hz
Bit 1 1024×768 @ 75 Hz
Bit 0 1280×1024 @ 75 Hz
37 Bit 7 1152x870 @ 75 Hz (Apple Macintosh II)
Bits 6–0 Other manufacturer-specific display modes
38–53 Standard timing information. Up to 8 2-byte fields describing standard display modes.
Unused fields are filled with 01 01
Byte 0 X resolution, divided by 8, less 31 (256–2288 pixels, value 00 is reserved and should not be used)
Byte 1 bits 7–6 X:Y pixel ratio: 00=16:10; 01=4:3; 10=5:4; 11=16:9.
(Versions prior to 1.3 defined 00 as 1:1.)
Byte 1 bits 5–0 Vertical frequency, less 60 (60–123 Hz)
54–71 Descriptor 1 Descriptor blocks. Detailed timing descriptors, in decreasing preference order. After all detailed timing descriptors, additional descriptors are permitted:
Monitor range limits (required)
ASCII text (monitor name (required), monitor serial number or unstructured text)
6 Additional standard timing information blocks
Colour point data
72–89 Descriptor 2
90–107 Descriptor 3
108–125 Descriptor 4
126 Number of extensions to follow. 0 if no extensions.
127 Checksum. Sum of all 128 bytes should equal 0 (mod 256).

В данном случае нас интересуют биты отвечающие за размер изображения: “horizontal image size” (21 бит) и “vertical image size” (22 бит).

Дампы старой и новой матриц соответственно:

На скриншотах выделены 21 и 22 биты. Размер изображения в первом случае 38×21 см. во втором 38×22 см. Меняем 22 бит с 0x16 на 0x15.

Но у EDID есть контрольная сумма (127 бит), если просто поменять какое-нибудь значение, то матрица работать не будет.

Спецификация подсказывает нам как её посчитать. Сделать это можно в онлайн калькуляторе на сайте http://www.planetimming.com/checksum8.html. Чтобы скопировать дамп для вставки на сайт, открываем его, например, в winhex, выделяем всё кроме последнего байта, копируем “как hex” через меню.

Новая контрольная сумма 0xF5. Прошиваем новый дамп.

Готово! Надеюсь кому-нибудь пригодится 🙂

Источник: http://vlab.su


Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *