Bug 196219
Summary: | WARNING at sound/hda/hdac_i915.c:367 on HSW and BDW platforms | ||
---|---|---|---|
Product: | Drivers | Reporter: | Martin Peres (martin.peres) |
Component: | Sound(ALSA) | Assignee: | Jaroslav Kysela (perex) |
Status: | RESOLVED CODE_FIX | ||
Severity: | normal | CC: | tiwai, tomi.p.sarvela |
Priority: | P1 | ||
Hardware: | Intel | ||
OS: | Linux | ||
Kernel Version: | Linux-next | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: |
Fix patch
Fix a typo leading to the module reference unbalance |
Description
Martin Peres
2017-06-29 13:52:17 UTC
Thanks for the report, it must be fcc88d9. For HSW and BDW, we need to avoid calling snd_hdac_i915_init() twice. I'll work on it. Could you try the patch below? Created attachment 257225 [details]
Fix patch
Thanks, I'll try it tomorrow! Tested-by: Martin Peres <martin.peres@linux.intel.com> Thanks, I'll let you close the bug when you have pushed it upstream :) I'll use your patch in our CI for now. Thanks! I already merged in this morning as I could check it locally, so sorry, your tested-by slipped :) Wonderful, thanks for being so reactive :) Let's see when the next bug comes :) I seem to have ill-tested the patch as it seems like it is is now preventing i915 to be reloaded. This could be to improper refcounting but I can't check until Monday. I at least verified that it really was caused by this patch before leaving the office. If you know what is going on, then go for it. Otherwise, let's debug this on Tuesday (when I am back from my short vacation) :) I checked HSW machine here but couldn't find a problem. The difference is that now no sound card instance is registered for HDMI when modeset is disabled while it appeared registered uselessly. This may change the card index number. I understand what you mean, but this does not seem to be our problem. What I see is that all our driver-reload tests are now failing. Looking at the code, it is the unload part that does not work, which could suggest that something is depending on i915, which prevents its unloading. I did not have time today to look more into that. Tell me if this is something you would want/need. Do you mean "all" as really all i915 platforms failing, not only HSW/BDW? Also, can you give a way to reproduce the problem manually? Yes, it is on all gen4+ platforms: https://intel-gfx-ci.01.org/CI/igt@drv_module_reload@basic-reload.html Here are the unit tests: https://cgit.freedesktop.org/xorg/app/intel-gpu-tools/ Please run the following commands: ./autogen.sh make ./tests/drv_module_reload --run-subtest basic-reload That should reproduce the problem Thanks for looking into it! Never mind, I found a typo causing the problem. diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 03e34edc8f24..5ae8ddab6412 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -1385,7 +1385,7 @@ static int azx_free(struct azx *chip) if (hda->need_i915_power) snd_hdac_display_power(bus, false); } - if (chip->driver_type & AZX_DCAPS_I915_COMPONENT) + if (chip->driver_caps & AZX_DCAPS_I915_COMPONENT) snd_hdac_i915_exit(bus); kfree(hda); I'll merge the fix for 4.13. Created attachment 257349 [details]
Fix a typo leading to the module reference unbalance
Wonderful! We should have it in drm-tip soon then. Thanks :) This fixed it: fc18282 ALSA: hda - Fix unbalance of i915 module refcount |