Skip to contentSkip to conversation

drm/i915: Return early when pipes are not available

PATCH In review Mika Kahola 6 participants 10 messages Nov 9, 2017 – Nov 10, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

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

---
 drivers/gpu/drm/i915/intel_audio.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/i915/intel_audio.c +3 -0
index 4705194..5e367b1 100644
@@ -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);
Signature · 6 lines
2.7.4

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

Quoting Mika Kahola (2017-11-09 10:49:52)

Quoted 4 lines

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

Quoted 8 lines

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.

dev_info_runtime_init() is too late. It depends on mmio being enabled to probe the HW and nothing else; so move it to i915_driver_init_mmio()? -Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw
Quoted 19 lines · Chris Wilson

Quoting Mika Kahola (2017-11-09 10:49:52)

Quoted 9 lines

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

Quoted 9 lines

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.

Quoted 3 lines

dev_info_runtime_init() is too late. It depends on mmio being enabled to
probe the HW and nothing else; so move it to i915_driver_init_mmio()?

Ok. I could try that. I was also thinking that is there a way to postpone audio initialization?

Quoted 1 line

-Chris

Signature · 6 lines
Mika Kahola - Intel OTC

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw
Quoted 20 lines · Mika Kahola
Quoted 19 lines · Chris Wilson

Quoting Mika Kahola (2017-11-09 10:49:52)

Quoted 18 lines

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.

Quoted 5 lines
Quoted 3 lines

dev_info_runtime_init() is too late. It depends on mmio being enabled to
probe the HW and nothing else; so move it to i915_driver_init_mmio()?

Ok. I could try that. I was also thinking that is there a way to postpone audio initialization?

We probably shouldn't be registering the audio thing until we've actually set up the outputs.

Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#4 lore raw
Quoted 35 lines · Ville Syrjälä
Quoted 34 lines · Mika Kahola
Quoted 32 lines · Chris Wilson

Quoting Mika Kahola (2017-11-09 10:49:52)

Quoted 12 lines

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

Quoted 13 lines

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.

dev_info_runtime_init() is too late. It depends on mmio being enabled
to
probe the HW and nothing else; so move it to i915_driver_init_mmio()?

Quoted 4 lines
Quoted 2 lines

Ok. I could try that. I was also thinking that is there a way to postpone audio initialization?

We probably shouldn't be registering the audio thing until we've actually set up the outputs.

I tried couple of versions. One with Chris's idea to move intel_device_info_runtime_init() to i915_driver_init_mmio() didn't turn out to be a success.

https://patchwork.freedesktop.org/series/33514/

I also tried to set num_pipes to 0 in case of display disable already in i915_driver_init_early(). That approach didn't turn out to be a success either.

https://patchwork.freedesktop.org/series/33522/

I'll give it a go for a patch that doesn't register audio in case of disabled display.

Quoted 1 line
Signature · 6 lines
Mika Kahola - Intel OTC

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
maintainer
#5 lore raw
Quoted 46 lines · Mika Kahola
Quoted 35 lines · Ville Syrjälä
Quoted 34 lines · Mika Kahola
Quoted 32 lines · Chris Wilson

Quoting Mika Kahola (2017-11-09 10:49:52)

Quoted 12 lines

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

Quoted 13 lines

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.

dev_info_runtime_init() is too late. It depends on mmio being enabled
to
probe the HW and nothing else; so move it to i915_driver_init_mmio()?

Quoted 4 lines
Quoted 2 lines

Ok. I could try that. I was also thinking that is there a way to postpone audio initialization?

We probably shouldn't be registering the audio thing until we've actually set up the outputs.

I tried couple of versions. One with Chris's idea to move intel_device_info_runtime_init() to i915_driver_init_mmio() didn't turn out to be a success.

https://patchwork.freedesktop.org/series/33514/

Quoted 8 lines

I also tried to set num_pipes to 0 in case of display disable already in i915_driver_init_early(). That approach didn't turn out to be a success either.

https://patchwork.freedesktop.org/series/33522/

I'll give it a go for a patch that doesn't register audio in case of disabled display.

