summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_cs.c
diff options
context:
space:
mode:
authorJerome Glisse <jglisse@redhat.com>2011-12-21 18:13:46 +0100
committerDave Airlie <airlied@redhat.com>2012-01-05 11:03:33 +0100
commit69e130a6a42270f94e6ee0bce34c3480a6b9da61 (patch)
tree025e3a3d94400eb3f6dd15535544d569cc57b5ad /drivers/gpu/drm/radeon/radeon_cs.c
parentdrm/radeon/kms: add missing ring ready check in sync tests (diff)
downloadlinux-69e130a6a42270f94e6ee0bce34c3480a6b9da61.tar.xz
linux-69e130a6a42270f94e6ee0bce34c3480a6b9da61.zip
drm/radeon: make ib size variable
This avoid to waste ib pool size and avoid a bunch of wait for previous ib to finish. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_cs.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_cs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c
index 09ef48636e53..6559cc455135 100644
--- a/drivers/gpu/drm/radeon/radeon_cs.c
+++ b/drivers/gpu/drm/radeon/radeon_cs.c
@@ -246,7 +246,9 @@ int radeon_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
radeon_mutex_unlock(&rdev->cs_mutex);
return r;
}
- r = radeon_ib_get(rdev, RADEON_RING_TYPE_GFX_INDEX, &parser.ib);
+ ib_chunk = &parser.chunks[parser.chunk_ib_idx];
+ r = radeon_ib_get(rdev, RADEON_RING_TYPE_GFX_INDEX, &parser.ib,
+ ib_chunk->length_dw * 4);
if (r) {
DRM_ERROR("Failed to get ib !\n");
radeon_cs_parser_fini(&parser, r);
@@ -264,7 +266,6 @@ int radeon_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
/* Copy the packet into the IB, the parser will read from the
* input memory (cached) and write to the IB (which can be
* uncached). */
- ib_chunk = &parser.chunks[parser.chunk_ib_idx];
parser.ib->length_dw = ib_chunk->length_dw;
r = radeon_cs_parse(&parser);
if (r || parser.parser_error) {