summaryrefslogtreecommitdiff
path: root/src/i915_hwmc.c
diff options
context:
space:
mode:
authorZhenyu Wang <zhenyu.z.wang@intel.com>2007-12-25 08:32:47 +0800
committerZhenyu Wang <zhenyu.z.wang@intel.com>2007-12-25 08:32:47 +0800
commited9ff6f30fff33fe2d60715f1b503047f8e1ef01 (patch)
tree844a6d6b72b3a6af3a6d76c63933913e552187fb /src/i915_hwmc.c
parentf0ced5edaeec3e7741828eab728417843326d56f (diff)
xvmc: consolidate put surface interfaces
Make surface list track like context list, and move generic PutSurface code out of i915. So MC driver just needs to fill specific the command params, and we can get one single type of intel xvmc command to issue, ddx driver's put_image_size got removed. Fix last commit with missing XvMCContext assignment. Fix priv_data free with apropriate X11 XFree.
Diffstat (limited to 'src/i915_hwmc.c')
-rw-r--r--src/i915_hwmc.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/src/i915_hwmc.c b/src/i915_hwmc.c
index e41d148d..a8daf3e6 100644
--- a/src/i915_hwmc.c
+++ b/src/i915_hwmc.c
@@ -766,24 +766,24 @@ static int i915_xvmc_put_image(ScrnInfoPtr pScrn,
{
I830Ptr pI830 = I830PTR(pScrn);
I915XvMCPtr pXvMC = (I915XvMCPtr)xvmc_driver->devPrivate;
- I915XvMCCommandBuffer *i915XvMCData = (I915XvMCCommandBuffer *)buf;
+ struct intel_xvmc_command *xvmc_cmd = (struct intel_xvmc_command *)buf;
int ret;
if (pI830->XvMCEnabled) {
if (FOURCC_XVMC == id) {
- switch (i915XvMCData->command) {
+ switch (xvmc_cmd->command) {
case INTEL_XVMC_COMMAND_DISPLAY:
- if ((i915XvMCData->srfNo >= I915_XVMC_MAX_SURFACES) ||
- !pXvMC->surfaces[i915XvMCData->srfNo] ||
- !pXvMC->sfprivs[i915XvMCData->srfNo]) {
+ if ((xvmc_cmd->srfNo >= I915_XVMC_MAX_SURFACES) ||
+ !pXvMC->surfaces[xvmc_cmd->srfNo] ||
+ !pXvMC->sfprivs[xvmc_cmd->srfNo]) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"[XvMC] i915 put image: Invalid parameters!\n");
return 1;
}
buf = pI830->FbBase +
- pXvMC->sfprivs[i915XvMCData->srfNo]->surface->offset;
- id = i915XvMCData->real_id;
+ pXvMC->sfprivs[xvmc_cmd->srfNo]->surface->offset;
+ id = xvmc_cmd->real_id;
pI830->IsXvMCSurface = 1;
break;
default:
@@ -799,12 +799,6 @@ static int i915_xvmc_put_image(ScrnInfoPtr pScrn,
return ret;
}
-static int i915_xvmc_put_image_size(ScrnInfoPtr pScrn)
-{
- return sizeof(I915XvMCCommandBuffer);
-}
-
-
static Bool i915_xvmc_init(ScrnInfoPtr pScrn, XF86VideoAdaptorPtr XvAdapt)
{
I915XvMCPtr pXvMC;
@@ -872,5 +866,4 @@ struct intel_xvmc_driver i915_xvmc_driver = {
.flag = XVMC_I915_MPEG2_MC,
.init = i915_xvmc_init,
.fini = i915_xvmc_fini,
- .put_image_size = i915_xvmc_put_image_size,
};