[PATCH v3,2/6] dt-bindings: media: mtk-vcodec: Add dma-ranges property

2021-04-12 Thread Irui Wang
here. And the iova requirement is for our HW. Thus put the property in our node. Signed-off-by: Irui Wang --- Documentation/devicetree/bindings/media/mediatek-vcodec.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/media/mediatek-vcodec.txt b/Documentation

[PATCH v3,4/6] dt-bindings: media: mtk-vcodec: Add binding for MT8192 VENC

2021-04-12 Thread Irui Wang
Updates binding document for mt8192 encoder driver. Acked-by: Rob Herring Signed-off-by: Irui Wang --- Documentation/devicetree/bindings/media/mediatek-vcodec.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/media/mediatek-vcodec.txt b/Documentation

[PATCH v3,6/6] media: mtk-vcodec: Support MT8192 H264 4K encoding

2021-04-12 Thread Irui Wang
MT8192 H264 support 4k(3840x2176) and Level 5.1 encoding, add related path according to enc_capability. Signed-off-by: Irui Wang --- .../platform/mtk-vcodec/mtk_vcodec_enc.c | 75 --- .../platform/mtk-vcodec/venc/venc_h264_if.c | 4 + 2 files changed, 54 insertions

[PATCH v3,5/6] media: mtk-vcodec: Add MT8192 H264 venc driver

2021-04-12 Thread Irui Wang
Add MT8192 venc driver's compatible and device private data. Signed-off-by: Irui Wang --- drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h | 1 + .../media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c | 14 ++ 2 files changed, 15 insertions(+) diff --git a/drivers/media/platfor

[PATCH v3,3/6] media: mtk-vcodec: Support 4GB~8GB range iova space for venc

2021-04-12 Thread Irui Wang
Use the dma_set_mask_and_coherent helper to set venc DMA bit mask to support 4GB~8GB range iova space. Signed-off-by: Irui Wang --- drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/media/platform/mtk-vcodec

[PATCH v3,1/6] media: mtk-vcodec: venc: remove redundant code

2021-04-12 Thread Irui Wang
From: Alexandre Courbot vidioc_try_fmt() does clamp height and width when called on the OUTPUT queue, so clamping them prior to calling this function is redundant. Set the queue's parameters after calling vidioc_try_fmt() so we can use the values it computed. Signed-off-by: Alexandre Courbot --

[PATCH v3,0/6] Support H264 4K on MT8192

2021-04-12 Thread Irui Wang
x-mediatek/20210325122625.15100-1-irui.w...@mediatek.com Alexandre Courbot (1): media: mtk-vcodec: venc: remove redundant code Irui Wang (5): dt-bindings: media: mtk-vcodec: Add dma-ranges property media: mtk-vcodec: Support 4GB~8GB range iova space for venc dt-bindings: media: mtk-vcodec: Add b

[PATCH v4,1/3] dt-bindings: media: mtk-vcodec: Separating mtk vcodec encoder node

2021-03-25 Thread Irui Wang
node still has compatible "mediatek,mt8173-vcodec-enc". Acked-by: Tiffany Lin Signed-off-by: Hsin-Yi Wang Signed-off-by: Maoguang Meng Signed-off-by: Irui Wang --- .../bindings/media/mediatek-vcodec.txt| 55 ++- 1 file changed, 29 insertions(+), 26 deletions(-) d

[PATCH v4,2/3] arm64: dts: mt8173: Separating mtk-vcodec-enc device node

2021-03-25 Thread Irui Wang
There are two separate hardware encoder blocks inside MT8173. Split the current mtk-vcodec-enc node to match the hardware architecture. Acked-by: Tiffany Lin Signed-off-by: Hsin-Yi Wang Signed-off-by: Maoguang Meng Signed-off-by: Irui Wang --- arch/arm64/boot/dts/mediatek/mt8173.dtsi | 60

[PATCH v4,3/3] media: mtk-vcodec: Separating mtk encoder driver

2021-03-25 Thread Irui Wang
. It's mainly for fixing the problem: https://lkml.org/lkml/2019/9/3/316 Acked-by: Tiffany Lin Signed-off-by: Hsin-Yi Wang Signed-off-by: Maoguang Meng Signed-off-by: Irui Wang --- .../platform/mtk-vcodec/mtk_vcodec_drv.h | 7 +- .../platform/mtk-vcodec/mtk_vcodec_enc.c

[PATCH v2,4/5] media: mtk-vcodec: Add MT8192 H264 venc driver

2021-03-11 Thread Irui Wang
Add MT8192 venc driver's compatible and device private data. Signed-off-by: Irui Wang --- .../media/platform/mtk-vcodec/mtk_vcodec_drv.h| 1 + .../platform/mtk-vcodec/mtk_vcodec_enc_drv.c | 15 +++ 2 files changed, 16 insertions(+) diff --git a/drivers/media/platfor

[PATCH v2,5/5] media: mtk-vcodec: Support H264 4K encoding on MT8192

2021-03-11 Thread Irui Wang
Supports H264 4K (3840x2176) and level 5.1 encoding on MT8192. Signed-off-by: Irui Wang --- .../platform/mtk-vcodec/mtk_vcodec_enc.c | 58 ++- .../platform/mtk-vcodec/venc/venc_h264_if.c | 4 ++ 2 files changed, 47 insertions(+), 15 deletions(-) diff --git a/drivers

[PATCH v2,2/5] media: mtk-vcodec: Support 4GB~8GB range iova space for venc

2021-03-11 Thread Irui Wang
Uses the dma_set_mask_and_coherent helper to set venc DMA bit mask to support 4GB~8GB range iova space. Signed-off-by: Irui Wang --- drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/media/platform/mtk-vcodec

[PATCH v2,0/5] Support H264 4K on MT8192

2021-03-11 Thread Irui Wang
Add MT8192 H264 venc driver and support H264 4K encoding on MT8192. Signed-off-by: Irui Wang --- This patch dependents on "dt-bindings: media: mtk-vcodec: Separating mtk vcodec encoder node" [1] We need "core_id" variable in device private data to indicate current encoder

[PATCH v2,3/5] dt-bindings: media: mtk-vcodec: Add binding for MT8192 VENC

2021-03-11 Thread Irui Wang
Updates binding document for mt8192 encoder driver. Signed-off-by: Irui Wang --- Documentation/devicetree/bindings/media/mediatek-vcodec.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/media/mediatek-vcodec.txt b/Documentation/devicetree/bindings/media

[PATCH v2,1/5] dt-bindings: media: mtk-vcodec: Add dma-ranges property

2021-03-11 Thread Irui Wang
here. And the iova requirement is for our HW. Thus put the property in our node. Signed-off-by: Irui Wang --- Documentation/devicetree/bindings/media/mediatek-vcodec.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/media/mediatek-vcodec.txt b/Documentation

[v3,PATCH 3/3] media: mtk-vcodec: Separating mtk encoder driver

2021-03-11 Thread Irui Wang
. It's mainly for fixing the problem: https://lkml.org/lkml/2019/9/3/316 Acked-by: Tiffany Lin Signed-off-by: Hsin-Yi Wang Signed-off-by: Maoguang Meng Signed-off-by: Irui Wang --- .../platform/mtk-vcodec/mtk_vcodec_drv.h | 7 +- .../platform/mtk-vcodec/mtk_vcodec_enc.c

[v3,PATCH 2/3] arm64: dts: mt8173: Separating mtk-vcodec-enc device node

2021-03-11 Thread Irui Wang
There are two separate hardware encoder blocks inside MT8173. Split the current mtk-vcodec-enc node to match the hardware architecture. Acked-by: Tiffany Lin Signed-off-by: Hsin-Yi Wang Signed-off-by: Maoguang Meng Signed-off-by: Irui Wang --- arch/arm64/boot/dts/mediatek/mt8173.dtsi | 60

[v3,PATCH 1/3] dt-bindings: media: mtk-vcodec: Separating mtk vcodec encoder node

2021-03-11 Thread Irui Wang
for adding device_link between the larbs and venc-device. It's mainly for fixing the problem: https://lkml.org/lkml/2019/9/3/316 Acked-by: Tiffany Lin Signed-off-by: Hsin-Yi Wang Signed-off-by: Maoguang Meng Signed-off-by: Irui Wang --- Change since v2: - update dt-bindings commit m

Re: [PATCH v2,1/3] dt-bindings: media: mtk-vcodec: Separating mtk vcodec encoder node

2021-03-07 Thread Irui Wang
On Sat, 2021-03-06 at 13:46 -0700, Rob Herring wrote: > On Thu, Feb 25, 2021 at 03:36:01PM +0800, Irui Wang wrote: > > Updates binding document since the avc and vp8 hardware encoder in > > MT8173 are now separated. Separate "mediatek,mt8173-vcodec-enc" to > > "

