[PATCH] drm/i915/gvt: emulate SKL_FUSE_STATUS and LCPLL_CTL for virtual monitor detection

Li, Weinan Z weinan.z.li at intel.com
Fri Mar 17 03:29:45 UTC 2017


One issue guest show black screen on skylake embedway. But no bug NO. it's found with production branch kernel 1st.
I also checked the physical state of host, the LCPLL_CTL also show ENABLED and LOCKED.
Thanks.
Best Regards.
Weinan, LI


> -----Original Message-----
> From: Zhenyu Wang [mailto:zhenyuw at linux.intel.com]
> Sent: Friday, March 17, 2017 10:53 AM
> To: Li, Weinan Z <weinan.z.li at intel.com>
> Cc: intel-gvt-dev at lists.freedesktop.org
> Subject: Re: [PATCH] drm/i915/gvt: emulate SKL_FUSE_STATUS and LCPLL_CTL
> for virtual monitor detection
> 
> On 2017.03.17 09:38:57 +0800, Weinan Li wrote:
> > Initialize the correct vreg for virtual monitor.
> > Set PG0/1/2 distribution and fuse download done in SKL_FUSE_STATUS.
> > Set PLL_ENABLE and PLL_LOCK in LCPLL_CTL.
> > Guest may need to check these registers for display monitor detection
> > on Skylake platforms.
> >
> 
> Has this fixed any known issues on SKL?
> 
> > Signed-off-by: Weinan Li <weinan.z.li at intel.com>
> > ---
> >  drivers/gpu/drm/i915/gvt/display.c | 13 ++++++++++++-
> >  1 file changed, 12 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/i915/gvt/display.c
> > b/drivers/gpu/drm/i915/gvt/display.c
> > index 5419ae6..79939f9 100644
> > --- a/drivers/gpu/drm/i915/gvt/display.c
> > +++ b/drivers/gpu/drm/i915/gvt/display.c
> > @@ -172,9 +172,20 @@ static void emulate_monitor_status_change(struct
> intel_vgpu *vgpu)
> >  			SDE_PORTC_HOTPLUG_CPT |
> >  			SDE_PORTD_HOTPLUG_CPT);
> >
> > -	if (IS_SKYLAKE(dev_priv))
> > +	if (IS_SKYLAKE(dev_priv)) {
> >  		vgpu_vreg(vgpu, SDEISR) &= ~(SDE_PORTA_HOTPLUG_SPT |
> >  				SDE_PORTE_HOTPLUG_SPT);
> > +		vgpu_vreg(vgpu, SKL_FUSE_STATUS) |=
> > +				SKL_FUSE_DOWNLOAD_STATUS |
> > +				SKL_FUSE_PG0_DIST_STATUS |
> > +				SKL_FUSE_PG1_DIST_STATUS |
> > +				SKL_FUSE_PG2_DIST_STATUS;
> > +		vgpu_vreg(vgpu, LCPLL1_CTL) |=
> > +				LCPLL_PLL_ENABLE |
> > +				LCPLL_PLL_LOCK;
> > +		vgpu_vreg(vgpu, LCPLL2_CTL) |= LCPLL_PLL_ENABLE;
> > +
> > +	}
> >
> >  	if (intel_vgpu_has_monitor_on_port(vgpu, PORT_B)) {
> >  		vgpu_vreg(vgpu, SDEISR) |= SDE_PORTB_HOTPLUG_CPT;
> > --
> > 1.9.1
> >
> > _______________________________________________
> > intel-gvt-dev mailing list
> > intel-gvt-dev at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gvt-dev
> 
> --
> Open Source Technology Center, Intel ltd.
> 
> $gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827


More information about the intel-gvt-dev mailing list