Commit be3cb588 authored by Harry Wentland's avatar Harry Wentland Committed by Alex Deucher

drm/amd/display: Error print when ATOM BIOS implementation is missing

We fail apply_ctx_to_hw when crtc_source_select is missing. This isn't
really helpful at this point. It would aid ASIC bringup if we log an error
when we can't find the implementation for the ATOM version.

Do the same for all other function points in the command table that do a
NULL check before being called.
Signed-off-by: default avatarHarry Wentland <harry.wentland@amd.com>
Reviewed-by: default avatarRoman Li <Roman.Li@amd.com>
Reviewed-by: default avatarJordan Lazare <Jordan.Lazare@amd.com>
Reviewed-by: default avatarTony Cheng <Tony.Cheng@amd.com>
Acked-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 4486c3fc
...@@ -387,6 +387,7 @@ static void init_transmitter_control(struct bios_parser *bp) ...@@ -387,6 +387,7 @@ static void init_transmitter_control(struct bios_parser *bp)
bp->cmd_tbl.transmitter_control = transmitter_control_v1_6; bp->cmd_tbl.transmitter_control = transmitter_control_v1_6;
break; break;
default: default:
dm_error("Don't have transmitter_control for v%d\n", crev);
bp->cmd_tbl.transmitter_control = NULL; bp->cmd_tbl.transmitter_control = NULL;
break; break;
} }
...@@ -910,6 +911,8 @@ static void init_set_pixel_clock(struct bios_parser *bp) ...@@ -910,6 +911,8 @@ static void init_set_pixel_clock(struct bios_parser *bp)
bp->cmd_tbl.set_pixel_clock = set_pixel_clock_v7; bp->cmd_tbl.set_pixel_clock = set_pixel_clock_v7;
break; break;
default: default:
dm_error("Don't have set_pixel_clock for v%d\n",
BIOS_CMD_TABLE_PARA_REVISION(SetPixelClock));
bp->cmd_tbl.set_pixel_clock = NULL; bp->cmd_tbl.set_pixel_clock = NULL;
break; break;
} }
...@@ -1227,6 +1230,8 @@ static void init_enable_spread_spectrum_on_ppll(struct bios_parser *bp) ...@@ -1227,6 +1230,8 @@ static void init_enable_spread_spectrum_on_ppll(struct bios_parser *bp)
enable_spread_spectrum_on_ppll_v3; enable_spread_spectrum_on_ppll_v3;
break; break;
default: default:
dm_error("Don't have enable_spread_spectrum_on_ppll for v%d\n",
BIOS_CMD_TABLE_PARA_REVISION(EnableSpreadSpectrumOnPPLL));
bp->cmd_tbl.enable_spread_spectrum_on_ppll = NULL; bp->cmd_tbl.enable_spread_spectrum_on_ppll = NULL;
break; break;
} }
...@@ -1422,6 +1427,8 @@ static void init_adjust_display_pll(struct bios_parser *bp) ...@@ -1422,6 +1427,8 @@ static void init_adjust_display_pll(struct bios_parser *bp)
bp->cmd_tbl.adjust_display_pll = adjust_display_pll_v3; bp->cmd_tbl.adjust_display_pll = adjust_display_pll_v3;
break; break;
default: default:
dm_error("Don't have adjust_display_pll for v%d\n",
BIOS_CMD_TABLE_PARA_REVISION(AdjustDisplayPll));
bp->cmd_tbl.adjust_display_pll = NULL; bp->cmd_tbl.adjust_display_pll = NULL;
break; break;
} }
...@@ -1695,6 +1702,8 @@ static void init_set_crtc_timing(struct bios_parser *bp) ...@@ -1695,6 +1702,8 @@ static void init_set_crtc_timing(struct bios_parser *bp)
set_crtc_using_dtd_timing_v3; set_crtc_using_dtd_timing_v3;
break; break;
default: default:
dm_error("Don't have set_crtc_timing for dtd v%d\n",
dtd_version);
bp->cmd_tbl.set_crtc_timing = NULL; bp->cmd_tbl.set_crtc_timing = NULL;
break; break;
} }
...@@ -1704,6 +1713,8 @@ static void init_set_crtc_timing(struct bios_parser *bp) ...@@ -1704,6 +1713,8 @@ static void init_set_crtc_timing(struct bios_parser *bp)
bp->cmd_tbl.set_crtc_timing = set_crtc_timing_v1; bp->cmd_tbl.set_crtc_timing = set_crtc_timing_v1;
break; break;
default: default:
dm_error("Don't have set_crtc_timing for v%d\n",
BIOS_CMD_TABLE_PARA_REVISION(SetCRTC_Timing));
bp->cmd_tbl.set_crtc_timing = NULL; bp->cmd_tbl.set_crtc_timing = NULL;
break; break;
} }
...@@ -1890,6 +1901,8 @@ static void init_select_crtc_source(struct bios_parser *bp) ...@@ -1890,6 +1901,8 @@ static void init_select_crtc_source(struct bios_parser *bp)
bp->cmd_tbl.select_crtc_source = select_crtc_source_v3; bp->cmd_tbl.select_crtc_source = select_crtc_source_v3;
break; break;
default: default:
dm_error("Don't select_crtc_source enable_crtc for v%d\n",
BIOS_CMD_TABLE_PARA_REVISION(SelectCRTC_Source));
bp->cmd_tbl.select_crtc_source = NULL; bp->cmd_tbl.select_crtc_source = NULL;
break; break;
} }
...@@ -1997,6 +2010,8 @@ static void init_enable_crtc(struct bios_parser *bp) ...@@ -1997,6 +2010,8 @@ static void init_enable_crtc(struct bios_parser *bp)
bp->cmd_tbl.enable_crtc = enable_crtc_v1; bp->cmd_tbl.enable_crtc = enable_crtc_v1;
break; break;
default: default:
dm_error("Don't have enable_crtc for v%d\n",
BIOS_CMD_TABLE_PARA_REVISION(EnableCRTC));
bp->cmd_tbl.enable_crtc = NULL; bp->cmd_tbl.enable_crtc = NULL;
break; break;
} }
...@@ -2103,6 +2118,8 @@ static void init_program_clock(struct bios_parser *bp) ...@@ -2103,6 +2118,8 @@ static void init_program_clock(struct bios_parser *bp)
bp->cmd_tbl.program_clock = program_clock_v6; bp->cmd_tbl.program_clock = program_clock_v6;
break; break;
default: default:
dm_error("Don't have program_clock for v%d\n",
BIOS_CMD_TABLE_PARA_REVISION(SetPixelClock));
bp->cmd_tbl.program_clock = NULL; bp->cmd_tbl.program_clock = NULL;
break; break;
} }
...@@ -2324,6 +2341,8 @@ static void init_enable_disp_power_gating( ...@@ -2324,6 +2341,8 @@ static void init_enable_disp_power_gating(
enable_disp_power_gating_v2_1; enable_disp_power_gating_v2_1;
break; break;
default: default:
dm_error("Don't enable_disp_power_gating enable_crtc for v%d\n",
BIOS_CMD_TABLE_PARA_REVISION(EnableDispPowerGating));
bp->cmd_tbl.enable_disp_power_gating = NULL; bp->cmd_tbl.enable_disp_power_gating = NULL;
break; break;
} }
...@@ -2371,6 +2390,8 @@ static void init_set_dce_clock(struct bios_parser *bp) ...@@ -2371,6 +2390,8 @@ static void init_set_dce_clock(struct bios_parser *bp)
bp->cmd_tbl.set_dce_clock = set_dce_clock_v2_1; bp->cmd_tbl.set_dce_clock = set_dce_clock_v2_1;
break; break;
default: default:
dm_error("Don't have set_dce_clock for v%d\n",
BIOS_CMD_TABLE_PARA_REVISION(SetDCEClock));
bp->cmd_tbl.set_dce_clock = NULL; bp->cmd_tbl.set_dce_clock = NULL;
break; break;
} }
......
...@@ -118,6 +118,7 @@ static void init_dig_encoder_control(struct bios_parser *bp) ...@@ -118,6 +118,7 @@ static void init_dig_encoder_control(struct bios_parser *bp)
bp->cmd_tbl.dig_encoder_control = encoder_control_digx_v1_5; bp->cmd_tbl.dig_encoder_control = encoder_control_digx_v1_5;
break; break;
default: default:
dm_error("Don't have dig_encoder_control for v%d\n", version);
bp->cmd_tbl.dig_encoder_control = NULL; bp->cmd_tbl.dig_encoder_control = NULL;
break; break;
} }
...@@ -205,6 +206,7 @@ static void init_transmitter_control(struct bios_parser *bp) ...@@ -205,6 +206,7 @@ static void init_transmitter_control(struct bios_parser *bp)
bp->cmd_tbl.transmitter_control = transmitter_control_v1_6; bp->cmd_tbl.transmitter_control = transmitter_control_v1_6;
break; break;
default: default:
dm_error("Don't have transmitter_control for v%d\n", crev);
bp->cmd_tbl.transmitter_control = NULL; bp->cmd_tbl.transmitter_control = NULL;
break; break;
} }
...@@ -268,6 +270,8 @@ static void init_set_pixel_clock(struct bios_parser *bp) ...@@ -268,6 +270,8 @@ static void init_set_pixel_clock(struct bios_parser *bp)
bp->cmd_tbl.set_pixel_clock = set_pixel_clock_v7; bp->cmd_tbl.set_pixel_clock = set_pixel_clock_v7;
break; break;
default: default:
dm_error("Don't have set_pixel_clock for v%d\n",
BIOS_CMD_TABLE_PARA_REVISION(setpixelclock));
bp->cmd_tbl.set_pixel_clock = NULL; bp->cmd_tbl.set_pixel_clock = NULL;
break; break;
} }
...@@ -379,6 +383,7 @@ static void init_set_crtc_timing(struct bios_parser *bp) ...@@ -379,6 +383,7 @@ static void init_set_crtc_timing(struct bios_parser *bp)
set_crtc_using_dtd_timing_v3; set_crtc_using_dtd_timing_v3;
break; break;
default: default:
dm_error("Don't have set_crtc_timing for v%d\n", dtd_version);
bp->cmd_tbl.set_crtc_timing = NULL; bp->cmd_tbl.set_crtc_timing = NULL;
break; break;
} }
...@@ -498,6 +503,8 @@ static void init_select_crtc_source(struct bios_parser *bp) ...@@ -498,6 +503,8 @@ static void init_select_crtc_source(struct bios_parser *bp)
bp->cmd_tbl.select_crtc_source = select_crtc_source_v3; bp->cmd_tbl.select_crtc_source = select_crtc_source_v3;
break; break;
default: default:
dm_error("Don't select_crtc_source enable_crtc for v%d\n",
BIOS_CMD_TABLE_PARA_REVISION(selectcrtc_source));
bp->cmd_tbl.select_crtc_source = NULL; bp->cmd_tbl.select_crtc_source = NULL;
break; break;
} }
...@@ -565,6 +572,8 @@ static void init_enable_crtc(struct bios_parser *bp) ...@@ -565,6 +572,8 @@ static void init_enable_crtc(struct bios_parser *bp)
bp->cmd_tbl.enable_crtc = enable_crtc_v1; bp->cmd_tbl.enable_crtc = enable_crtc_v1;
break; break;
default: default:
dm_error("Don't have enable_crtc for v%d\n",
BIOS_CMD_TABLE_PARA_REVISION(enablecrtc));
bp->cmd_tbl.enable_crtc = NULL; bp->cmd_tbl.enable_crtc = NULL;
break; break;
} }
...@@ -661,6 +670,8 @@ static void init_enable_disp_power_gating( ...@@ -661,6 +670,8 @@ static void init_enable_disp_power_gating(
enable_disp_power_gating_v2_1; enable_disp_power_gating_v2_1;
break; break;
default: default:
dm_error("Don't enable_disp_power_gating enable_crtc for v%d\n",
BIOS_CMD_TABLE_PARA_REVISION(enabledisppowergating));
bp->cmd_tbl.enable_disp_power_gating = NULL; bp->cmd_tbl.enable_disp_power_gating = NULL;
break; break;
} }
...@@ -710,6 +721,8 @@ static void init_set_dce_clock(struct bios_parser *bp) ...@@ -710,6 +721,8 @@ static void init_set_dce_clock(struct bios_parser *bp)
bp->cmd_tbl.set_dce_clock = set_dce_clock_v2_1; bp->cmd_tbl.set_dce_clock = set_dce_clock_v2_1;
break; break;
default: default:
dm_error("Don't have set_dce_clock for v%d\n",
BIOS_CMD_TABLE_PARA_REVISION(setdceclock));
bp->cmd_tbl.set_dce_clock = NULL; bp->cmd_tbl.set_dce_clock = NULL;
break; break;
} }
......
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