summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/dc/i2caux
diff options
context:
space:
mode:
authorChiawen Huang <chiawen.huang@amd.com>2018-08-24 17:45:28 +0800
committerAlex Deucher <alexander.deucher@amd.com>2018-09-10 22:43:10 -0500
commit86a2da705cc29a3a006c6571cadfa45676150622 (patch)
tree075d8c83e93da7e9b697c8b11aa8910b605b5ba0 /drivers/gpu/drm/amd/display/dc/i2caux
parent491e08c9b858a328e0d7d09a557edd748f2d1b93 (diff)
drm/amd/display: add aux transition event log.
[Why] Enhance aux transition debugging information. [How] Added Aux request and reply event log. Signed-off-by: Chiawen Huang <chiawen.huang@amd.com> Reviewed-by: Tony Cheng <Tony.Cheng@amd.com> Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@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.c13
-rw-r--r--drivers/gpu/drm/amd/display/dc/i2caux/dce110/aux_engine_dce110.c7
-rw-r--r--drivers/gpu/drm/amd/display/dc/i2caux/i2c_hw_engine.c18
3 files changed, 37 insertions, 1 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 0afd2fa57bbe..03292c52b18d 100644
--- a/drivers/gpu/drm/amd/display/dc/i2caux/aux_engine.c
+++ b/drivers/gpu/drm/amd/display/dc/i2caux/aux_engine.c
@@ -24,6 +24,7 @@
*/
#include "dm_services.h"
+#include "dm_event_log.h"
/*
* Pre-requisites: headers required by header of this unit
@@ -296,6 +297,12 @@ static bool read_command(
if (request->payload.address_space ==
I2CAUX_TRANSACTION_ADDRESS_SPACE_DPCD) {
+ EVENT_LOG_I2CAUX_READ(request->payload.address_space,
+ engine->base.ddc->pin_data->en,
+ request->payload.address,
+ request->status,
+ request->payload.length,
+ request->payload.data);
DC_LOG_I2C_AUX("READ: addr:0x%x value:0x%x Result:%d",
request->payload.address,
request->payload.data[0],
@@ -512,6 +519,12 @@ static bool write_command(
if (request->payload.address_space ==
I2CAUX_TRANSACTION_ADDRESS_SPACE_DPCD) {
+ EVENT_LOG_I2CAUX_WRITE(request->payload.address_space,
+ engine->base.ddc->pin_data->en,
+ request->payload.address,
+ request->status,
+ request->payload.length,
+ request->payload.data);
DC_LOG_I2C_AUX("WRITE: addr:0x%x value:0x%x Result:%d",
request->payload.address,
request->payload.data[0],
diff --git a/drivers/gpu/drm/amd/display/dc/i2caux/dce110/aux_engine_dce110.c b/drivers/gpu/drm/amd/display/dc/i2caux/dce110/aux_engine_dce110.c
index ae5caa97caca..4a88fc76614e 100644
--- a/drivers/gpu/drm/amd/display/dc/i2caux/dce110/aux_engine_dce110.c
+++ b/drivers/gpu/drm/amd/display/dc/i2caux/dce110/aux_engine_dce110.c
@@ -24,6 +24,7 @@
*/
#include "dm_services.h"
+#include "dm_event_log.h"
/*
* Pre-requisites: headers required by header of this unit
@@ -273,6 +274,8 @@ static void submit_channel_request(
REG_WAIT(AUX_SW_STATUS, AUX_SW_DONE, 0,
10, aux110->timeout_period/10);
REG_UPDATE(AUX_SW_CONTROL, AUX_SW_GO, 1);
+ EVENT_LOG_AUX_REQ(engine->base.ddc->pin_data->en, Native, request->action,
+ request->address, request->length, request->data);
}
static int read_channel_reply(struct aux_engine *engine, uint32_t size,
@@ -336,7 +339,9 @@ static void process_channel_reply(
uint32_t sw_status;
bytes_replied = read_channel_reply(engine, reply->length, reply->data,
- &reply_result, &sw_status);
+ &reply_result, &sw_status);
+ EVENT_LOG_AUX_Reply(engine->base.ddc->pin_data->en, Native,
+ sw_status, reply_result, bytes_replied, reply->data);
/* in case HPD is LOW, exit AUX transaction */
if ((sw_status & AUX_SW_STATUS__AUX_SW_HPD_DISCON_MASK)) {
diff --git a/drivers/gpu/drm/amd/display/dc/i2caux/i2c_hw_engine.c b/drivers/gpu/drm/amd/display/dc/i2caux/i2c_hw_engine.c
index 4b54fcfb28ec..1747b9f5f10e 100644
--- a/drivers/gpu/drm/amd/display/dc/i2caux/i2c_hw_engine.c
+++ b/drivers/gpu/drm/amd/display/dc/i2caux/i2c_hw_engine.c
@@ -24,6 +24,7 @@
*/
#include "dm_services.h"
+#include "dm_event_log.h"
/*
* Pre-requisites: headers required by header of this unit
@@ -170,6 +171,23 @@ bool dal_i2c_hw_engine_submit_request(
process_channel_reply(&hw_engine->base, &reply);
}
+ if (i2caux_request->operation == I2CAUX_TRANSACTION_READ) {
+ EVENT_LOG_I2CAUX_READ(i2caux_request->payload.address_space,
+ engine->ddc->pin_data->en,
+ i2caux_request->payload.address,
+ i2caux_request->status,
+ i2caux_request->payload.length,
+ i2caux_request->payload.data);
+ } else if (i2caux_request->operation == I2CAUX_TRANSACTION_WRITE) {
+ EVENT_LOG_I2CAUX_WRITE(i2caux_request->payload.address_space,
+ engine->ddc->pin_data->en,
+ i2caux_request->payload.address,
+ i2caux_request->status,
+ i2caux_request->payload.length,
+ i2caux_request->payload.data);
+ }
+
+
return result;
}