drm/i915/gvt: Fix build failure after intel_engine_cs change
diff mbox

Message ID 20161018014007.29369-1-zhenyuw@linux.intel.com
State New
Headers show

Commit Message

Zhenyu Wang Oct. 18, 2016, 1:40 a.m. UTC
Change GVT-g code reference for intel_engine_cs from static array to
allocated pointer after commit 3b3f1650b1ca ("drm/i915: Allocate
intel_engine_cs structure only for the enabled engines").

Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
---
 drivers/gpu/drm/i915/gvt/execlist.c  | 2 +-
 drivers/gpu/drm/i915/gvt/handlers.c  | 2 +-
 drivers/gpu/drm/i915/gvt/scheduler.c | 6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)

Comments

Saarinen, Jani Oct. 18, 2016, 5:39 a.m. UTC | #1
> == Series Details ==

> 

> Series: drm/i915/gvt: Fix build failure after intel_engine_cs change

> URL   : https://patchwork.freedesktop.org/series/13910/

> State : failure

> 

> == Summary ==

> 

> Series 13910v1 drm/i915/gvt: Fix build failure after intel_engine_cs change

> https://patchwork.freedesktop.org/api/1.0/series/13910/revisions/1/mbox/

> 

> Test gem_exec_suspend:

>         Subgroup basic-s3:

>                 incomplete -> DMESG-WARN (fi-byt-n2820)

Command	/opt/igt/tests/gem_exec_suspend --run-subtest basic-S3
dmesg	
 [  363.532729] Suspending console(s) (use no_console_suspend to debug)
[  363.539402] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[  363.540866] sd 0:0:0:0: [sda] Stopping disk
[  364.370247] Broke affinity for irq 19
[  364.370265] Broke affinity for irq 87
[  364.370272] Broke affinity for irq 88
[  364.370278] Broke affinity for irq 89
[  364.388813]  cache: parent cpu1 should not be sleeping
[  364.638398] ------------[ cut here ]------------
[  364.638409] WARNING: CPU: 1 PID: 0 at kernel/locking/lockdep.c:2729 trace_hardirqs_on_caller+0x113/0x1b0
[  364.638412] DEBUG_LOCKS_WARN_ON(current->hardirq_context)
[  364.638440] Modules linked in: snd_hda_intel i915 intel_powerclamp coretemp crct10dif_pclmul crc32_pclmul snd_hda_codec_hdmi ghash_clmulni_intel snd_hda_codec_realtek snd_hda_codec_generic snd_hda_codec lpc_ich snd_hwdep snd_hda_core snd_pcm i2c_designware_platform i2c_designware_core r8169 mii sdhci_acpi sdhci i2c_hid mmc_core [last unloaded: i915]
[  364.638444] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G     U          4.9.0-rc1-CI-Patchwork_2740+ #1
[  364.638446] Hardware name: \xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff \xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff/DN2820FYK, BIOS FYBYT10H.86A.0038.2014.0717.1455 07/17/2014
[  364.638453]  ffff88013fd03d68 ffffffff8142df05 ffff88013fd03db8 0000000000000000
[  364.638458]  ffff88013fd03da8 ffffffff8107e496 00000aa93fd03e08 ffffffff81e249a0
[  364.638463]  ffffffff8181d137 ffffffff82e7e280 0000000000000000 0000000000000004
[  364.638464] Call Trace:
[  364.638472]  <IRQ> 
[  364.638473]  [<ffffffff8142df05>] dump_stack+0x67/0x92
[  364.638477]  [<ffffffff8107e496>] __warn+0xc6/0xe0
[  364.638483]  [<ffffffff8181d137>] ? _raw_spin_unlock_irq+0x27/0x50
[  364.638487]  [<ffffffff8107e4fa>] warn_slowpath_fmt+0x4a/0x50
[  364.638491]  [<ffffffff81679b2d>] ? rtc_handler+0x1d/0xa0
[  364.638495]  [<ffffffff810d6d83>] trace_hardirqs_on_caller+0x113/0x1b0
[  364.638499]  [<ffffffff810d6e2d>] trace_hardirqs_on+0xd/0x10
[  364.638502]  [<ffffffff8181d137>] _raw_spin_unlock_irq+0x27/0x50
[  364.638505]  [<ffffffff81679b42>] rtc_handler+0x32/0xa0
[  364.638509]  [<ffffffff814c0ac3>] acpi_ev_fixed_event_detect+0xd4/0xfb
[  364.638513]  [<ffffffff814c2eeb>] acpi_ev_sci_xrupt_handler+0xf/0x2d
[  364.638517]  [<ffffffff814ab60e>] acpi_irq+0x11/0x2c
[  364.638521]  [<ffffffff810e5288>] __handle_irq_event_percpu+0x58/0x370
[  364.638525]  [<ffffffff810e55be>] handle_irq_event_percpu+0x1e/0x50
[  364.638528]  [<ffffffff810e5624>] handle_irq_event+0x34/0x60
[  364.638531]  [<ffffffff810e8906>] handle_fasteoi_irq+0xa6/0x170
[  364.638536]  [<ffffffff8101eef5>] handle_irq+0x15/0x20
[  364.638539]  [<ffffffff8101e548>] do_IRQ+0x68/0x130
[  364.638542]  [<ffffffff8181e289>] common_interrupt+0x89/0x89
[  364.638548]  <EOI> 
[  364.638548]  [<ffffffff8181c773>] ? mwait_idle+0x93/0x210
[  364.638551]  [<ffffffff8181c76a>] ? mwait_idle+0x8a/0x210
[  364.638555]  [<ffffffff81026b0a>] arch_cpu_idle+0xa/0x10
[  364.638558]  [<ffffffff8181cb9e>] default_idle_call+0x1e/0x30
[  364.638561]  [<ffffffff810cbf6c>] cpu_startup_entry+0x17c/0x1f0
[  364.638565]  [<ffffffff8103cf32>] start_secondary+0x102/0x120
[  364.638568] ---[ end trace 302f2b5e754e367a ]---

