i830: tidy in flight bo reuse.
A left-over cleanup patch for c374c94. *sigh*
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
72fd7d191c
commit
86d349aa7b
|
|
@ -937,14 +937,26 @@ i830_uxa_create_pixmap(ScreenPtr screen, int w, int h, int depth,
|
|||
list_foreach_entry(priv, struct intel_pixmap,
|
||||
&intel->in_flight,
|
||||
in_flight) {
|
||||
if (priv->tiling == tiling &&
|
||||
priv->stride >= stride &&
|
||||
priv->bo->size >= priv->stride * aligned_h) {
|
||||
list_del(&priv->in_flight);
|
||||
screen->ModifyPixmapHeader(pixmap, w, h, 0, 0, priv->stride, NULL);
|
||||
i830_uxa_set_pixmap_intel(pixmap, priv);
|
||||
return pixmap;
|
||||
if (priv->tiling != tiling)
|
||||
continue;
|
||||
|
||||
if (tiling == I915_TILING_NONE) {
|
||||
if (priv->bo->size < size)
|
||||
continue;
|
||||
|
||||
priv->stride = stride;
|
||||
} else {
|
||||
if (priv->stride < stride ||
|
||||
priv->bo->size < priv->stride * aligned_h)
|
||||
continue;
|
||||
|
||||
stride = priv->stride;
|
||||
}
|
||||
|
||||
list_del(&priv->in_flight);
|
||||
screen->ModifyPixmapHeader(pixmap, w, h, 0, 0, stride, NULL);
|
||||
i830_uxa_set_pixmap_intel(pixmap, priv);
|
||||
return pixmap;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue