Re: [Intel-gfx] 5.14-rc2 warnings with kvmgvt

2021-07-22 Thread Christoph Hellwig
On Thu, Jul 22, 2021 at 09:03:45AM -0700, Lucas De Marchi wrote:
> On Thu, Jul 22, 2021 at 08:20:34AM +0100, Christoph Hellwig wrote:
> > On Thu, Jul 22, 2021 at 01:55:23AM -0400, Lucas De Marchi wrote:
> > > humn... PORT_F. KBL doesn't have PORT_F. We decided to keep the handling
> > > of DISPLAY_VER == 10 and DISPLAY_VER == 9 together and trust the VBT,
> > > but when the VBT is not present, DDI F will get added unconditio.
> > > 
> > > maybe best thing to do is to split that
> > 
> > With this and the previous patch the stack traces are gone.
> 
> maybe not the perfect fix though... can you share how you're starting
> qemu so I can try to reproduce it? I'd like to see a log with
> drm.debug=0xe param.
> 
> In theory 5a9d38b20a5a ("drm/i915/display: hide workaround for broken vbt in 
> intel_bios.c")
> should filter out the PORT_F in KBL.

Here is my qemu script that reproduces the issue:



kvm-gvt.sh
Description: Bourne shell script
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] 5.14-rc2 warnings with kvmgvt

2021-07-22 Thread Lucas De Marchi

On Thu, Jul 22, 2021 at 08:20:34AM +0100, Christoph Hellwig wrote:

On Thu, Jul 22, 2021 at 01:55:23AM -0400, Lucas De Marchi wrote:

humn... PORT_F. KBL doesn't have PORT_F. We decided to keep the handling
of DISPLAY_VER == 10 and DISPLAY_VER == 9 together and trust the VBT,
but when the VBT is not present, DDI F will get added unconditio.

maybe best thing to do is to split that


With this and the previous patch the stack traces are gone.


maybe not the perfect fix though... can you share how you're starting
qemu so I can try to reproduce it? I'd like to see a log with
drm.debug=0xe param.

In theory 5a9d38b20a5a ("drm/i915/display: hide workaround for broken vbt in 
intel_bios.c")
should filter out the PORT_F in KBL.


thanks
Lucas De Marchi
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] 5.14-rc2 warnings with kvmgvt

2021-07-22 Thread Christoph Hellwig
On Thu, Jul 22, 2021 at 01:55:23AM -0400, Lucas De Marchi wrote:
> humn... PORT_F. KBL doesn't have PORT_F. We decided to keep the handling
> of DISPLAY_VER == 10 and DISPLAY_VER == 9 together and trust the VBT,
> but when the VBT is not present, DDI F will get added unconditio.
> 
> maybe best thing to do is to split that

With this and the previous patch the stack traces are gone.
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] 5.14-rc2 warnings with kvmgvt

2021-07-21 Thread Lucas De Marchi

On Thu, Jul 22, 2021 at 05:24:30AM +0100, Christoph Hellwig wrote:

On Wed, Jul 21, 2021 at 05:18:18PM -0400, Rodrigo Vivi wrote:

could you please try this small patch?


I had to hand apply it as it wa corruped to due to cut off context.

It fixes one of the warnings, new output below:

[4.182820] i915 :00:04.0: [drm] Virtual GPU for Intel GVT-g detected.
[4.184076] i915 :00:04.0: [drm] VT-d active for gfx access
[4.185199] i915 :00:04.0: [drm] iGVT-g active, disabling use of stolen 
memory
[4.207889] i915 :00:04.0: BAR 6: can't assign [??? 0x flags 
0x2000] (bogus a)
[4.210062] i915 :00:04.0: [drm] Failed to find VBIOS tables (VBT)
[4.212256] i915 :00:04.0: vgaarb: changed VGA decodes: 
olddecodes=io+mem,decodes=none:owm
[4.214447] i915 :00:04.0: Direct firmware load for 
i915/kbl_dmc_ver1_04.bin failed with 2
[4.215447] i915 :00:04.0: [drm] Failed to load DMC firmware 
i915/kbl_dmc_ver1_04.bin. Di.
[4.216643] i915 :00:04.0: [drm] DMC firmware homepage: 
https://git.kernel.org/pub/scm/li5
[4.227760] i915 :00:04.0: [drm] failed to retrieve link info, disabling 
eDP
[4.229706] [ cut here ]
[4.230204] Missing case (port == 5)


humn... PORT_F. KBL doesn't have PORT_F. We decided to keep the handling
of DISPLAY_VER == 10 and DISPLAY_VER == 9 together and trust the VBT,
but when the VBT is not present, DDI F will get added unconditio.

maybe best thing to do is to split that

---8<-
diff --git a/drivers/gpu/drm/i915/display/intel_display.c 
b/drivers/gpu/drm/i915/display/intel_display.c
index c274bfb8e549..44cad63e20fb 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -11371,6 +11371,13 @@ static void intel_setup_outputs(struct 
drm_i915_private *dev_priv)
intel_ddi_init(dev_priv, PORT_E);
intel_ddi_init(dev_priv, PORT_F);
icl_dsi_init(dev_priv);
+   } else if (DISPLAY_VER(dev_priv) == 10) {
+   intel_ddi_init(dev_priv, PORT_A);
+   intel_ddi_init(dev_priv, PORT_B);
+   intel_ddi_init(dev_priv, PORT_C);
+   intel_ddi_init(dev_priv, PORT_D);
+   intel_ddi_init(dev_priv, PORT_E);
+   intel_ddi_init(dev_priv, PORT_F);
} else if (IS_GEMINILAKE(dev_priv) || IS_BROXTON(dev_priv)) {
intel_ddi_init(dev_priv, PORT_A);
intel_ddi_init(dev_priv, PORT_B);
@@ -11382,7 +11389,6 @@ static void intel_setup_outputs(struct drm_i915_private 
*dev_priv)
intel_ddi_init(dev_priv, PORT_C);
intel_ddi_init(dev_priv, PORT_D);
intel_ddi_init(dev_priv, PORT_E);
-   intel_ddi_init(dev_priv, PORT_F);
} else if (HAS_DDI(dev_priv)) {
u32 found;
 
---8<-


thanks
Lucas De Marchi


[4.230652] WARNING: CPU: 3 PID: 1 at 
drivers/gpu/drm/i915/display/intel_hdmi.c:2740 intel_hd0
[4.231815] Modules linked in:
[4.232146] CPU: 3 PID: 1 Comm: swapper/0 Not tainted 5.14.0-rc2+ #40
[4.232826] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 
1.14.0-2 04/01/2014
[4.233706] RIP: 0010:intel_hdmi_init_connector+0x7cf/0x880
[4.234330] Code: b6 fb 45 89 fb e9 bd fb ff ff 49 63 d7 48 c7 c6 da 67 18 
83 44 89 44 24 10 4
[4.236289] RSP: :c9013be8 EFLAGS: 00010282
[4.236949] RAX:  RBX: 888104cda000 RCX: 
[4.237703] RDX: 0001 RSI: 831a7617 RDI: 
[4.238499] RBP: 888104c01000 R08: 0001 R09: 0001
[4.239240] R10:  R11: 3fff R12: 8881054c
[4.240112] R13: 0005 R14: 8881054c R15: 0005
[4.240963] FS:  () GS:88813bd8() 
knlGS:
[4.241856] CS:  0010 DS:  ES:  CR0: 80050033
[4.242533] CR2:  CR3: 03462000 CR4: 06e0
[4.243437] Call Trace:
[4.243754]  intel_ddi_init+0x88d/0xc30
[4.244216]  intel_modeset_init_nogem+0xdab/0x1310
[4.244792]  ? intel_irq_postinstall+0x1aa/0x520
[4.245372]  i915_driver_probe+0x695/0xd30
[4.245908]  ? _raw_spin_unlock_irqrestore+0x33/0x50
[4.246507]  pci_device_probe+0xcd/0x140
[4.246933]  really_probe.part.0+0x99/0x270
[4.247421]  __driver_probe_device+0x8b/0x120
[4.247887]  driver_probe_device+0x19/0x90
[4.248328]  __driver_attach+0x79/0x120
[4.248740]  ? __device_attach_driver+0x90/0x90
[4.249225]  bus_for_each_dev+0x78/0xc0
[4.249637]  bus_add_driver+0x109/0x1b0
[4.250051]  driver_register+0x86/0xd0
[4.250512]  ? ttm_init+0x18/0x18
[4.250884]  i915_init+0x58/0x72
[4.251234]  do_one_initcall+0x56/0x2e0
[4.251644]  ? rcu_read_lock_sched_held+0x3a/0x70
[4.252150]  kern

Re: [Intel-gfx] 5.14-rc2 warnings with kvmgvt

2021-07-21 Thread Christoph Hellwig
On Thu, Jul 22, 2021 at 01:05:49PM +0800, Zhenyu Wang wrote:
> On 2021.07.21 13:10:49 +0200, Christoph Hellwig wrote:
> > Hi all,
> > 
> > I'm trying to test some changes for the gvt code, but even with a baseline
> > 5.14-rc2 host and guest the 915 driver does not seem overly happy:
> >
> 
> I think we also got bug report on those display related warnings, should be
> some issue with our virtual display model that doesn't work nicely with more 
> i915
> display pipe/port check or exercises have been added...But I believe you 
> should
> still get virtual framebuffer up and show, right?

Well, as soon as I add a display the warnings disappear anyway.  Not
sure how to test if the framebuffers gets up without the display.
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] 5.14-rc2 warnings with kvmgvt

