overlay: Allow disabling secure playback
If the device's kernel isn't fully prepared for secure content playback, having the secure field in the msm_rotator_img_info struct will cause issues while playing out video. The correct set of patches to the kernel (MDP, maybe vidc) needs to be figured out for this to be enabled; to disable it, add QCOM_NO_SECURE_PLAYBACK to the device's CFLAGS. (and remove "secure" from msm_rotator_img_info) Change-Id: I7949e918163e0acb2d6eb3d8881b04fb07b2be2c
This commit is contained in:
parent
3684704af4
commit
92b683627a
@ -73,9 +73,11 @@ void MdpRot::setSource(const overlay::utils::Whf& awhf) {
|
||||
}
|
||||
|
||||
void MdpRot::setFlags(const utils::eMdpFlags& flags) {
|
||||
#ifndef QCOM_NO_SECURE_PLAYBACK
|
||||
mRotImgInfo.secure = 0;
|
||||
if(flags & utils::OV_MDP_SECURE_OVERLAY_SESSION)
|
||||
mRotImgInfo.secure = 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
void MdpRot::setTransform(const utils::eTransform& rot, const bool& rotUsed)
|
||||
@ -117,10 +119,15 @@ bool MdpRot::commit() {
|
||||
bool MdpRot::open_i(uint32_t numbufs, uint32_t bufsz)
|
||||
{
|
||||
OvMem mem;
|
||||
int secureFlag = 0;
|
||||
|
||||
OVASSERT(MAP_FAILED == mem.addr(), "MAP failed in open_i");
|
||||
|
||||
if(!mem.open(numbufs, bufsz, mRotImgInfo.secure)){
|
||||
#ifndef QCOM_NO_SECURE_PLAYBACK
|
||||
secureFlag = mRotImgInfo.secure;
|
||||
#endif
|
||||
|
||||
if(!mem.open(numbufs, bufsz, secureFlag)){
|
||||
ALOGE("%s: Failed to open", __func__);
|
||||
mem.close();
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user