summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorJason Sams <rjsams@android.com>2011-04-29 16:23:40 -0700
committerJason Sams <rjsams@android.com>2011-04-29 16:23:40 -0700
commiteccf6c6483564bbe21020e2affb490ced2345e5e (patch)
tree0d2b23ec4f6c79e50cb89f5c1722a2363bc59f99 /libs
parent3ea208a843d30f4cd34f2f1a239a029908576538 (diff)
downloadframeworks_base-eccf6c6483564bbe21020e2affb490ced2345e5e.zip
frameworks_base-eccf6c6483564bbe21020e2affb490ced2345e5e.tar.gz
frameworks_base-eccf6c6483564bbe21020e2affb490ced2345e5e.tar.bz2
Fix bug 4355588
With auto inbanding the fifo didn't reserve the correct size. Caused failure on fifo wrap. Change-Id: Ie78e7bef5286f68c6239f79ee2f284fd99bdacc3
Diffstat (limited to 'libs')
-rw-r--r--libs/rs/rsg_generator.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/rs/rsg_generator.c b/libs/rs/rsg_generator.c
index ed20fef..239795d 100644
--- a/libs/rs/rsg_generator.c
+++ b/libs/rs/rsg_generator.c
@@ -240,9 +240,11 @@ void printApiCpp(FILE *f) {
}
//fprintf(f, " LOGE(\"add command %s\\n\");\n", api->name);
- fprintf(f, " RS_CMD_%s *cmd = static_cast<RS_CMD_%s *>(io->mToCore.reserve(sizeof(RS_CMD_%s)));\n", api->name, api->name, api->name);
if (hasInlineDataPointers(api)) {
+ fprintf(f, " RS_CMD_%s *cmd = static_cast<RS_CMD_%s *>(io->mToCore.reserve(dataSize + sizeof(RS_CMD_%s)));\n", api->name, api->name, api->name);
fprintf(f, " uint8_t *payload = (uint8_t *)&cmd[1];\n");
+ } else {
+ fprintf(f, " RS_CMD_%s *cmd = static_cast<RS_CMD_%s *>(io->mToCore.reserve(sizeof(RS_CMD_%s)));\n", api->name, api->name, api->name);
}
for (ct2=0; ct2 < api->paramCount; ct2++) {