[V1,2/2] media: media: jpegenc: set bit mask for jpegenc

Rex-BC Chen rex-bc.chen at mediatek.com
Thu May 19 01:43:30 PDT 2022


On Thu, 2022-05-19 at 16:16 +0800, kyrie.wu wrote:
> From: kyrie wu <kyrie.wu at mediatek.com>
> 
> set bit mask for jpeg encode
> 
> Signed-off-by: kyrie wu <kyrie.wu at mediatek.com>
> ---
>  drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c
> b/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c
> index bc5b0a0168ec..87685a62a5c2 100644
> --- a/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c
> +++ b/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c
> @@ -1369,6 +1369,9 @@ static int mtk_jpeg_probe(struct
> platform_device *pdev)
>  	jpeg->vdev->device_caps = V4L2_CAP_STREAMING |
>  				  V4L2_CAP_VIDEO_M2M_MPLANE;
>  
> +	if (of_get_property(pdev->dev.of_node, "dma-ranges", NULL))
> +		dma_set_mask_and_coherent(&pdev->dev,
> DMA_BIT_MASK(34));
> +
>  	ret = video_register_device(jpeg->vdev, VFL_TYPE_VIDEO, -1);
>  	if (ret) {
>  		v4l2_err(&jpeg->v4l2_dev, "Failed to register video
> device\n");

Hello Kyrie,

if you want to add this property in dts, you need to add a new property
description to descript this.

BRs,
Rex




More information about the linux-arm-kernel mailing list