disp: msm: dp: enhance dpcd debugfs to parse extended capability information

Add support to pass extended capability information to the DPCD
debugfs node. This will help to validate features like VSC support
using debugfs node.

Usage will be the same as before and the change will automatically
detect the presence of extended capability field and expect
additional bytes of information.

Change-Id: If541fd8837aac4794c3db0fa3badeab4143ff9c3
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
This commit is contained in:
Abhinav Kumar
2019-06-19 19:46:48 -07:00
parent aacd9e9585
commit 1286b854ae
3 changed files with 30 additions and 7 deletions

View File

@@ -1763,8 +1763,13 @@ static int dp_panel_read_dpcd(struct dp_panel *dp_panel, bool multi_func)
DPRX_FEATURE_ENUMERATION_LIST, &rx_feature, 1);
if (rlen != 1) {
DP_DEBUG("failed to read DPRX_FEATURE_ENUMERATION_LIST\n");
goto skip_dpcd_read;
rx_feature = 0;
}
skip_dpcd_read:
if (panel->custom_dpcd)
rx_feature = dp_panel->dpcd[DP_RECEIVER_CAP_SIZE + 1];
panel->vsc_supported = !!(rx_feature &
VSC_SDP_EXTENSION_FOR_COLORIMETRY_SUPPORTED);
panel->vscext_supported = !!(rx_feature & VSC_EXT_VESA_SDP_SUPPORTED);
@@ -1775,7 +1780,6 @@ static int dp_panel_read_dpcd(struct dp_panel *dp_panel, bool multi_func)
panel->vsc_supported, panel->vscext_supported,
panel->vscext_chaining_supported);
skip_dpcd_read:
link_info->revision = dpcd[DP_DPCD_REV];
panel->major = (link_info->revision >> 4) & 0x0f;
panel->minor = link_info->revision & 0x0f;
@@ -1876,7 +1880,8 @@ static int dp_panel_set_dpcd(struct dp_panel *dp_panel, u8 *dpcd)
panel = container_of(dp_panel, struct dp_panel_private, dp_panel);
if (dpcd) {
memcpy(dp_dpcd, dpcd, DP_RECEIVER_CAP_SIZE + 1);
memcpy(dp_dpcd, dpcd, DP_RECEIVER_CAP_SIZE +
DP_RECEIVER_EXT_CAP_SIZE + 1);
panel->custom_dpcd = true;
} else {
panel->custom_dpcd = false;