That seems like the way to go. Display disable on the command line should be no different from num_pipes == 0.

BR,
Jani.

Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#6 lore raw
Quoted 63 lines · Jani Nikula
Quoted 62 lines · Mika Kahola
Quoted 43 lines · Ville Syrjälä
Quoted 41 lines · Mika Kahola
Quoted 38 lines · Chris Wilson

Quoting Mika Kahola (2017-11-09 10:49:52)

Quoted 15 lines

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

Quoted 15 lines

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.

dev_info_runtime_init() is too late. It depends on mmio being enabled
to
probe the HW and nothing else; so move it to i915_driver_init_mmio()?

Quoted 5 lines
Quoted 3 lines

Ok. I could try that. I was also thinking that is there a way to
postpone audio initialization?

We probably shouldn't be registering the audio thing until we've actually set up the outputs.

I tried couple of versions. One with Chris's idea to move intel_device_info_runtime_init() to i915_driver_init_mmio() didn't turn
out to be a success.

https://patchwork.freedesktop.org/series/33514/

I also tried to set num_pipes to 0 in case of display disable already
in i915_driver_init_early(). That approach didn't turn out to be a success either.

Quoted 7 lines
Quoted 5 lines

https://patchwork.freedesktop.org/series/33522/

I'll give it a go for a patch that doesn't register audio in case of
disabled display.

That seems like the way to go. Display disable on the command line should be no different from num_pipes == 0.

Yeah, let's skip this patch for this. I tested another patch that doesn't register the audio in case of disabled display. At least the trybot run for this patch was clean.

https://patchwork.freedesktop.org/series/33601/

Quoted 4 lines

BR,
Jani.

Signature · 6 lines
Mika Kahola - Intel OTC

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#7 lore raw

HI,

Quoted 12 lines

-----Original Message-----
From: Intel-gfx [mailto:[email protected]] On Behalf Of Mika Kahola
Sent: perjantai 10. marraskuuta 2017 15.35
To: Jani Nikula <[email protected]>; Ville Syrjälä <[email protected]>
Cc: [email protected]
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Return early when pipes are not available

Quoted 2 lines
Quoted 2 lines

https://patchwork.freedesktop.org/series/33522/

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

I'll give it a go for a patch that doesn't register audio in case of disabled display.

That seems like the way to go. Display disable on the command line should be no different from num_pipes == 0.

Yeah, let's skip this patch for this. I tested another patch that doesn't register the audio in case of disabled display. At least the trybot run for this patch was clean.

Well, no if you look all.html. same issues seen.

Quoted 11 lines

https://patchwork.freedesktop.org/series/33601/

Quoted 4 lines

BR,
Jani.

--
Mika Kahola - Intel OTC

Jani Saarinen
Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#8 lore raw

✓ Fi.CI.BAT: success for drm/i915: Return early when pipes are not available

In reply to Mika Kahola
== Series Details ==

== Series Details ==

Series: drm/i915: Return early when pipes are not available
URL : https://patchwork.freedesktop.org/series/33506/
State : success

== Summary ==

Series 33506v1 drm/i915: Return early when pipes are not available
https://patchwork.freedesktop.org/api/1.0/series/33506/revisions/1/mbox/

Test chamelium:

        Subgroup dp-crc-fast:
                pass       -> FAIL       (fi-kbl-7500u) fdo#102514
Test gem_exec_reloc:
        Subgroup basic-gtt-active:
                fail       -> PASS       (fi-gdg-551) fdo#102582 +2
Test gem_sync:
        Subgroup basic-store-all:
                pass       -> FAIL       (fi-ivb-3520m) fdo#100007

fdo#102514 https://bugs.freedesktop.org/show_bug.cgi?id=102514
fdo#102582 https://bugs.freedesktop.org/show_bug.cgi?id=102582
fdo#100007 https://bugs.freedesktop.org/show_bug.cgi?id=100007

