summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/display/dc/i2caux
diff options
context:
space:
mode:
authorEric Yang2018-02-06 23:28:46 +0100
committerAlex Deucher2018-02-19 20:20:15 +0100
commitfdf0c1c2f75ea3380e13a5f26a0155775d5162f0 (patch)
tree304ad6a318c09359cdeac5436683605689ec43a1 /drivers/gpu/drm/amd/display/dc/i2caux
parentdrm/amd/display: Set vsc pack revision when DPCD revision is >= 1.2 (diff)
downloadkernel-qcow2-linux-fdf0c1c2f75ea3380e13a5f26a0155775d5162f0.tar.gz
kernel-qcow2-linux-fdf0c1c2f75ea3380e13a5f26a0155775d5162f0.tar.xz
kernel-qcow2-linux-fdf0c1c2f75ea3380e13a5f26a0155775d5162f0.zip
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>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/i2caux')
-rw-r--r--drivers/gpu/drm/amd/display/dc/i2caux/aux_engine.c16
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(
msleep(engine->delay);
} while (ctx.operation_succeeded && !ctx.transaction_complete);
+ if (request->payload.address_space ==
+ I2CAUX_TRANSACTION_ADDRESS_SPACE_DPCD) {
+ dm_logger_write(engine->base.ctx->logger, LOG_I2C_AUX, "READ: addr:0x%x value:0x%x Result:%d",
+ request->payload.address,
+ request->payload.data[0],
+ ctx.operation_succeeded);
+ }
+
return ctx.operation_succeeded;
}
@@ -484,6 +492,14 @@ static bool write_command(
msleep(engine->delay);
} while (ctx.operation_succeeded && !ctx.transaction_complete);
+ if (request->payload.address_space ==
+ I2CAUX_TRANSACTION_ADDRESS_SPACE_DPCD) {
+ dm_logger_write(engine->base.ctx->logger, LOG_I2C_AUX, "WRITE: addr:0x%x value:0x%x Result:%d",
+ request->payload.address,
+ request->payload.data[0],
+ ctx.operation_succeeded);
+ }
+
return ctx.operation_succeeded;
}