diff options
author | Lin Xie <lin.xie@intel.com> | 2013-08-01 14:04:33 +0800 |
---|---|---|
committer | cactus <cactus@intel.com> | 2013-08-07 08:36:49 -0700 |
commit | 47fc445a4dbc3f7d6d71139ed82a114e59616b0b (patch) | |
tree | bd0e4835daeeacee5c8821b8c98fdf72ceefc1a6 /ips | |
parent | de2f6c3bfb8ac09d42ce12f0206d2ee0d2443527 (diff) | |
download | hwcomposer-47fc445a4dbc3f7d6d71139ed82a114e59616b0b.tar.gz |
Fix the vpp regression by mapping kernel handle.
BZ: 126717
We haven't found a clear way to map the kernel handle so far.
Just had a workaround to do so through the Wsbm.
It's just needed when do the drm mode setting, so don't use
it as a formal way. Not sure about the root cause to make vpp
easily hang.
Need the DDK support for a reliable solution.
Change-Id: Ifff899f0afc624d8071db810726a040938777514
Signed-off-by: Lin Xie <lin.xie@intel.com>
Reviewed-on: http://android.intel.com:8080/122581
Reviewed-by: buildbot <buildbot@intel.com>
Reviewed-by: Qiu, Junhai <junhai.qiu@intel.com>
Reviewed-by: Wang, Lili A <lili.a.wang@intel.com>
Reviewed-by: Shi, PingX <pingx.shi@intel.com>
Tested-by: Shi, PingX <pingx.shi@intel.com>
Reviewed-by: cactus <cactus@intel.com>
Tested-by: cactus <cactus@intel.com>
Diffstat (limited to 'ips')
-rw-r--r-- | ips/common/GrallocBufferMapperBase.cpp | 2 | ||||
-rw-r--r-- | ips/common/GrallocBufferMapperBase.h | 2 | ||||
-rw-r--r-- | ips/common/TTMBufferMapper.h | 2 | ||||
-rw-r--r-- | ips/tangier/TngGrallocBufferMapper.cpp | 13 | ||||
-rw-r--r-- | ips/tangier/TngGrallocBufferMapper.h | 1 |
5 files changed, 16 insertions, 4 deletions
diff --git a/ips/common/GrallocBufferMapperBase.cpp b/ips/common/GrallocBufferMapperBase.cpp index 24a7877..6c3ec77 100644 --- a/ips/common/GrallocBufferMapperBase.cpp +++ b/ips/common/GrallocBufferMapperBase.cpp @@ -72,7 +72,7 @@ uint32_t GrallocBufferMapperBase::getSize(int subIndex) const return 0; } -uint32_t GrallocBufferMapperBase::getKHandle(int subIndex) const +uint32_t GrallocBufferMapperBase::getKHandle(int subIndex) { if (subIndex >= 0 && subIndex < SUB_BUFFER_MAX) return mKHandle[subIndex]; diff --git a/ips/common/GrallocBufferMapperBase.h b/ips/common/GrallocBufferMapperBase.h index 6c56dbe..6db7b86 100644 --- a/ips/common/GrallocBufferMapperBase.h +++ b/ips/common/GrallocBufferMapperBase.h @@ -46,7 +46,7 @@ public: uint32_t getGttOffsetInPage(int subIndex) const; void* getCpuAddress(int subIndex) const; uint32_t getSize(int subIndex) const; - uint32_t getKHandle(int subIndex) const; + virtual uint32_t getKHandle(int subIndex); protected: // mapped info diff --git a/ips/common/TTMBufferMapper.h b/ips/common/TTMBufferMapper.h index a4d77e5..deb6809 100644 --- a/ips/common/TTMBufferMapper.h +++ b/ips/common/TTMBufferMapper.h @@ -52,7 +52,7 @@ public: uint32_t getSize(int subIndex) const { return mSize; } - uint32_t getKHandle(int subIndex) const { + uint32_t getKHandle(int subIndex) { return 0; } diff --git a/ips/tangier/TngGrallocBufferMapper.cpp b/ips/tangier/TngGrallocBufferMapper.cpp index f416f62..eba5e78 100644 --- a/ips/tangier/TngGrallocBufferMapper.cpp +++ b/ips/tangier/TngGrallocBufferMapper.cpp @@ -145,7 +145,7 @@ bool TngGrallocBufferMapper::map() } if (i == SUB_BUFFER_MAX) { - return mapKhandle(); + return true; } // error handling @@ -184,6 +184,17 @@ bool TngGrallocBufferMapper::unmap() return err; } +uint32_t TngGrallocBufferMapper::getKHandle(int subIndex) +{ + uint32_t ret = GrallocBufferMapperBase::getKHandle(subIndex); + if (subIndex == 0 && ret == 0) { + if (mapKhandle()) + return mKHandle[subIndex]; + } + + return ret; +} + bool TngGrallocBufferMapper::mapKhandle() { // TODO: this is a complete hack and temporary workaround diff --git a/ips/tangier/TngGrallocBufferMapper.h b/ips/tangier/TngGrallocBufferMapper.h index 9c3554c..17ef01b 100644 --- a/ips/tangier/TngGrallocBufferMapper.h +++ b/ips/tangier/TngGrallocBufferMapper.h @@ -44,6 +44,7 @@ public: public: bool map(); bool unmap(); + uint32_t getKHandle(int subIndex); private: bool gttMap(void *vaddr, uint32_t size, uint32_t gttAlign, int *offset); bool gttUnmap(void *vaddr); |