xf86-video-intel: src/sna/sna_video_textured.c
Chris Wilson
ickle at kemper.freedesktop.org
Fri Nov 7 01:58:19 PST 2014
src/sna/sna_video_textured.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
New commits:
commit ab6680375cc6d5efebe8e40816d1906b15678d6e
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Fri Nov 7 09:54:35 2014 +0000
sna/xv: Give the illusion of hardware progress
The number of ports we provide for Xv textured video is arbitrary. The
main cost is reservation of a number of XIDs and preallocation of a
block of memory. Whatever value we pick, someone will always want
more...
References: https://bugs.freedesktop.org/show_bug.cgi?id=85974
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_video_textured.c b/src/sna/sna_video_textured.c
index 8183396..9501193 100644
--- a/src/sna/sna_video_textured.c
+++ b/src/sna/sna_video_textured.c
@@ -312,7 +312,7 @@ void sna_video_textured_setup(struct sna *sna, ScreenPtr screen)
{
XvAdaptorPtr adaptor;
struct sna_video *video;
- int nports = 16, i;
+ int nports, i;
if (!sna->render.video) {
xf86DrvMsg(sna->scrn->scrnIndex, X_INFO,
@@ -330,6 +330,12 @@ void sna_video_textured_setup(struct sna *sna, ScreenPtr screen)
if (adaptor == NULL)
return;
+ nports = 16;
+ if (sna->kgem.gen >= 060)
+ nports = 32;
+ if (sna->kgem.gen >= 0100)
+ nports = 64;
+
video = calloc(nports, sizeof(struct sna_video));
adaptor->pPorts = calloc(nports, sizeof(XvPortRec));
if (video == NULL || adaptor->pPorts == NULL) {
@@ -339,7 +345,6 @@ void sna_video_textured_setup(struct sna *sna, ScreenPtr screen)
return;
}
-
adaptor->type = XvInputMask | XvImageMask;
adaptor->pScreen = screen;
adaptor->name = (char *)"Intel(R) Textured Video";
More information about the xorg-commit
mailing list