mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 00:22:00 +02:00
drm/amd/display: Check and log for function error codes
[WHAT & HOW] BIOS_CMD_TABLE_REVISION and link_transmitter_control can return error codes and errors should be reported. This fixes 3 CHECKED_RETURN issues reported by Coverity. Reviewed-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
e094992bd1
commit
a171cce577
|
|
@ -227,7 +227,8 @@ static void init_transmitter_control(struct bios_parser *bp)
|
|||
uint8_t frev;
|
||||
uint8_t crev = 0;
|
||||
|
||||
BIOS_CMD_TABLE_REVISION(dig1transmittercontrol, frev, crev);
|
||||
if (!BIOS_CMD_TABLE_REVISION(dig1transmittercontrol, frev, crev))
|
||||
BREAK_TO_DEBUGGER();
|
||||
|
||||
switch (crev) {
|
||||
case 6:
|
||||
|
|
|
|||
|
|
@ -1361,7 +1361,10 @@ void dce110_link_encoder_dp_set_lane_settings(
|
|||
cntl.lane_settings = training_lane_set.raw;
|
||||
|
||||
/* call VBIOS table to set voltage swing and pre-emphasis */
|
||||
link_transmitter_control(enc110, &cntl);
|
||||
if (link_transmitter_control(enc110, &cntl) != BP_RESULT_OK) {
|
||||
DC_LOG_ERROR("%s: Failed to execute VBIOS command table!\n", __func__);
|
||||
BREAK_TO_DEBUGGER();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1104,6 +1104,7 @@ void dcn10_link_encoder_dp_set_lane_settings(
|
|||
union dpcd_training_lane_set training_lane_set = { { 0 } };
|
||||
int32_t lane = 0;
|
||||
struct bp_transmitter_control cntl = { 0 };
|
||||
enum bp_result result;
|
||||
|
||||
if (!link_settings) {
|
||||
BREAK_TO_DEBUGGER();
|
||||
|
|
@ -1138,7 +1139,12 @@ void dcn10_link_encoder_dp_set_lane_settings(
|
|||
cntl.lane_settings = training_lane_set.raw;
|
||||
|
||||
/* call VBIOS table to set voltage swing and pre-emphasis */
|
||||
link_transmitter_control(enc10, &cntl);
|
||||
result = link_transmitter_control(enc10, &cntl);
|
||||
|
||||
if (result != BP_RESULT_OK) {
|
||||
DC_LOG_ERROR("%s: Failed to execute VBIOS command table!\n", __func__);
|
||||
BREAK_TO_DEBUGGER();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user