[PATCH] drm/i915: Return early when pipes are not available

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux