[Spice-devel] [PATCH xf86-video-qxl] Fix drawable mm_time with KMS

Christophe Fergeau cfergeau at redhat.com
Mon Jun 22 10:19:06 PDT 2015


On Mon, Jun 22, 2015 at 07:09:05PM +0200, Christophe Fergeau wrote:
> On Mon, Jun 22, 2015 at 04:08:12PM +0200, Javier Celaya wrote:
> > El Lunes, 22 de junio de 2015 13:39:17 Christophe Fergeau escribió:
> > > Hey,
> > > 
> > > On Fri, Jun 19, 2015 at 02:05:10PM +0200, Javier Celaya wrote:
> > > > When KMS is enabled, the mm_time value of a QXLDrawable is undefined.
> > > > This results in severe synchronization problems. This patch sets it to
> > > > zero to force the spice-server to use the local clock.
> > > > ---
> > > > 
> > > >  src/qxl_surface.c | 1 +
> > > >  1 file changed, 1 insertion(+)
> > > > 
> > > > diff --git a/src/qxl_surface.c b/src/qxl_surface.c
> > > > index c5e76e0..95d34db 100644
> > > > --- a/src/qxl_surface.c
> > > > +++ b/src/qxl_surface.c
> > > > @@ -86,6 +86,7 @@ make_drawable (qxl_screen_t *qxl, qxl_surface_t *surf,
> > > > uint8_t type,> 
> > > >      if (!qxl->kms_enabled)
> > > >      
> > > >          drawable->mm_time = qxl->rom->mm_clock;
> > > > 
> > > > +    else drawable->mm_time = 0;
> > > 
> > > With what spice-server version have you been having this issue? Since
> > > commit c541d7e29dc0053e6, mm_time should be unconditionnally set
> > > server-side. Is there anything causing qxl->rom->mm_clock not to work
> > > with older spice-server and kms? In other words, why not remove the if
> > > (!qxl->kms_enabled) check?
> > > 
> > > Christophe
> > 
> > Hi Christophe
> > 
> > Indeed the version of spice-server might be a bit old, it is v0.12.4. I have not tested 
> > with a newer one. However I tried to remove the (!qxl->kms_enabled) check and that 
> > resulted in a segmentation fault. I suppose qxl->rom is NULL with kms, but I don't 
> > know why.-- 
> 
> Ah right, this kind of low level interaction with the device is done in
> the kernel module, not in the xorg driver. I'm fairly sure this is
> obsolete with spice-server.git, but it does not hurt to make sure this
> field is initialized.

I've pushed your patch with a minor formatting change.

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20150622/48a5881c/attachment.sig>


More information about the Spice-devel mailing list