diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-11-07 09:54:35 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-11-07 09:57:07 +0000 |
commit | ab6680375cc6d5efebe8e40816d1906b15678d6e (patch) | |
tree | 08364f86e88df4269a6ecba819fdacf0212fc20f /src | |
parent | 0aa2edbd29c8dd26a5f3748e3875c445ea358a6d (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')
-rw-r--r-- | src/sna/sna_video_textured.c | 9 |
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"; |