2021-07-21 Thread Zhenyu Wang
On 2021.07.21 13:10:49 +0200, Christoph Hellwig wrote:
> Hi all,
> 
> I'm trying to test some changes for the gvt code, but even with a baseline
> 5.14-rc2 host and guest the 915 driver does not seem overly happy:
>

I think we also got bug report on those display related warnings, should be
some issue with our virtual display model that doesn't work nicely with more 
i915
display pipe/port check or exercises have been added...But I believe you should
still get virtual framebuffer up and show, right?

> [5.693099] i915 :00:04.0: [drm] Virtual GPU for Intel GVT-g detected.
> [5.694841] i915 :00:04.0: [drm] VT-d active for gfx access
> [5.696411] i915 :00:04.0: [drm] iGVT-g active, disabling use of 
> stolen memory
> [5.711317] i915 :00:04.0: BAR 6: can't assign [??? 0x flags 
> 0x2000] (bogus alignm)
> [5.712847] i915 :00:04.0: [drm] Failed to find VBIOS tables (VBT)
> [5.714343] i915 :00:04.0: vgaarb: changed VGA decodes: 
> olddecodes=io+mem,decodes=none:owns=iom
> [5.716466] i915 :00:04.0: Direct firmware load for 
> i915/kbl_dmc_ver1_04.bin failed with error2
> [5.718021] i915 :00:04.0: [drm] Failed to load DMC firmware 
> i915/kbl_dmc_ver1_04.bin. Disabli.
> [5.719914] i915 :00:04.0: [drm] DMC firmware homepage: 
> https://git.kernel.org/pub/scm/linux/k5
> [5.733269] i915 :00:04.0: [drm] failed to retrieve link info, 
> disabling eDP
> [5.735841] i915 :00:04.0: [drm] *ERROR* crtc 51: Can't calculate 
> constants, dotclock = 0!
> [5.737354] [ cut here ]
> [5.738141] i915 :00:04.0: 
> drm_WARN_ON_ONCE(drm_drv_uses_atomic_modeset(dev))
> [5.738165] WARNING: CPU: 0 PID: 1 at drivers/gpu/drm/drm_vblank.c:728 
> drm_crtc_vblank_helper_get_0
> [5.738745] Modules linked in:
> [5.738745] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.14.0-rc2+ #22
> [5.738745] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 
> 1.14.0-2 04/01/2014
> [5.738745] RIP: 
> 0010:drm_crtc_vblank_helper_get_vblank_timestamp_internal+0x335/0x350
> [5.738745] Code: 4c 8b 6f 50 4d 85 ed 75 03 4c 8b 2f e8 34 10 26 00 48 c7 
> c1 20 54 0d 83 4c 89 ea0
> [5.738745] RSP: :c9013a90 EFLAGS: 00010086
> [5.738745] RAX:  RBX: 81c3c5b0 RCX: 
> 
> [5.738745] RDX: 0003 RSI: fffe RDI: 
> 
> [5.738745] RBP: c9013b00 R08: 83bb3e28 R09: 
> 0003
> [5.738745] R10: 834b3e40 R11: 3fff R12: 
> 
> [5.738745] R13: 888100e982f0 R14: 8881053f0340 R15: 
> 888105592178
> [5.738745] FS:  () GS:88813bc0() 
> knlGS:
> [5.738745] CS:  0010 DS:  ES:  CR0: 80050033
> [5.738745] CR2:  CR3: 03462000 CR4: 
> 06f0
> [5.738745] Call Trace:
> [5.738745]  drm_get_last_vbltimestamp+0xa5/0xb0
> [5.738745]  drm_reset_vblank_timestamp+0x56/0xc0
> [5.738745]  drm_crtc_vblank_on+0x81/0x140
> [5.738745]  intel_crtc_vblank_on+0x2b/0xe0
> [5.738745]  intel_modeset_setup_hw_state+0xa9c/0x1ab0
> [5.738745]  ? ww_mutex_lock+0x2b/0x90
> [5.738745]  intel_modeset_init_nogem+0x3c5/0x1310
> [5.738745]  ? intel_irq_postinstall+0x1aa/0x520
> [5.738745]  i915_driver_probe+0x695/0xd30
> [5.738745]  ? _raw_spin_unlock_irqrestore+0x33/0x50
> [5.738745]  pci_device_probe+0xcd/0x140
> [5.738745]  really_probe.part.0+0x99/0x270
> [5.738745]  __driver_probe_device+0x8b/0x120
> [5.738745]  driver_probe_device+0x19/0x90
> [5.738745]  __driver_attach+0x79/0x120
> [5.738745]  ? __device_attach_driver+0x90/0x90
> [5.738745]  bus_for_each_dev+0x78/0xc0
> [5.738745]  bus_add_driver+0x109/0x1b0
> [5.738745]  driver_register+0x86/0xd0
> [5.738745]  ? ttm_init+0x18/0x18
> [5.738745]  i915_init+0x58/0x72
> [5.738745]  do_one_initcall+0x56/0x2e0
> [5.738745]  ? rcu_read_lock_sched_held+0x3a/0x70
> [5.738745]  kernel_init_freeable+0x186/0x1ce
> [5.738745]  ? rest_init+0x250/0x250
> [5.738745]  kernel_init+0x11/0x110
> [5.738745]  ret_from_fork+0x22/0x30
> [5.738745] irq event stamp: 8200428
> [5.738745] hardirqs last  enabled at (8200427): [] 
> _raw_spin_unlock_irqrestore+0
> [5.738745] hardirqs last disabled at (8200428): [] 
> _raw_spin_lock_irq+0x41/0x50
> [5.738745] softirqs last  enabled at (8199086): [] 
> irq_exit_rcu+0x108/0x140
> [5.738745] softirqs last disabled at (8199079): [] 
> irq_exit_rcu+0x108/0x140
> [5.738745] ---[ end trace e99e0812b8ee9c5d ]---
> [5.786472] i915 :00:04.0: [drm] VGT ballooning configuration:
> [5.787531] i915 :00:04.0: [drm] Mappable graphic memory: base 
> 0x31c7000 size 65536KiB
> [5.788865] i915 :00:04.0: [drm] Unmappable graphic memory: base 
> 0xe7ef8000

