[Intel-gfx] [PATCH 04/18] i915 XvMC: kill last_flip and last_render
Daniel Vetter
daniel.vetter at ffwll.ch
Tue Mar 2 21:53:14 CET 2010
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 at ffwll.ch>
---
src/xvmc/i915_xvmc.c | 34 ----------------------------------
src/xvmc/i915_xvmc.h | 5 -----
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 0faba95..4195cba 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 f0e8d3e..d85d9c1 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 60a2fbb..8ee1ae4 100644
--- a/src/xvmc/intel_xvmc.h
+++ b/src/xvmc/intel_xvmc.h
@@ -149,7 +149,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;
--
1.6.6.1
More information about the Intel-gfx
mailing list