Commit 7de13ccf authored by Jani Nikula's avatar Jani Nikula

drm/i915/dmc: handle request_firmware() errors separately

Clarify request_firmware() error handling. Don't proceed to trying to
parse non-existent firmware or check for payload when request_firmware()
failed to begin with. There's no reason to release_firmware() either
when request_firmware() failed.

Also move the message about DMC firmware homepage here, as in other
cases the user probably has some firmware, although its parsing fails
for some reason.
Reviewed-by: default avatarGustavo Sousa <gustavo.sousa@intel.com>
Acked-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/0654bb3480f8d2103225d26f665badead5495532.1713519628.git.jani.nikula@intel.comSigned-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parent d08184aa
......@@ -942,6 +942,15 @@ static void dmc_load_work_fn(struct work_struct *work)
}
}
if (err) {
drm_notice(&i915->drm,
"Failed to load DMC firmware %s (%pe). Disabling runtime power management.\n",
dmc->fw_path, ERR_PTR(err));
drm_notice(&i915->drm, "DMC firmware homepage: %s",
INTEL_DMC_FIRMWARE_URL);
return;
}
parse_dmc_fw(dmc, fw);
if (intel_dmc_has_payload(i915)) {
......@@ -956,8 +965,6 @@ static void dmc_load_work_fn(struct work_struct *work)
"Failed to load DMC firmware %s."
" Disabling runtime power management.\n",
dmc->fw_path);
drm_notice(&i915->drm, "DMC firmware homepage: %s",
INTEL_DMC_FIRMWARE_URL);
}
release_firmware(fw);
......
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