Commit fc9e44f0 authored by Daniel Vetter's avatar Daniel Vetter Committed by Carl Worth

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's avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Carl Worth's avatarCarl Worth <cworth@cworth.org>
parent 04aa38a6
......@@ -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;
}
......
......@@ -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 */
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment