RE: [PATCH v6 6/6] [media] s5p-mfc: Update MFC v4l2 driver to support MFC6.x

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Arun,

Please find my comment inline.
It seems that we're very close to an ACK :)

PS - you missed me in CC when posting this patch (6/6).

Best wishes,
--
Kamil Debski
Linux Platform Group
Samsung Poland R&D Center


> Subject: [PATCH v6 6/6] [media] s5p-mfc: Update MFC v4l2 driver to support
> MFC6.x
> Date: Fri, 31 Aug 2012 22:37:42 +0530
> 
> From: Jeongtae Park <jtp.park@xxxxxxxxxxx>
> 
> Multi Format Codec 6.x is a hardware video coding acceleration
> module present in new Exynos5 SoC series. It is capable of
> handling several new video codecs for decoding and encoding
> 
> Signed-off-by: Jeongtae Park <jtp.park@xxxxxxxxxxx>
> Signed-off-by: Janghyuck Kim <janghyuck.kim@xxxxxxxxxxx>
> Signed-off-by: Jaeryul Oh <jaeryul.oh@xxxxxxxxxxx>
> Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@xxxxxxxxxxx>
> Signed-off-by: Arun Kumar K <arun.kk@xxxxxxxxxxx>
> ---
>  drivers/media/platform/Kconfig                  |    4 +-
>  drivers/media/platform/s5p-mfc/Makefile         |    8 +-
>  drivers/media/platform/s5p-mfc/regs-mfc.h       |   32 +
>  drivers/media/platform/s5p-mfc/s5p_mfc.c        |   64 +-
>  drivers/media/platform/s5p-mfc/s5p_mfc_cmd.c    |    7 +-
>  drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v6.c |  156 ++
>  drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v6.h |   20 +
>  drivers/media/platform/s5p-mfc/s5p_mfc_common.h |   61 +-
>  drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c   |  154 ++-
>  drivers/media/platform/s5p-mfc/s5p_mfc_dec.c    |  193 ++-
>  drivers/media/platform/s5p-mfc/s5p_mfc_enc.c    |  139 ++-
>  drivers/media/platform/s5p-mfc/s5p_mfc_opr.c    |   10 +-
>  drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c | 1956
+++++++++++++++++++++++
>  drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.h |   50 +
>  drivers/media/platform/s5p-mfc/s5p_mfc_pm.c     |    3 +-
>  15 files changed, 2689 insertions(+), 168 deletions(-)
>  create mode 100644 drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v6.c
>  create mode 100644 drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v6.h
>  create mode 100644 drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c
>  create mode 100644 drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.h
> 
> diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig
> index d4c034d..9269307 100644
> --- a/drivers/media/platform/Kconfig
> +++ b/drivers/media/platform/Kconfig
> @@ -164,12 +164,12 @@ config VIDEO_SAMSUNG_S5P_JPEG
>  	  This is a v4l2 driver for Samsung S5P and EXYNOS4 JPEG codec
> 
>  config VIDEO_SAMSUNG_S5P_MFC
> -	tristate "Samsung S5P MFC 5.1 Video Codec"
> +	tristate "Samsung S5P MFC Video Codec"
>  	depends on VIDEO_DEV && VIDEO_V4L2 && PLAT_S5P
>  	select VIDEOBUF2_DMA_CONTIG
>  	default n
>  	help
> -	    MFC 5.1 driver for V4L2.
> +	    MFC 5.1 and 6.x driver for V4L2
> 
>  config VIDEO_MX2_EMMAPRP
>  	tristate "MX2 eMMa-PrP support"
> diff --git a/drivers/media/platform/s5p-mfc/Makefile
> b/drivers/media/platform/s5p-mfc/Makefile
> index cfb9ee9..379008c 100644
> --- a/drivers/media/platform/s5p-mfc/Makefile
> +++ b/drivers/media/platform/s5p-mfc/Makefile
> @@ -1,6 +1,6 @@
>  obj-$(CONFIG_VIDEO_SAMSUNG_S5P_MFC) := s5p-mfc.o
> -s5p-mfc-y += s5p_mfc.o s5p_mfc_intr.o s5p_mfc_opr.o
> +s5p-mfc-y += s5p_mfc.o s5p_mfc_intr.o
>  s5p-mfc-y += s5p_mfc_dec.o s5p_mfc_enc.o
> -s5p-mfc-y += s5p_mfc_ctrl.o s5p_mfc_cmd.o
> -s5p-mfc-y += s5p_mfc_pm.o
> -s5p-mfc-y += s5p_mfc_opr_v5.o s5p_mfc_cmd_v5.o
> +s5p-mfc-y += s5p_mfc_ctrl.o s5p_mfc_pm.o
> +s5p-mfc-y += s5p_mfc_opr.o s5p_mfc_opr_v5.o s5p_mfc_opr_v6.o
> +s5p-mfc-y += s5p_mfc_cmd.o s5p_mfc_cmd_v5.o s5p_mfc_cmd_v6.o
> diff --git a/drivers/media/platform/s5p-mfc/regs-mfc.h
> b/drivers/media/platform/s5p-mfc/regs-mfc.h
> index 3e2fce0..77ce293 100644
> --- a/drivers/media/platform/s5p-mfc/regs-mfc.h
> +++ b/drivers/media/platform/s5p-mfc/regs-mfc.h
> @@ -144,6 +144,7 @@
>  #define S5P_FIMV_ENC_PROFILE_H264_MAIN			0
>  #define S5P_FIMV_ENC_PROFILE_H264_HIGH			1
>  #define S5P_FIMV_ENC_PROFILE_H264_BASELINE		2
> +#define S5P_FIMV_ENC_PROFILE_H264_CONSTRAINED_BASELINE	3
>  #define S5P_FIMV_ENC_PROFILE_MPEG4_SIMPLE		0
>  #define S5P_FIMV_ENC_PROFILE_MPEG4_ADVANCED_SIMPLE	1
>  #define S5P_FIMV_ENC_PIC_STRUCT		0x083c /* picture field/frame
flag */
> @@ -213,6 +214,7 @@
>  #define S5P_FIMV_DEC_STATUS_RESOLUTION_MASK		(3<<4)
>  #define S5P_FIMV_DEC_STATUS_RESOLUTION_INC		(1<<4)
>  #define S5P_FIMV_DEC_STATUS_RESOLUTION_DEC		(2<<4)
> +#define S5P_FIMV_DEC_STATUS_RESOLUTION_SHIFT		4
> 
>  /* Decode frame address */
>  #define S5P_FIMV_DECODE_Y_ADR			0x2024
> @@ -377,6 +379,16 @@
>  #define S5P_FIMV_R2H_CMD_EDFU_INIT_RET		16
>  #define S5P_FIMV_R2H_CMD_ERR_RET		32
> 
> +/* Dummy definition for MFCv6 compatibilty */
> +#define S5P_FIMV_CODEC_H264_MVC_DEC		-1
> +#define S5P_FIMV_R2H_CMD_FIELD_DONE_RET		-1
> +#define S5P_FIMV_MFC_RESET			-1
> +#define S5P_FIMV_RISC_ON			-1
> +#define S5P_FIMV_RISC_BASE_ADDRESS		-1
> +#define S5P_FIMV_CODEC_VP8_DEC			-1
> +#define S5P_FIMV_REG_CLEAR_BEGIN		0
> +#define S5P_FIMV_REG_CLEAR_COUNT		0
> +
>  /* Error handling defines */
>  #define S5P_FIMV_ERR_WARNINGS_START		145
>  #define S5P_FIMV_ERR_DEC_MASK			0xFFFF
> @@ -432,4 +444,24 @@
>  #define MFC_VERSION		0x51
>  #define MFC_NUM_PORTS		2
> 
> +#define S5P_FIMV_SHARED_FRAME_PACK_SEI_AVAIL    0x16C
> +#define S5P_FIMV_SHARED_FRAME_PACK_ARRGMENT_ID  0x170
> +#define S5P_FIMV_SHARED_FRAME_PACK_SEI_INFO     0x174
> +#define S5P_FIMV_SHARED_FRAME_PACK_GRID_POS     0x178
> +
> +/* SEI related information */
> +#define S5P_FIMV_FRAME_PACK_SEI_AVAIL S5P_FIMV_SHARED_FRAME_PACK_SEI_AVAIL

Is there any particular reason for such defines? It seems to me that one name
should
be enough. (this also applies to other such defines in this file and in
regs-mfc-v6.h)

> +#define S5P_FIMV_FRAME_PACK_ARRGMENT_ID
> S5P_FIMV_SHARED_FRAME_PACK_ARRGMENT_ID
> +#define S5P_FIMV_FRAME_PACK_SEI_INFO
> S5P_FIMV_SHARED_FRAME_PACK_SEI_INFO
> +#define S5P_FIMV_FRAME_PACK_GRID_POS
> S5P_FIMV_SHARED_FRAME_PACK_GRID_POS
> +
> +#define S5P_FIMV_SHARED_SET_E_FRAME_TAG
> 	S5P_FIMV_SHARED_SET_FRAME_TAG
> +#define S5P_FIMV_SHARED_GET_E_FRAME_TAG
> 	S5P_FIMV_SHARED_GET_FRAME_TAG_TOP
> +#define S5P_FIMV_ENCODED_LUMA_ADDR		S5P_FIMV_ENCODED_Y_ADDR
> +#define S5P_FIMV_ENCODED_CHROMA_ADDR		S5P_FIMV_ENCODED_C_ADDR
> +
> +/* Values for resolution change in display status */
> +#define S5P_FIMV_RES_INCREASE	1
> +#define S5P_FIMV_RES_DECREASE	2
> +
>  #endif /* _REGS_FIMV_H */

[snip]

Best wishes,
Kamil Debski

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux