[Intel-gfx] [PATCH 5/8] drm/i915: Add the display switch logic for vgpu in i915 driver

Daniel Vetter daniel at ffwll.ch
Tue Sep 30 12:56:41 CEST 2014


On Tue, Sep 30, 2014 at 06:25:26PM +0800, Zhiyuan Lv wrote:
> On Mon, Sep 29, 2014 at 02:30:09PM +0200, Daniel Vetter wrote:
> > I guess the question is what exactly you want to signal to the hyporvisor
> > with this. I guess I need to dig a bit into the sourcecode for the
> > hyperviros part, and you need to make a really clear specification of when
> > guests should call this and what the hyporvisor must to in reaction of
> > this.
> 
> In this patchset for i915 driver running inside a virtual machine, the code
> here is to signal vgt that guest framebuffer address in plane surface register
> is ready to be written into physical registers. vgt's reaction is to make
> policy change. After that point, VM's write to surface MMIO will go into
> physical register directly. Here we do not need notifications for every guest
> display surface MMIO write, but just the time we can do the policy change.
> 
> The usage of this is for guest system booting. At the very beginning, we block
> the guest surface MMIO writes so that the monitor still shows up host
> contents, then we rely on this notification to show up guest VM's screen.

This sounds more like we need one call at the end of the i915 driver load
sequence to signal to the hypervisor that everything is now down and a
proper driver is in charge of the virtual machine gfx.

> We have another change for i915 driver to notify vgt the modesetting. But that
> is for i915 running as a host driver. Sorry that it may be confusing to mix
> two things together. This can be discussed later.

Yeah, better split that out and move it to the host-side vgt integration
series.

> > I don't think we'll have any issues with a bit of overhead in the
> > frontbuffer flip/flush functions, they're not called too often. Aside:
> > There's no nice kerneldoc for this stuff:
> > 
> > http://people.freedesktop.org/~danvet/drm/drmI915.html#idp54709056
> >
> 
> Thanks for the info! The doc is helpful for me to understand the new feature.
> Since intel_frontbuffer_flush() will be called every time there is page flip
> request, that may not be what we want: just one time notification to do the
> policy change. Thanks!

Always nice when my documentation work proves useful ;-)

Cheers, Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch



More information about the Intel-gfx mailing list