disp: msm: dp: add support to dump dpcd from debugfs node
Current debugfs dpcd node only dumps last written dpcd string in dpsim mode. This change adds support to dump dpcd information in real monitor use case. Change-Id: I8a716f30df72feadf9012c65f5a56fe7194d91d2 Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
Этот коммит содержится в:
@@ -313,16 +313,24 @@ static ssize_t dp_debug_read_dpcd(struct file *file,
|
||||
if (!dpcd)
|
||||
goto bail;
|
||||
|
||||
dp_sim_read_dpcd_reg(debug->sim_bridge, dpcd,
|
||||
debug->dpcd_size, debug->dpcd_offset);
|
||||
|
||||
len += snprintf(buf, buf_size, "0x%x", debug->dpcd_offset);
|
||||
|
||||
while (offset < debug->dpcd_size) {
|
||||
len += snprintf(buf + len, buf_size - len, "0x%x",
|
||||
dpcd[debug->dpcd_offset + offset++]);
|
||||
/*
|
||||
* In simulation mode, this function returns the last written DPCD node.
|
||||
* For a real monitor plug in, it always dumps the first 16 DPCD registers.
|
||||
*/
|
||||
if (debug->dp_debug.sim_mode) {
|
||||
dp_sim_read_dpcd_reg(debug->sim_bridge, dpcd, debug->dpcd_size, debug->dpcd_offset);
|
||||
} else {
|
||||
debug->dpcd_size = sizeof(debug->panel->dpcd);
|
||||
debug->dpcd_offset = 0;
|
||||
memcpy(dpcd, debug->panel->dpcd, debug->dpcd_size);
|
||||
}
|
||||
|
||||
len += scnprintf(buf, buf_size, "%04x: ", debug->dpcd_offset);
|
||||
|
||||
while (offset < debug->dpcd_size)
|
||||
len += scnprintf(buf + len, buf_size - len, "%02x ",
|
||||
dpcd[debug->dpcd_offset + offset++]);
|
||||
|
||||
kfree(dpcd);
|
||||
|
||||
len = min_t(size_t, count, len);
|
||||
|
Ссылка в новой задаче
Block a user