gralloc: Add support for PRIV_FLAGS_DISP_CONSUMER
On some targets, Venus h/w can support 4k decoding but mdss can handle only upto 2k. So, in usecases where the resolution of the video is more than 2k, venus h/w would downscale the content to 2k and allocate the output decoded buffers at 2k. In cases where display(SF) is not the consumer of the decoded buffers(for ex:transcoding, etc), downscaling need not happen. So, video f/w needs a mechanism to identify the consumer of the decoded buffers and allocate them accordingly. The buffers would be allocated at the incoming video resolution by default. During allocation, the gralloc private flag PRIV_FLAGS_DISP_CONSUMER would be set to indicate to the video f/w if display is the consumer of the content. If display happens to be the consumer and the resolution of the incoming video is more than 2k, video f/w would cancel the earlier allocated buffers and would allocate the new buffers at 2k. Change-Id: Ic6e562d357eadb8d49b166b454746f91ccc85ed8
This commit is contained in:
committed by
Manoj Kumar AVM
parent
d5c4a54133
commit
074314d7e7
@@ -143,6 +143,10 @@ int gpu_context_t::gralloc_alloc_buffer(unsigned int size, int usage,
|
||||
flags |= private_handle_t::PRIV_FLAGS_NON_CPU_WRITER;
|
||||
}
|
||||
|
||||
if(usage & GRALLOC_USAGE_HW_COMPOSER) {
|
||||
flags |= private_handle_t::PRIV_FLAGS_DISP_CONSUMER;
|
||||
}
|
||||
|
||||
if(false == data.uncached) {
|
||||
flags |= private_handle_t::PRIV_FLAGS_CACHED;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user