From: Jani Nikula <jani.nikula@intel.com>
To: Matthieu CHARETTE <matthieu.charette@gmail.com>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/edid/firmware: stop using throwaway platform device
Date: Wed, 12 Oct 2022 11:25:59 +0300 [thread overview]
Message-ID: <87v8opwiqw.fsf@intel.com> (raw)
In-Reply-To: <CA+FNwmJRZ-5BwuXykp3R6tQagQgunMC9EhfL9CRyi+Ff47TXhA@mail.gmail.com>
On Tue, 11 Oct 2022, Matthieu CHARETTE <matthieu.charette@gmail.com> wrote:
> Currently the EDID is requested during the resume. But since it's
> requested too early, this means before the filesystem is mounted, the
> firmware request fails. This make the DRM driver crash when resuming.
> This kind of issue should be prevented by the firmware caching process
> which cache every firmware requested for the next resume. But since we
> are using a temporary device, the firmware isn't cached on suspend
> since the device doesn't work anymore.
> When using a non temporary device to get the EDID, the firmware will
> be cached on suspend for the next resume. So requesting the firmware
> during resume will succeed.
> But if the firmware has never been requested since the boot, this
> means that the monitor isn't plugged since the boot. The kernel will
> not be caching the EDID. So if we plug the monitor while the machine
> is suspended. The resume will fail to load the firmware. And the DRM
> driver will crash.
> So basically, your fix should solve the issue except for the case
> where the monitor hasn't been plugged since boot and is plugged while
> the machine is suspended.
> I hope I was clear. Tell me if I wasn't. I'm not really good at explaining.
That was a pretty good explanation. The only thing I'm missing is what
the failure mode is exactly when you claim the driver will crash. Why
would request_firmware() "crash" if called for the first time on the
resume path?
I'm not sure I care much about not being able to load the firmware EDID
in the suspend-plug-resume case (as this can be remedied with a
subsequent modeset), but obviously any errors need to be handled
gracefully, without crashing.
BR,
Jani.
--
Jani Nikula, Intel Open Source Graphics Center
WARNING: multiple messages have this Message-ID (diff)
From: Jani Nikula <jani.nikula@intel.com>
To: Matthieu CHARETTE <matthieu.charette@gmail.com>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/edid/firmware: stop using throwaway platform device
Date: Wed, 12 Oct 2022 11:25:59 +0300 [thread overview]
Message-ID: <87v8opwiqw.fsf@intel.com> (raw)
In-Reply-To: <CA+FNwmJRZ-5BwuXykp3R6tQagQgunMC9EhfL9CRyi+Ff47TXhA@mail.gmail.com>
On Tue, 11 Oct 2022, Matthieu CHARETTE <matthieu.charette@gmail.com> wrote:
> Currently the EDID is requested during the resume. But since it's
> requested too early, this means before the filesystem is mounted, the
> firmware request fails. This make the DRM driver crash when resuming.
> This kind of issue should be prevented by the firmware caching process
> which cache every firmware requested for the next resume. But since we
> are using a temporary device, the firmware isn't cached on suspend
> since the device doesn't work anymore.
> When using a non temporary device to get the EDID, the firmware will
> be cached on suspend for the next resume. So requesting the firmware
> during resume will succeed.
> But if the firmware has never been requested since the boot, this
> means that the monitor isn't plugged since the boot. The kernel will
> not be caching the EDID. So if we plug the monitor while the machine
> is suspended. The resume will fail to load the firmware. And the DRM
> driver will crash.
> So basically, your fix should solve the issue except for the case
> where the monitor hasn't been plugged since boot and is plugged while
> the machine is suspended.
> I hope I was clear. Tell me if I wasn't. I'm not really good at explaining.
That was a pretty good explanation. The only thing I'm missing is what
the failure mode is exactly when you claim the driver will crash. Why
would request_firmware() "crash" if called for the first time on the
resume path?
I'm not sure I care much about not being able to load the firmware EDID
in the suspend-plug-resume case (as this can be remedied with a
subsequent modeset), but obviously any errors need to be handled
gracefully, without crashing.
BR,
Jani.
--
Jani Nikula, Intel Open Source Graphics Center
next prev parent reply other threads:[~2022-10-12 8:26 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-06 22:21 [Intel-gfx] [PATCH] drm/edid/firmware: stop using throwaway platform device Jani Nikula
2022-10-06 22:21 ` Jani Nikula
2022-10-06 23:02 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2022-10-06 23:21 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-10-07 9:15 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2022-10-11 6:27 ` [Intel-gfx] [PATCH] " Matthieu CHARETTE
2022-10-11 6:27 ` Matthieu CHARETTE
2022-10-11 7:20 ` [Intel-gfx] " Jani Nikula
2022-10-11 7:20 ` Jani Nikula
2022-10-11 20:45 ` [Intel-gfx] " Matthieu CHARETTE
2022-10-11 20:45 ` Matthieu CHARETTE
2022-10-12 8:25 ` Jani Nikula [this message]
2022-10-12 8:25 ` Jani Nikula
2022-10-12 17:16 ` [Intel-gfx] " Matthieu CHARETTE
2022-10-12 17:16 ` Matthieu CHARETTE
2022-11-06 15:03 ` [Intel-gfx] " Matthieu CHARETTE
2022-11-06 15:03 ` Matthieu CHARETTE
2022-11-08 11:27 ` [Intel-gfx] " Jani Nikula
2022-11-08 11:27 ` Jani Nikula
2022-11-08 15:40 ` [Intel-gfx] " Matthieu CHARETTE
2022-11-08 15:40 ` Matthieu CHARETTE
2022-11-13 19:26 ` [Intel-gfx] " Matthieu CHARETTE
2022-11-13 19:26 ` Matthieu CHARETTE
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=87v8opwiqw.fsf@intel.com \
--to=jani.nikula@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=matthieu.charette@gmail.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.