fi-bdw-5557u     total:289  pass:268  dwarn:0   dfail:0   fail:0   skip:21  time:444s
fi-bdw-gvtdvm    total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:450s
fi-blb-e6850     total:289  pass:223  dwarn:1   dfail:0   fail:0   skip:65  time:380s
fi-bsw-n3050     total:289  pass:243  dwarn:0   dfail:0   fail:0   skip:46  time:539s
fi-bwr-2160      total:289  pass:183  dwarn:0   dfail:0   fail:0   skip:106 time:275s
fi-bxt-dsi       total:289  pass:259  dwarn:0   dfail:0   fail:0   skip:30  time:502s
fi-bxt-j4205     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:505s
fi-byt-j1900     total:289  pass:254  dwarn:0   dfail:0   fail:0   skip:35  time:495s
fi-byt-n2820     total:289  pass:250  dwarn:0   dfail:0   fail:0   skip:39  time:491s
fi-elk-e7500     total:289  pass:229  dwarn:0   dfail:0   fail:0   skip:60  time:424s
fi-gdg-551       total:289  pass:178  dwarn:1   dfail:0   fail:1   skip:109 time:264s
fi-glk-1         total:289  pass:261  dwarn:0   dfail:0   fail:0   skip:28  time:540s
fi-hsw-4770      total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:437s
fi-hsw-4770r     total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:437s
fi-ilk-650       total:289  pass:228  dwarn:0   dfail:0   fail:0   skip:61  time:424s
fi-ivb-3520m     total:289  pass:259  dwarn:0   dfail:0   fail:1   skip:29  time:468s
fi-ivb-3770      total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:460s
fi-kbl-7500u     total:289  pass:263  dwarn:1   dfail:0   fail:1   skip:24  time:475s
fi-kbl-7560u     total:289  pass:270  dwarn:0   dfail:0   fail:0   skip:19  time:521s
fi-kbl-7567u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:474s
fi-kbl-r         total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:534s
fi-pnv-d510      total:289  pass:222  dwarn:1   dfail:0   fail:0   skip:66  time:570s
fi-skl-6260u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:451s
fi-skl-6600u     total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:548s
fi-skl-6700hq    total:289  pass:263  dwarn:0   dfail:0   fail:0   skip:26  time:563s
fi-skl-6700k     total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:521s
fi-skl-6770hq    total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:497s
fi-skl-gvtdvm    total:289  pass:266  dwarn:0   dfail:0   fail:0   skip:23  time:456s
fi-snb-2520m     total:289  pass:250  dwarn:0   dfail:0   fail:0   skip:39  time:567s
fi-snb-2600      total:289  pass:249  dwarn:0   dfail:0   fail:0   skip:40  time:419s
Blacklisted hosts:
fi-cnl-y         total:289  pass:99   dwarn:0   dfail:0   fail:0   skip:20 
fi-glk-dsi       total:289  pass:259  dwarn:0   dfail:0   fail:0   skip:30  time:492s

65dc54b704d3ee0486f9f5b11f00c28973f783a2 drm-tip: 2017y-11m-09d-08h-53m-46s UTC integration manifest 6eb51f11a76f drm/i915: Return early when pipes are not available

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7032/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#9 lore raw

✗ Fi.CI.IGT: failure for drm/i915: Return early when pipes are not available

In reply to Mika Kahola
== Series Details ==

== Series Details ==

Series: drm/i915: Return early when pipes are not available
URL : https://patchwork.freedesktop.org/series/33506/
State : failure

== Summary ==

Test kms_setmode:

        Subgroup basic:
                fail       -> PASS       (shard-hsw) fdo#99912
Test kms_flip:
        Subgroup blocking-wf_vblank:
                pass       -> FAIL       (shard-hsw)
Test pm_lpsp:
        Subgroup screens-disabled:
                pass       -> FAIL       (shard-hsw) fdo#102579
Test perf:
        Subgroup blocking:
                fail       -> PASS       (shard-hsw) fdo#102252

fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
fdo#102579 https://bugs.freedesktop.org/show_bug.cgi?id=102579
fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252

shard-hsw total:2540 pass:1432 dwarn:0 dfail:0 fail:11 skip:1097 time:9255s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7032/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx