mirror of
https://github.com/NVIDIA/open-gpu-kernel-modules.git
synced 2025-03-14 09:29:24 +01:00
Try fixing wrong strings in ELD
This commit is contained in:
parent
ed4be64962
commit
958e3c8801
@ -1027,31 +1027,11 @@ static NvBool FillELDBuffer(const NVDpyEvoRec *pDpyEvo,
|
||||
monitorNameLen = 0;
|
||||
|
||||
status = NvTiming_GetProductName(&pParsedEdid->info, name, sizeof(name));
|
||||
|
||||
if (status == NVT_STATUS_SUCCESS) {
|
||||
/*
|
||||
* NvTiming_GetProductName() returns a nul-terminated string, but the
|
||||
* string in the EDID is terminated with 0x0A and padded with 0x20.
|
||||
* Put back these special characters.
|
||||
*/
|
||||
NvBool pastTerminator = FALSE;
|
||||
NvU32 i;
|
||||
|
||||
for (i = 0; i < NVT_EDID_LDD_PAYLOAD_SIZE; i++) {
|
||||
if (pastTerminator) {
|
||||
name[i] = 0x20;
|
||||
}
|
||||
if (name[i] == '\0') {
|
||||
name[i] = 0x0A;
|
||||
pastTerminator = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
monitorNameLen = NVT_EDID_LDD_PAYLOAD_SIZE;
|
||||
pEld->buffer[4] |= NVT_EDID_LDD_PAYLOAD_SIZE;
|
||||
nvkms_memcpy(&pEld->buffer[20], name,
|
||||
NVT_EDID_LDD_PAYLOAD_SIZE);
|
||||
}
|
||||
/*
|
||||
* NvTiming_GetProductName() returns a nul-terminated string, but the
|
||||
* string in the EDID is terminated with 0x0A and padded with 0x20.
|
||||
* We do not keep the special characters.
|
||||
*/
|
||||
|
||||
/* offset 20 + MNL ~ 20 + MNL + (3 * SAD_Count) - 1 : CEA_SADs */
|
||||
if (SADCount) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user