From: Jani Nikula <jani.nikula@intel.com>
To: Gustavo Sousa <gustavo.sousa@intel.com>,
intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Cc: 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 22:56:06 +0300 [thread overview]
Message-ID: <87le5awill.fsf@intel.com> (raw)
In-Reply-To: <171346501148.2007.15538095166602817029@gjsousa-mobl2>
On Thu, 18 Apr 2024, Gustavo Sousa <gustavo.sousa@intel.com> wrote:
> 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)
Although it currently doesn't, a URL could contain printf format
characters.
>
>>+ return;
>>+ }
>>+
>> parse_dmc_fw(dmc, fw);
>
> Maybe also remove the now unnecessary NULL check for fw in
> parse_dmc_fw()?
Yeah, was ambivalent about it, could go either way.
>
>>
>> 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.
That's done in the next patch. :)
>
> 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>
Thanks!
BR,
Jani.
>
> --
> 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
>>
--
Jani Nikula, Intel
next prev parent reply other threads:[~2024-04-18 19:56 UTC|newest]
Thread overview: 29+ 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
2024-04-18 19:56 ` Jani Nikula [this message]
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 15:55 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/dmc: firmware path handling changes Patchwork
2024-04-18 15:55 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-04-18 16:08 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-04-18 16:54 ` ✓ CI.Patch_applied: success " 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=87le5awill.fsf@intel.com \
--to=jani.nikula@intel.com \
--cc=gustavo.sousa@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.