Re: [PATCH 1/5] dt-bindings: media: mtk-vcodec: Add dma-ranges property

2021-02-28 Thread Irui Wang
On Wed, 2021-02-10 at 16:53 -0600, Rob Herring wrote: > On Wed, Feb 03, 2021 at 04:37:48PM +0800, Irui Wang wrote: > > Adds dma-ranges property for DMA addresses translation. > > > > Signed-off-by: Irui Wang > > --- > > Documentation/devicetree/bindings/media/

[PATCH v2,3/3] media: mtk-vcodec: Separating mtk encoder driver

2021-02-24 Thread Irui Wang
. It's mainly for fixing the problem: https://lkml.org/lkml/2019/9/3/316 Acked-by: Tiffany Lin Signed-off-by: Hsin-Yi Wang Signed-off-by: Maoguang Meng Signed-off-by: Irui Wang --- Change since v1: - use the same name for both devices instead of using "name" member - rename compatib

[PATCH v2,1/3] dt-bindings: media: mtk-vcodec: Separating mtk vcodec encoder node

2021-02-24 Thread Irui Wang
rb". Acked-by: Tiffany Lin Signed-off-by: Hsin-Yi Wang Signed-off-by: Maoguang Meng Signed-off-by: Irui Wang --- Change since v1: - rename compatible and device node --- .../bindings/media/mediatek-vcodec.txt| 55 ++- 1 file changed, 29 insertions(+), 26 deletions(-

[PATCH v2,2/3] arm64: dts: mt8173: Separating mtk-vcodec-enc device node

2021-02-24 Thread Irui Wang
There are two separate hardware encoder blocks inside MT8173. Split the current mtk-vcodec-enc node to match the hardware architecture. Acked-by: Tiffany Lin Signed-off-by: Hsin-Yi Wang Signed-off-by: Maoguang Meng Signed-off-by: Irui Wang --- Change since v1: - rename compatible and device

Re: [PATCH 3/3] media: mtk-vcodec: Separating mtk encoder driver

2021-02-19 Thread Irui Wang
> On Thu, Jan 21, 2021 at 3:18 PM Irui Wang wrote: > > > > MTK H264 Encoder(VENC_SYS) and VP8 Encoder(VENC_LT_SYS) are two > > independent hardware instance. They have their owner interrupt, > > register mapping, and special clocks. > > > > This patch sep

Re: [PATCH 1/3] dt-bindings: media: mtk-vcodec: Separating mtk vcodec encoder node

2021-02-19 Thread Irui Wang
On Tue, 2021-02-09 at 09:53 -0600, Rob Herring wrote: > On Thu, Jan 21, 2021 at 02:18:02PM +0800, Irui Wang wrote: > > Updates binding document since the avc and vp8 hardware encoder in > > MT8173 are now separated. Separate "mediatek,mt8173-vcodec-enc" to > > "

Re: [PATCH 1/3] dt-bindings: media: mtk-vcodec: Separating mtk vcodec encoder node

2021-02-19 Thread Irui Wang
On Wed, 2021-02-03 at 19:44 +0900, Alexandre Courbot wrote: > On Thu, Jan 21, 2021 at 3:18 PM Irui Wang wrote: > > > > Updates binding document since the avc and vp8 hardware encoder in > > MT8173 are now separated. Separate "mediatek,mt8173-vcodec-enc" to > >

[PATCH 3/5] dt-bindings: media: mtk-vcodec: Add binding for MT8192 VENC

2021-02-03 Thread Irui Wang
Updates binding document for mt8192 encoder driver. Signed-off-by: Irui Wang --- .../bindings/media/mediatek-vcodec.txt| 26 +++ 1 file changed, 26 insertions(+) diff --git a/Documentation/devicetree/bindings/media/mediatek-vcodec.txt b/Documentation/devicetree

[PATCH 5/5] media: mtk-vcodec: Support H264 4K encoding on MT8192

2021-02-03 Thread Irui Wang
Supports H264 4K (3840x2176) and level 5.1 encoding on MT8192. Signed-off-by: Irui Wang --- .../platform/mtk-vcodec/mtk_vcodec_enc.c | 58 ++- .../platform/mtk-vcodec/venc/venc_h264_if.c | 4 ++ 2 files changed, 47 insertions(+), 15 deletions(-) diff --git a/drivers