Re: [Intel-gfx] 5.14-rc2 warnings with kvmgvt

2021-07-21 Thread Christoph Hellwig
On Wed, Jul 21, 2021 at 05:18:18PM -0400, Rodrigo Vivi wrote:
> could you please try this small patch?

I had to hand apply it as it wa corruped to due to cut off context.

It fixes one of the warnings, new output below:

[4.182820] i915 :00:04.0: [drm] Virtual GPU for Intel GVT-g detected.
[4.184076] i915 :00:04.0: [drm] VT-d active for gfx access
[4.185199] i915 :00:04.0: [drm] iGVT-g active, disabling use of stolen 
memory
[4.207889] i915 :00:04.0: BAR 6: can't assign [??? 0x flags 
0x2000] (bogus a)
[4.210062] i915 :00:04.0: [drm] Failed to find VBIOS tables (VBT)
[4.212256] i915 :00:04.0: vgaarb: changed VGA decodes: 
olddecodes=io+mem,decodes=none:owm
[4.214447] i915 :00:04.0: Direct firmware load for 
i915/kbl_dmc_ver1_04.bin failed with 2
[4.215447] i915 :00:04.0: [drm] Failed to load DMC firmware 
i915/kbl_dmc_ver1_04.bin. Di.
[4.216643] i915 :00:04.0: [drm] DMC firmware homepage: 
https://git.kernel.org/pub/scm/li5
[4.227760] i915 :00:04.0: [drm] failed to retrieve link info, disabling 
eDP
[4.229706] [ cut here ]
[4.230204] Missing case (port == 5)
[4.230652] WARNING: CPU: 3 PID: 1 at 
drivers/gpu/drm/i915/display/intel_hdmi.c:2740 intel_hd0
[4.231815] Modules linked in:
[4.232146] CPU: 3 PID: 1 Comm: swapper/0 Not tainted 5.14.0-rc2+ #40
[4.232826] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 
1.14.0-2 04/01/2014
[4.233706] RIP: 0010:intel_hdmi_init_connector+0x7cf/0x880
[4.234330] Code: b6 fb 45 89 fb e9 bd fb ff ff 49 63 d7 48 c7 c6 da 67 18 
83 44 89 44 24 10 4
[4.236289] RSP: :c9013be8 EFLAGS: 00010282
[4.236949] RAX:  RBX: 888104cda000 RCX: 
[4.237703] RDX: 0001 RSI: 831a7617 RDI: 
[4.238499] RBP: 888104c01000 R08: 0001 R09: 0001
[4.239240] R10:  R11: 3fff R12: 8881054c
[4.240112] R13: 0005 R14: 8881054c R15: 0005
[4.240963] FS:  () GS:88813bd8() 
knlGS:
[4.241856] CS:  0010 DS:  ES:  CR0: 80050033
[4.242533] CR2:  CR3: 03462000 CR4: 06e0
[4.243437] Call Trace:
[4.243754]  intel_ddi_init+0x88d/0xc30
[4.244216]  intel_modeset_init_nogem+0xdab/0x1310
[4.244792]  ? intel_irq_postinstall+0x1aa/0x520
[4.245372]  i915_driver_probe+0x695/0xd30
[4.245908]  ? _raw_spin_unlock_irqrestore+0x33/0x50
[4.246507]  pci_device_probe+0xcd/0x140
[4.246933]  really_probe.part.0+0x99/0x270
[4.247421]  __driver_probe_device+0x8b/0x120
[4.247887]  driver_probe_device+0x19/0x90
[4.248328]  __driver_attach+0x79/0x120
[4.248740]  ? __device_attach_driver+0x90/0x90
[4.249225]  bus_for_each_dev+0x78/0xc0
[4.249637]  bus_add_driver+0x109/0x1b0
[4.250051]  driver_register+0x86/0xd0
[4.250512]  ? ttm_init+0x18/0x18
[4.250884]  i915_init+0x58/0x72
[4.251234]  do_one_initcall+0x56/0x2e0
[4.251644]  ? rcu_read_lock_sched_held+0x3a/0x70
[4.252150]  kernel_init_freeable+0x186/0x1ce
[4.252625]  ? rest_init+0x250/0x250
[4.253032]  kernel_init+0x11/0x110
[4.253464]  ret_from_fork+0x22/0x30
[4.253864] irq event stamp: 8201065
[4.254308] hardirqs last  enabled at (8201075): [] 
console_unlock+0x323/0x0
[4.255377] hardirqs last disabled at (8201082): [] 
console_unlock+0x3d0/0x0
[4.256325] softirqs last  enabled at (8200736): [] 
irq_exit_rcu+0x108/0x140
[4.257234] softirqs last disabled at (8200695): [] 
irq_exit_rcu+0x108/0x140
[4.258142] ---[ end trace 2e5275f4e68f236b ]---
[4.259727] i915 :00:04.0: [drm] [ENCODER:94:DDI B/PHY B] is disabled/in 
DSI mode with ant
[4.260917] i915 :00:04.0: [drm] [ENCODER:110:DDI C/PHY C] is 
disabled/in DSI mode with at
[4.262086] i915 :00:04.0: [drm] [ENCODER:130:DDI F/PHY F] is 
disabled/in DSI mode with at
[4.263764] i915 :00:04.0: [drm] VGT ballooning configuration:
[4.264418] i915 :00:04.0: [drm] Mappable graphic memory: base 0x218 
size 65536KiB
[4.265284] i915 :00:04.0: [drm] Unmappable graphic memory: base 
0x1000 size 393216KiB
[4.266188] i915 :00:04.0: [drm] balloon space: range [ 0x2800 - 
0x1 ] 353894.
[4.267159] i915 :00:04.0: [drm] balloon space: range [ 0x0 - 0x218
] 34304 KiB.
[4.268025] i915 :00:04.0: [drm] balloon space: range [ 0x618 - 
0x1000 ] 162304 K.
[4.268968] i915 :00:04.0: [drm] VGT balloon successfully
[4.888116] i915 :00:04.0: [drm] *ERROR* Failed to disable SAGV (-110)
[4.908031] [drm] Initialized i915 1.6.0 20201103 for :00:04.0 on minor
0

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.

Re: [Intel-gfx] 5.14-rc2 warnings with kvmgvt

2021-07-21 Thread Rodrigo Vivi
On Wed, Jul 21, 2021 at 09:40:03PM +0100, Christoph Hellwig wrote:
> On Wed, Jul 21, 2021 at 04:43:44PM +0100, Christoph Hellwig wrote:
> > > > I'm trying to test some changes for the gvt code, but even with a 
> > > > baseline
> > > > 5.14-rc2 host and guest the 915 driver does not seem overly happy:
> > > 
> > > Is this a regression over -rc1 or over 5.13?
> > > Bisect possible?
> > 
> > This was introduced somewhere between 5.12 and 5.13, still bisecting.
> > Note that it only happens for "headless" setups.  Once a display is
> > added on the qemu command line it goes away.
> 
> The culprit is:
> 
> commit f4eb6d4906669b4285c4f49c87814d4ce63c35bb
> Author: Jani Nikula 
> Date:   Wed Mar 17 18:36:45 2021 +0200
> 
> drm/i915/bios: limit default outputs to ports A through F
> 

could you please try this small patch?

diff --git a/drivers/gpu/drm/i915/display/intel_bios.c 
b/drivers/gpu/drm/i915/display/intel_bios.c
index 5b6922e28ef2..8bbeb5978bf7 100644
--- a/drivers/gpu/drm/i915/display/intel_bios.c
+++ b/drivers/gpu/drm/i915/display/intel_bios.c
@@ -2166,7 +2166,8 @@ static void
 init_vbt_missing_defaults(struct drm_i915_private *i915)
 {
enum port port;
-   int ports = PORT_A | PORT_B | PORT_C | PORT_D | PORT_E | PORT_F;
+   int ports = BIT(PORT_A) | BIT(PORT_B) | BIT(PORT_C) | \
+   BIT(PORT_D) | BIT(PORT_E) | BIT(PORT_F);
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] 5.14-rc2 warnings with kvmgvt

