Commit 4e3133c7 authored by Ding Wang's avatar Ding Wang Committed by Alex Deucher

drm/amd/display: obtain usHBR3En bit from BP 1

ASICs using bios parser 1 don't check HBR3 capability as there is no such
a bit usHBR3En in ATOM_ENCODER_CAP_RECORDER.
Therefore, will use ATOM_ENCODER_CAP_RECORDER_V2 and thus obtain the usHBR3En
bit.
Signed-off-by: default avatarDing Wang <ding.wang@amd.com>
Acked-by: default avatarHarry Wentland <Harry.Wentland@amd.com>
Reviewed-by: default avatarTony Cheng <Tony.Cheng@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 7b779c99
...@@ -88,7 +88,7 @@ static ATOM_HPD_INT_RECORD *get_hpd_record(struct bios_parser *bp, ...@@ -88,7 +88,7 @@ static ATOM_HPD_INT_RECORD *get_hpd_record(struct bios_parser *bp,
static struct device_id device_type_from_device_id(uint16_t device_id); static struct device_id device_type_from_device_id(uint16_t device_id);
static uint32_t signal_to_ss_id(enum as_signal_type signal); static uint32_t signal_to_ss_id(enum as_signal_type signal);
static uint32_t get_support_mask_for_device_id(struct device_id device_id); static uint32_t get_support_mask_for_device_id(struct device_id device_id);
static ATOM_ENCODER_CAP_RECORD *get_encoder_cap_record( static ATOM_ENCODER_CAP_RECORD_V2 *get_encoder_cap_record(
struct bios_parser *bp, struct bios_parser *bp,
ATOM_OBJECT *object); ATOM_OBJECT *object);
...@@ -1837,7 +1837,7 @@ static enum bp_result bios_parser_get_encoder_cap_info( ...@@ -1837,7 +1837,7 @@ static enum bp_result bios_parser_get_encoder_cap_info(
{ {
struct bios_parser *bp = BP_FROM_DCB(dcb); struct bios_parser *bp = BP_FROM_DCB(dcb);
ATOM_OBJECT *object; ATOM_OBJECT *object;
ATOM_ENCODER_CAP_RECORD *record = NULL; ATOM_ENCODER_CAP_RECORD_V2 *record = NULL;
if (!info) if (!info)
return BP_RESULT_BADINPUT; return BP_RESULT_BADINPUT;
...@@ -1851,8 +1851,8 @@ static enum bp_result bios_parser_get_encoder_cap_info( ...@@ -1851,8 +1851,8 @@ static enum bp_result bios_parser_get_encoder_cap_info(
if (!record) if (!record)
return BP_RESULT_NORECORD; return BP_RESULT_NORECORD;
info->DP_HBR2_CAP = record->usHBR2Cap;
info->DP_HBR2_EN = record->usHBR2En; info->DP_HBR2_EN = record->usHBR2En;
info->DP_HBR3_EN = record->usHBR3En;
return BP_RESULT_OK; return BP_RESULT_OK;
} }
...@@ -1867,9 +1867,9 @@ static enum bp_result bios_parser_get_encoder_cap_info( ...@@ -1867,9 +1867,9 @@ static enum bp_result bios_parser_get_encoder_cap_info(
* @return atom encoder cap record * @return atom encoder cap record
* *
* @note * @note
* search all records to find the ATOM_ENCODER_CAP_RECORD record * search all records to find the ATOM_ENCODER_CAP_RECORD_V2 record
*/ */
static ATOM_ENCODER_CAP_RECORD *get_encoder_cap_record( static ATOM_ENCODER_CAP_RECORD_V2 *get_encoder_cap_record(
struct bios_parser *bp, struct bios_parser *bp,
ATOM_OBJECT *object) ATOM_OBJECT *object)
{ {
...@@ -1899,8 +1899,8 @@ static ATOM_ENCODER_CAP_RECORD *get_encoder_cap_record( ...@@ -1899,8 +1899,8 @@ static ATOM_ENCODER_CAP_RECORD *get_encoder_cap_record(
if (ATOM_ENCODER_CAP_RECORD_TYPE != header->ucRecordType) if (ATOM_ENCODER_CAP_RECORD_TYPE != header->ucRecordType)
continue; continue;
if (sizeof(ATOM_ENCODER_CAP_RECORD) <= header->ucRecordSize) if (sizeof(ATOM_ENCODER_CAP_RECORD_V2) <= header->ucRecordSize)
return (ATOM_ENCODER_CAP_RECORD *)header; return (ATOM_ENCODER_CAP_RECORD_V2 *)header;
} }
return NULL; return NULL;
......
...@@ -993,7 +993,7 @@ bool dce110_link_encoder_construct( ...@@ -993,7 +993,7 @@ bool dce110_link_encoder_construct(
enc110->base.ctx->dc_bios, enc110->base.id, enc110->base.ctx->dc_bios, enc110->base.id,
&bp_cap_info)) { &bp_cap_info)) {
enc110->base.features.flags.bits.IS_HBR2_CAPABLE = enc110->base.features.flags.bits.IS_HBR2_CAPABLE =
bp_cap_info.DP_HBR2_CAP; bp_cap_info.DP_HBR2_EN;
enc110->base.features.flags.bits.IS_HBR3_CAPABLE = enc110->base.features.flags.bits.IS_HBR3_CAPABLE =
bp_cap_info.DP_HBR3_EN; bp_cap_info.DP_HBR3_EN;
} }
......
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