Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1614970

Re: [Patch v3 06/11] [media] s5p-mfc: Add support for HEVC decoder

From Hans Verkuil <hverkuil@xs4all.nl>
Newsgroups linux.kernel
Subject Re: [Patch v3 06/11] [media] s5p-mfc: Add support for HEVC decoder
Date 2017-04-03 10:20 +0200
Message-ID <ts5ns-4l0-15@gated-at.bofh.it> (permalink)
References <tr0Jb-2AS-7@gated-at.bofh.it> <tr0Jc-2AS-53@gated-at.bofh.it> <tr0Jc-2AS-51@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 03/31/2017 11:06 AM, Smitha T Murthy wrote:
> Add support for codec definition and corresponding buffer
> requirements for HEVC decoder.
> 
> Signed-off-by: Smitha T Murthy <smitha.t@samsung.com>
> Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
> ---
>  drivers/media/platform/s5p-mfc/regs-mfc-v10.h   |  1 +
>  drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v6.c |  3 +++
>  drivers/media/platform/s5p-mfc/s5p_mfc_common.h |  1 +
>  drivers/media/platform/s5p-mfc/s5p_mfc_dec.c    |  8 ++++++++
>  drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c | 17 +++++++++++++++--
>  drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.h |  3 +++
>  6 files changed, 31 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/platform/s5p-mfc/regs-mfc-v10.h b/drivers/media/platform/s5p-mfc/regs-mfc-v10.h
> index 3f0dab3..953a073 100644
> --- a/drivers/media/platform/s5p-mfc/regs-mfc-v10.h
> +++ b/drivers/media/platform/s5p-mfc/regs-mfc-v10.h
> @@ -33,6 +33,7 @@
>  #define MFC_NUM_PORTS_V10	1
>  
>  /* MFCv10 codec defines*/
> +#define S5P_FIMV_CODEC_HEVC_DEC		17
>  #define S5P_FIMV_CODEC_HEVC_ENC         26
>  
>  /* Encoder buffer size for MFC v10.0 */
> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v6.c b/drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v6.c
> index b1b1491..76eca67 100644
> --- a/drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v6.c
> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v6.c
> @@ -101,6 +101,9 @@ static int s5p_mfc_open_inst_cmd_v6(struct s5p_mfc_ctx *ctx)
>  	case S5P_MFC_CODEC_VP8_DEC:
>  		codec_type = S5P_FIMV_CODEC_VP8_DEC_V6;
>  		break;
> +	case S5P_MFC_CODEC_HEVC_DEC:
> +		codec_type = S5P_FIMV_CODEC_HEVC_DEC;
> +		break;
>  	case S5P_MFC_CODEC_H264_ENC:
>  		codec_type = S5P_FIMV_CODEC_H264_ENC_V6;
>  		break;
> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
> index 8368d5c2..f49fa34 100644
> --- a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
> @@ -79,6 +79,7 @@ static inline dma_addr_t s5p_mfc_mem_cookie(void *a, void *b)
>  #define S5P_MFC_CODEC_H263_DEC		5
>  #define S5P_MFC_CODEC_VC1RCV_DEC	6
>  #define S5P_MFC_CODEC_VP8_DEC		7
> +#define S5P_MFC_CODEC_HEVC_DEC		17
>  
>  #define S5P_MFC_CODEC_H264_ENC		20
>  #define S5P_MFC_CODEC_H264_MVC_ENC	21
> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
> index db6d9fa..4fdaec2 100644
> --- a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
> @@ -144,6 +144,14 @@ static struct s5p_mfc_fmt formats[] = {
>  		.num_planes	= 1,
>  		.versions	= MFC_V6PLUS_BITS,
>  	},
> +	{
> +		.name		= "HEVC Encoded Stream",
> +		.fourcc		= V4L2_PIX_FMT_HEVC,
> +		.codec_mode	= S5P_FIMV_CODEC_HEVC_DEC,
> +		.type		= MFC_FMT_DEC,
> +		.num_planes	= 1,
> +		.versions	= MFC_V10_BIT,
> +	},
>  };

The '.name' should probably be removed completely in this driver. The name is now filled
in by v4l_fill_fmtdesc() in v4l2-ioctl.c, so there is no longer any need to set it in a
driver.