>                 dmesg-warn -> INCOMPLETE (fi-byt-j1900)


[075/246] skip: 12, pass: 62, fail: 1 -
running: igt/gem_exec_suspend/basic-s3 

[075/246] skip: 12, pass: 62, fail: 1 \
Build timed out (after 18 minutes). Marking the build as aborted.

> Test vgem_basic:

>         Subgroup unload:

>                 skip       -> PASS       (fi-hsw-4770r)

>                 pass       -> SKIP       (fi-bdw-5557u)

> 

> fi-bdw-5557u     total:246  pass:230  dwarn:0   dfail:0   fail:0   skip:16

> fi-bsw-n3050     total:246  pass:203  dwarn:1   dfail:0   fail:0   skip:42

> fi-bxt-t5700     total:246  pass:216  dwarn:0   dfail:0   fail:0   skip:30

> fi-byt-j1900     total:76   pass:62   dwarn:0   dfail:0   fail:1   skip:12

> fi-byt-n2820     total:246  pass:209  dwarn:1   dfail:0   fail:1   skip:35

> fi-hsw-4770      total:246  pass:224  dwarn:0   dfail:0   fail:0   skip:22

> fi-hsw-4770r     total:246  pass:223  dwarn:1   dfail:0   fail:0   skip:22

> fi-ivb-3770      total:246  pass:221  dwarn:0   dfail:0   fail:0   skip:25

> fi-skl-6700hq    total:246  pass:223  dwarn:0   dfail:0   fail:0   skip:23

> fi-skl-6700k     total:246  pass:221  dwarn:1   dfail:0   fail:0   skip:24

> fi-snb-2600      total:246  pass:209  dwarn:0   dfail:0   fail:0   skip:37

> fi-skl-6260u failed to connect after reboot

> fi-skl-6770hq failed to connect after reboot

> 

> Results at /archive/results/CI_IGT_test/Patchwork_2740/

> 

> 7ec75289774dec48c46c37271fb334b7caed3d32 drm-intel-nightly: 2016y-10m-

> 17d-14h-07m-32s UTC integration manifest

> ae305ca drm/i915/gvt: Fix build failure after intel_engine_cs change

> 

It seems kernel is currently broken?


Jani Saarinen
Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo
Zhenyu Wang Oct. 18, 2016, 5:52 a.m. UTC | #2
On 2016.10.18 05:39:11 +0000, Saarinen, Jani wrote:
> > == Series Details ==
> > 
> > Series: drm/i915/gvt: Fix build failure after intel_engine_cs change
> > URL   : https://patchwork.freedesktop.org/series/13910/
> > State : failure
> > 
> > == Summary ==
> > 
> > Series 13910v1 drm/i915/gvt: Fix build failure after intel_engine_cs change
> > https://patchwork.freedesktop.org/api/1.0/series/13910/revisions/1/mbox/
> > 
> > Test gem_exec_suspend:
> >         Subgroup basic-s3:
> >                 incomplete -> DMESG-WARN (fi-byt-n2820)
> Command	/opt/igt/tests/gem_exec_suspend --run-subtest basic-S3
> dmesg	
>  [  363.532729] Suspending console(s) (use no_console_suspend to debug)
> [  363.539402] sd 0:0:0:0: [sda] Synchronizing SCSI cache
> [  363.540866] sd 0:0:0:0: [sda] Stopping disk
> [  364.370247] Broke affinity for irq 19
> [  364.370265] Broke affinity for irq 87
> [  364.370272] Broke affinity for irq 88
> [  364.370278] Broke affinity for irq 89
> [  364.388813]  cache: parent cpu1 should not be sleeping
> [  364.638398] ------------[ cut here ]------------
> [  364.638409] WARNING: CPU: 1 PID: 0 at kernel/locking/lockdep.c:2729 trace_hardirqs_on_caller+0x113/0x1b0
> [  364.638412] DEBUG_LOCKS_WARN_ON(current->hardirq_context)
> [  364.638440] Modules linked in: snd_hda_intel i915 intel_powerclamp coretemp crct10dif_pclmul crc32_pclmul snd_hda_codec_hdmi ghash_clmulni_intel snd_hda_codec_realtek snd_hda_codec_generic snd_hda_codec lpc_ich snd_hwdep snd_hda_core snd_pcm i2c_designware_platform i2c_designware_core r8169 mii sdhci_acpi sdhci i2c_hid mmc_core [last unloaded: i915]
> [  364.638444] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G     U          4.9.0-rc1-CI-Patchwork_2740+ #1
> [  364.638446] Hardware name: \xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff \xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff/DN2820FYK, BIOS FYBYT10H.86A.0038.2014.0717.1455 07/17/2014
> [  364.638453]  ffff88013fd03d68 ffffffff8142df05 ffff88013fd03db8 0000000000000000
> [  364.638458]  ffff88013fd03da8 ffffffff8107e496 00000aa93fd03e08 ffffffff81e249a0
> [  364.638463]  ffffffff8181d137 ffffffff82e7e280 0000000000000000 0000000000000004
> [  364.638464] Call Trace:
> [  364.638472]  <IRQ> 
> [  364.638473]  [<ffffffff8142df05>] dump_stack+0x67/0x92
> [  364.638477]  [<ffffffff8107e496>] __warn+0xc6/0xe0
> [  364.638483]  [<ffffffff8181d137>] ? _raw_spin_unlock_irq+0x27/0x50
> [  364.638487]  [<ffffffff8107e4fa>] warn_slowpath_fmt+0x4a/0x50
> [  364.638491]  [<ffffffff81679b2d>] ? rtc_handler+0x1d/0xa0
> [  364.638495]  [<ffffffff810d6d83>] trace_hardirqs_on_caller+0x113/0x1b0
> [  364.638499]  [<ffffffff810d6e2d>] trace_hardirqs_on+0xd/0x10
> [  364.638502]  [<ffffffff8181d137>] _raw_spin_unlock_irq+0x27/0x50
> [  364.638505]  [<ffffffff81679b42>] rtc_handler+0x32/0xa0
> [  364.638509]  [<ffffffff814c0ac3>] acpi_ev_fixed_event_detect+0xd4/0xfb
> [  364.638513]  [<ffffffff814c2eeb>] acpi_ev_sci_xrupt_handler+0xf/0x2d
> [  364.638517]  [<ffffffff814ab60e>] acpi_irq+0x11/0x2c
> [  364.638521]  [<ffffffff810e5288>] __handle_irq_event_percpu+0x58/0x370
> [  364.638525]  [<ffffffff810e55be>] handle_irq_event_percpu+0x1e/0x50
> [  364.638528]  [<ffffffff810e5624>] handle_irq_event+0x34/0x60
> [  364.638531]  [<ffffffff810e8906>] handle_fasteoi_irq+0xa6/0x170
> [  364.638536]  [<ffffffff8101eef5>] handle_irq+0x15/0x20
> [  364.638539]  [<ffffffff8101e548>] do_IRQ+0x68/0x130
> [  364.638542]  [<ffffffff8181e289>] common_interrupt+0x89/0x89
> [  364.638548]  <EOI> 
> [  364.638548]  [<ffffffff8181c773>] ? mwait_idle+0x93/0x210
> [  364.638551]  [<ffffffff8181c76a>] ? mwait_idle+0x8a/0x210
> [  364.638555]  [<ffffffff81026b0a>] arch_cpu_idle+0xa/0x10
> [  364.638558]  [<ffffffff8181cb9e>] default_idle_call+0x1e/0x30
> [  364.638561]  [<ffffffff810cbf6c>] cpu_startup_entry+0x17c/0x1f0
> [  364.638565]  [<ffffffff8103cf32>] start_secondary+0x102/0x120
> [  364.638568] ---[ end trace 302f2b5e754e367a ]---
> 
> >                 dmesg-warn -> INCOMPLETE (fi-byt-j1900)
> 
> [075/246] skip: 12, pass: 62, fail: 1 -
> running: igt/gem_exec_suspend/basic-s3 
> 
> [075/246] skip: 12, pass: 62, fail: 1 \
> Build timed out (after 18 minutes). Marking the build as aborted.
> 
> > Test vgem_basic:
> >         Subgroup unload:
> >                 skip       -> PASS       (fi-hsw-4770r)
> >                 pass       -> SKIP       (fi-bdw-5557u)
> > 
> > fi-bdw-5557u     total:246  pass:230  dwarn:0   dfail:0   fail:0   skip:16
> > fi-bsw-n3050     total:246  pass:203  dwarn:1   dfail:0   fail:0   skip:42
> > fi-bxt-t5700     total:246  pass:216  dwarn:0   dfail:0   fail:0   skip:30
> > fi-byt-j1900     total:76   pass:62   dwarn:0   dfail:0   fail:1   skip:12
> > fi-byt-n2820     total:246  pass:209  dwarn:1   dfail:0   fail:1   skip:35
> > fi-hsw-4770      total:246  pass:224  dwarn:0   dfail:0   fail:0   skip:22
> > fi-hsw-4770r     total:246  pass:223  dwarn:1   dfail:0   fail:0   skip:22
> > fi-ivb-3770      total:246  pass:221  dwarn:0   dfail:0   fail:0   skip:25
> > fi-skl-6700hq    total:246  pass:223  dwarn:0   dfail:0   fail:0   skip:23
> > fi-skl-6700k     total:246  pass:221  dwarn:1   dfail:0   fail:0   skip:24
> > fi-snb-2600      total:246  pass:209  dwarn:0   dfail:0   fail:0   skip:37
> > fi-skl-6260u failed to connect after reboot
> > fi-skl-6770hq failed to connect after reboot
> > 
> > Results at /archive/results/CI_IGT_test/Patchwork_2740/
> > 
> > 7ec75289774dec48c46c37271fb334b7caed3d32 drm-intel-nightly: 2016y-10m-
> > 17d-14h-07m-32s UTC integration manifest
> > ae305ca drm/i915/gvt: Fix build failure after intel_engine_cs change
> > 
> It seems kernel is currently broken?
> 

Is your kernel config available somewhere? So I can try to produce here.

thanks
Zhenyu Wang Oct. 18, 2016, 6:46 a.m. UTC | #3
On 2016.10.18 09:47:56 +0300, Joonas Lahtinen wrote:
> On ti, 2016-10-18 at 09:40 +0800, Zhenyu Wang wrote:
> > @@ -134,7 +134,7 @@ static int render_mmio_to_ring_id(struct intel_gvt *gvt, unsigned int reg)
> >  
> >  	reg &= ~GENMASK(11, 0);
> >  	for (i = 0; i < I915_NUM_ENGINES; i++) {
> > -		if (gvt->dev_priv->engine[i].mmio_base == reg)
> > +		if (gvt->dev_priv->engine[i]->mmio_base == reg)
> >  			return i;
> >  	}
> 
> This loop is bad now that engine[i] might be NULL. Use for_each_engine
> instead.
> 

yes, we're fixing this with newly merged code and testing for VM,
should be fixed in next pull request.

Thanks
Joonas Lahtinen Oct. 18, 2016, 6:47 a.m. UTC | #4
On ti, 2016-10-18 at 09:40 +0800, Zhenyu Wang wrote:
> @@ -134,7 +134,7 @@ static int render_mmio_to_ring_id(struct intel_gvt *gvt, unsigned int reg)
>  
>  	reg &= ~GENMASK(11, 0);
>  	for (i = 0; i < I915_NUM_ENGINES; i++) {
> -		if (gvt->dev_priv->engine[i].mmio_base == reg)
> +		if (gvt->dev_priv->engine[i]->mmio_base == reg)
>  			return i;
>  	}

