diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2010-03-08 17:03:36 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2010-04-08 11:22:16 +0200 |
commit | 5d104e9c5cd5cd2d34c9035dd38794fa9b5578f3 (patch) | |
tree | b826c58fd4bc5f6ec253d4d21baee53bbd27ec9c /src/i830_video.c | |
parent | ebc0ffba79cc4bd564a8bd97327f24a1d15b3d1a (diff) |
XvMC: unify PutImage handling
Both xvmc are handing in the bo in the exact same way. So move the code
to src/i830_video.c and kill this great oeuvre of spaghetti-code.
The xvmc driver ini and fini also lost their last use, kill them, too.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'src/i830_video.c')
-rw-r--r-- | src/i830_video.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/i830_video.c b/src/i830_video.c index db728638..c2a02b5b 100644 --- a/src/i830_video.c +++ b/src/i830_video.c @@ -406,11 +406,8 @@ void I830InitVideo(ScreenPtr screen) adaptors[num_adaptors++] = overlayAdaptor; #ifdef INTEL_XVMC - if (intel_xvmc_probe(scrn)) { - if (texturedAdaptor) - xvmc_status = - intel_xvmc_driver_init(screen, texturedAdaptor); - } + if (intel_xvmc_probe(scrn)) + xvmc_status = TRUE; #endif if (num_adaptors) { @@ -422,7 +419,7 @@ void I830InitVideo(ScreenPtr screen) } #ifdef INTEL_XVMC - if (xvmc_status) + if (xvmc_status && texturedAdaptor) intel_xvmc_screen_init(screen); #endif xfree(adaptors); @@ -1507,6 +1504,9 @@ I830PutImageTextured(ScrnInfoPtr scrn, if (xvmc_passthrough(id)) { int size; + struct intel_xvmc_command *cmd + = (struct intel_xvmc_command *)buf; + i830_free_video_buffers(adaptor_priv); i830_setup_dst_params(scrn, adaptor_priv, width, height, @@ -1521,7 +1521,7 @@ I830PutImageTextured(ScrnInfoPtr scrn, adaptor_priv->buf = drm_intel_bo_gem_create_from_name(intel->bufmgr, "xvmc surface", - (uintptr_t)buf); + cmd->handle); } else { if (!i830_copy_video_data(scrn, adaptor_priv, width, height, &dstPitch, &dstPitch2, |