diff options
author | Mathias Agopian <mathias@google.com> | 2010-08-20 16:02:29 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2010-08-20 16:02:29 -0700 |
commit | ad20ef6be061091a95353fbf71712a3a97618304 (patch) | |
tree | 411ebf51eda55fdfb5fbf9b34b87f150b2565a35 | |
parent | a91a220ae435832209702ec59040036d276b63ca (diff) | |
download | msm7k-ad20ef6be061091a95353fbf71712a3a97618304.tar.gz |
don't revert to ashmem if HW usage bits are set
this wouldn't make sense, since the h/w wouldn't be able
to use the buffer. in this case it it better to fail to
let the caller a change to try again with different usage bits.
Change-Id: Ibecaf069b6b58ee9c026affc95a45512660d5881
-rw-r--r-- | libgralloc-qsd8k/gpu.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libgralloc-qsd8k/gpu.cpp b/libgralloc-qsd8k/gpu.cpp index c838cb6..d577f96 100644 --- a/libgralloc-qsd8k/gpu.cpp +++ b/libgralloc-qsd8k/gpu.cpp @@ -164,7 +164,7 @@ int gpu_context_t::gralloc_alloc_buffer(size_t size, int usage, buffer_handle_t* // Allocate the buffer from pmem err = pma->alloc_pmem_buffer(size, usage, &base, &offset, &fd); if (err < 0) { - if (((usage & GRALLOC_USAGE_HW_2D) == 0) && + if (((usage & GRALLOC_USAGE_HW_MASK) == 0) && ((usage & GRALLOC_USAGE_PRIVATE_PMEM_ADSP) == 0)) { // the caller didn't request PMEM, so we can try something else flags &= ~private_handle_t::PRIV_FLAGS_USES_PMEM; |