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

Bug#586693: Improve resolution for QEMU



On Mon, Sep 06, 2010 at 01:50:24PM +0200, Julien Cristau wrote:
> On Mon, Sep  6, 2010 at 13:22:39 +0200, Guido Günther wrote:
> 
> > Hi,
> > On Mon, Jun 21, 2010 at 07:59:28PM +0200, Guido Günther wrote:
> > > Package: xserver-xorg-video-cirrus
> > > Severity: wishlist
> > > Tags: +patch
> > > 
> > > Hi,
> > > Fedora has this nice path to allow QEMU to use 1024x800 for virtual
> > > machines:
> > > 
> > > http://cvs.fedoraproject.org/viewvc/rpms/xorg-x11-drv-cirrus/F-13/cirrus-1.2.0-qemu.patch?revision=1.2&view=co
> > > 
> > > This makes kvm/qemu much more useful for desktop virtualization so it'd
> > > be nice to have this in squeeze. Since it checks for the subvendor_id it
> > > has little potential of breaking anything else. Please apply and let me
> > > know if I should NMU.
> > Any chance we get this fixed for Squeeze? It would make Debian a much
> > more usable graphical guest in KVM/Qemu. I'd be happy to NMU.
> 
> The above URL is a 404 (I suppose because fedora moved to git).
Attached now a version for 1.3.2.
Cheers,
 -- Guido
diff -up xf86-video-cirrus-1.2.0/src/alp_driver.c.jx xf86-video-cirrus-1.2.0/src/alp_driver.c
--- xf86-video-cirrus-1.2.0/src/alp_driver.c.jx	2008-03-19 10:29:23.000000000 -0400
+++ xf86-video-cirrus-1.2.0/src/alp_driver.c	2009-02-27 10:59:27.000000000 -0500
@@ -812,6 +812,20 @@ AlpPreInit(ScrnInfoPtr pScrn, int flags)
      else
  	xf86SetDDCproperties(pScrn,xf86PrintEDID(
  	    xf86DoEDID_DDC2(pScrn->scrnIndex,pCir->I2CPtr1)));
+#ifdef XSERVER_LIBPCIACCESS
+     if (!pScrn->monitor->DDC &&
+	 ((pCir->PciInfo->subvendor_id & 0xffff) == 0x1af4)) {
+	xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+		   "Defaulting to 1024x768 for QEMU\n");
+	pScrn->monitor->nHsync = 1;
+	pScrn->monitor->hsync[0].lo = 31.5;
+	pScrn->monitor->hsync[0].hi = 48.0;
+	pScrn->monitor->nVrefresh = 1;
+	pScrn->monitor->vrefresh[0].lo = 56.0;
+	pScrn->monitor->vrefresh[0].hi = 60.1;
+	pScrn->monitor->maxPixClock = 65000;
+     }
+#endif
  
      /* Probe the possible LCD display */
      AlpProbeLCD(pScrn);

Reply to: