summaryrefslogtreecommitdiff
path: root/src/i915_hwmc.c
diff options
context:
space:
mode:
authorZhenyu Wang <zhenyu.z.wang@intel.com>2008-06-27 09:39:02 +0800
committerZhenyu Wang <zhenyu.z.wang@intel.com>2008-06-28 19:15:57 +0800
commit989ec9e8a69f909cb64f17e4465982613b4b054d (patch)
treee788ad721cfe1020e581654aec98153bb393ba04 /src/i915_hwmc.c
parent550082070a3fdb951e3cf08974dc56276c0a739c (diff)
xvmc: Don't copy on xvmc surface in PutImage
As xvmc rendering result has already been in fb, we shouldn't do extra copy on it. Although special care is required for i915 xvmc surface pitch alignment, which must be at least 1KB aligned. So video display function should take it into acount instead of always setting Y pitch to be double of U/V pitch.
Diffstat (limited to 'src/i915_hwmc.c')
-rw-r--r--src/i915_hwmc.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/i915_hwmc.c b/src/i915_hwmc.c
index c3451750..659638e1 100644
--- a/src/i915_hwmc.c
+++ b/src/i915_hwmc.c
@@ -790,7 +790,6 @@ static int i915_xvmc_put_image(ScrnInfoPtr pScrn,
short height, Bool sync, RegionPtr clipBoxes, pointer data,
DrawablePtr pDraw)
{
- I830Ptr pI830 = I830PTR(pScrn);
I915XvMCPtr pXvMC = (I915XvMCPtr)xvmc_driver->devPrivate;
struct intel_xvmc_command *xvmc_cmd = (struct intel_xvmc_command *)buf;
int ret;
@@ -806,10 +805,8 @@ static int i915_xvmc_put_image(ScrnInfoPtr pScrn,
return 1;
}
- buf = pI830->FbBase +
- pXvMC->sfprivs[xvmc_cmd->srfNo]->surface->offset;
- id = xvmc_cmd->real_id;
- pI830->IsXvMCSurface = 1;
+ /* use char *buf to hold our surface offset...hacky! */
+ buf = (unsigned char *)pXvMC->sfprivs[xvmc_cmd->srfNo]->surface->offset;
break;
default:
return 0;
@@ -819,7 +816,6 @@ static int i915_xvmc_put_image(ScrnInfoPtr pScrn,
ret = pXvMC->savePutImage(pScrn, src_x, src_y, drw_x, drw_y, src_w, src_h,
drw_w, drw_h, id, buf, width, height, sync, clipBoxes,
data, pDraw);
- pI830->IsXvMCSurface = 0;
return ret;
}