[PATCH 2/2] drm/i915/gvt: Don't read ADPA_CRT_HOTPLUG_MONITOR from host
Zhang, Xiong Y
xiong.y.zhang at intel.com
Fri Jun 23 08:23:09 UTC 2017
> On 2017.06.20 11:37:23 +0800, Xiong Zhang wrote:
> > When host connect a crt screen, linux guest will detect two
> > screens: crt and dp. This is wrong as linux guest has only
> > one dp.
> >
> > In order to avoid guest get host crt screen, we should set
> > ADPA_CRT_HOTPLUG_MONITOR to none. But MMIO_RO(PCH_ADPA) prevent
> > from this. So MMIO_DH should be used instead of MMIO_RO.
> >
> > Signed-off-by: Xiong Zhang <xiong.y.zhang at intel.com>
> > ---
> > drivers/gpu/drm/i915/gvt/handlers.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/i915/gvt/handlers.c
> b/drivers/gpu/drm/i915/gvt/handlers.c
> > index 973396b..89f2a9d 100644
> > --- a/drivers/gpu/drm/i915/gvt/handlers.c
> > +++ b/drivers/gpu/drm/i915/gvt/handlers.c
> > @@ -1898,7 +1898,7 @@ static int init_generic_mmio_info(struct intel_gvt
> *gvt)
> > MMIO_F(_PCH_DPD_AUX_CH_CTL, 6 * 4, 0, 0, 0, D_PRE_SKL, NULL,
> > dp_aux_ch_ctl_mmio_write);
> >
> > - MMIO_RO(PCH_ADPA, D_ALL, 0, ADPA_CRT_HOTPLUG_MONITOR_MASK,
> NULL, pch_adpa_mmio_write);
> > + MMIO_DH(PCH_ADPA, D_ALL, NULL, pch_adpa_mmio_write);
> >
>
> so this will still depend on whether host machine has vga connect or not?
> We should force to return no vga whatever host has.
[Zhang, Xiong Y] this depends on guest driver behave, if host machine has vga connected, the initial value of ADPA_CRT_HOTPLUG_MONITOR_MASK is set by host, then guest i915 driver will clear this bit to 0 in intel_crt_reset(), finally guest i915 won't detect host's vga in intel_crt_detect(). But recently I found windows driver doesn't do crt_reset() and window's guest still detects host's vga.
So I will enhance this patch: set the initial value of this bit to 0 in intel_vgpu_init_display() + this patch.
thanks
>
> --
> Open Source Technology Center, Intel ltd.
>
> $gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
More information about the intel-gvt-dev
mailing list