|
@@ -1129,16 +1129,14 @@ static int msm_vdec_subscribe_property(struct msm_vidc_inst *inst,
|
|
enum msm_vidc_port_type port)
|
|
enum msm_vidc_port_type port)
|
|
{
|
|
{
|
|
int rc = 0;
|
|
int rc = 0;
|
|
- struct msm_vidc_core *core;
|
|
|
|
u32 payload[32] = {0};
|
|
u32 payload[32] = {0};
|
|
u32 i, count = 0;
|
|
u32 i, count = 0;
|
|
bool allow = false;
|
|
bool allow = false;
|
|
|
|
|
|
- if (!inst || !inst->core) {
|
|
|
|
|
|
+ if (!inst) {
|
|
d_vpr_e("%s: invalid params\n", __func__);
|
|
d_vpr_e("%s: invalid params\n", __func__);
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
- core = inst->core;
|
|
|
|
i_vpr_h(inst, "%s()\n", __func__);
|
|
i_vpr_h(inst, "%s()\n", __func__);
|
|
|
|
|
|
payload[0] = HFI_MODE_PROPERTY;
|
|
payload[0] = HFI_MODE_PROPERTY;
|
|
@@ -1178,7 +1176,6 @@ static int msm_vdec_subscribe_metadata(struct msm_vidc_inst *inst,
|
|
enum msm_vidc_port_type port)
|
|
enum msm_vidc_port_type port)
|
|
{
|
|
{
|
|
int rc = 0;
|
|
int rc = 0;
|
|
- struct msm_vidc_core *core;
|
|
|
|
u32 payload[32] = {0};
|
|
u32 payload[32] = {0};
|
|
u32 i, count = 0;
|
|
u32 i, count = 0;
|
|
struct msm_vidc_inst_capability *capability;
|
|
struct msm_vidc_inst_capability *capability;
|
|
@@ -1201,11 +1198,10 @@ static int msm_vdec_subscribe_metadata(struct msm_vidc_inst *inst,
|
|
META_MAX_NUM_REORDER_FRAMES,
|
|
META_MAX_NUM_REORDER_FRAMES,
|
|
};
|
|
};
|
|
|
|
|
|
- if (!inst || !inst->core || !inst->capabilities) {
|
|
|
|
|
|
+ if (!inst || !inst->capabilities) {
|
|
d_vpr_e("%s: invalid params\n", __func__);
|
|
d_vpr_e("%s: invalid params\n", __func__);
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
- core = inst->core;
|
|
|
|
i_vpr_h(inst, "%s()\n", __func__);
|
|
i_vpr_h(inst, "%s()\n", __func__);
|
|
|
|
|
|
capability = inst->capabilities;
|
|
capability = inst->capabilities;
|
|
@@ -1233,7 +1229,6 @@ static int msm_vdec_set_delivery_mode_metadata(struct msm_vidc_inst *inst,
|
|
enum msm_vidc_port_type port)
|
|
enum msm_vidc_port_type port)
|
|
{
|
|
{
|
|
int rc = 0;
|
|
int rc = 0;
|
|
- struct msm_vidc_core *core;
|
|
|
|
u32 payload[32] = {0};
|
|
u32 payload[32] = {0};
|
|
u32 i, count = 0;
|
|
u32 i, count = 0;
|
|
struct msm_vidc_inst_capability *capability;
|
|
struct msm_vidc_inst_capability *capability;
|
|
@@ -1244,11 +1239,10 @@ static int msm_vdec_set_delivery_mode_metadata(struct msm_vidc_inst *inst,
|
|
META_OUTPUT_BUF_TAG,
|
|
META_OUTPUT_BUF_TAG,
|
|
};
|
|
};
|
|
|
|
|
|
- if (!inst || !inst->core || !inst->capabilities) {
|
|
|
|
|
|
+ if (!inst || !inst->capabilities) {
|
|
d_vpr_e("%s: invalid params\n", __func__);
|
|
d_vpr_e("%s: invalid params\n", __func__);
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
- core = inst->core;
|
|
|
|
i_vpr_h(inst, "%s()\n", __func__);
|
|
i_vpr_h(inst, "%s()\n", __func__);
|
|
|
|
|
|
capability = inst->capabilities;
|
|
capability = inst->capabilities;
|
|
@@ -1305,18 +1299,16 @@ static int msm_vdec_session_resume(struct msm_vidc_inst *inst,
|
|
int msm_vdec_init_input_subcr_params(struct msm_vidc_inst *inst)
|
|
int msm_vdec_init_input_subcr_params(struct msm_vidc_inst *inst)
|
|
{
|
|
{
|
|
struct msm_vidc_subscription_params *subsc_params;
|
|
struct msm_vidc_subscription_params *subsc_params;
|
|
- struct msm_vidc_core *core;
|
|
|
|
u32 left_offset, top_offset, right_offset, bottom_offset;
|
|
u32 left_offset, top_offset, right_offset, bottom_offset;
|
|
u32 primaries, matrix_coeff, transfer_char;
|
|
u32 primaries, matrix_coeff, transfer_char;
|
|
u32 full_range = 0, video_format = 0;
|
|
u32 full_range = 0, video_format = 0;
|
|
u32 colour_description_present_flag = 0;
|
|
u32 colour_description_present_flag = 0;
|
|
u32 video_signal_type_present_flag = 0;
|
|
u32 video_signal_type_present_flag = 0;
|
|
|
|
|
|
- if (!inst || !inst->core || !inst->capabilities) {
|
|
|
|
|
|
+ if (!inst || !inst->capabilities) {
|
|
d_vpr_e("%s: invalid params\n", __func__);
|
|
d_vpr_e("%s: invalid params\n", __func__);
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
- core = inst->core;
|
|
|
|
subsc_params = &inst->subcr_params[INPUT_PORT];
|
|
subsc_params = &inst->subcr_params[INPUT_PORT];
|
|
|
|
|
|
subsc_params->bitstream_resolution =
|
|
subsc_params->bitstream_resolution =
|
|
@@ -1373,7 +1365,7 @@ static int msm_vdec_read_input_subcr_params(struct msm_vidc_inst *inst)
|
|
struct msm_vidc_core *core;
|
|
struct msm_vidc_core *core;
|
|
u32 width, height;
|
|
u32 width, height;
|
|
u32 primaries, matrix_coeff, transfer_char;
|
|
u32 primaries, matrix_coeff, transfer_char;
|
|
- u32 full_range = 0, video_format = 0;
|
|
|
|
|
|
+ u32 full_range = 0;
|
|
u32 colour_description_present_flag = 0;
|
|
u32 colour_description_present_flag = 0;
|
|
u32 video_signal_type_present_flag = 0;
|
|
u32 video_signal_type_present_flag = 0;
|
|
|
|
|
|
@@ -1418,7 +1410,6 @@ static int msm_vdec_read_input_subcr_params(struct msm_vidc_inst *inst)
|
|
inst->fmts[OUTPUT_PORT].fmt.pix_mp.quantization = V4L2_QUANTIZATION_DEFAULT;
|
|
inst->fmts[OUTPUT_PORT].fmt.pix_mp.quantization = V4L2_QUANTIZATION_DEFAULT;
|
|
|
|
|
|
if (video_signal_type_present_flag) {
|
|
if (video_signal_type_present_flag) {
|
|
- video_format = (subsc_params.color_info & 0x1C000000) >> 26;
|
|
|
|
inst->fmts[OUTPUT_PORT].fmt.pix_mp.quantization =
|
|
inst->fmts[OUTPUT_PORT].fmt.pix_mp.quantization =
|
|
full_range ?
|
|
full_range ?
|
|
V4L2_QUANTIZATION_FULL_RANGE :
|
|
V4L2_QUANTIZATION_FULL_RANGE :
|
|
@@ -2356,15 +2347,13 @@ int msm_vdec_process_cmd(struct msm_vidc_inst *inst, u32 cmd)
|
|
int msm_vdec_try_fmt(struct msm_vidc_inst *inst, struct v4l2_format *f)
|
|
int msm_vdec_try_fmt(struct msm_vidc_inst *inst, struct v4l2_format *f)
|
|
{
|
|
{
|
|
int rc = 0;
|
|
int rc = 0;
|
|
- struct msm_vidc_core *core;
|
|
|
|
struct v4l2_pix_format_mplane *pixmp = &f->fmt.pix_mp;
|
|
struct v4l2_pix_format_mplane *pixmp = &f->fmt.pix_mp;
|
|
u32 pix_fmt;
|
|
u32 pix_fmt;
|
|
|
|
|
|
- if (!inst || !inst->core) {
|
|
|
|
|
|
+ if (!inst) {
|
|
d_vpr_e("%s: invalid params\n", __func__);
|
|
d_vpr_e("%s: invalid params\n", __func__);
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
- core = inst->core;
|
|
|
|
|
|
|
|
memset(pixmp->reserved, 0, sizeof(pixmp->reserved));
|
|
memset(pixmp->reserved, 0, sizeof(pixmp->reserved));
|
|
if (f->type == INPUT_MPLANE) {
|
|
if (f->type == INPUT_MPLANE) {
|
|
@@ -2714,7 +2703,7 @@ int msm_vdec_s_param(struct msm_vidc_inst *inst,
|
|
do_div(input_rate, us_per_frame);
|
|
do_div(input_rate, us_per_frame);
|
|
|
|
|
|
set_default:
|
|
set_default:
|
|
- i_vpr_h(inst, "%s: type %s, %s value %d\n",
|
|
|
|
|
|
+ i_vpr_h(inst, "%s: type %s, %s value %llu\n",
|
|
__func__, v4l2_type_name(s_parm->type),
|
|
__func__, v4l2_type_name(s_parm->type),
|
|
is_frame_rate ? "frame rate" : "operating rate", input_rate);
|
|
is_frame_rate ? "frame rate" : "operating rate", input_rate);
|
|
|
|
|
|
@@ -2731,7 +2720,7 @@ set_default:
|
|
}
|
|
}
|
|
rc = input_rate > max_rate;
|
|
rc = input_rate > max_rate;
|
|
if (rc) {
|
|
if (rc) {
|
|
- i_vpr_e(inst, "%s: unsupported rate %u, max %u\n", __func__,
|
|
|
|
|
|
+ i_vpr_e(inst, "%s: unsupported rate %llu, max %u\n", __func__,
|
|
input_rate, max_rate);
|
|
input_rate, max_rate);
|
|
rc = -ENOMEM;
|
|
rc = -ENOMEM;
|
|
goto reset_rate;
|
|
goto reset_rate;
|
|
@@ -2748,7 +2737,7 @@ set_default:
|
|
|
|
|
|
reset_rate:
|
|
reset_rate:
|
|
if (rc) {
|
|
if (rc) {
|
|
- i_vpr_e(inst, "%s: setting rate %u failed, reset to %u\n", __func__,
|
|
|
|
|
|
+ i_vpr_e(inst, "%s: setting rate %llu failed, reset to %u\n", __func__,
|
|
input_rate, default_rate);
|
|
input_rate, default_rate);
|
|
msm_vidc_update_cap_value(inst, is_frame_rate ? FRAME_RATE : OPERATING_RATE,
|
|
msm_vidc_update_cap_value(inst, is_frame_rate ? FRAME_RATE : OPERATING_RATE,
|
|
default_rate << 16, __func__);
|
|
default_rate << 16, __func__);
|