Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1346310 > unrolled thread
| Started by | Jung Zhao <jung.zhao@rock-chips.com> |
|---|---|
| First post | 2016-03-01 03:40 +0100 |
| Last post | 2016-03-01 03:50 +0100 |
| Articles | 4 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH v3 0/3] Add Rockchip VP8 Video Decoder Driver Jung Zhao <jung.zhao@rock-chips.com> - 2016-03-01 03:40 +0100
[PATCH v3 1/3] [NOT FOR REVIEW] v4l: Add private compound control type. Jung Zhao <jung.zhao@rock-chips.com> - 2016-03-01 03:40 +0100
[PATCH v3 2/3] [NOT FOR REVIEW] v4l: Add VP8 low-level decoder API controls. Jung Zhao <jung.zhao@rock-chips.com> - 2016-03-01 03:40 +0100
Re: [PATCH v3 2/3] [NOT FOR REVIEW] v4l: Add VP8 low-level decoder API controls. kbuild test robot <lkp@intel.com> - 2016-03-01 03:50 +0100
| From | Jung Zhao <jung.zhao@rock-chips.com> |
|---|---|
| Date | 2016-03-01 03:40 +0100 |
| Subject | [PATCH v3 0/3] Add Rockchip VP8 Video Decoder Driver |
| Message-ID | <r7Io9-2Vu-5@gated-at.bofh.it> |
The purpose of this series is to add Rockchip VPU driver for hw video codec in Rockchip's RK3229 and RK3288 SOCs. Rockchip Video VPU Driver is able to handle video decoding of in a range of formats(Now only support VP8, and more formats will be supported in future). The VPU driver depends on Request API[1] and RK IOMMU[2]. [1]http://www.spinics.net/lists/linux-media/msg95733.html [2]http://www.gossamer-threads.com/lists/linux/kernel/2347458 Since VP8 headers and controls for the V4L2 API and framework and the changes to videobuf2 were authored and written by Pawel Osciak <posciak@chromium.org> and Tomasz Figa <tfiga@chromium.org>. These parts are 'NOT FOR REVIEW' and will be submitted by themselves. But these patches are very important for Rockchip VPU Driver, I cherrypick them from Chromium OS Tree[3] and use for reference here. [3]https://chromium.googlesource.com/chromiumos/third_party/kernel Changes in v3: - set DMA_ATTR_ALLOC_SINGLE_PAGES(Douglas) Changes in v2: - add [NOT FOR REVIEW] tag for patches from Chromium OS Tree suggested by Tomasz - update copyright message - list all the related signed-off names - add more description suggested by Enric - fix format error of commit message suggested by Tomasz Jung Zhao (1): media: vcodec: rockchip: Add Rockchip VP8 decoder driver Pawel Osciak (2): [NOT FOR REVIEW] v4l: Add private compound control type. [NOT FOR REVIEW] v4l: Add VP8 low-level decoder API controls. drivers/media/platform/Kconfig | 11 + drivers/media/platform/Makefile | 1 + drivers/media/platform/rockchip-vpu/Makefile | 7 + .../media/platform/rockchip-vpu/rkvpu_hw_vp8d.c | 798 ++++++++++ .../platform/rockchip-vpu/rockchip_vp8d_regs.h | 1594 ++++++++++++++++++++ drivers/media/platform/rockchip-vpu/rockchip_vpu.c | 812 ++++++++++ .../platform/rockchip-vpu/rockchip_vpu_common.h | 439 ++++++ .../media/platform/rockchip-vpu/rockchip_vpu_dec.c | 1007 +++++++++++++ .../media/platform/rockchip-vpu/rockchip_vpu_dec.h | 33 + .../media/platform/rockchip-vpu/rockchip_vpu_hw.c | 295 ++++ .../media/platform/rockchip-vpu/rockchip_vpu_hw.h | 100 ++ drivers/media/v4l2-core/v4l2-ctrls.c | 13 + drivers/media/v4l2-core/v4l2-ioctl.c | 1 + include/media/v4l2-ctrls.h | 2 + include/uapi/linux/v4l2-controls.h | 94 ++ include/uapi/linux/videodev2.h | 5 + 16 files changed, 5212 insertions(+) create mode 100644 drivers/media/platform/rockchip-vpu/Makefile create mode 100644 drivers/media/platform/rockchip-vpu/rkvpu_hw_vp8d.c create mode 100644 drivers/media/platform/rockchip-vpu/rockchip_vp8d_regs.h create mode 100644 drivers/media/platform/rockchip-vpu/rockchip_vpu.c create mode 100644 drivers/media/platform/rockchip-vpu/rockchip_vpu_common.h create mode 100644 drivers/media/platform/rockchip-vpu/rockchip_vpu_dec.c create mode 100644 drivers/media/platform/rockchip-vpu/rockchip_vpu_dec.h create mode 100644 drivers/media/platform/rockchip-vpu/rockchip_vpu_hw.c create mode 100644 drivers/media/platform/rockchip-vpu/rockchip_vpu_hw.h -- 1.9.1
[toc] | [next] | [standalone]
| From | Jung Zhao <jung.zhao@rock-chips.com> |
|---|---|
| Date | 2016-03-01 03:40 +0100 |
| Subject | [PATCH v3 1/3] [NOT FOR REVIEW] v4l: Add private compound control type. |
| Message-ID | <r7Ioa-2Vu-11@gated-at.bofh.it> |
| In reply to | #1346310 |
From: Pawel Osciak <posciak@chromium.org>
V4L2_CTRL_TYPE_PRIVATE is to be used for private driver compound
controls that use the "ptr" member of struct v4l2_ext_control.
Signed-off-by: Pawel Osciak <posciak@chromium.org>
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
---
Changes in v3: None
Changes in v2:
- add [NOT FOR REVIEW] tag for patches from Chromium OS Tree suggested by Tomasz
- update copyright message
- list all the related signed-off names
- add more description suggested by Enric
- fix format error of commit message suggested by Tomasz
drivers/media/v4l2-core/v4l2-ctrls.c | 4 ++++
include/uapi/linux/videodev2.h | 2 ++
2 files changed, 6 insertions(+)
diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c
index 890520d..527d65c 100644
--- a/drivers/media/v4l2-core/v4l2-ctrls.c
+++ b/drivers/media/v4l2-core/v4l2-ctrls.c
@@ -1525,6 +1525,10 @@ static int std_validate(const struct v4l2_ctrl *ctrl, u32 idx,
return -ERANGE;
return 0;
+ /* FIXME:just return 0 for now */
+ case V4L2_CTRL_TYPE_PRIVATE:
+ return 0;
+
default:
return -EINVAL;
}
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index 29a6b78..53ac896 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -1517,6 +1517,8 @@ enum v4l2_ctrl_type {
V4L2_CTRL_TYPE_U8 = 0x0100,
V4L2_CTRL_TYPE_U16 = 0x0101,
V4L2_CTRL_TYPE_U32 = 0x0102,
+
+ V4L2_CTRL_TYPE_PRIVATE = 0xffff,
};
/* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */
--
1.9.1
[toc] | [prev] | [next] | [standalone]
| From | Jung Zhao <jung.zhao@rock-chips.com> |
|---|---|
| Date | 2016-03-01 03:40 +0100 |
| Subject | [PATCH v3 2/3] [NOT FOR REVIEW] v4l: Add VP8 low-level decoder API controls. |
| Message-ID | <r7Ioa-2Vu-17@gated-at.bofh.it> |
| In reply to | #1346310 |
From: Pawel Osciak <posciak@chromium.org>
These controls are to be used with the new low-level decoder API for VP8
to provide additional parameters for the hardware that cannot parse the
input stream.
Signed-off-by: Pawel Osciak <posciak@chromium.org>
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
---
Changes in v3: None
Changes in v2: None
drivers/media/v4l2-core/v4l2-ctrls.c | 9 ++++
drivers/media/v4l2-core/v4l2-ioctl.c | 1 +
include/media/v4l2-ctrls.h | 2 +
include/uapi/linux/v4l2-controls.h | 94 ++++++++++++++++++++++++++++++++++++
include/uapi/linux/videodev2.h | 3 ++
5 files changed, 109 insertions(+)
diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c
index 527d65c..ffc513e 100644
--- a/drivers/media/v4l2-core/v4l2-ctrls.c
+++ b/drivers/media/v4l2-core/v4l2-ctrls.c
@@ -762,6 +762,8 @@ const char *v4l2_ctrl_get_name(u32 id)
case V4L2_CID_MPEG_VIDEO_VPX_P_FRAME_QP: return "VPX P-Frame QP Value";
case V4L2_CID_MPEG_VIDEO_VPX_PROFILE: return "VPX Profile";
+ case V4L2_CID_MPEG_VIDEO_VP8_FRAME_HDR: return "VP8 Frame Header";
+
/* CAMERA controls */
/* Keep the order of the 'case's the same as in v4l2-controls.h! */
case V4L2_CID_CAMERA_CLASS: return "Camera Controls";
@@ -1126,6 +1128,9 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,
case V4L2_CID_RDS_TX_ALT_FREQS:
*type = V4L2_CTRL_TYPE_U32;
break;
+ case V4L2_CID_MPEG_VIDEO_VP8_FRAME_HDR:
+ *type = V4L2_CTRL_TYPE_VP8_FRAME_HDR;
+ break;
default:
*type = V4L2_CTRL_TYPE_INTEGER;
break;
@@ -1529,6 +1534,7 @@ static int std_validate(const struct v4l2_ctrl *ctrl, u32 idx,
case V4L2_CTRL_TYPE_PRIVATE:
return 0;
+ case V4L2_CTRL_TYPE_VP8_FRAME_HDR:
default:
return -EINVAL;
}
@@ -2078,6 +2084,9 @@ static struct v4l2_ctrl *v4l2_ctrl_new(struct v4l2_ctrl_handler *hdl,
case V4L2_CTRL_TYPE_U32:
elem_size = sizeof(u32);
break;
+ case V4L2_CTRL_TYPE_VP8_FRAME_HDR:
+ elem_size = sizeof(struct v4l2_ctrl_vp8_frame_hdr);
+ break;
default:
if (type < V4L2_CTRL_COMPOUND_TYPES)
elem_size = sizeof(s32);
diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
index 7d028d1..915dc2c 100644
--- a/drivers/media/v4l2-core/v4l2-ioctl.c
+++ b/drivers/media/v4l2-core/v4l2-ioctl.c
@@ -1259,6 +1259,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
case V4L2_PIX_FMT_VC1_ANNEX_G: descr = "VC-1 (SMPTE 412M Annex G)"; break;
case V4L2_PIX_FMT_VC1_ANNEX_L: descr = "VC-1 (SMPTE 412M Annex L)"; break;
case V4L2_PIX_FMT_VP8: descr = "VP8"; break;
+ case V4L2_PIX_FMT_VP8_FRAME: descr = "VP8 FRAME"; break;
case V4L2_PIX_FMT_CPIA1: descr = "GSPCA CPiA YUV"; break;
case V4L2_PIX_FMT_WNVA: descr = "WNVA"; break;
case V4L2_PIX_FMT_SN9C10X: descr = "GSPCA SN9C10X"; break;
diff --git a/include/media/v4l2-ctrls.h b/include/media/v4l2-ctrls.h
index 5f9526f..0424cdc 100644
--- a/include/media/v4l2-ctrls.h
+++ b/include/media/v4l2-ctrls.h
@@ -46,6 +46,7 @@ struct poll_table_struct;
* @p_u16: Pointer to a 16-bit unsigned value.
* @p_u32: Pointer to a 32-bit unsigned value.
* @p_char: Pointer to a string.
+ * @p_vp8_frame_hdr: Pointer to a struct v4l2_ctrl_vp8_frame_hdr.
* @p: Pointer to a compound value.
*/
union v4l2_ctrl_ptr {
@@ -55,6 +56,7 @@ union v4l2_ctrl_ptr {
u16 *p_u16;
u32 *p_u32;
char *p_char;
+ struct v4l2_ctrl_vp8_frame_hdr *p_vp8_frame_hdr;
void *p;
};
diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h
index 2d225bc..894de37 100644
--- a/include/uapi/linux/v4l2-controls.h
+++ b/include/uapi/linux/v4l2-controls.h
@@ -578,6 +578,8 @@ enum v4l2_vp8_golden_frame_sel {
#define V4L2_CID_MPEG_VIDEO_VPX_P_FRAME_QP (V4L2_CID_MPEG_BASE+510)
#define V4L2_CID_MPEG_VIDEO_VPX_PROFILE (V4L2_CID_MPEG_BASE+511)
+#define V4L2_CID_MPEG_VIDEO_VP8_FRAME_HDR (V4L2_CID_MPEG_BASE+512)
+
/* MPEG-class control IDs specific to the CX2341x driver as defined by V4L2 */
#define V4L2_CID_MPEG_CX2341X_BASE (V4L2_CTRL_CLASS_MPEG | 0x1000)
#define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE (V4L2_CID_MPEG_CX2341X_BASE+0)
@@ -963,4 +965,96 @@ enum v4l2_detect_md_mode {
#define V4L2_CID_DETECT_MD_THRESHOLD_GRID (V4L2_CID_DETECT_CLASS_BASE + 3)
#define V4L2_CID_DETECT_MD_REGION_GRID (V4L2_CID_DETECT_CLASS_BASE + 4)
+#define V4L2_VP8_SEGMNT_HDR_FLAG_ENABLED 0x01
+#define V4L2_VP8_SEGMNT_HDR_FLAG_UPDATE_MAP 0x02
+#define V4L2_VP8_SEGMNT_HDR_FLAG_UPDATE_FEATURE_DATA 0x04
+struct v4l2_vp8_sgmnt_hdr {
+ __u8 segment_feature_mode;
+
+ __s8 quant_update[4];
+ __s8 lf_update[4];
+ __u8 segment_probs[3];
+
+ __u8 flags;
+};
+
+#define V4L2_VP8_LF_HDR_ADJ_ENABLE 0x01
+#define V4L2_VP8_LF_HDR_DELTA_UPDATE 0x02
+struct v4l2_vp8_loopfilter_hdr {
+ __u8 type;
+ __u8 level;
+ __u8 sharpness_level;
+ __s8 ref_frm_delta_magnitude[4];
+ __s8 mb_mode_delta_magnitude[4];
+
+ __u8 flags;
+};
+
+struct v4l2_vp8_quantization_hdr {
+ __u8 y_ac_qi;
+ __s8 y_dc_delta;
+ __s8 y2_dc_delta;
+ __s8 y2_ac_delta;
+ __s8 uv_dc_delta;
+ __s8 uv_ac_delta;
+ __u16 dequant_factors[4][3][2];
+};
+
+struct v4l2_vp8_entropy_hdr {
+ __u8 coeff_probs[4][8][3][11];
+ __u8 y_mode_probs[4];
+ __u8 uv_mode_probs[3];
+ __u8 mv_probs[2][19];
+};
+
+#define V4L2_VP8_FRAME_HDR_FLAG_EXPERIMENTAL 0x01
+#define V4L2_VP8_FRAME_HDR_FLAG_SHOW_FRAME 0x02
+#define V4L2_VP8_FRAME_HDR_FLAG_MB_NO_SKIP_COEFF 0x04
+struct v4l2_ctrl_vp8_frame_hdr {
+ /* 0: keyframe, 1: not a keyframe */
+ __u8 key_frame;
+ __u8 version;
+
+ /* Populated also if not a key frame */
+ __u16 width;
+ __u8 horizontal_scale;
+ __u16 height;
+ __u8 vertical_scale;
+
+ struct v4l2_vp8_sgmnt_hdr sgmnt_hdr;
+ struct v4l2_vp8_loopfilter_hdr lf_hdr;
+ struct v4l2_vp8_quantization_hdr quant_hdr;
+ struct v4l2_vp8_entropy_hdr entropy_hdr;
+
+ __u8 sign_bias_golden;
+ __u8 sign_bias_alternate;
+
+ __u8 prob_skip_false;
+ __u8 prob_intra;
+ __u8 prob_last;
+ __u8 prob_gf;
+
+ __u32 first_part_size;
+ __u32 first_part_offset;
+ /*
+ * Offset in bits of MB data in first partition,
+ * i.e. bit offset starting from first_part_offset.
+ */
+ __u32 macroblock_bit_offset;
+
+ __u8 num_dct_parts;
+ __u32 dct_part_sizes[8];
+
+ __u8 bool_dec_range;
+ __u8 bool_dec_value;
+ __u8 bool_dec_count;
+
+ /* v4l2_buffer indices of reference frames */
+ __u32 last_frame;
+ __u32 golden_frame;
+ __u32 alt_frame;
+
+ __u8 flags;
+};
+
#endif
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index 53ac896..1493ec4 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -593,6 +593,7 @@ struct v4l2_pix_format {
#define V4L2_PIX_FMT_VC1_ANNEX_G v4l2_fourcc('V', 'C', '1', 'G') /* SMPTE 421M Annex G compliant stream */
#define V4L2_PIX_FMT_VC1_ANNEX_L v4l2_fourcc('V', 'C', '1', 'L') /* SMPTE 421M Annex L compliant stream */
#define V4L2_PIX_FMT_VP8 v4l2_fourcc('V', 'P', '8', '0') /* VP8 */
+#define V4L2_PIX_FMT_VP8_FRAME v4l2_fourcc('V', 'P', '8', 'F') /* VP8 parsed frames */
/* Vendor-specific formats */
#define V4L2_PIX_FMT_CPIA1 v4l2_fourcc('C', 'P', 'I', 'A') /* cpia1 YUV */
@@ -1473,6 +1474,7 @@ struct v4l2_ext_control {
__u8 __user *p_u8;
__u16 __user *p_u16;
__u32 __user *p_u32;
+ struct v4l2_ctrl_vp8_frame_hdr __user *p_vp8_frame_hdr;
void __user *ptr;
};
} __attribute__ ((packed));
@@ -1517,6 +1519,7 @@ enum v4l2_ctrl_type {
V4L2_CTRL_TYPE_U8 = 0x0100,
V4L2_CTRL_TYPE_U16 = 0x0101,
V4L2_CTRL_TYPE_U32 = 0x0102,
+ V4L2_CTRL_TYPE_VP8_FRAME_HDR = 0x108,
V4L2_CTRL_TYPE_PRIVATE = 0xffff,
};
--
1.9.1
[toc] | [prev] | [next] | [standalone]
| From | kbuild test robot <lkp@intel.com> |
|---|---|
| Date | 2016-03-01 03:50 +0100 |
| Subject | Re: [PATCH v3 2/3] [NOT FOR REVIEW] v4l: Add VP8 low-level decoder API controls. |
| Message-ID | <r7IxP-2Zx-5@gated-at.bofh.it> |
| In reply to | #1346314 |
[Multipart message — attachments visible in raw view] — view raw
Hi Pawel,
[auto build test WARNING on sailus-media/master]
[also build test WARNING on v4.5-rc6 next-20160229]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]
url: https://github.com/0day-ci/linux/commits/Jung-Zhao/Add-Rockchip-VP8-Video-Decoder-Driver/20160301-103522
base: git://linuxtv.org/media_tree.git master
config: i386-tinyconfig (attached as .config)
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All warnings (new ones prefixed by >>):
>> ./usr/include/linux/v4l2-controls.h:983: found __[us]{8,16,32,64} type without #include <linux/types.h>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web