Commit b94f1cc9 authored by Tom Rix's avatar Tom Rix Committed by Alex Deucher

drm/amd/display: return status of dmub_srv_get_fw_boot_status

gcc with W=1 reports
drivers/gpu/drm/amd/amdgpu/../display/dc/dc_dmub_srv.c:
  In function ‘dc_dmub_srv_optimized_init_done’:
drivers/gpu/drm/amd/amdgpu/../display/dc/dc_dmub_srv.c:184:26:
  error: variable ‘dmub’ set but not used [-Werror=unused-but-set-variable]
  184 |         struct dmub_srv *dmub;
      |                          ^~~~

The return status is never set.
It looks like a call to dmub_srv_get_fw_boot_status is missing.

Fixes: 499e4b1c ("drm/amd/display: add mechanism to skip DCN init")
Signed-off-by: default avatarTom Rix <trix@redhat.com>
Signed-off-by: default avatarHamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 4e004146
...@@ -182,14 +182,23 @@ bool dc_dmub_srv_cmd_run_list(struct dc_dmub_srv *dc_dmub_srv, unsigned int coun ...@@ -182,14 +182,23 @@ bool dc_dmub_srv_cmd_run_list(struct dc_dmub_srv *dc_dmub_srv, unsigned int coun
bool dc_dmub_srv_optimized_init_done(struct dc_dmub_srv *dc_dmub_srv) bool dc_dmub_srv_optimized_init_done(struct dc_dmub_srv *dc_dmub_srv)
{ {
struct dmub_srv *dmub; struct dmub_srv *dmub;
union dmub_fw_boot_status status; struct dc_context *dc_ctx;
union dmub_fw_boot_status boot_status;
enum dmub_status status;
if (!dc_dmub_srv || !dc_dmub_srv->dmub) if (!dc_dmub_srv || !dc_dmub_srv->dmub)
return false; return false;
dmub = dc_dmub_srv->dmub; dmub = dc_dmub_srv->dmub;
dc_ctx = dc_dmub_srv->ctx;
status = dmub_srv_get_fw_boot_status(dmub, &boot_status);
if (status != DMUB_STATUS_OK) {
DC_ERROR("Error querying DMUB boot status: error=%d\n", status);
return false;
}
return status.bits.optimized_init_done; return boot_status.bits.optimized_init_done;
} }
bool dc_dmub_srv_notify_stream_mask(struct dc_dmub_srv *dc_dmub_srv, bool dc_dmub_srv_notify_stream_mask(struct dc_dmub_srv *dc_dmub_srv,
......
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