2021-07-21 Thread Christoph Hellwig
On Wed, Jul 21, 2021 at 04:43:44PM +0100, Christoph Hellwig wrote:
> > > I'm trying to test some changes for the gvt code, but even with a baseline
> > > 5.14-rc2 host and guest the 915 driver does not seem overly happy:
> > 
> > Is this a regression over -rc1 or over 5.13?
> > Bisect possible?
> 
> This was introduced somewhere between 5.12 and 5.13, still bisecting.
> Note that it only happens for "headless" setups.  Once a display is
> added on the qemu command line it goes away.

The culprit is:

commit f4eb6d4906669b4285c4f49c87814d4ce63c35bb
Author: Jani Nikula 
Date:   Wed Mar 17 18:36:45 2021 +0200

drm/i915/bios: limit default outputs to ports A through F

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


Re: [Intel-gfx] 5.14-rc2 warnings with kvmgvt

2021-07-21 Thread Christoph Hellwig
On Wed, Jul 21, 2021 at 07:24:47AM -0400, Rodrigo Vivi wrote:
> On Wed, Jul 21, 2021 at 01:10:49PM +0200, Christoph Hellwig wrote:
> > Hi all,
> > 
> > I'm trying to test some changes for the gvt code, but even with a baseline
> > 5.14-rc2 host and guest the 915 driver does not seem overly happy:
> 
> Is this a regression over -rc1 or over 5.13?
> Bisect possible?

This was introduced somewhere between 5.12 and 5.13, still bisecting.
Note that it only happens for "headless" setups.  Once a display is
added on the qemu command line it goes away.
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] 5.14-rc2 warnings with kvmgvt

2021-07-21 Thread Rodrigo Vivi
On Wed, Jul 21, 2021 at 01:10:49PM +0200, Christoph Hellwig wrote:
> Hi all,
> 
> I'm trying to test some changes for the gvt code, but even with a baseline
> 5.14-rc2 host and guest the 915 driver does not seem overly happy:

Is this a regression over -rc1 or over 5.13?
Bisect possible?

Could you please file a bug to our gitlab issues tracker:
https://gitlab.freedesktop.org/drm/intel/-/wikis/How-to-file-i915-bugs

Thanks,
Rodrigo.

