[Nouveau] Xvideo blitter with randr12 enabled

Bernhard Kaindl bk at suse.de
Wed Sep 5 09:27:36 PDT 2007


On Wed, 5 Sep 2007, Bernhard Kaindl wrote:

> ... I hope, but first I would like to get the console switch working as it
> should and as I had it with my patch to the randr branch.

Ok that was quick, from my previous patch for the randr branch, this patch
wasn't yet applied to master:

diff --git a/src/nv_driver.c b/src/nv_driver.c
index 92c22b8..873da8e 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -774,6 +774,8 @@ NVEnterVT(int scrnIndex, int flags)

      if (pNv->randr12_enable) {
  	xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
+	int i;
+
  	pScrn->vtSema = TRUE;

  	if (pNv->Architecture == NV_ARCH_50) {
@@ -788,6 +790,10 @@ NVEnterVT(int scrnIndex, int flags)
  		NVSave(pScrn);
  	}

+	for (i = 0; i < xf86_config->num_crtc; i++) {
+		NVCrtcLockUnlock(xf86_config->crtc[i], 0);
+	}
+
  	NVResetCrtcConfig(pScrn, 0);
  	if (!xf86SetDesiredModes(pScrn))
  		return FALSE;

This fixes chvt 1;chvt 7 (back to X) with my NV40 card when Option "Randr12" is
enabled in xorg.conf.

It should be fine to commit this as it does not look like a workaround for me
but neccessary to enable writing the CRTC registers again. To my (non-expert)
impressin it looks like the equvalent of

     NVLockUnlock(pNv, 0);
     if(pNv->twoHeads) {
         nvWriteVGA(pNv, NV_VGA_CRTCX_OWNER, nvReg->crtcOwner);
         NVLockUnlock(pNv, 0);
     }

in NVModeInit which is used for the same in the !pNv->randr12_enable code
branch of NVEnterVT to enter the X screen.

Best Regards,
Bernhard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nouveau-master-fix-chvt.diff
Type: text/x-patch
Size: 645 bytes
Desc: 
Url : http://lists.freedesktop.org/archives/nouveau/attachments/20070905/6c48c1a5/attachment.bin 


More information about the Nouveau mailing list