diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2010-03-02 21:53:14 +0100 |
---|---|---|
committer | Owain G. Ainsworth <oga@openbsd.org> | 2010-05-16 19:59:13 +0100 |
commit | 4e89c33a3892e80f13e566f29d01db5ad1b9da78 (patch) | |
tree | 4c4e7c2ee2ba229d145711ddeba923977cba5cd8 /src/xvmc | |
parent | 6f7a0f6fdbad0054648181189f91690e34a771f2 (diff) |
i915 XvMC: kill last_flip and last_render
Seems to be a remnant from i810 XvMC support. last_flip is always 0,
so serves no real purpose anymore. Kill it and the associated code.
With last_flip gone, last_render also lost its purpose. Kill it, too.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Carl Worth <cworth@cworth.org>
(cherry picked from commit fc9e44f01910eb9fd43def9b2ac531b0742d8b4e)
Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
Diffstat (limited to 'src/xvmc')
-rw-r--r-- | src/xvmc/i915_xvmc.c | 34 | ||||
-rw-r--r-- | src/xvmc/i915_xvmc.h | 5 | ||||
-rw-r--r-- | src/xvmc/intel_xvmc.h | 1 |
3 files changed, 0 insertions, 40 deletions
diff --git a/src/xvmc/i915_xvmc.c b/src/xvmc/i915_xvmc.c index 0faba95f..4195cba2 100644 --- a/src/xvmc/i915_xvmc.c +++ b/src/xvmc/i915_xvmc.c @@ -1029,7 +1029,6 @@ static Status i915_xvmc_mc_create_context(Display * display, pI915XvMC->uvStride = STRIDE(context->width >> 1); pI915XvMC->haveXv = 0; pI915XvMC->dual_prime = 0; - pI915XvMC->last_flip = 0; pI915XvMC->port = context->port; pI915XvMC->ref = 1; @@ -1093,8 +1092,6 @@ static Status i915_xvmc_mc_create_surface(Display * display, } /* Initialize private values */ - pI915Surface->last_render = 0; - pI915Surface->last_flip = 0; pI915Surface->yStride = pI915XvMC->yStride; pI915Surface->uvStride = pI915XvMC->uvStride; pI915Surface->width = context->width; @@ -1144,9 +1141,6 @@ static int i915_xvmc_mc_destroy_surface(Display * display, if (!(pI915XvMC = pI915Surface->privContext)) return XvMCBadSurface; - if (pI915Surface->last_flip) - XvMCSyncSurface(display, surface); - if (pI915Surface->srf.map) drmUnmap(pI915Surface->srf.map, pI915Surface->srf.size); @@ -1370,8 +1364,6 @@ static int i915_xvmc_mc_render_surface(Display * display, XvMCContext * context, } intelFlushBatch(TRUE); - xvmc_driver->last_render = xvmc_driver->alloc.irq_emitted; - privTarget->last_render = xvmc_driver->last_render; UNLOCK_HARDWARE(intel_ctx->hw_context); return 0; @@ -1426,32 +1418,6 @@ static int i915_xvmc_mc_get_surface_status(Display * display, if (!(pI915XvMC = pI915Surface->privContext)) return XvMCBadSurface; - PPTHREAD_MUTEX_LOCK(); - if (pI915Surface->last_flip) { - /* This can not happen */ - if (pI915XvMC->last_flip < pI915Surface->last_flip) { - XVMC_ERR - ("Context last flip is less than surface last flip."); - PPTHREAD_MUTEX_UNLOCK(); - return BadValue; - } - - /* - If the context has 2 or more flips after this surface it - cannot be displaying. Don't bother to check. - */ - if (!(pI915XvMC->last_flip > (pI915Surface->last_flip + 1))) { - /* - If this surface was the last flipped it is either displaying - or about to be so don't bother checking. - */ - if (pI915XvMC->last_flip == pI915Surface->last_flip) { - *stat |= XVMC_DISPLAYING; - } - } - } - - PPTHREAD_MUTEX_UNLOCK(); return 0; } diff --git a/src/xvmc/i915_xvmc.h b/src/xvmc/i915_xvmc.h index f0e8d3e4..d85d9c19 100644 --- a/src/xvmc/i915_xvmc.h +++ b/src/xvmc/i915_xvmc.h @@ -50,7 +50,6 @@ */ typedef struct _i915XvMCContext { unsigned int ctxno; - unsigned int last_flip; unsigned int dual_prime; /* Flag to identify when dual prime is in use. */ unsigned int yStride; unsigned int uvStride; @@ -82,8 +81,6 @@ typedef struct _i915XvMCContext { */ typedef struct _i915XvMCSubpicture { unsigned int srfNo; - unsigned int last_render; - unsigned int last_flip; unsigned int pitch; unsigned char palette[3][16]; intel_xvmc_drm_map_t srf; @@ -100,8 +97,6 @@ typedef struct _i915XvMCSubpicture { */ typedef struct _i915XvMCSurface { unsigned int srfNo; /* XvMC private surface numbers */ - unsigned int last_render; - unsigned int last_flip; unsigned int yStride; /* Stride of YUV420 Y component. */ unsigned int uvStride; unsigned int width; /* Dimensions */ diff --git a/src/xvmc/intel_xvmc.h b/src/xvmc/intel_xvmc.h index 263fc33d..f2c84bc3 100644 --- a/src/xvmc/intel_xvmc.h +++ b/src/xvmc/intel_xvmc.h @@ -150,7 +150,6 @@ typedef struct _intel_xvmc_driver { unsigned int irq_emitted; } alloc; intel_xvmc_drm_map_t batchbuffer; - unsigned int last_render; sigset_t sa_mask; pthread_mutex_t ctxmutex; |