From: Pauli Nieminen Subject: [PATCH] libdrm/radeon: Fix section size mismatch to reset the section. Date: Mon, 1 Feb 2010 20:24:21 +0200 Message-ID: <1265048661-16303-1-git-send-email-suokkos@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.sourceforge.net To: dri-devel@lists.sourceforge.net List-Id: dri-devel@lists.freedesktop.org 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. Signed-off-by: Pauli Nieminen --- radeon/radeon_cs_gem.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/radeon/radeon_cs_gem.c b/radeon/radeon_cs_gem.c index c2301ad..9bfcda0 100644 --- a/radeon/radeon_cs_gem.c +++ b/radeon/radeon_cs_gem.c @@ -255,6 +255,7 @@ static int cs_gem_end(struct radeon_cs_int *cs, file, func, line); return -EPIPE; } + cs->section_ndw = 0; if (cs->section_ndw != cs->section_cdw) { fprintf(stderr, "CS section size missmatch start at (%s,%s,%d) %d vs %d\n", cs->section_file, cs->section_func, cs->section_line, cs->section_ndw, cs->section_cdw); @@ -262,7 +263,6 @@ static int cs_gem_end(struct radeon_cs_int *cs, file, func, line); return -EPIPE; } - cs->section_ndw = 0; return 0; } -- 1.6.3.3 ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com --