> 
> [5.693099] i915 :00:04.0: [drm] Virtual GPU for Intel GVT-g detected.
> [5.694841] i915 :00:04.0: [drm] VT-d active for gfx access
> [5.696411] i915 :00:04.0: [drm] iGVT-g active, disabling use of 
> stolen memory
> [5.711317] i915 :00:04.0: BAR 6: can't assign [??? 0x flags 
> 0x2000] (bogus alignm)
> [5.712847] i915 :00:04.0: [drm] Failed to find VBIOS tables (VBT)
> [5.714343] i915 :00:04.0: vgaarb: changed VGA decodes: 
> olddecodes=io+mem,decodes=none:owns=iom
> [5.716466] i915 :00:04.0: Direct firmware load for 
> i915/kbl_dmc_ver1_04.bin failed with error2
> [5.718021] i915 :00:04.0: [drm] Failed to load DMC firmware 
> i915/kbl_dmc_ver1_04.bin. Disabli.
> [5.719914] i915 :00:04.0: [drm] DMC firmware homepage: 
> https://git.kernel.org/pub/scm/linux/k5
> [5.733269] i915 :00:04.0: [drm] failed to retrieve link info, 
> disabling eDP
> [5.735841] i915 :00:04.0: [drm] *ERROR* crtc 51: Can't calculate 
> constants, dotclock = 0!
> [5.737354] [ cut here ]
> [5.738141] i915 :00:04.0: 
> drm_WARN_ON_ONCE(drm_drv_uses_atomic_modeset(dev))
> [5.738165] WARNING: CPU: 0 PID: 1 at drivers/gpu/drm/drm_vblank.c:728 
> drm_crtc_vblank_helper_get_0
> [5.738745] Modules linked in:
> [5.738745] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.14.0-rc2+ #22
> [5.738745] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 
> 1.14.0-2 04/01/2014
> [5.738745] RIP: 
> 0010:drm_crtc_vblank_helper_get_vblank_timestamp_internal+0x335/0x350
> [5.738745] Code: 4c 8b 6f 50 4d 85 ed 75 03 4c 8b 2f e8 34 10 26 00 48 c7 
> c1 20 54 0d 83 4c 89 ea0
> [5.738745] RSP: :c9013a90 EFLAGS: 00010086
> [5.738745] RAX:  RBX: 81c3c5b0 RCX: 
> 
> [5.738745] RDX: 0003 RSI: fffe RDI: 
> 
> [5.738745] RBP: c9013b00 R08: 83bb3e28 R09: 
> 0003
> [5.738745] R10: 834b3e40 R11: 3fff R12: 
> 
> [5.738745] R13: 888100e982f0 R14: 8881053f0340 R15: 
> 888105592178
> [5.738745] FS:  () GS:88813bc0() 
> knlGS:
> [5.738745] CS:  0010 DS:  ES:  CR0: 80050033
> [5.738745] CR2:  CR3: 03462000 CR4: 
> 06f0
> [5.738745] Call Trace:
> [5.738745]  drm_get_last_vbltimestamp+0xa5/0xb0
> [5.738745]  drm_reset_vblank_timestamp+0x56/0xc0
> [5.738745]  drm_crtc_vblank_on+0x81/0x140
> [5.738745]  intel_crtc_vblank_on+0x2b/0xe0
> [5.738745]  intel_modeset_setup_hw_state+0xa9c/0x1ab0
> [5.738745]  ? ww_mutex_lock+0x2b/0x90
> [5.738745]  intel_modeset_init_nogem+0x3c5/0x1310
> [5.738745]  ? intel_irq_postinstall+0x1aa/0x520
> [5.738745]  i915_driver_probe+0x695/0xd30
> [5.738745]  ? _raw_spin_unlock_irqrestore+0x33/0x50
> [5.738745]  pci_device_probe+0xcd/0x140
> [5.738745]  really_probe.part.0+0x99/0x270
> [5.738745]  __driver_probe_device+0x8b/0x120
> [5.738745]  driver_probe_device+0x19/0x90
> [5.738745]  __driver_attach+0x79/0x120
> [5.738745]  ? __device_attach_driver+0x90/0x90
> [5.738745]  bus_for_each_dev+0x78/0xc0
> [5.738745]  bus_add_driver+0x109/0x1b0
> [5.738745]  driver_register+0x86/0xd0
> [5.738745]  ? ttm_init+0x18/0x18
> [5.738745]  i915_init+0x58/0x72
> [5.738745]  do_one_initcall+0x56/0x2e0
> [5.738745]  ? rcu_read_lock_sched_held+0x3a/0x70
> [5.738745]  kernel_init_freeable+0x186/0x1ce
> [5.738745]  ? rest_init+0x250/0x250
> [5.738745]  kernel_init+0x11/0x110
> [5.738745]  ret_from_fork+0x22/0x30
> [5.738745] irq event stamp: 8200428
> [5.738745] hardirqs last  enabled at (8200427): [] 
> _raw_spin_unlock_irqrestore+0
> [5.738745] hardirqs last disabled at (8200428): [] 
> _raw_spin_lock_irq+0x41/0x50
> [5.738745] softirqs last  enabled at (8199086): [] 
> irq_exit_rcu+0x108/0x140
> [5.738745] softirqs last disabled at (8199079): [] 
> irq_exit_rcu+0x108/0x140
> [5.738745] ---[ end trace e99e0812b8ee9c5d ]---
> [5.786472] i915 :00:04.0: [drm] VGT ballooning configuration:
> [5.787531] i915 :00:04.0: [drm] Mappable graphic memory: base 
> 0x31c7000 size 65536KiB
> [5.788865] i915 :00:04.0: [drm] Unmappable graphic memory: base 
> 0xe7ef8000 size 393216KiB
> [5.790270] i915 :00:04.0: [drm] balloon 

[Intel-gfx] 5.14-rc2 warnings with kvmgvt

2021-07-21 Thread Christoph Hellwig
Hi all,

I'm trying to test some changes for the gvt code, but even with a baseline
5.14-rc2 host and guest the 915 driver does not seem overly happy:

