[Nouveau] Fixes and workarounds for regressions and issues in the randr-1.2 branch
Bernhard Kaindl
bk at suse.de
Wed Sep 5 08:14:09 PDT 2007
On Mon, 3 Sep 2007, Bernhard Kaindl wrote:
>
> They may help others as well but may e.g. also disable the Xv blitter
> which might be working for some (but didn't on my card) - more information
> is found in the text comments in the patches.
The patch "xf86-video-nouveau-Xv_noblit.diff" which disabled the Xv blitter
on some cards was wrong, thanks to encouragement from Arthur Huillet and that
I had now some time to check out what was failing, I found out that the Xv
problems which I see are limited to two situations:
1) randr active and monitors configured side-by-side with xrandr
2) Option "ShadowFB" is used (or other NoAccel trigger)
While I have no fix for 1) yet, 2) is easy to deal with properly:
As driving the blitter requires the DMA FIFO, and while the overlay might work
without the DMA FIFO, it has a fallback to the blitter for Composite, we think
it's best to also disable the overlay for now when pNV->NoAccel is <> 0.
I attached and appended patch for the current master branch, which (with one
small change, which I am going to talk in a separate mail) works for me with
Randr12 (except for the Xv in side-by-side mode).
Thanks to Arthur for the guidance and explanations!
Bernhard
--- src/nv_video.c 2007-09-05 16:02:00.000000000 +0200
+++ src/nv_video.c 2007-09-05 16:24:22.000000000 +0200
@@ -2275,10 +2275,13 @@
XF86VideoAdaptorPtr blitAdaptor = NULL;
int num_adaptors;
- if (pScrn->bitsPerPixel == 8)
- return;
-
- if (pNv->Architecture < NV_ARCH_50) {
+ /*
+ * Driving the blitter requires the DMA FIFO. Using the FIFO
+ * without accel causes DMA errors. While the overlay might
+ * might work without accel, we also disable it for now when
+ * acceleration is disabled:
+ */
+ if (pScrn->bitsPerPixel != 8 && pNv->Architecture < NV_ARCH_50 && !pNv->NoAccel) {
overlayAdaptor = NVSetupOverlayVideo(pScreen);
blitAdaptor = NVSetupBlitVideo(pScreen);
}
======================================================
PS:
The inspiration to change from this logic
- if (pScrn->bitsPerPixel == 8)
- return;
to this logic
+ if (pScrn->bitsPerPixel != 8 && pNv->Architecture < NV_ARCH_50 && !pNv->NoAccel)
overlayAdaptor = NVSetupOverlayVideo(pScreen);
blitAdaptor = NVSetupBlitVideo(pScreen);
}
to disable overlay and blitter came from the NV50 change (which you see in the
patch) and it seems reasonable to do it also for 8bit as
xf86-video-intel-2.1.1/src/i810_video.c does it similar for 8bit:
if (pScrn->bitsPerPixel != 8)
{
newAdaptor = I810SetupImageVideo(pScreen);
I810InitOffscreenImages(pScreen);
}
num_adaptors = xf86XVListGenericAdaptors(pScrn, &adaptors);
if(newAdaptor) {
... similar to nouveau code here
}
if(num_adaptors)
xf86XVScreenInit(pScreen, adaptors, num_adaptors);
(The routine in nv_driver has basically the same code)
which means that generic, driver-independent Xv adaptors (such as the v4l Xv
adaptor) are always initialized, xf86XVListGenericAdaptors lists them if
such are there:
xf86XVListGenericAdaptors(
...
/*
* The v4l driver registers itself first, but can use surfaces registered
* by other drivers. So, call the v4l driver last.
*/
..
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Xv-NoAccel-master.diff
Type: text/x-patch
Size: 2137 bytes
Desc:
Url : http://lists.freedesktop.org/archives/nouveau/attachments/20070905/2e76e21c/attachment.bin
More information about the Nouveau
mailing list