forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TEST, DNM] sound: Use -EPROBE_DEFER instead of i915 module loading. #4485
Closed
ujfalusi
wants to merge
9
commits into
thesofproject:topic/sof-dev
from
ujfalusi:peter/sof/test/no_delaywork_01
Closed
[TEST, DNM] sound: Use -EPROBE_DEFER instead of i915 module loading. #4485
ujfalusi
wants to merge
9
commits into
thesofproject:topic/sof-dev
from
ujfalusi:peter/sof/test/no_delaywork_01
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add missing pci_set_drv to NULL call on error. Signed-off-by: Maarten Lankhorst <[email protected]>
Selecting CONFIG_DRM selects CONFIG_VIDEO_NOMODESET, which exports video_firmware_drivers_only(). This can be used as a first approximation on whether i915 will be available. It's safe to use as this is only built when CONFIG_SND_HDA_I915 is selected by CONFIG_I915. It's not completely fool proof, as you can boot with "nomodeset i915.modeset=1" to make i915 load regardless, or use "i915.force_probe=!*" to never load i915, but the common case of booting with nomodeset to disable all GPU drivers this will work as intended. Because of this, we add an extra module parameter, snd_hda_core.gpu_bind that can be used to signal users intent. -1 follows nomodeset, 0 disables binding, 1 forces wait/-EPROBE_DEFER on binding. Signed-off-by: Maarten Lankhorst <[email protected]>
Xe is a new GPU driver that re-uses the display (and sound) code from i915. It's no longer possible to load i915, as the GPU can be driven by the xe driver instead. The new behavior will return -EPROBE_DEFER, and wait for a compatible driver to be loaded instead of modprobing i915. Converting all drivers at the same time is a lot of work, instead we will convert each user one by one. Changes since v1: - Use dev_err_probe to set a probe reason for debugfs' deferred_devices. Signed-off-by: Maarten Lankhorst <[email protected]>
xe is a new driver for intel GPU's that shares the sound related code with i915. Don't allow it to be modprobed though; the module is not upstream yet and we should exclusively use the EPROBE_DEFER mechanism. Signed-off-by: Maarten Lankhorst <[email protected]>
Now that we can use -EPROBE_DEFER, it's no longer required to spin off the snd_hdac_i915_init into a workqueue. It's likely the whole workqueue can be destroyed, but I don't have the means to test this. Removing the workqueue would simplify init even further, but is left as exercise for the reviewer. Changes since v1: - Rename error label. Signed-off-by: Maarten Lankhorst <[email protected]> Acked-by: Mark Brown <[email protected]>
Now that we can use -EPROBE_DEFER, it's no longer required to spin off the snd_hdac_i915_init into a workqueue. It's likely the whole workqueue can be destroyed, but I don't have the means to test this. Removing the workqueue would simplify init even further, but is left as exercise for the reviewer. Signed-off-by: Maarten Lankhorst <[email protected]> Acked-by: Mark Brown <[email protected]>
Now that we can use -EPROBE_DEFER, it's no longer required to spin off the snd_hdac_i915_init into a workqueue. Use the -EPROBE_DEFER mechanism instead, which must be returned in the probe function. Changes since v1: - Use dev_err_probe() - Don't move probed_devs bitmap unnecessarily. (tiwai) - Move snd_hdac_i915_init slightly upward, to ensure it's always initialised before vga-switcheroo is called. Signed-off-by: Maarten Lankhorst <[email protected]>
This was only used to allow modprobing i915, by converting to the -EPROBE_DEFER mechanism, it can be completely removed, and is in fact counterproductive since -EPROBE_DEFER otherwise won't be handled correctly. Signed-off-by: Maarten Lankhorst <[email protected]> Acked-by: Matthew Auld <[email protected]> Acked-by: Mark Brown <[email protected]>
Now that all drivers have moved from modprobe loading to handling -EPROBE_DEFER, we can remove the argument again. Changes since v1: - Use dev_err_probe() to set reason in debugfs for deferred probe. Signed-off-by: Maarten Lankhorst <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
https://lore.kernel.org/alsa-devel/[email protected]/
applied to topic/sof-dev.