summaryrefslogtreecommitdiff
path: root/radeon/radeon_cs_gem.c
diff options
context:
space:
mode:
authorPauli Nieminen <suokkos@gmail.com>2010-02-01 20:19:33 +0200
committerDave Airlie <airlied@redhat.com>2010-02-04 12:14:37 +1000
commit1802e1a4e747b5906d3af10c4a53fd457eddcbb4 (patch)
treeb04b50b1db3cbd8093e034c5e01c624a81c6d75a /radeon/radeon_cs_gem.c
parent520c658706aa896d64f374cc74065394111f6122 (diff)
libdrm/radeon: Fix section size mismatch to reset the section.
If there is section size mismatch reusing the section object makes section start fail. Reseting the object before doing error checking prevents the possible flood of errors.
Diffstat (limited to 'radeon/radeon_cs_gem.c')
-rw-r--r--radeon/radeon_cs_gem.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/radeon/radeon_cs_gem.c b/radeon/radeon_cs_gem.c
index c2301ad3..45a219c3 100644
--- a/radeon/radeon_cs_gem.c
+++ b/radeon/radeon_cs_gem.c
@@ -260,7 +260,10 @@ static int cs_gem_end(struct radeon_cs_int *cs,
cs->section_file, cs->section_func, cs->section_line, cs->section_ndw, cs->section_cdw);
fprintf(stderr, "CS section end at (%s,%s,%d)\n",
file, func, line);
- return -EPIPE;
+
+ /* We must reset the section even when there is error. */
+ cs->section_ndw = 0;
+ return -EPIPE;
}
cs->section_ndw = 0;
return 0;