This loop is bad now that engine[i] might be NULL. Use for_each_engine
instead.

Regards, Joonas
Chris Wilson Oct. 18, 2016, 8:32 a.m. UTC | #5
On Tue, Oct 18, 2016 at 05:39:11AM +0000, Saarinen, Jani wrote:
> > == Series Details ==
> > 
> > Series: drm/i915/gvt: Fix build failure after intel_engine_cs change
> > URL   : https://patchwork.freedesktop.org/series/13910/
> > State : failure
> > 
> > == Summary ==
> > 
> > Series 13910v1 drm/i915/gvt: Fix build failure after intel_engine_cs change
> > https://patchwork.freedesktop.org/api/1.0/series/13910/revisions/1/mbox/
> > 
> > Test gem_exec_suspend:
> >         Subgroup basic-s3:
> >                 incomplete -> DMESG-WARN (fi-byt-n2820)
> Command	/opt/igt/tests/gem_exec_suspend --run-subtest basic-S3
> dmesg	
>  [  363.532729] Suspending console(s) (use no_console_suspend to debug)
> [  363.539402] sd 0:0:0:0: [sda] Synchronizing SCSI cache
> [  363.540866] sd 0:0:0:0: [sda] Stopping disk
> [  364.370247] Broke affinity for irq 19
> [  364.370265] Broke affinity for irq 87
> [  364.370272] Broke affinity for irq 88
> [  364.370278] Broke affinity for irq 89
> [  364.388813]  cache: parent cpu1 should not be sleeping
> [  364.638398] ------------[ cut here ]------------
> [  364.638409] WARNING: CPU: 1 PID: 0 at kernel/locking/lockdep.c:2729 trace_hardirqs_on_caller+0x113/0x1b0
> [  364.638412] DEBUG_LOCKS_WARN_ON(current->hardirq_context)
> [  364.638440] Modules linked in: snd_hda_intel i915 intel_powerclamp coretemp crct10dif_pclmul crc32_pclmul snd_hda_codec_hdmi ghash_clmulni_intel snd_hda_codec_realtek snd_hda_codec_generic snd_hda_codec lpc_ich snd_hwdep snd_hda_core snd_pcm i2c_designware_platform i2c_designware_core r8169 mii sdhci_acpi sdhci i2c_hid mmc_core [last unloaded: i915]
> [  364.638444] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G     U          4.9.0-rc1-CI-Patchwork_2740+ #1
> [  364.638446] Hardware name: \xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff \xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff\xffffffff/DN2820FYK, BIOS FYBYT10H.86A.0038.2014.0717.1455 07/17/2014
> [  364.638453]  ffff88013fd03d68 ffffffff8142df05 ffff88013fd03db8 0000000000000000
> [  364.638458]  ffff88013fd03da8 ffffffff8107e496 00000aa93fd03e08 ffffffff81e249a0
> [  364.638463]  ffffffff8181d137 ffffffff82e7e280 0000000000000000 0000000000000004
> [  364.638464] Call Trace:
> [  364.638472]  <IRQ> 
> [  364.638473]  [<ffffffff8142df05>] dump_stack+0x67/0x92
> [  364.638477]  [<ffffffff8107e496>] __warn+0xc6/0xe0
> [  364.638483]  [<ffffffff8181d137>] ? _raw_spin_unlock_irq+0x27/0x50
> [  364.638487]  [<ffffffff8107e4fa>] warn_slowpath_fmt+0x4a/0x50
> [  364.638491]  [<ffffffff81679b2d>] ? rtc_handler+0x1d/0xa0
> [  364.638495]  [<ffffffff810d6d83>] trace_hardirqs_on_caller+0x113/0x1b0
> [  364.638499]  [<ffffffff810d6e2d>] trace_hardirqs_on+0xd/0x10
> [  364.638502]  [<ffffffff8181d137>] _raw_spin_unlock_irq+0x27/0x50
> [  364.638505]  [<ffffffff81679b42>] rtc_handler+0x32/0xa0
> [  364.638509]  [<ffffffff814c0ac3>] acpi_ev_fixed_event_detect+0xd4/0xfb
> [  364.638513]  [<ffffffff814c2eeb>] acpi_ev_sci_xrupt_handler+0xf/0x2d
> [  364.638517]  [<ffffffff814ab60e>] acpi_irq+0x11/0x2c
> [  364.638521]  [<ffffffff810e5288>] __handle_irq_event_percpu+0x58/0x370
> [  364.638525]  [<ffffffff810e55be>] handle_irq_event_percpu+0x1e/0x50
> [  364.638528]  [<ffffffff810e5624>] handle_irq_event+0x34/0x60
> [  364.638531]  [<ffffffff810e8906>] handle_fasteoi_irq+0xa6/0x170
> [  364.638536]  [<ffffffff8101eef5>] handle_irq+0x15/0x20
> [  364.638539]  [<ffffffff8101e548>] do_IRQ+0x68/0x130
> [  364.638542]  [<ffffffff8181e289>] common_interrupt+0x89/0x89
> [  364.638548]  <EOI> 
> [  364.638548]  [<ffffffff8181c773>] ? mwait_idle+0x93/0x210
> [  364.638551]  [<ffffffff8181c76a>] ? mwait_idle+0x8a/0x210
> [  364.638555]  [<ffffffff81026b0a>] arch_cpu_idle+0xa/0x10
> [  364.638558]  [<ffffffff8181cb9e>] default_idle_call+0x1e/0x30
> [  364.638561]  [<ffffffff810cbf6c>] cpu_startup_entry+0x17c/0x1f0
> [  364.638565]  [<ffffffff8103cf32>] start_secondary+0x102/0x120
> [  364.638568] ---[ end trace 302f2b5e754e367a ]---
> 
> >                 dmesg-warn -> INCOMPLETE (fi-byt-j1900)
> 
> [075/246] skip: 12, pass: 62, fail: 1 -
> running: igt/gem_exec_suspend/basic-s3 
> 
> [075/246] skip: 12, pass: 62, fail: 1 \
> Build timed out (after 18 minutes). Marking the build as aborted.
> 
> > Test vgem_basic:
> >         Subgroup unload:
> >                 skip       -> PASS       (fi-hsw-4770r)
> >                 pass       -> SKIP       (fi-bdw-5557u)
> > 
> > fi-bdw-5557u     total:246  pass:230  dwarn:0   dfail:0   fail:0   skip:16
> > fi-bsw-n3050     total:246  pass:203  dwarn:1   dfail:0   fail:0   skip:42
> > fi-bxt-t5700     total:246  pass:216  dwarn:0   dfail:0   fail:0   skip:30
> > fi-byt-j1900     total:76   pass:62   dwarn:0   dfail:0   fail:1   skip:12
> > fi-byt-n2820     total:246  pass:209  dwarn:1   dfail:0   fail:1   skip:35
> > fi-hsw-4770      total:246  pass:224  dwarn:0   dfail:0   fail:0   skip:22
> > fi-hsw-4770r     total:246  pass:223  dwarn:1   dfail:0   fail:0   skip:22
> > fi-ivb-3770      total:246  pass:221  dwarn:0   dfail:0   fail:0   skip:25
> > fi-skl-6700hq    total:246  pass:223  dwarn:0   dfail:0   fail:0   skip:23
> > fi-skl-6700k     total:246  pass:221  dwarn:1   dfail:0   fail:0   skip:24
> > fi-snb-2600      total:246  pass:209  dwarn:0   dfail:0   fail:0   skip:37
> > fi-skl-6260u failed to connect after reboot
> > fi-skl-6770hq failed to connect after reboot
> > 
> > Results at /archive/results/CI_IGT_test/Patchwork_2740/
> > 
> > 7ec75289774dec48c46c37271fb334b7caed3d32 drm-intel-nightly: 2016y-10m-
> > 17d-14h-07m-32s UTC integration manifest
> > ae305ca drm/i915/gvt: Fix build failure after intel_engine_cs change
> > 
> It seems kernel is currently broken?

