summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
diff options
context:
space:
mode:
authorJaehyun Chung <jaehyun.chung@amd.com>2022-09-08 19:11:31 -0400
committerAlex Deucher <alexander.deucher@amd.com>2022-09-19 15:15:37 -0400
commitdeed8ec482a6e7e84dd5bcaac5f77c75bd8093b3 (patch)
treee9a5da930e25de8d3892db72251226a2a789f246 /drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
parentca86bbdd9b47464d78ae6af565a6e78c6e4e2fbd (diff)
drm/amd/display: Assume connectors are on single slot
[Why] v1_5 display object table has no way for connectors to indicate which slot they are a part of, resulting in additional empty slots to appear in EDID management UI. [How] Assume that all connectors belong to the same slot. Reviewed-by: Jun Lei <Jun.Lei@amd.com> Acked-by: Wayne Lin <wayne.lin@amd.com> Signed-off-by: Jaehyun Chung <jaehyun.chung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c')
-rw-r--r--drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
index acbdb7926375..5d70f9901d13 100644
--- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
+++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
@@ -3346,6 +3346,7 @@ static enum bp_result bios_get_board_layout_info(
struct bios_parser *bp;
static enum bp_result record_result;
+ unsigned int max_slots;
const unsigned int slot_index_to_vbios_id[MAX_BOARD_SLOTS] = {
GENERICOBJECT_BRACKET_LAYOUT_ENUM_ID1,
@@ -3362,8 +3363,14 @@ static enum bp_result bios_get_board_layout_info(
}
board_layout_info->num_of_slots = 0;
+ max_slots = MAX_BOARD_SLOTS;
- for (i = 0; i < MAX_BOARD_SLOTS; ++i) {
+ // Assume single slot on v1_5
+ if (bp->object_info_tbl.revision.minor == 5) {
+ max_slots = 1;
+ }
+
+ for (i = 0; i < max_slots; ++i) {
record_result = get_bracket_layout_record(dcb,
slot_index_to_vbios_id[i],
&board_layout_info->slots[i]);