summaryrefslogtreecommitdiff
path: root/drivers/media/platform/mtk-vcodec
AgeCommit message (Collapse)Author
2016-07-15[media] mtk-vcodec: fix default OUTPUT buffer sizeTiffany Lin
When calculate OUTPUT buffer size in vidioc_try_fmt, it will add more size hw need in each plane. But in mtk_vcodec_enc_set_default_params, it do not add same size in each plane. This makes v4l2-compliance test fail. This patch fix the issue. Signed-off-by: Tiffany Lin <tiffany.lin@mediatek.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-15[media] mtk-vcodec: fix more type mismatchesArnd Bergmann
The newly added mtk-vcodec driver produces a number of warnings in an ARM allmodconfig build, mainly since it assumes that dma_addr_t is 32-bit wide: mtk-vcodec/venc/venc_vp8_if.c: In function 'vp8_enc_alloc_work_buf': mtk-vcodec/venc/venc_vp8_if.c:212:191: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] mtk-vcodec/venc/venc_h264_if.c: In function 'h264_enc_alloc_work_buf': mtk-vcodec/venc/venc_h264_if.c:297:190: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] This rearranges the format strings and type casts to what they should have been in order to avoid the warnings. e0f80d8d62f5 ("[media] mtk-vcodec: fix two compiler warnings") fixed some of the problems that were introduced at the same time, but missed two others. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-13[media] mtk-vcodec: remove redundant dev_err call in mtk_vcodec_probe()Wei Yongjun
There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Reviewed-by: Tiffany Lin <tiffany.lin@mediatek.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-13[media] vcodec: mediatek: Fix return value check in mtk_vcodec_init_enc_pm()Wei Yongjun
In case of error, the function devm_clk_get() returns ERR_PTR() and not returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-12[media] mtk-vcodec: fix sparse warningTiffany Lin
This patch fix sparse warning when running with parameters: C=2 CF="-D__CHECK_ENDIAN__" Signed-off-by: Tiffany Lin <tiffany.lin@mediatek.com> Signed-off-by: PoChun Lin <pochun.lin@mediatek.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-12[media] mtk-vcodec: fix platform_no_drv_owner.cocci warningsFengguang Wu
drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c:433:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-09[media] mtk-vcodec: fix compiler warningHans Verkuil
mtk-vcodec/venc_vpu_if.c:40:30: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] struct venc_vpu_inst *vpu = (struct venc_vpu_inst *)msg->venc_inst; ^ Note: venc_inst is u64. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-09[media] mtk-vcodec: fix two compiler warningsHans Verkuil
mtk-vcodec/mtk_vcodec_enc.c: In function 'mtk_venc_worker': mtk-vcodec/mtk_vcodec_enc.c:1030:43: warning: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'size_t {aka unsigned int}' [-Wformat=] mtk-vcodec/mtk_vcodec_enc.c:1030:43: warning: format '%lx' expects argument of type 'long unsigned int', but argument 10 has type 'size_t {aka unsigned int}' [-Wformat=] Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] mtk-vcodec: convert driver to use the new vb2_queue dev fieldHans Verkuil
The patch dropping the vb2_dma_contig_init_ctx() and _cleanup_ctx() functions was already applied before this driver was added. So convert this driver as well. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] vcodec: mediatek: Add Mediatek H264 Video Encoder DriverTiffany Lin
Add h264 encoder driver for MT8173 Signed-off-by: PoChun Lin <pochun.lin@mediatek.com> Signed-off-by: Tiffany Lin <tiffany.lin@mediatek.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] vcodec: mediatek: Add Mediatek VP8 Video Encoder DriverTiffany Lin
Add vp8 encoder driver for MT8173 Signed-off-by: PoChun Lin <pochun.lin@mediatek.com> Signed-off-by: Tiffany Lin <tiffany.lin@mediatek.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] vcodec: mediatek: Add Mediatek V4L2 Video Encoder DriverTiffany Lin
Add v4l2 layer encoder driver for MT8173 Signed-off-by: Tiffany Lin <tiffany.lin@mediatek.com> [hans.verkuil@cisco.com: drop unnecessary ARM || ARM64 dependency] Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>