summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRobert Noland <rnoland@2hip.net>2009-10-20 20:07:38 +0200
committerDave Airlie <airlied@redhat.com>2009-10-26 04:28:21 +0100
commit33fdb15c99aac20d238af487fa363d3e5c7ed197 (patch)
treec16113310eaf398e5a9d6397aa6c484e4cad88b7 /drivers
parentdrm/radeon/r600: Replace repeated calculations with variable. (diff)
downloadlinux-33fdb15c99aac20d238af487fa363d3e5c7ed197.tar.xz
linux-33fdb15c99aac20d238af487fa363d3e5c7ed197.zip
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 <rnoland@2hip.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/radeon/r600_blit.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/r600_blit.c b/drivers/gpu/drm/radeon/r600_blit.c
index 626a9ab7075a..5ea432347589 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;