Re: [PATCH spice-server] red-qxl: Make sure we have at least one monitor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Frediano Ziglio (fziglio@xxxxxxxxxx) wrote:
> > 
> > On Thu, Sep 19, 2019 at 11:17:25AM +0100, Frediano Ziglio wrote:
> > > It does not make sense to have a graphic card without a monitor.
> > > In spice_qxl_set_max_monitors we prevent to set 0 monitors, do
> > > the same in spice_qxl_set_device_info.
> > > 
> > > This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1691721.
> > > 
> > > Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
> > 
> > Acked-by: Victor Toso <victortoso@xxxxxxxxxx>
> > 
> 
> Can I add a 
> 
> Tested-by: Dr. David Alan Gilbert <dgilbert@xxxxxxxxxx>
> 

Yes you can; fixes it nicely for me.

Dave

> 
> 
> > > ---
> > >  server/red-qxl.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/server/red-qxl.c b/server/red-qxl.c
> > > index 03348270..dbfcd440 100644
> > > --- a/server/red-qxl.c
> > > +++ b/server/red-qxl.c
> > > @@ -804,7 +804,7 @@ void spice_qxl_set_device_info(QXLInstance *instance,
> > >      }
> > >  
> > >      instance->st->monitors_count = device_display_id_count;
> > > -    instance->st->max_monitors = device_display_id_count;
> > > +    instance->st->max_monitors = MAX(1u, device_display_id_count);
> > >  
> > >      reds_send_device_display_info(red_qxl_get_server(instance->st));
> > >  }
--
Dr. David Alan Gilbert / dgilbert@xxxxxxxxxx / Manchester, UK
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]