summaryrefslogtreecommitdiff
path: root/src/sna/sna_video_textured.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-11-07 09:54:35 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2014-11-07 09:57:07 +0000
commitab6680375cc6d5efebe8e40816d1906b15678d6e (patch)
tree08364f86e88df4269a6ecba819fdacf0212fc20f /src/sna/sna_video_textured.c
parent0aa2edbd29c8dd26a5f3748e3875c445ea358a6d (diff)
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@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_video_textured.c')
-rw-r--r--src/sna/sna_video_textured.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/sna/sna_video_textured.c b/src/sna/sna_video_textured.c
index 81833960..95011939 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";