diff options
Diffstat (limited to 'drivers/gpu/drm/radeon/atombios_dp.c')
-rw-r--r-- | drivers/gpu/drm/radeon/atombios_dp.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/atombios_dp.c b/drivers/gpu/drm/radeon/atombios_dp.c index 0b6f2cef1c52..8a133bda00a2 100644 --- a/drivers/gpu/drm/radeon/atombios_dp.c +++ b/drivers/gpu/drm/radeon/atombios_dp.c | |||
@@ -336,11 +336,13 @@ bool radeon_process_aux_ch(struct radeon_i2c_chan *chan, u8 *req_bytes, | |||
336 | union aux_channel_transaction args; | 336 | union aux_channel_transaction args; |
337 | int index = GetIndexIntoMasterTable(COMMAND, ProcessAuxChannelTransaction); | 337 | int index = GetIndexIntoMasterTable(COMMAND, ProcessAuxChannelTransaction); |
338 | unsigned char *base; | 338 | unsigned char *base; |
339 | int retry_count = 0; | ||
339 | 340 | ||
340 | memset(&args, 0, sizeof(args)); | 341 | memset(&args, 0, sizeof(args)); |
341 | 342 | ||
342 | base = (unsigned char *)rdev->mode_info.atom_context->scratch; | 343 | base = (unsigned char *)rdev->mode_info.atom_context->scratch; |
343 | 344 | ||
345 | retry: | ||
344 | memcpy(base, req_bytes, num_bytes); | 346 | memcpy(base, req_bytes, num_bytes); |
345 | 347 | ||
346 | args.v1.lpAuxRequest = 0; | 348 | args.v1.lpAuxRequest = 0; |
@@ -353,10 +355,12 @@ bool radeon_process_aux_ch(struct radeon_i2c_chan *chan, u8 *req_bytes, | |||
353 | 355 | ||
354 | atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args); | 356 | atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args); |
355 | 357 | ||
356 | if (args.v1.ucReplyStatus) { | 358 | if (args.v1.ucReplyStatus && !args.v1.ucDataOutLen) { |
357 | DRM_DEBUG("failed to get auxch %02x%02x %02x %02x 0x%02x %02x\n", | 359 | if (args.v1.ucReplyStatus == 0x20 && retry_count++ < 10) |
360 | goto retry; | ||
361 | DRM_DEBUG("failed to get auxch %02x%02x %02x %02x 0x%02x %02x after %d retries\n", | ||
358 | req_bytes[1], req_bytes[0], req_bytes[2], req_bytes[3], | 362 | req_bytes[1], req_bytes[0], req_bytes[2], req_bytes[3], |
359 | chan->rec.i2c_id, args.v1.ucReplyStatus); | 363 | chan->rec.i2c_id, args.v1.ucReplyStatus, retry_count); |
360 | return false; | 364 | return false; |
361 | } | 365 | } |
362 | 366 | ||