[5.693099] i915 :00:04.0: [drm] Virtual GPU for Intel GVT-g detected.
[5.694841] i915 :00:04.0: [drm] VT-d active for gfx access
[5.696411] i915 :00:04.0: [drm] iGVT-g active, disabling use of stolen 
memory
[5.711317] i915 :00:04.0: BAR 6: can't assign [??? 0x flags 
0x2000] (bogus alignm)
[5.712847] i915 :00:04.0: [drm] Failed to find VBIOS tables (VBT)
[5.714343] i915 :00:04.0: vgaarb: changed VGA decodes: 
olddecodes=io+mem,decodes=none:owns=iom
[5.716466] i915 :00:04.0: Direct firmware load for 
i915/kbl_dmc_ver1_04.bin failed with error2
[5.718021] i915 :00:04.0: [drm] Failed to load DMC firmware 
i915/kbl_dmc_ver1_04.bin. Disabli.
[5.719914] i915 :00:04.0: [drm] DMC firmware homepage: 
https://git.kernel.org/pub/scm/linux/k5
[5.733269] i915 :00:04.0: [drm] failed to retrieve link info, disabling 
eDP
[5.735841] i915 :00:04.0: [drm] *ERROR* crtc 51: Can't calculate 
constants, dotclock = 0!
[5.737354] [ cut here ]
[5.738141] i915 :00:04.0: 
drm_WARN_ON_ONCE(drm_drv_uses_atomic_modeset(dev))
[5.738165] WARNING: CPU: 0 PID: 1 at drivers/gpu/drm/drm_vblank.c:728 
drm_crtc_vblank_helper_get_0
[5.738745] Modules linked in:
[5.738745] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.14.0-rc2+ #22
[5.738745] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 
1.14.0-2 04/01/2014
[5.738745] RIP: 
0010:drm_crtc_vblank_helper_get_vblank_timestamp_internal+0x335/0x350
[5.738745] Code: 4c 8b 6f 50 4d 85 ed 75 03 4c 8b 2f e8 34 10 26 00 48 c7 
c1 20 54 0d 83 4c 89 ea0
[5.738745] RSP: :c9013a90 EFLAGS: 00010086
[5.738745] RAX:  RBX: 81c3c5b0 RCX: 
[5.738745] RDX: 0003 RSI: fffe RDI: 
[5.738745] RBP: c9013b00 R08: 83bb3e28 R09: 0003
[5.738745] R10: 834b3e40 R11: 3fff R12: 
[5.738745] R13: 888100e982f0 R14: 8881053f0340 R15: 888105592178
[5.738745] FS:  () GS:88813bc0() 
knlGS:
[5.738745] CS:  0010 DS:  ES:  CR0: 80050033
[5.738745] CR2:  CR3: 03462000 CR4: 06f0
[5.738745] Call Trace:
[5.738745]  drm_get_last_vbltimestamp+0xa5/0xb0
[5.738745]  drm_reset_vblank_timestamp+0x56/0xc0
[5.738745]  drm_crtc_vblank_on+0x81/0x140
[5.738745]  intel_crtc_vblank_on+0x2b/0xe0
[5.738745]  intel_modeset_setup_hw_state+0xa9c/0x1ab0
[5.738745]  ? ww_mutex_lock+0x2b/0x90
[5.738745]  intel_modeset_init_nogem+0x3c5/0x1310
[5.738745]  ? intel_irq_postinstall+0x1aa/0x520
[5.738745]  i915_driver_probe+0x695/0xd30
[5.738745]  ? _raw_spin_unlock_irqrestore+0x33/0x50
[5.738745]  pci_device_probe+0xcd/0x140
[5.738745]  really_probe.part.0+0x99/0x270
[5.738745]  __driver_probe_device+0x8b/0x120
[5.738745]  driver_probe_device+0x19/0x90
[5.738745]  __driver_attach+0x79/0x120
[5.738745]  ? __device_attach_driver+0x90/0x90
[5.738745]  bus_for_each_dev+0x78/0xc0
[5.738745]  bus_add_driver+0x109/0x1b0
[5.738745]  driver_register+0x86/0xd0
[5.738745]  ? ttm_init+0x18/0x18
[5.738745]  i915_init+0x58/0x72
[5.738745]  do_one_initcall+0x56/0x2e0
[5.738745]  ? rcu_read_lock_sched_held+0x3a/0x70
[5.738745]  kernel_init_freeable+0x186/0x1ce
[5.738745]  ? rest_init+0x250/0x250
[5.738745]  kernel_init+0x11/0x110
[5.738745]  ret_from_fork+0x22/0x30
[5.738745] irq event stamp: 8200428
[5.738745] hardirqs last  enabled at (8200427): [] 
_raw_spin_unlock_irqrestore+0
[5.738745] hardirqs last disabled at (8200428): [] 
_raw_spin_lock_irq+0x41/0x50
[5.738745] softirqs last  enabled at (8199086): [] 
irq_exit_rcu+0x108/0x140
[5.738745] softirqs last disabled at (8199079): [] 
irq_exit_rcu+0x108/0x140
[5.738745] ---[ end trace e99e0812b8ee9c5d ]---
[5.786472] i915 :00:04.0: [drm] VGT ballooning configuration:
[5.787531] i915 :00:04.0: [drm] Mappable graphic memory: base 0x31c7000 
size 65536KiB
[5.788865] i915 :00:04.0: [drm] Unmappable graphic memory: base 
0xe7ef8000 size 393216KiB
[5.790270] i915 :00:04.0: [drm] balloon space: range [ 0x1000 - 
0xe7ef8000 ] 3537888 KiB.
[5.791807] i915 :00:04.0: [drm] balloon space: range [ 0xffef8000 - 
0x1 ] 1056 KiB.
[5.793241] i915 :00:04.0: [drm] balloon space: range [ 0x0 - 0x31c7000 
] 50972 KiB.
[5.794565] i915 :00:04.0: [drm] balloon space: range [ 0x71c7000 - 
0x1000 ] 145636 KiB.
[5.796028] i915 :00:04.0: [drm] VGT balloon successfully
[6.670284] [ cut here ]
[6.67115