From: Robert Noland Date: Tue, 20 Oct 2009 18:07:38 +0000 (-0500) Subject: drm/radeon/r600: only assign vb after we know space is available. X-Git-Tag: 2.1b_release~10434^2~24 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=33fdb15c99aac20d238af487fa363d3e5c7ed197;p=platform%2Fkernel%2Fkernel-mfld-blackbay.git drm/radeon/r600: only assign vb after we know space is available. This patch only changes this is the swap path, where it doesn't loop. Signed-off-by: Robert Noland Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/radeon/r600_blit.c b/drivers/gpu/drm/radeon/r600_blit.c index 626a9ab..5ea4323 100644 --- a/drivers/gpu/drm/radeon/r600_blit.c +++ b/drivers/gpu/drm/radeon/r600_blit.c @@ -778,8 +778,6 @@ r600_blit_swap(struct drm_device *dev, u64 vb_addr; u32 *vb; - vb = r600_nomm_get_vb_ptr(dev); - if ((dev_priv->blit_vb->used + 48) > dev_priv->blit_vb->total) { r600_nomm_put_vb(dev); @@ -788,8 +786,8 @@ r600_blit_swap(struct drm_device *dev, return; set_shaders(dev); - vb = r600_nomm_get_vb_ptr(dev); } + vb = r600_nomm_get_vb_ptr(dev); sx2 = sx + w; sy2 = sy + h;