From: Gustavo Sousa <gustavo.sousa@intel.com>
To: Jani Nikula <jani.nikula@intel.com>,
<intel-gfx@lists.freedesktop.org>,
<intel-xe@lists.freedesktop.org>
Cc: <jani.nikula@intel.com>, <lucas.demarchi@intel.com>,
<rodrigo.vivi@intel.com>
Subject: Re: [PATCH 1/5] drm/i915/dmc: handle request_firmware() errors separately
Date: Thu, 18 Apr 2024 15:30:11 -0300 [thread overview]
Message-ID: <171346501148.2007.15538095166602817029@gjsousa-mobl2> (raw)
In-Reply-To: <725c3580aae52bf34f32b93275cce6208dfd42b7.1713450693.git.jani.nikula@intel.com>
Quoting Jani Nikula (2024-04-18 11:39:50-03:00)
>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.
>
>Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>---
> drivers/gpu/drm/i915/display/intel_dmc.c | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/gpu/drm/i915/display/intel_dmc.c b/drivers/gpu/drm/i915/display/intel_dmc.c
>index a34ff3383fd3..65880dea9c15 100644
>--- a/drivers/gpu/drm/i915/display/intel_dmc.c
>+++ b/drivers/gpu/drm/i915/display/intel_dmc.c
>@@ -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);
This could also be:
drm_notice(&i915->drm, "DMC firmware homepage: " INTEL_DMC_FIRMWARE_URL)
>+ return;
>+ }
>+
> parse_dmc_fw(dmc, fw);
Maybe also remove the now unnecessary NULL check for fw in
parse_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."
Should we tweak the message to differentiate from the previous one? At
this point, we know the blob file exists, but there is a problem with
its content.
I think the patch looks good and to me all of the above suggestions are
just that :-) So, with or without them:
Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
--
Gustavo Sousa
> " Disabling runtime power management.\n",
> dmc->fw_path);
>- drm_notice(&i915->drm, "DMC firmware homepage: %s",
>- INTEL_DMC_FIRMWARE_URL);
> }
>
> release_firmware(fw);
>--
>2.39.2
>
next prev parent reply other threads:[~2024-04-18 18:30 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-18 14:39 [PATCH 0/5] drm/i915/dmc: firmware path handling changes Jani Nikula
2024-04-18 14:39 ` [PATCH 1/5] drm/i915/dmc: handle request_firmware() errors separately Jani Nikula
2024-04-18 18:30 ` Gustavo Sousa [this message]
2024-04-18 19:56 ` Jani Nikula
2024-04-18 19:59 ` Gustavo Sousa
2024-04-18 14:39 ` [PATCH 2/5] drm/i915/dmc: improve firmware parse failure propagation Jani Nikula
2024-04-18 18:53 ` Gustavo Sousa
2024-04-18 20:03 ` Jani Nikula
2024-04-18 20:40 ` Gustavo Sousa
2024-04-18 14:39 ` [PATCH 3/5] drm/i915/dmc: split out per-platform firmware path selection Jani Nikula
2024-04-18 19:00 ` Gustavo Sousa
2024-04-18 14:39 ` [PATCH 4/5] drm/i915/dmc: change meaning of dmc_firmware_path="" module param Jani Nikula
2024-04-18 19:19 ` Gustavo Sousa
2024-04-18 20:09 ` Jani Nikula
2024-04-18 20:44 ` Gustavo Sousa
2024-04-18 20:49 ` Lucas De Marchi
2024-04-18 14:39 ` [PATCH 5/5] drm/i915/display: move dmc_firmware_path to display params Jani Nikula
2024-04-18 19:43 ` Gustavo Sousa
2024-04-18 16:54 ` ✓ CI.Patch_applied: success for drm/i915/dmc: firmware path handling changes Patchwork
2024-04-18 16:54 ` ✗ CI.checkpatch: warning " Patchwork
2024-04-18 16:55 ` ✓ CI.KUnit: success " Patchwork
2024-04-18 17:15 ` ✓ CI.Build: " Patchwork
2024-04-18 17:17 ` ✓ CI.Hooks: " Patchwork
2024-04-18 17:25 ` ✗ CI.checksparse: warning " Patchwork
2024-04-18 18:01 ` ✓ CI.BAT: success " Patchwork
2024-04-20 8:00 ` ✗ CI.FULL: failure " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=171346501148.2007.15538095166602817029@gjsousa-mobl2 \
--to=gustavo.sousa@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=lucas.demarchi@intel.com \
--cc=rodrigo.vivi@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox