Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6bd5f5fc authored by Zhongbo Shi's avatar Zhongbo Shi Committed by Shi Zhongbo
Browse files

msm: vidc: add P010 support for decoder



Add the P010 10bit color format for decoder split mode only.

CRs-Fixed: 2088430
Change-Id: I6614f0da7a1cd67c87027ee24bfd5c6d63820dd1
Signed-off-by: default avatarZhongbo Shi <zhongbos@codeaurora.org>
parent 8e0e97e8
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -67,6 +67,8 @@ static int color_format[] = {
	[ilog2(HAL_COLOR_FORMAT_NV12_UBWC)] =  HFI_COLOR_FORMAT_NV12_UBWC,
	[ilog2(HAL_COLOR_FORMAT_NV12_TP10_UBWC)] =
			HFI_COLOR_FORMAT_YUV420_TP10_UBWC,
	/*P010 10bit format*/
	[ilog2(HAL_COLOR_FORMAT_P010)] =  HFI_COLOR_FORMAT_P010,
};

static int nal_type[] = {
+7 −0
Original line number Diff line number Diff line
@@ -428,6 +428,13 @@ struct msm_vidc_format vdec_formats[] = {
		.get_frame_size = get_frame_size_nv12,
		.type = CAPTURE_PORT,
	},
	{
		.name = "YCbCr Semiplanar 4:2:0 10bit",
		.description = "Y/CbCr 4:2:0 10bit",
		.fourcc = V4L2_PIX_FMT_SDE_Y_CBCR_H2V2_P010,
		.get_frame_size = get_frame_size_p010,
		.type = CAPTURE_PORT,
	},
	{
		.name = "UBWC YCbCr Semiplanar 4:2:0",
		.description = "UBWC Y/CbCr 4:2:0",
+2 −0
Original line number Diff line number Diff line
@@ -236,6 +236,8 @@ int msm_vidc_g_fmt(void *instance, struct v4l2_format *f)
		break;
	case V4L2_PIX_FMT_NV12_TP10_UBWC:
		color_format = COLOR_FMT_NV12_BPP10_UBWC;
	case V4L2_PIX_FMT_SDE_Y_CBCR_H2V2_P010:
		color_format = COLOR_FMT_P010;
		break;
	default:
		dprintk(VIDC_DBG,
+8 −0
Original line number Diff line number Diff line
@@ -834,6 +834,9 @@ enum hal_uncompressed_format msm_comm_get_hal_uncompressed(int fourcc)
	case V4L2_PIX_FMT_NV12_TP10_UBWC:
		format = HAL_COLOR_FORMAT_NV12_TP10_UBWC;
		break;
	case V4L2_PIX_FMT_SDE_Y_CBCR_H2V2_P010:
		format = HAL_COLOR_FORMAT_P010;
		break;
	default:
		format = HAL_UNUSED_COLOR;
		break;
@@ -5737,6 +5740,11 @@ u32 get_frame_size_tp10_ubwc(int plane, u32 height, u32 width)
	return VENUS_BUFFER_SIZE(COLOR_FMT_NV12_BPP10_UBWC, width, height);
}

u32 get_frame_size_p010(int plane, u32 height, u32 width)
{
	return VENUS_BUFFER_SIZE(COLOR_FMT_P010, width, height);
}


void print_vidc_buffer(u32 tag, const char *str, struct msm_vidc_inst *inst,
		struct msm_vidc_buffer *mbuf)
+1 −0
Original line number Diff line number Diff line
@@ -109,6 +109,7 @@ u32 get_frame_size_nv12_ubwc(int plane, u32 height, u32 width);
u32 get_frame_size_rgba(int plane, u32 height, u32 width);
u32 get_frame_size_nv21(int plane, u32 height, u32 width);
u32 get_frame_size_tp10_ubwc(int plane, u32 height, u32 width);
u32 get_frame_size_p010(int plane, u32 height, u32 width);
struct vb2_buffer *msm_comm_get_vb_using_vidc_buffer(
		struct msm_vidc_inst *inst, struct msm_vidc_buffer *mbuf);
struct msm_vidc_buffer *msm_comm_get_buffer_using_device_planes(
Loading