提交 7e605902 编写于 作者: X Xiaolin Zhang 提交者: Zhenyu Wang

drm/i915/gvt: enabled pipe A default on creating vgpu

when i915 driver unloading, it will shutdown all CRTCs and
it will introudce kernel panic when conducting igt drv_module_reload
test case under guest environment (bug reported by XENGT-468) as below:

BUG: unable to handle kernel NULL pointer dereference at 0000000000000070
IP: intel_edp_backlight_off+0xe/0x7c [i915]
RIP: 0010:intel_edp_backlight_off+0xe/0x7c [i915]
Call Trace:
 intel_disable_ddi+0xb3/0xbc [i915]
 intel_modeset_setup_hw_state+0x654/0xb4c [i915]
 intel_modeset_init+0x9f1/0xe69 [i915]
 ? intel_i2c_reset+0x3d/0x40 [i915]
 ? intel_setup_gmbus+0xba/0x249 [i915]
 i915_driver_load+0xae5/0xcc0 [i915]
 i915_pci_probe+0x3a/0x3c [i915]
 local_pci_probe+0x38/0x7b
 pci_device_probe+0xec/0x12b
 driver_probe_device+0x134/0x294
 __driver_attach+0x6a/0x8c
 ? driver_probe_device+0x294/0x294
 bus_for_each_dev+0x68/0x80
 driver_attach+0x19/0x1b
 bus_add_driver+0xea/0x1d3
 ? 0xffffffffa03cd000
 driver_register+0x85/0xc1
 ? 0xffffffffa03cd000
 __pci_register_driver+0x55/0x57
 i915_init+0x57/0x5a [i915]
 do_one_initcall+0x8a/0x12e
 ? __vunmap+0x8d/0x93
 ? kmem_cache_alloc_trace+0x96/0x11c
 do_init_module+0x5a/0x1e1

in this case, active connector detected but no active pipe
available, so it will hang to disable connector.

to fix, on vgpu creating, to report active pipe available for
guest.
Signed-off-by: NXiaolin Zhang <xiaolin.zhang@intel.com>
Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
上级 c3c80f07
...@@ -282,6 +282,7 @@ static void clean_virtual_dp_monitor(struct intel_vgpu *vgpu, int port_num) ...@@ -282,6 +282,7 @@ static void clean_virtual_dp_monitor(struct intel_vgpu *vgpu, int port_num)
static int setup_virtual_dp_monitor(struct intel_vgpu *vgpu, int port_num, static int setup_virtual_dp_monitor(struct intel_vgpu *vgpu, int port_num,
int type, unsigned int resolution) int type, unsigned int resolution)
{ {
struct drm_i915_private *dev_priv = vgpu->gvt->dev_priv;
struct intel_vgpu_port *port = intel_vgpu_port(vgpu, port_num); struct intel_vgpu_port *port = intel_vgpu_port(vgpu, port_num);
if (WARN_ON(resolution >= GVT_EDID_NUM)) if (WARN_ON(resolution >= GVT_EDID_NUM))
...@@ -307,6 +308,7 @@ static int setup_virtual_dp_monitor(struct intel_vgpu *vgpu, int port_num, ...@@ -307,6 +308,7 @@ static int setup_virtual_dp_monitor(struct intel_vgpu *vgpu, int port_num,
port->type = type; port->type = type;
emulate_monitor_status_change(vgpu); emulate_monitor_status_change(vgpu);
vgpu_vreg(vgpu, PIPECONF(PIPE_A)) |= PIPECONF_ENABLE;
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册