This particular one lies in ACPI land. ACPI functions being used from
hardirq context and objecting to it, that would also explain the
INCOMPLETE just depending upon timing.

It affects both byt machines and bsw as well.
-Chris
Chris Wilson Oct. 18, 2016, 8:39 a.m. UTC | #6
On Tue, Oct 18, 2016 at 09:40:07AM +0800, Zhenyu Wang wrote:
> Change GVT-g code reference for intel_engine_cs from static array to
> allocated pointer after commit 3b3f1650b1ca ("drm/i915: Allocate
> intel_engine_cs structure only for the enabled engines").

You also need to enable deprecation warnings and fix the use of obsolete
functions.
-Chris

Patch
diff mbox

diff --git a/drivers/gpu/drm/i915/gvt/execlist.c b/drivers/gpu/drm/i915/gvt/execlist.c
index 4a00ee7..c50a3d1 100644
--- a/drivers/gpu/drm/i915/gvt/execlist.c
+++ b/drivers/gpu/drm/i915/gvt/execlist.c
@@ -39,7 +39,7 @@ 
 #define _EL_OFFSET_STATUS_PTR   0x3A0
 
 #define execlist_ring_mmio(gvt, ring_id, offset) \
-	(gvt->dev_priv->engine[ring_id].mmio_base + (offset))
+	(gvt->dev_priv->engine[ring_id]->mmio_base + (offset))
 
 #define valid_context(ctx) ((ctx)->valid)
 #define same_context(a, b) (((a)->context_id == (b)->context_id) && \
diff --git a/drivers/gpu/drm/i915/gvt/handlers.c b/drivers/gpu/drm/i915/gvt/handlers.c
index d59a934..e8ec403 100644
--- a/drivers/gpu/drm/i915/gvt/handlers.c
+++ b/drivers/gpu/drm/i915/gvt/handlers.c
@@ -134,7 +134,7 @@  static int render_mmio_to_ring_id(struct intel_gvt *gvt, unsigned int reg)
 
 	reg &= ~GENMASK(11, 0);
 	for (i = 0; i < I915_NUM_ENGINES; i++) {
-		if (gvt->dev_priv->engine[i].mmio_base == reg)
+		if (gvt->dev_priv->engine[i]->mmio_base == reg)
 			return i;
 	}
 	return -1;
diff --git a/drivers/gpu/drm/i915/gvt/scheduler.c b/drivers/gpu/drm/i915/gvt/scheduler.c
index 732672b..b15cdf5 100644
--- a/drivers/gpu/drm/i915/gvt/scheduler.c
+++ b/drivers/gpu/drm/i915/gvt/scheduler.c
@@ -68,7 +68,7 @@  static int populate_shadow_context(struct intel_vgpu_workload *workload)
 			workload->ctx_desc.lrca);
 
 	context_page_num = intel_lr_context_size(
-			&gvt->dev_priv->engine[ring_id]);
+			gvt->dev_priv->engine[ring_id]);
 
 	context_page_num = context_page_num >> PAGE_SHIFT;
 
@@ -171,7 +171,7 @@  static int dispatch_workload(struct intel_vgpu_workload *workload)
 	shadow_ctx->desc_template = workload->ctx_desc.addressing_mode <<
 				    GEN8_CTX_ADDRESSING_MODE_SHIFT;
 
-	workload->req = i915_gem_request_alloc(&dev_priv->engine[ring_id],
+	workload->req = i915_gem_request_alloc(dev_priv->engine[ring_id],
 					       shadow_ctx);
 	if (IS_ERR_OR_NULL(workload->req)) {
 		gvt_err("fail to allocate gem request\n");
@@ -298,7 +298,7 @@  static void update_guest_context(struct intel_vgpu_workload *workload)
 			workload->ctx_desc.lrca);
 
 	context_page_num = intel_lr_context_size(
-			&gvt->dev_priv->engine[ring_id]);
+			gvt->dev_priv->engine[ring_id]);
 
 	context_page_num = context_page_num >> PAGE_SHIFT;