[PATCH 4/5] media: mtk-vcodec: Add MT8192 H264 venc driver

2021-02-03 Thread Irui Wang
Add MT8192 venc driver's compatible and device private data. Signed-off-by: Irui Wang --- .../media/platform/mtk-vcodec/mtk_vcodec_drv.h | 1 + .../platform/mtk-vcodec/mtk_vcodec_enc_drv.c | 16 2 files changed, 17 insertions(+) diff --git a/drivers/media/platfor

[PATCH 1/5] dt-bindings: media: mtk-vcodec: Add dma-ranges property

2021-02-03 Thread Irui Wang
Adds dma-ranges property for DMA addresses translation. Signed-off-by: Irui Wang --- Documentation/devicetree/bindings/media/mediatek-vcodec.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/media/mediatek-vcodec.txt b/Documentation/devicetree/bindings

[PATCH 0/5] Support H264 4K on MT8192

2021-02-03 Thread Irui Wang
Add MT8192 H264 venc driver and support H264 4K encoding on MT8192. Signed-off-by: Irui Wang --- This patch dependents on "dt-bindings: media: mtk-vcodec: Separating mtk vcodec encoder node" [1] We need "name" and "core_id" variable in device private data to i

[PATCH 2/5] media: mtk-vcodec: Support 4GB~8GB range iova space for venc

2021-02-03 Thread Irui Wang
Uses the dma_set_mask_and_coherent helper to set venc DMA bit mask to support 4GB~8GB range iova space. Signed-off-by: Irui Wang --- drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/media/platform/mtk-vcodec

[PATCH 3/3] media: mtk-vcodec: Separating mtk encoder driver

2021-01-20 Thread Irui Wang
codec-enc"; VP8 Encoder return driver name "mtk-venc-vp8. Signed-off-by: Hsin-Yi Wang Signed-off-by: Maoguang Meng Signed-off-by: Irui Wang --- .../platform/mtk-vcodec/mtk_vcodec_drv.h | 10 +- .../platform/mtk-vcodec/mtk_vcodec_enc.c | 23 +++- .../platform/mtk-vcodec/mt

[PATCH 1/3] dt-bindings: media: mtk-vcodec: Separating mtk vcodec encoder node

2021-01-20 Thread Irui Wang
Updates binding document since the avc and vp8 hardware encoder in MT8173 are now separated. Separate "mediatek,mt8173-vcodec-enc" to "mediatek,mt8173-vcodec-vp8-enc" and "mediatek,mt8173-vcodec-avc-enc". Signed-off-by: Hsin-Yi Wang Signed-off-by: Maoguang

[PATCH 2/3] arm64: dts: mt8173: Separating mtk-vcodec-enc device node

2021-01-20 Thread Irui Wang
There are two separate hardware encoder blocks inside MT8173. Split the current mtk-vcodec-enc node to match the hardware architecture. Signed-off-by: Hsin-Yi Wang Signed-off-by: Maoguang Meng Signed-off-by: Irui Wang --- arch/arm64/boot/dts/mediatek/mt8173.dtsi | 60

[PATCH 1/2] media: mtk-vpu: VPU should be in idle state before system is suspended

2020-10-28 Thread Irui Wang
VPU should be in idle state before system is suspended or it will work abnormally like VPU program counter not in a correct address or VPU reset Signed-off-by: Irui Wang --- drivers/media/platform/mtk-vpu/mtk_vpu.c | 68 1 file changed, 68 insertions(+) diff --git a

[PATCH 2/2] media: mtk-vpu: dump VPU status when IPI times out

2020-10-28 Thread Irui Wang
when IPI time out, dump VPU status to get more debug information Signed-off-by: Irui Wang --- drivers/media/platform/mtk-vpu/mtk_vpu.c | 33 +--- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/drivers/media/platform/mtk-vpu/mtk_vpu.c b/drivers/media/platform

Re: [PATCH] media: mtk-vcodec: set dma max segment size

2020-09-02 Thread Irui Wang
Dear Hsin-Yi, because this Warning is occured with config CONFIG_DMA_API_DEBUG_SG=y, how about add these modifications with this configuration as well? On Fri, 2020-08-21 at 12:14 +0800, Hsin-Yi Wang wrote: > Set dma max segment size for encoder and decoder driver. > > Fix following warning with