diff options
author | Gustavo Diaz Prado <a0273371@ti.com> | 2012-10-03 11:47:47 -0500 |
---|---|---|
committer | Jason Simmons <jsimmons@google.com> | 2012-10-22 16:06:06 -0700 |
commit | 54712e460cc3b292e5cacb7ce9dd9bd96321e5f9 (patch) | |
tree | acbbd92c23ecafbfe3904d3d2ec34034ecfc7a0d | |
parent | 2d7bd1ee60dd7a35573728c17fcae49999f8edd9 (diff) | |
download | omap4-aah-54712e460cc3b292e5cacb7ce9dd9bd96321e5f9.tar.gz |
hwc: rgz: Fix using an invalid array index when there are no blits
When the regionizer decides there are no blits as a result of a given
hwc geometry a -1 array index was being used to set the last blit
async, this needs to be avoided if there are no blits.
Change-Id: I3ce2f60a46096559c2ba308cf1d617a79731751e
Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com>
(cherry picked from commit 8d486cd705ffc33d6048880189e16fed387338fd)
-rw-r--r-- | hwc/rgz_2d.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/hwc/rgz_2d.c b/hwc/rgz_2d.c index 5c4d1a9..96c4374 100644 --- a/hwc/rgz_2d.c +++ b/hwc/rgz_2d.c @@ -1510,9 +1510,11 @@ static int rgz_out_region(rgz_t *rgz, rgz_out_params_t *params) params->data.bvc.out_nhndls++; } - /* Last blit is made sync to act like a fence for the previous async blits */ - struct rgz_blt_entry* e = &blts.bvcmds[blts.idx-1]; - rgz_set_async(e, 0); + if (blts.idx > 0) { + /* Last blit is made sync to act like a fence for the previous async blits */ + struct rgz_blt_entry* e = &blts.bvcmds[blts.idx-1]; + rgz_set_async(e, 0); + } /* FIXME: we want to be able to call rgz_blts_free and populate the actual * composition data structure ourselves */ |