diff --git a/src/atombios_output.c b/src/atombios_output.c index a028be0..fde69d4 100644 --- a/src/atombios_output.c +++ b/src/atombios_output.c @@ -2042,11 +2042,20 @@ retry: data.exec.pspace = &args; RHDAtomBiosFunc(info->atomBIOS->scrnIndex, info->atomBIOS, ATOMBIOS_EXEC, &data); + /* + * If ucDataOutLen is 0, the ucReplyStatus codes are as follows: + * 0 - success + * 1 - timeout + * 2 - status flags not zero + * 3 - fail (no ack) + */ + if (args.v1.ucReplyStatus && !args.v1.ucDataOutLen) { - if (args.v1.ucReplyStatus == 0x20 && retry_count++ < 10) - goto retry; - ErrorF("failed to get auxch %02x%02x %02x %02x %02x after %d retries\n", - req_bytes[1], req_bytes[0], req_bytes[2], req_bytes[3], args.v1.ucReplyStatus, retry_count); + if (args.v1.ucReplyStatus != 3 && retry_count++ < 10) + goto retry; + ErrorF("failed to get auxch %02x%02x %02x %02x 0x%02x %02x after %d retries\n", + req_bytes[1], req_bytes[0], req_bytes[2], req_bytes[3], radeon_output->ucI2cId, args.v1.ucReplyStatus, retry_count); return FALSE; } if (args.v1.ucDataOutLen && read_byte && read_buf_len) {