Rev 1403 | Rev 1428 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1403 | Rev 1404 | ||
---|---|---|---|
Line 330... | Line 330... | ||
330 | struct drm_device *dev = chan->dev; |
330 | struct drm_device *dev = chan->dev; |
331 | struct radeon_device *rdev = dev->dev_private; |
331 | struct radeon_device *rdev = dev->dev_private; |
332 | PROCESS_AUX_CHANNEL_TRANSACTION_PS_ALLOCATION args; |
332 | PROCESS_AUX_CHANNEL_TRANSACTION_PS_ALLOCATION args; |
333 | int index = GetIndexIntoMasterTable(COMMAND, ProcessAuxChannelTransaction); |
333 | int index = GetIndexIntoMasterTable(COMMAND, ProcessAuxChannelTransaction); |
334 | unsigned char *base; |
334 | unsigned char *base; |
- | 335 | int retry_count = 0; |
|
Line 335... | Line 336... | ||
335 | 336 | ||
Line 336... | Line 337... | ||
336 | memset(&args, 0, sizeof(args)); |
337 | memset(&args, 0, sizeof(args)); |
Line -... | Line 338... | ||
- | 338 | ||
337 | 339 | base = (unsigned char *)rdev->mode_info.atom_context->scratch; |
|
Line 338... | Line 340... | ||
338 | base = (unsigned char *)rdev->mode_info.atom_context->scratch; |
340 | |
339 | 341 | retry: |
|
340 | memcpy(base, req_bytes, num_bytes); |
342 | memcpy(base, req_bytes, num_bytes); |
341 | 343 | ||
342 | args.lpAuxRequest = 0; |
344 | args.lpAuxRequest = 0; |
Line 343... | Line 345... | ||
343 | args.lpDataOut = 16; |
345 | args.lpDataOut = 16; |
Line 344... | Line 346... | ||
344 | args.ucDataOutLen = 0; |
346 | args.ucDataOutLen = 0; |
- | 347 | args.ucChannelID = chan->rec.i2c_id; |
|
- | 348 | args.ucDelay = delay / 10; |
|
345 | args.ucChannelID = chan->rec.i2c_id; |
349 | |
346 | args.ucDelay = delay / 10; |
350 | atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args); |
347 | 351 | ||
348 | atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args); |
352 | if (args.ucReplyStatus && !args.ucDataOutLen) { |
349 | 353 | if (args.ucReplyStatus == 0x20 && retry_count < 10) |
|
Line 350... | Line 354... | ||
350 | if (args.ucReplyStatus) { |
354 | goto retry; |
351 | DRM_DEBUG("failed to get auxch %02x%02x %02x %02x 0x%02x %02x\n", |
355 | DRM_DEBUG("failed to get auxch %02x%02x %02x %02x 0x%02x %02x after %d retries\n", |