diff options
author | Eric Yang <Eric.Yang2@amd.com> | 2018-02-06 17:28:46 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-02-19 14:20:15 -0500 |
commit | fdf0c1c2f75ea3380e13a5f26a0155775d5162f0 (patch) | |
tree | 304ad6a318c09359cdeac5436683605689ec43a1 | |
parent | 3b94a4007dcfd4ac5780cd3d8a2d99979c966073 (diff) |
drm/amd/display: Add logging for aux DPCD access
Add basic logging for DPCD access. Does not print
by default.
Currently only prints first byte of the data accessed.
Technical debt: Need to make it so that the entire
data block accessed is printed. Also need to log
address space that's not DPCD.
Signed-off-by: Eric Yang <Eric.Yang2@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/i2caux/aux_engine.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/i2caux/aux_engine.c b/drivers/gpu/drm/amd/display/dc/i2caux/aux_engine.c index fc7a7d4ebca5..0b1db48fef36 100644 --- a/drivers/gpu/drm/amd/display/dc/i2caux/aux_engine.c +++ b/drivers/gpu/drm/amd/display/dc/i2caux/aux_engine.c | |||
@@ -284,6 +284,14 @@ static bool read_command( | |||
284 | msleep(engine->delay); | 284 | msleep(engine->delay); |
285 | } while (ctx.operation_succeeded && !ctx.transaction_complete); | 285 | } while (ctx.operation_succeeded && !ctx.transaction_complete); |
286 | 286 | ||
287 | if (request->payload.address_space == | ||
288 | I2CAUX_TRANSACTION_ADDRESS_SPACE_DPCD) { | ||
289 | dm_logger_write(engine->base.ctx->logger, LOG_I2C_AUX, "READ: addr:0x%x value:0x%x Result:%d", | ||
290 | request->payload.address, | ||
291 | request->payload.data[0], | ||
292 | ctx.operation_succeeded); | ||
293 | } | ||
294 | |||
287 | return ctx.operation_succeeded; | 295 | return ctx.operation_succeeded; |
288 | } | 296 | } |
289 | 297 | ||
@@ -484,6 +492,14 @@ static bool write_command( | |||
484 | msleep(engine->delay); | 492 | msleep(engine->delay); |
485 | } while (ctx.operation_succeeded && !ctx.transaction_complete); | 493 | } while (ctx.operation_succeeded && !ctx.transaction_complete); |
486 | 494 | ||
495 | if (request->payload.address_space == | ||
496 | I2CAUX_TRANSACTION_ADDRESS_SPACE_DPCD) { | ||
497 | dm_logger_write(engine->base.ctx->logger, LOG_I2C_AUX, "WRITE: addr:0x%x value:0x%x Result:%d", | ||
498 | request->payload.address, | ||
499 | request->payload.data[0], | ||
500 | ctx.operation_succeeded); | ||
501 | } | ||
502 | |||
487 | return ctx.operation_succeeded; | 503 | return ctx.operation_succeeded; |
488 | } | 504 | } |
489 | 505 | ||