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.main
parent
520c658706
commit
1802e1a4e7
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue