diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-04-09 09:18:41 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-04-09 09:19:51 +0100 |
commit | 5f1367d611b91008ba28a8c99a6b98a3e84449dc (patch) | |
tree | c7069b309f7752489e7959e0224ba8478b522fb4 | |
parent | 21294eaaf16a1e35fefe0f45a237826d38dc62eb (diff) |
sna/video: Textured video passthrough no longer relies upon XvMC
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_video_textured.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/src/sna/sna_video_textured.c b/src/sna/sna_video_textured.c index ddde2494..8278606c 100644 --- a/src/sna/sna_video_textured.c +++ b/src/sna/sna_video_textured.c @@ -56,15 +56,7 @@ static const XF86AttributeRec TexturedAttributes[] = { {XvSettable | XvGettable, 0, 255, "XV_CONTRAST"}, }; -#ifdef SNA_XVMC -#define NUM_IMAGES 5 -#define XVMC_IMAGE 1 -#else -#define NUM_IMAGES 4 -#define XVMC_IMAGE 0 -#endif - -static const XF86ImageRec Images[NUM_IMAGES] = { +static const XF86ImageRec Images[] = { XVIMAGE_YUY2, XVIMAGE_YV12, XVIMAGE_I420, @@ -224,12 +216,6 @@ sna_video_textured_put_image(ScrnInfoPtr scrn, DBG(("%s: using passthough, name=%d\n", __FUNCTION__, *(uint32_t *)buf)); - if (sna->kgem.gen < 031) { - /* XXX: i915 is not support and needs some - * serious care. grep for KMS in i915_hwmc.c */ - return BadAlloc; - } - frame.bo = kgem_create_for_name(&sna->kgem, *(uint32_t*)buf); if (frame.bo == NULL) { DBG(("%s: failed to open bo\n", __FUNCTION__)); @@ -325,14 +311,12 @@ sna_video_textured_query(ScrnInfoPtr scrn, pitches[0] = size; size *= *h; break; -#ifdef SNA_XVMC case FOURCC_XVMC: *h = (*h + 1) & ~1; size = sizeof(uint32_t); if (pitches) pitches[0] = size; break; -#endif } return size; @@ -403,7 +387,7 @@ XF86VideoAdaptorPtr sna_video_textured_setup(struct sna *sna, adaptor->pAttributes = attrs; memcpy(attrs, TexturedAttributes, NUM_TEXTURED_ATTRIBUTES * sizeof(XF86AttributeRec)); - adaptor->nImages = NUM_IMAGES; + adaptor->nImages = ARRAY_SIZE(Images); adaptor->pImages = (XF86ImagePtr)Images; adaptor->PutVideo = NULL; adaptor->PutStill = NULL; |