public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Return early when pipes are not available
@ 2017-11-09 10:49 Mika Kahola
  2017-11-09 11:01 ` Chris Wilson
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Mika Kahola @ 2017-11-09 10:49 UTC (permalink / raw)
  To: intel-gfx

At least in Coffee Lake it happens that we start initiliazing audio when
no display is connected. This was discovered by CI when running IGT test
case

drv_module_reload --r basic-no-display

The issue here is that the 'intel_device_info_runtime_init()' sets
num_pipes to 0 but before this happens the audio part has already started
to initialize itself. Later on the num_pipes is updated to 0 in
intel_device_info_runtime_init() and we hit that when audio part is digging
out ELD. This causes a warning in dmesg. To fix this issue, let's check the
number of available pipes when trying to read out ELD.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103206
Signed-off-by: Mika Kahola <mika.kahola@intel.com>
---
 drivers/gpu/drm/i915/intel_audio.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c
index 4705194..5e367b1 100644
--- a/drivers/gpu/drm/i915/intel_audio.c
+++ b/drivers/gpu/drm/i915/intel_audio.c
@@ -859,6 +859,9 @@ static int i915_audio_component_get_eld(struct device *kdev, int port,
 	const u8 *eld;
 	int ret = -EINVAL;
 
+	if (INTEL_INFO(dev_priv)->num_pipes == 0)
+		return ret;
+
 	mutex_lock(&dev_priv->av_mutex);
 
 	intel_encoder = get_saved_enc(dev_priv, port, pipe);
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-11-10 13:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-09 10:49 [PATCH] drm/i915: Return early when pipes are not available Mika Kahola
2017-11-09 11:01 ` Chris Wilson
2017-11-09 11:11   ` Mika Kahola
2017-11-09 13:15     ` Ville Syrjälä
2017-11-10 12:22       ` Mika Kahola
2017-11-10 13:22         ` Jani Nikula
2017-11-10 13:34           ` Mika Kahola
2017-11-10 13:37             ` Saarinen, Jani
2017-11-09 11:27 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-11-09 12:54 ` ✗ Fi.CI.IGT: failure " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox