mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-18 06:33:43 -04:00
drm/amd/display: Detect panel type from VSDB
[Why] The AMD VSDB contains two bits that indicate the type of panel connected. This can be useful for policy decisions based upon panel technology. [How] Read the bits for the panel type when parsing VSDB and store them in the dc_link. Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org> Signed-off-by: Matthew Stewart <matthew.stewart2@amd.com> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
8cee62904c
commit
0a62732e53
@@ -13146,9 +13146,24 @@ static int parse_amd_vsdb(struct amdgpu_dm_connector *aconnector,
|
||||
|
||||
if (ieeeId == HDMI_AMD_VENDOR_SPECIFIC_DATA_BLOCK_IEEE_REGISTRATION_ID &&
|
||||
amd_vsdb->version == HDMI_AMD_VENDOR_SPECIFIC_DATA_BLOCK_VERSION_3) {
|
||||
u8 panel_type;
|
||||
vsdb_info->replay_mode = (amd_vsdb->feature_caps & AMD_VSDB_VERSION_3_FEATURECAP_REPLAYMODE) ? true : false;
|
||||
vsdb_info->amd_vsdb_version = HDMI_AMD_VENDOR_SPECIFIC_DATA_BLOCK_VERSION_3;
|
||||
drm_dbg_kms(aconnector->base.dev, "Panel supports Replay Mode: %d\n", vsdb_info->replay_mode);
|
||||
panel_type = (amd_vsdb->color_space_eotf_support & AMD_VDSB_VERSION_3_PANEL_TYPE_MASK) >> AMD_VDSB_VERSION_3_PANEL_TYPE_SHIFT;
|
||||
switch (panel_type) {
|
||||
case AMD_VSDB_PANEL_TYPE_OLED:
|
||||
aconnector->dc_link->panel_type = PANEL_TYPE_OLED;
|
||||
break;
|
||||
case AMD_VSDB_PANEL_TYPE_MINILED:
|
||||
aconnector->dc_link->panel_type = PANEL_TYPE_MINILED;
|
||||
break;
|
||||
default:
|
||||
aconnector->dc_link->panel_type = PANEL_TYPE_NONE;
|
||||
break;
|
||||
}
|
||||
drm_dbg_kms(aconnector->base.dev, "Panel type: %d\n",
|
||||
aconnector->dc_link->panel_type);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user