mbox series

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

Message ID 20210521070139.20644-1-irui.wang@mediatek.com
Headers show
Series Support H264 4K on MT8192 | expand

Message

Irui Wang May 21, 2021, 7:01 a.m. UTC
Add MT8192 H264 venc driver and support H264 4K encoding on MT8192.

Change notes:
v4: rebase on Linux 5.13-rc1

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 binding for MT8192 VENC
  media: mtk-vcodec: Add MT8192 H264 venc driver
  media: mtk-vcodec: Support MT8192 H264 4K encoding

 .../bindings/media/mediatek-vcodec.txt        |  3 +
 .../platform/mtk-vcodec/mtk_vcodec_drv.h      |  1 +
 .../platform/mtk-vcodec/mtk_vcodec_enc.c      | 89 +++++++++++--------
 .../platform/mtk-vcodec/mtk_vcodec_enc_drv.c  | 17 ++++
 .../platform/mtk-vcodec/venc/venc_h264_if.c   |  4 +
 5 files changed, 78 insertions(+), 36 deletions(-)

Comments

Tzung-Bi Shih May 21, 2021, 8:06 a.m. UTC | #1
On Fri, May 21, 2021 at 3:02 PM Irui Wang <irui.wang@mediatek.com> wrote:
> +       if (of_get_property(pdev->dev.of_node, "dma-ranges", NULL))
> +               dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(34));
> +
Yong Wu (吴勇) May 22, 2021, 9:50 a.m. UTC | #2
On Fri, 2021-05-21 at 16:06 +0800, Tzung-Bi Shih wrote:
> On Fri, May 21, 2021 at 3:02 PM Irui Wang <irui.wang@mediatek.com> wrote:

> > +       if (of_get_property(pdev->dev.of_node, "dma-ranges", NULL))

> > +               dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(34));

> > +

> 

> From your previous dt-bindings patch[1], it has 4 banks.

> > 0~4G; 4G~8G; 8G~12G; 12G~16G.

> 

> But, the code treats it as a boolean.  I.e. 0~4GB if non-existent;

> otherwise, 4GB~8GB.


Here DMA_BIT_MASK(34) means dma address support 34bits(16GB).

The code is ok for me. Only the commit message should not say 4G-8G. it
could be something like:

Use the dma_set_mask_and_coherent helper to set venc DMA bit mask to
support 34bits iova space(16GB) that the mt8192 iommu HW support. Whole
the iova range separate to 0~4G/4G~8G/8G~12G/12G~16G, Regarding which
iova range VENC actually locate, it depend on the dma-ranges property of
the venc dtsi node.

> 

> [1]: https://patchwork.linuxtv.org/project/linux-media/patch/20210521070139.20644-3-irui.wang@mediatek.com/

> 

> _______________________________________________

> Linux-mediatek mailing list

> Linux-mediatek@lists.infradead.org

> http://lists.infradead.org/mailman/listinfo/linux-mediatek