intel / XenGT-Preview-xen

20 stars 7 forks source link

How to use Indirect Mode Display? #9

Open Min-Kang opened 9 years ago

Min-Kang commented 9 years ago

I have tried to enable Indirect Mode display in my haswell PC. I have applyed kernel parameter(xen_vgt.propagate_monitor_to_guest=0) and use monitor.conf by following manual. But I can't see vgt display

Do I miss something to enable Indirect Mode display?

I think the functions from i915_gem_vgtbuffer.c is the one to enable Indirect Mode Display, Am i right?

Please give some guides to enable the Mode.

zhiyuanlv commented 9 years ago

Hello, You mean the mode described in XenGT_Setup_Guide section 4.4 right?

That mode is not related to i915_gem_vgtbuffer.c. It provides VM a monitor on virtual port, not necessarily the same as physical port. In order to do that, users need to provide the map information between virtual port and the physical port that has monitor connected.

i915_gem_vgtbuffer.c is used when users want to get guest framebuffer and use it to render another windows. Hope that helps. Thanks!

Min-Kang commented 9 years ago

Thanks for your reply.

So you mean that the Indirect Mode is remapping the virtual port of VM and physical port, right? ‎‎ According to the slides (http://events.linuxfoundation.org/sites/events/files/slides/XenGT-LinuxCollaborationSummit-final_1.pdf), the Indirect mode composite the framebuffer of VM and disply through a Dom 0. I would like to do that but I couldn't.

But VM stops after following kernel messages out. [ 2.223765] i915_balloon_space: start 0xb7ff000 end 0x10000000 [ 2.224322] free_space ffff88005d7562a0 [ 2.224792] free_space ffff88005d7562a0 [ 2.225300] bl_info.space[1] = ffff88005d756300 [ 2.225815] balloon successfully [ 6.538016] vGT: PPGTT PDEs begins @ 0x43e00 [ 6.717961] i915: intel_flush_display_plane [ 6.718858] i915: intel_flush_display_plane [ 6.719833] i915: intel_flush_display_plane [ 6.721472] ------------[ cut here ]------------ [ 6.722019] WARNING: CPU: 1 PID: 1 at drivers/gpu/drm/i915/intel_display.c:3872 intel_modeset_check_state+0x75c/0x770() [ 6.722907] wrong connector dpms state [ 6.723383] Modules linked in: [ 6.724033] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 3.11.6-vgt+ #11 [ 6.724593] Hardware name: Xen HVM domU, BIOS 4.3.1 11/26/2014 [ 6.725136] 0000000000000009 ffff88007b907940 ffffffff8172a59b ffff88007b907988 [ 6.726608] ffff88007b907978 ffffffff8106e1fd ffff88005d5e5800 ffff88005d5e4800 [ 6.728079] ffff88005d5e2000 ffff88005d5e2460 0000000000000000 ffff88007b9079d8 [ 6.729557] Call Trace: [ 6.730008] [] dump_stack+0x45/0x56 [ 6.730524] [] warn_slowpath_common+0x7d/0xa0 [ 6.731117] [] warn_slowpath_fmt+0x4c/0x50 [ 6.731648] [] ? intel_ddi_connector_get_hw_state+0x63/0x120 [ 6.732416] [] intel_modeset_check_state+0x75c/0x770 [ 6.733043] [] ? intel_dump_pipe_config.isra.42+0x1e2/0x1f0 [ 6.733829] [] intel_modeset_setup_hw_state+0x83d/0xad0 [ 6.734406] [] intel_modeset_gem_init+0x24/0x30 [ 6.734952] [] i915_driver_load+0xbbe/0xe40 [ 6.735486] [] ? extcon_dev_register+0x6f0/0x6f0 [ 6.736027] [] drm_get_pci_dev+0x166/0x2c0 [ 6.736577] [] i915_pci_probe+0x8b/0x90 [ 6.737103] [] pci_device_probe+0x147/0x160 [ 6.737631] [] driver_probe_device+0x7f/0x380 [ 6.738168] [] __driver_attach+0x93/0xa0 [ 6.738690] [] ? device_attach+0x40/0x40 [ 6.739283] [] bus_for_each_dev+0x63/0xa0 [ 6.739845] [] driver_attach+0x1e/0x20 [ 6.740363] [] bus_add_driver+0x1e8/0x2a0 [ 6.740885] [] ? ttm_init+0x67/0x67 [ 6.741396] [] driver_register+0x74/0x150 [ 6.741917] [] ? ttm_init+0x67/0x67 [ 6.742430] [] pci_register_driver+0x4b/0x50 [ 6.742967] [] drm_pci_init+0x115/0x130 [ 6.743531] [] ? ttm_init+0x67/0x67 [ 6.744040] [] i915_init+0x82/0x84 [ 6.745608] [] do_one_initcall+0xd2/0x180 [ 6.746150] [] ? parse_args+0x225/0x400 [ 6.746698] [] kernel_init_freeable+0x15e/0x1e3 [ 6.747256] [] ? do_early_param+0x88/0x88 [ 6.747816] [] ? rest_init+0x80/0x80 [ 6.748345] [] kernel_init+0xe/0x190 [ 6.748877] [] ret_from_fork+0x7c/0xb0 [ 6.749411] [] ? rest_init+0x80/0x80 [ 6.749938] ---[ end trace 333fa07b1c00b9da ]---

I think that is needed a compositer but I cannot find it from the code.