Merge "msm: vidc: Add platform capabilities for holi"
This commit is contained in:
commit
7c0902f1a1
@ -71,6 +71,14 @@ static struct msm_vidc_codec_data bengal_codec_data[] = {
|
||||
CODEC_ENTRY(V4L2_PIX_FMT_VP9, MSM_VIDC_DECODER, 0, 440, 440),
|
||||
};
|
||||
|
||||
static struct msm_vidc_codec_data holi_codec_data[] = {
|
||||
CODEC_ENTRY(V4L2_PIX_FMT_H264, MSM_VIDC_ENCODER, 0, 675, 320),
|
||||
CODEC_ENTRY(V4L2_PIX_FMT_HEVC, MSM_VIDC_ENCODER, 0, 675, 320),
|
||||
CODEC_ENTRY(V4L2_PIX_FMT_H264, MSM_VIDC_DECODER, 0, 440, 440),
|
||||
CODEC_ENTRY(V4L2_PIX_FMT_HEVC, MSM_VIDC_DECODER, 0, 440, 440),
|
||||
CODEC_ENTRY(V4L2_PIX_FMT_VP9, MSM_VIDC_DECODER, 0, 440, 440),
|
||||
};
|
||||
|
||||
#define ENC HAL_VIDEO_DOMAIN_ENCODER
|
||||
#define DEC HAL_VIDEO_DOMAIN_DECODER
|
||||
#define H264 HAL_VIDEO_CODEC_H264
|
||||
@ -87,6 +95,12 @@ static struct msm_vidc_codec bengal_codecs[] = {
|
||||
{ENC, H264}, {ENC, HEVC},
|
||||
};
|
||||
|
||||
static struct msm_vidc_codec holi_codecs[] = {
|
||||
/* {domain, codec} */
|
||||
{DEC, H264}, {DEC, HEVC}, {DEC, VP9},
|
||||
{ENC, H264}, {ENC, HEVC},
|
||||
};
|
||||
|
||||
static struct msm_vidc_codec default_codecs[] = {
|
||||
/* {domain, codec} */
|
||||
{DEC, H264}, {DEC, HEVC}, {DEC, VP9}, {DEC, MPEG2},
|
||||
@ -213,6 +227,69 @@ static struct msm_vidc_codec_capability bengal_capabilities_v1[] = {
|
||||
V4L2_MPEG_VIDEO_HEVC_LEVEL_4_1},
|
||||
};
|
||||
|
||||
static struct msm_vidc_codec_capability holi_capabilities[] = {
|
||||
/* {cap_type, domains, codecs, min, max, step_size, default_value} */
|
||||
{CAP_FRAME_WIDTH, DOMAINS_ALL, CODECS_ALL, 128, 1920, 1, 1920},
|
||||
{CAP_FRAME_HEIGHT, DOMAINS_ALL, CODECS_ALL, 128, 1920, 1, 1080},
|
||||
/* ((1920 * 1088) / 256) */
|
||||
{CAP_MBS_PER_FRAME, DOMAINS_ALL, CODECS_ALL, 64, 8160, 1, 8160},
|
||||
/* 1080@30 decode + 1080@30 encode */
|
||||
{CAP_MBS_PER_SECOND, DOMAINS_ALL, CODECS_ALL, 64, 489600, 1, 244800},
|
||||
{CAP_FRAMERATE, DOMAINS_ALL, CODECS_ALL, 1, 120, 1, 30},
|
||||
{CAP_BITRATE, DOMAINS_ALL, CODECS_ALL, 1, 60000000, 1, 20000000},
|
||||
{CAP_CABAC_BITRATE, ENC, H264, 1, 60000000, 1, 20000000},
|
||||
{CAP_HIER_P_NUM_ENH_LAYERS, ENC, H264|HEVC, 0, 6, 1, 0},
|
||||
{CAP_LTR_COUNT, ENC, H264|HEVC, 0, 4, 1, 0},
|
||||
/* ((1920 * 1088) / 256) * 30 fps */
|
||||
{CAP_MBS_PER_SECOND_POWER_SAVE, ENC, CODECS_ALL,
|
||||
0, 244800, 1, 244800},
|
||||
{CAP_I_FRAME_QP, ENC, H264|HEVC, 0, 51, 1, 10},
|
||||
{CAP_P_FRAME_QP, ENC, H264|HEVC, 0, 51, 1, 20},
|
||||
{CAP_B_FRAME_QP, ENC, H264|HEVC, 0, 51, 1, 20},
|
||||
|
||||
/* 10 slices */
|
||||
{CAP_SLICE_BYTE, ENC, H264|HEVC, 1, 10, 1, 10},
|
||||
{CAP_SLICE_MB, ENC, H264|HEVC, 1, 10, 1, 10},
|
||||
{CAP_MAX_VIDEOCORES, DOMAINS_ALL, CODECS_ALL, 0, 1, 1, 1},
|
||||
|
||||
/* Secure usecase specific */
|
||||
{CAP_SECURE_FRAME_WIDTH, DOMAINS_ALL, CODECS_ALL, 128, 1920, 1, 1920},
|
||||
{CAP_SECURE_FRAME_HEIGHT, DOMAINS_ALL, CODECS_ALL, 128, 1920, 1, 1080},
|
||||
/* (1920 * 1088) / 256 */
|
||||
{CAP_SECURE_MBS_PER_FRAME, DOMAINS_ALL, CODECS_ALL, 64, 8160, 1, 8160},
|
||||
{CAP_SECURE_BITRATE, DOMAINS_ALL, CODECS_ALL, 1, 35000000, 1, 20000000},
|
||||
|
||||
/* All intra encoding usecase specific */
|
||||
{CAP_ALLINTRA_MAX_FPS, ENC, H264|HEVC, 1, 30, 1, 30},
|
||||
|
||||
/* Image specific */
|
||||
{CAP_HEVC_IMAGE_FRAME_WIDTH, ENC, HEVC, 128, 512, 1, 512},
|
||||
{CAP_HEVC_IMAGE_FRAME_HEIGHT, ENC, HEVC, 128, 512, 1, 512},
|
||||
{CAP_HEIC_IMAGE_FRAME_WIDTH, ENC, HEVC, 512, 8192, 1, 8192},
|
||||
{CAP_HEIC_IMAGE_FRAME_HEIGHT, ENC, HEVC, 512, 8192, 1, 8192},
|
||||
|
||||
/* Level for AVC and HEVC encoder specific.
|
||||
* Default for levels is UNKNOWN value. But if we use unknown
|
||||
* value here to set as default, max value needs to be set to
|
||||
* unknown as well, which creates a problem of allowing client
|
||||
* to set higher level than supported
|
||||
*/
|
||||
{CAP_H264_LEVEL, ENC, H264, V4L2_MPEG_VIDEO_H264_LEVEL_1_0,
|
||||
V4L2_MPEG_VIDEO_H264_LEVEL_5_0, 1,
|
||||
V4L2_MPEG_VIDEO_H264_LEVEL_4_1},
|
||||
{CAP_HEVC_LEVEL, ENC, HEVC, V4L2_MPEG_VIDEO_HEVC_LEVEL_1,
|
||||
V4L2_MPEG_VIDEO_HEVC_LEVEL_5, 1,
|
||||
V4L2_MPEG_VIDEO_HEVC_LEVEL_4_1},
|
||||
|
||||
/* Level for AVC and HEVC decoder specific */
|
||||
{CAP_H264_LEVEL, DEC, H264, V4L2_MPEG_VIDEO_H264_LEVEL_1_0,
|
||||
V4L2_MPEG_VIDEO_H264_LEVEL_5_0, 1,
|
||||
V4L2_MPEG_VIDEO_H264_LEVEL_4_1},
|
||||
{CAP_HEVC_LEVEL, DEC, HEVC, V4L2_MPEG_VIDEO_HEVC_LEVEL_1,
|
||||
V4L2_MPEG_VIDEO_HEVC_LEVEL_5, 1,
|
||||
V4L2_MPEG_VIDEO_HEVC_LEVEL_4_1},
|
||||
};
|
||||
|
||||
static struct msm_vidc_codec_capability lahaina_capabilities[] = {
|
||||
/* {cap_type, domains, codecs, min, max, step_size, default_value,} */
|
||||
{CAP_FRAME_WIDTH, DEC, CODECS_ALL, 96, 8192, 1, 1920},
|
||||
@ -592,6 +669,53 @@ static struct msm_vidc_common_data bengal_common_data_v1[] = {
|
||||
},
|
||||
};
|
||||
|
||||
static struct msm_vidc_common_data holi_common_data[] = {
|
||||
{
|
||||
.key = "qcom,never-unload-fw",
|
||||
.value = 1,
|
||||
},
|
||||
{
|
||||
.key = "qcom,sw-power-collapse",
|
||||
.value = 1,
|
||||
},
|
||||
{
|
||||
.key = "qcom,domain-attr-non-fatal-faults",
|
||||
.value = 1,
|
||||
},
|
||||
{
|
||||
.key = "qcom,max-secure-instances",
|
||||
.value = 3,
|
||||
},
|
||||
{
|
||||
.key = "qcom,max-hw-load",
|
||||
.value = 489600, /* ((1088x1920)/256)@60fps */
|
||||
},
|
||||
{
|
||||
.key = "qcom,max-mbpf",
|
||||
.value = 65280,/* ((3840x2176)/256) x 2 */
|
||||
},
|
||||
{
|
||||
.key = "qcom,power-collapse-delay",
|
||||
.value = 1500,
|
||||
},
|
||||
{
|
||||
.key = "qcom,hw-resp-timeout",
|
||||
.value = 1000,
|
||||
},
|
||||
{
|
||||
.key = "qcom,dcvs",
|
||||
.value = 1,
|
||||
},
|
||||
{
|
||||
.key = "qcom,fw-cycles",
|
||||
.value = 733003,
|
||||
},
|
||||
{
|
||||
.key = "qcom,fw-vpp-cycles",
|
||||
.value = 225975,
|
||||
},
|
||||
};
|
||||
|
||||
/* Default UBWC config for LPDDR5 */
|
||||
static struct msm_vidc_ubwc_config_data lahaina_ubwc_data[] = {
|
||||
UBWC_CONFIG(1, 1, 1, 0, 0, 0, 8, 32, 16, 0, 0),
|
||||
@ -653,6 +777,26 @@ static struct msm_vidc_platform_data bengal_data = {
|
||||
.codec_caps_count = ARRAY_SIZE(bengal_capabilities_v0),
|
||||
};
|
||||
|
||||
static struct msm_vidc_platform_data holi_data = {
|
||||
.codec_data = holi_codec_data,
|
||||
.codec_data_length = ARRAY_SIZE(holi_codec_data),
|
||||
.common_data = holi_common_data,
|
||||
.common_data_length = ARRAY_SIZE(holi_common_data),
|
||||
.csc_data.vpe_csc_custom_bias_coeff = vpe_csc_custom_bias_coeff,
|
||||
.csc_data.vpe_csc_custom_matrix_coeff = vpe_csc_custom_matrix_coeff,
|
||||
.csc_data.vpe_csc_custom_limit_coeff = vpe_csc_custom_limit_coeff,
|
||||
.efuse_data = NULL,
|
||||
.efuse_data_length = 0,
|
||||
.sku_version = 0,
|
||||
.vpu_ver = VPU_VERSION_AR50_LITE,
|
||||
.num_vpp_pipes = 0x1,
|
||||
.ubwc_config = 0x0,
|
||||
.codecs = holi_codecs,
|
||||
.codecs_count = ARRAY_SIZE(holi_codecs),
|
||||
.codec_caps = holi_capabilities,
|
||||
.codec_caps_count = ARRAY_SIZE(holi_capabilities),
|
||||
};
|
||||
|
||||
static const struct of_device_id msm_vidc_dt_device[] = {
|
||||
{
|
||||
.compatible = "qcom,lahaina-vidc",
|
||||
@ -662,6 +806,10 @@ static const struct of_device_id msm_vidc_dt_device[] = {
|
||||
.compatible = "qcom,bengal-vidc",
|
||||
.data = &bengal_data,
|
||||
},
|
||||
{
|
||||
.compatible = "qcom,holi-vidc",
|
||||
.data = &holi_data,
|
||||
},
|
||||
{},
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user