summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Cheng <tony.cheng@amd.com>2018-06-17 13:26:27 -0400
committerAlex Deucher <alexander.deucher@amd.com>2018-07-13 14:47:39 -0500
commit7a34057cb5ceb20756e30abc36c58c34be62eff9 (patch)
treecf6755be29b3f73f9dac951049a700918b855744
parent16aecfd4bf546907a6d7d06b4edfdbeea75b1839 (diff)
drm/amd/display: fix incorrect check for atom table size
in case we have very few pins in the table, check fails and we can't boot Signed-off-by: Tony Cheng <tony.cheng@amd.com> Reviewed-by: Yongqiang Sun <yongqiang.sun@amd.com> Acked-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c2
1 files changed, 1 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 aeb56e402ccc..eab007e1793c 100644
--- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
+++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
@@ -678,7 +678,7 @@ static enum bp_result bios_parser_get_gpio_pin_info(
return BP_RESULT_BADBIOSTABLE;
if (sizeof(struct atom_common_table_header) +
- sizeof(struct atom_gpio_pin_lut_v2_1)
+ sizeof(struct atom_gpio_pin_assignment)
> le16_to_cpu(header->table_header.structuresize))
return BP_RESULT_BADBIOSTABLE;