This can be done in a separate patch before this patch is applied.

Doing this in v4l2-ioctl.c ensures consistent format naming across drivers.

Regards,

	Hans

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[Patch v3 00/11] Add MFC v10.10 support Smitha T Murthy <smitha.t@samsung.com> - 2017-03-31 11:10 +0200
  [Patch v3 02/11] [media] s5p-mfc: Adding initial support for MFC v10.10 Smitha T Murthy <smitha.t@samsung.com> - 2017-03-31 11:10 +0200
  [Patch v3 08/11] [media] s5p-mfc: Add VP9 decoder support Smitha T Murthy <smitha.t@samsung.com> - 2017-03-31 11:10 +0200
  [Patch v3 01/11] [media] s5p-mfc: Rename IS_MFCV8 macro Smitha T Murthy <smitha.t@samsung.com> - 2017-03-31 11:10 +0200
  [Patch v3 11/11] Documention: v4l: Documentation for HEVC CIDs Smitha T Murthy <smitha.t@samsung.com> - 2017-03-31 11:10 +0200
    Re: [Patch v3 11/11] Documention: v4l: Documentation for HEVC CIDs Hans Verkuil <hverkuil@xs4all.nl> - 2017-04-03 10:30 +0200
      Re: [Patch v3 11/11] Documention: v4l: Documentation for HEVC CIDs Smitha T Murthy <smitha.t@samsung.com> - 2017-04-04 12:40 +0200
  [Patch v3 07/11] Documentation: v4l: Documentation for HEVC v4l2  definition Smitha T Murthy <smitha.t@samsung.com> - 2017-03-31 11:10 +0200
    Re: [Patch v3 07/11] Documentation: v4l: Documentation for HEVC v4l2  definition Hans Verkuil <hverkuil@xs4all.nl> - 2017-04-03 10:20 +0200
      Re: [Patch v3 07/11] Documentation: v4l: Documentation for HEVC v4l2  definition Smitha T Murthy <smitha.t@samsung.com> - 2017-04-03 14:20 +0200
        Re: [Patch v3 07/11] Documentation: v4l: Documentation for HEVC v4l2  definition Hans Verkuil <hverkuil@xs4all.nl> - 2017-04-03 14:20 +0200
          Re: [Patch v3 07/11] Documentation: v4l: Documentation for HEVC v4l2  definition Smitha T Murthy <smitha.t@samsung.com> - 2017-04-03 14:20 +0200
  [Patch v3 06/11] [media] s5p-mfc: Add support for HEVC decoder Smitha T Murthy <smitha.t@samsung.com> - 2017-03-31 11:10 +0200
    Re: [Patch v3 06/11] [media] s5p-mfc: Add support for HEVC decoder Hans Verkuil <hverkuil@xs4all.nl> - 2017-04-03 10:20 +0200
      Re: [Patch v3 06/11] [media] s5p-mfc: Add support for HEVC decoder Smitha T Murthy <smitha.t@samsung.com> - 2017-04-03 14:20 +0200
  [Patch v3 09/11] [media] v4l2: Add v4l2 control IDs for HEVC  encoder Smitha T Murthy <smitha.t@samsung.com> - 2017-03-31 11:10 +0200
    Re: [Patch v3 09/11] [media] v4l2: Add v4l2 control IDs for HEVC  encoder Hans Verkuil <hverkuil@xs4all.nl> - 2017-04-03 10:30 +0200
      Re: [Patch v3 09/11] [media] v4l2: Add v4l2 control IDs for HEVC  encoder Smitha T Murthy <smitha.t@samsung.com> - 2017-04-03 14:20 +0200
  [Patch v3 03/11] [media] s5p-mfc: Use min scratch buffer size as  provided by F/W Smitha T Murthy <smitha.t@samsung.com> - 2017-03-31 11:10 +0200
  Re: [Patch v3 00/11] Add MFC v10.10 support Andrzej Hajda <a.hajda@samsung.com> - 2017-03-31 15:40 +0200
    Re: [Patch v3 00/11] Add MFC v10.10 support Smitha T Murthy <smitha.t@samsung.com> - 2017-04-03 08:20 +0200

csiph-web