From 5d104e9c5cd5cd2d34c9035dd38794fa9b5578f3 Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Mon, 8 Mar 2010 17:03:36 +0100 Subject: 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 --- src/i830_video.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/i830_video.c') 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, -- cgit v1.2.3