The GKI kernel does not allow non-render thread to open /dev/dri/card0
and alloc drm buffer from it. So we need to use /dev/dri/renderD128
instead.
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I0fad306c6eeadd8da5507883f4f4915c11946761
For kernel 4.4 and before, if VPU only has decoder, register size is
101. Thus extra size append at offset of 164*4 will be ignored by
kernel.
Change-Id: Idf4524099615b8ffd46766f55c9c0ea481f7cb76
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
RV1126/RV1109 JPEG decoder has no PP. This will be conflict with
vcodec_type queried from kernel. Also VPU_CLIENT_VEPU2_JPEG is defined
and used only for multi-core JPEG encoder at kernel. So the following
changes is made to fix this problem:
1. This reverts commit 9b860cd250.
2. Define a new MppDecHwCap to distinguish normal VPU with only JPEG
supported from multi-core JPEG encoder.
3. Correct vcodec_type queried from kernel when there is no PP for
VDPU2.
Change-Id: I58a1abe708721f725a9cf487e8f870dd5820844f
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
fallback to DRM/ION buffer when DMA heap allocator is invalid
Signed-off-by: leo <8252892+leokvw@users.noreply.github.com>
Change-Id: Ib2cd5669e6c9b41ceed7f4dd87f8fc33de88aa1c
For kernel dmabuf driver has bug on partial sync function we deside to
disable partial sync to reduce user's error.
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I2c69c407eb5b0056ad0377699fef6ef31e1d79cd
mpp_dup function use fnctl F_DUPFD_CLOEXEC for fd dup with CLOEXEC flag.
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Idd82eb935b06d2885685aeb696b95e910981539d
1. Allocator api is determined by buffer type.
2. Allocator ctx is determined by both buffer type and buffer flags.
3. All allocator dma_heap / drm / ion / ext_dma should support different
buffer flags.
4. The buffer flag supports cacheable / 32-bit / contig options.
5. Add flags update flow on allocator create process.
6. Add mpp_dmabuf_has_partial_ops to disable dmabuf partial ops when the
kernel driver has bug.
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: If36a05c6704112cad3ab46861023597ff02bf14c
Currently only support uncached dma heap node access,
because of the cache processing is not yet complete.
So if there are no uncached node in /dev/dma_heap/ path,
mpp will not use dma_heap allocator.
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ic33fca9c445c7668a86454f01f9d7577668de32b
sync_begin - cache invalidate, should be called before cpu read
sync_end - cache flush, should be called after cpu write
MppBuffer sync flow:
1. hw access
2. sync_begin
3. cpu access (read / write)
4. sync_end
5. hw access
NOTE: readonly option is faster for read only buffer.
Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I253a6139e9bb30808c07075d64f17b5cfad8519a
The simple thread has the thread group feature.
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ife367ecc3b5a46d2b50037e8d21cc8ce665a4c02
When vp9 decoder switches from FBC mode to non-FBC mode it requires
resetting the alignment function in buf_slot.
Change-Id: I0c3e35e2c573d003192a2a82d9bdd9c30f42088c
Signed-off-by: Hery Xu <hery.xu@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
1. Android 14 required to use libc++ instead of libstdc++
2. Add ndk search path and options for ndk switch.
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I07595fc0290daaaf6518eca18d7b318be89fc6ae
support hack for err ref check for decoder
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ib61336b50dde626d85f9f6bb25950ea70149ea49
When a object is double put by mpp_mem_pool_put,
it will destroy the info of MppMemPoolImpl.
So set node->check = NULL when mpp_mem_pool_put, and it will check
failed adn return when double mpp_mem_pool_put.
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I54be2eae3a1d7e81579f89d3e80304abface3049