Commit c276f81b authored by Chiawen Huang's avatar Chiawen Huang Committed by Alex Deucher

drm/amd/display: add aux i2c event log.

[Why]
support i2c transition event log

[How]
refined aux REQ and REP events in aux flow.
commented REQ and REP events in i2c flow.

note: i2c event log is currently commented out. more work is required
to find an portocol parser to and generate event for the parser
Signed-off-by: default avatarChiawen Huang <chiawen.huang@amd.com>
Reviewed-by: default avatarTony Cheng <Tony.Cheng@amd.com>
Acked-by: default avatarLeo Li <sunpeng.li@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent b07971d4
...@@ -31,7 +31,8 @@ ...@@ -31,7 +31,8 @@
#define __DM_EVENT_LOG_H__ #define __DM_EVENT_LOG_H__
#define EVENT_LOG_AUX_REQ(dcc, type, action, address, len, data) #define EVENT_LOG_AUX_REQ(ddc, type, action, address, len, data)
#define EVENT_LOG_AUX_Reply(dcc, type, swStatus, replyStatus, len, data) #define EVENT_LOG_AUX_REP(ddc, type, replyStatus, len, data)
#endif #endif
...@@ -274,8 +274,8 @@ static void submit_channel_request( ...@@ -274,8 +274,8 @@ static void submit_channel_request(
REG_WAIT(AUX_SW_STATUS, AUX_SW_DONE, 0, REG_WAIT(AUX_SW_STATUS, AUX_SW_DONE, 0,
10, aux110->timeout_period/10); 10, aux110->timeout_period/10);
REG_UPDATE(AUX_SW_CONTROL, AUX_SW_GO, 1); REG_UPDATE(AUX_SW_CONTROL, AUX_SW_GO, 1);
EVENT_LOG_AUX_REQ(engine->base.ddc->pin_data->en, Native, request->action, EVENT_LOG_AUX_REQ(engine->base.ddc->pin_data->en, EVENT_LOG_AUX_ORIGIN_NATIVE,
request->address, request->length, request->data); request->action, request->address, request->length, request->data);
} }
static int read_channel_reply(struct aux_engine *engine, uint32_t size, static int read_channel_reply(struct aux_engine *engine, uint32_t size,
...@@ -340,8 +340,9 @@ static void process_channel_reply( ...@@ -340,8 +340,9 @@ static void process_channel_reply(
bytes_replied = read_channel_reply(engine, reply->length, reply->data, 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, EVENT_LOG_AUX_REP(engine->base.ddc->pin_data->en,
sw_status, reply_result, bytes_replied, reply->data); EVENT_LOG_AUX_ORIGIN_NATIVE, reply_result,
bytes_replied, reply->data);
/* in case HPD is LOW, exit AUX transaction */ /* in case HPD is LOW, exit AUX transaction */
if ((sw_status & AUX_SW_STATUS__AUX_SW_HPD_DISCON_MASK)) { if ((sw_status & AUX_SW_STATUS__AUX_SW_HPD_DISCON_MASK)) {
......
...@@ -121,6 +121,8 @@ bool dal_i2c_hw_engine_submit_request( ...@@ -121,6 +121,8 @@ bool dal_i2c_hw_engine_submit_request(
hw_engine->base.funcs->submit_channel_request( hw_engine->base.funcs->submit_channel_request(
&hw_engine->base, &request); &hw_engine->base, &request);
/* EVENT_LOG_AUX_REQ(engine->ddc->pin_data->en, EVENT_LOG_AUX_ORIGIN_I2C, */
/* request.action, request.address, request.length, request.data); */
if ((request.status == I2C_CHANNEL_OPERATION_FAILED) || if ((request.status == I2C_CHANNEL_OPERATION_FAILED) ||
(request.status == I2C_CHANNEL_OPERATION_ENGINE_BUSY)) { (request.status == I2C_CHANNEL_OPERATION_ENGINE_BUSY)) {
...@@ -169,6 +171,8 @@ bool dal_i2c_hw_engine_submit_request( ...@@ -169,6 +171,8 @@ bool dal_i2c_hw_engine_submit_request(
hw_engine->base.funcs-> hw_engine->base.funcs->
process_channel_reply(&hw_engine->base, &reply); process_channel_reply(&hw_engine->base, &reply);
/* EVENT_LOG_AUX_REP(engine->ddc->pin_data->en, EVENT_LOG_AUX_ORIGIN_I2C, */
/* AUX_TRANSACTION_REPLY_I2C_ACK, reply.length, reply.data); */
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment