Re: [PATCH 31/34] drm/amd/display: Add logging for aux DPCD access

2018-02-13 Thread Harry Wentland
On 2018-02-12 04:31 PM, Andrey Grodzovsky wrote:
> With this logger you should probably remove the Linux specific logger in 
> amdgpu_dm_mst_types.c, check log_dpcd function.
> 

This currently only logs the first byte of the response. Once that's fixed 
you're right, we should rip out the one from amdgpu_dm_mst_types.c.

Harry

> Andrey
> 
> 
> On 02/12/2018 12:16 PM, Harry Wentland wrote:
>> From: Eric Yang 
>>
>> 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.
>>
>> Change-Id: I10ef7042c14d70508845ef827ebec2432d8d8176
>> Signed-off-by: Eric Yang 
>> Reviewed-by: Tony Cheng 
>> Acked-by: Harry Wentland 
>> ---
>>   drivers/gpu/drm/amd/display/dc/i2caux/aux_engine.c | 16 
>>   1 file changed, 16 insertions(+)
>>
>> 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;
>>   }
>>   
> 
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 31/34] drm/amd/display: Add logging for aux DPCD access

2018-02-12 Thread Andrey Grodzovsky
With this logger you should probably remove the Linux specific logger in 
amdgpu_dm_mst_types.c, check log_dpcd function.


Andrey


On 02/12/2018 12:16 PM, Harry Wentland wrote:

From: Eric Yang 

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.

Change-Id: I10ef7042c14d70508845ef827ebec2432d8d8176
Signed-off-by: Eric Yang 
Reviewed-by: Tony Cheng 
Acked-by: Harry Wentland 
---
  drivers/gpu/drm/amd/display/dc/i2caux/aux_engine.c | 16 
  1 file changed, 16 insertions(+)

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;
  }
  


___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH 31/34] drm/amd/display: Add logging for aux DPCD access

2018-02-12 Thread Harry Wentland
From: Eric Yang 

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.

Change-Id: I10ef7042c14d70508845ef827ebec2432d8d8176
Signed-off-by: Eric Yang 
Reviewed-by: Tony Cheng 
Acked-by: Harry Wentland 
---
 drivers/gpu/drm/amd/display/dc/i2caux/aux_engine.c | 16 
 1 file changed, 16 insertions(+)

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;
 }
 
-- 
2.14.1

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx