video: driver: remove core capability pointer
Remove core capability pointer. Change-Id: I42f4c5cb7f8a0791b8c5f84d5f0d953be3bf80d6 Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
This commit is contained in:
@@ -2579,10 +2579,6 @@ int msm_vidc_adjust_dec_outbuf_fence_type(void *instance, struct v4l2_ctrl *ctrl
|
|||||||
}
|
}
|
||||||
capability = inst->capabilities;
|
capability = inst->capabilities;
|
||||||
core = inst->core;
|
core = inst->core;
|
||||||
if (!core->capabilities) {
|
|
||||||
d_vpr_e("%s: invalid core caps\n", __func__);
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
adjusted_value = ctrl ? ctrl->val :
|
adjusted_value = ctrl ? ctrl->val :
|
||||||
capability[OUTBUF_FENCE_TYPE].value;
|
capability[OUTBUF_FENCE_TYPE].value;
|
||||||
@@ -2619,10 +2615,6 @@ int msm_vidc_adjust_dec_outbuf_fence_direction(void *instance, struct v4l2_ctrl
|
|||||||
}
|
}
|
||||||
capability = inst->capabilities;
|
capability = inst->capabilities;
|
||||||
core = inst->core;
|
core = inst->core;
|
||||||
if (!core->capabilities) {
|
|
||||||
d_vpr_e("%s: invalid core caps\n", __func__);
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
adjusted_value = ctrl ? ctrl->val :
|
adjusted_value = ctrl ? ctrl->val :
|
||||||
capability[OUTBUF_FENCE_DIRECTION].value;
|
capability[OUTBUF_FENCE_DIRECTION].value;
|
||||||
|
@@ -30,10 +30,6 @@ static u32 msm_vidc_decoder_bin_size_iris2(struct msm_vidc_inst *inst)
|
|||||||
}
|
}
|
||||||
core = inst->core;
|
core = inst->core;
|
||||||
|
|
||||||
if (!core->capabilities) {
|
|
||||||
i_vpr_e(inst, "%s: invalid capabilities\n", __func__);
|
|
||||||
return size;
|
|
||||||
}
|
|
||||||
num_vpp_pipes = core->capabilities[NUM_VPP_PIPE].value;
|
num_vpp_pipes = core->capabilities[NUM_VPP_PIPE].value;
|
||||||
if (inst->decode_vpp_delay.enable)
|
if (inst->decode_vpp_delay.enable)
|
||||||
vpp_delay = inst->decode_vpp_delay.size;
|
vpp_delay = inst->decode_vpp_delay.size;
|
||||||
@@ -104,10 +100,7 @@ static u32 msm_vidc_decoder_non_comv_size_iris2(struct msm_vidc_inst* inst)
|
|||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
core = inst->core;
|
core = inst->core;
|
||||||
if (!core->capabilities) {
|
|
||||||
i_vpr_e(inst, "%s: invalid core capabilities\n", __func__);
|
|
||||||
return size;
|
|
||||||
}
|
|
||||||
num_vpp_pipes = core->capabilities[NUM_VPP_PIPE].value;
|
num_vpp_pipes = core->capabilities[NUM_VPP_PIPE].value;
|
||||||
|
|
||||||
f = &inst->fmts[INPUT_PORT];
|
f = &inst->fmts[INPUT_PORT];
|
||||||
@@ -137,10 +130,7 @@ static u32 msm_vidc_decoder_line_size_iris2(struct msm_vidc_inst *inst)
|
|||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
core = inst->core;
|
core = inst->core;
|
||||||
if (!core->capabilities) {
|
|
||||||
i_vpr_e(inst, "%s: invalid capabilities\n", __func__);
|
|
||||||
return size;
|
|
||||||
}
|
|
||||||
num_vpp_pipes = core->capabilities[NUM_VPP_PIPE].value;
|
num_vpp_pipes = core->capabilities[NUM_VPP_PIPE].value;
|
||||||
|
|
||||||
color_fmt = v4l2_colorformat_to_driver(inst,
|
color_fmt = v4l2_colorformat_to_driver(inst,
|
||||||
@@ -263,10 +253,7 @@ static u32 msm_vidc_encoder_bin_size_iris2(struct msm_vidc_inst *inst)
|
|||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
core = inst->core;
|
core = inst->core;
|
||||||
if (!core->capabilities) {
|
|
||||||
i_vpr_e(inst, "%s: invalid core capabilities\n", __func__);
|
|
||||||
return size;
|
|
||||||
}
|
|
||||||
num_vpp_pipes = core->capabilities[NUM_VPP_PIPE].value;
|
num_vpp_pipes = core->capabilities[NUM_VPP_PIPE].value;
|
||||||
stage = inst->capabilities[STAGE].value;
|
stage = inst->capabilities[STAGE].value;
|
||||||
f = &inst->fmts[OUTPUT_PORT];
|
f = &inst->fmts[OUTPUT_PORT];
|
||||||
@@ -350,10 +337,7 @@ static u32 msm_vidc_encoder_non_comv_size_iris2(struct msm_vidc_inst* inst)
|
|||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
core = inst->core;
|
core = inst->core;
|
||||||
if (!core->capabilities) {
|
|
||||||
i_vpr_e(inst, "%s: invalid core capabilities\n", __func__);
|
|
||||||
return size;
|
|
||||||
}
|
|
||||||
num_vpp_pipes = core->capabilities[NUM_VPP_PIPE].value;
|
num_vpp_pipes = core->capabilities[NUM_VPP_PIPE].value;
|
||||||
f = &inst->fmts[OUTPUT_PORT];
|
f = &inst->fmts[OUTPUT_PORT];
|
||||||
width = f->fmt.pix_mp.width;
|
width = f->fmt.pix_mp.width;
|
||||||
@@ -381,10 +365,7 @@ static u32 msm_vidc_encoder_line_size_iris2(struct msm_vidc_inst *inst)
|
|||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
core = inst->core;
|
core = inst->core;
|
||||||
if (!core->capabilities) {
|
|
||||||
i_vpr_e(inst, "%s: invalid capabilities\n", __func__);
|
|
||||||
return size;
|
|
||||||
}
|
|
||||||
num_vpp_pipes = core->capabilities[NUM_VPP_PIPE].value;
|
num_vpp_pipes = core->capabilities[NUM_VPP_PIPE].value;
|
||||||
pixfmt = inst->capabilities[PIX_FMTS].value;
|
pixfmt = inst->capabilities[PIX_FMTS].value;
|
||||||
|
|
||||||
|
@@ -413,7 +413,7 @@ static int __power_off_iris2(struct msm_vidc_core *core)
|
|||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
|
||||||
if (!core || !core->capabilities) {
|
if (!core) {
|
||||||
d_vpr_e("%s: invalid params\n", __func__);
|
d_vpr_e("%s: invalid params\n", __func__);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
@@ -30,10 +30,6 @@ static u32 msm_vidc_decoder_bin_size_iris3(struct msm_vidc_inst *inst)
|
|||||||
}
|
}
|
||||||
core = inst->core;
|
core = inst->core;
|
||||||
|
|
||||||
if (!core->capabilities) {
|
|
||||||
i_vpr_e(inst, "%s: invalid capabilities\n", __func__);
|
|
||||||
return size;
|
|
||||||
}
|
|
||||||
num_vpp_pipes = core->capabilities[NUM_VPP_PIPE].value;
|
num_vpp_pipes = core->capabilities[NUM_VPP_PIPE].value;
|
||||||
if (inst->decode_vpp_delay.enable)
|
if (inst->decode_vpp_delay.enable)
|
||||||
vpp_delay = inst->decode_vpp_delay.size;
|
vpp_delay = inst->decode_vpp_delay.size;
|
||||||
@@ -133,10 +129,7 @@ static u32 msm_vidc_decoder_non_comv_size_iris3(struct msm_vidc_inst* inst)
|
|||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
core = inst->core;
|
core = inst->core;
|
||||||
if (!core->capabilities) {
|
|
||||||
i_vpr_e(inst, "%s: invalid core capabilities\n", __func__);
|
|
||||||
return size;
|
|
||||||
}
|
|
||||||
num_vpp_pipes = core->capabilities[NUM_VPP_PIPE].value;
|
num_vpp_pipes = core->capabilities[NUM_VPP_PIPE].value;
|
||||||
|
|
||||||
f = &inst->fmts[INPUT_PORT];
|
f = &inst->fmts[INPUT_PORT];
|
||||||
@@ -166,10 +159,6 @@ static u32 msm_vidc_decoder_line_size_iris3(struct msm_vidc_inst *inst)
|
|||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
core = inst->core;
|
core = inst->core;
|
||||||
if (!core->capabilities) {
|
|
||||||
i_vpr_e(inst, "%s: invalid capabilities\n", __func__);
|
|
||||||
return size;
|
|
||||||
}
|
|
||||||
num_vpp_pipes = core->capabilities[NUM_VPP_PIPE].value;
|
num_vpp_pipes = core->capabilities[NUM_VPP_PIPE].value;
|
||||||
|
|
||||||
color_fmt = v4l2_colorformat_to_driver(inst,
|
color_fmt = v4l2_colorformat_to_driver(inst,
|
||||||
@@ -346,10 +335,7 @@ static u32 msm_vidc_encoder_bin_size_iris3(struct msm_vidc_inst *inst)
|
|||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
core = inst->core;
|
core = inst->core;
|
||||||
if (!core->capabilities) {
|
|
||||||
i_vpr_e(inst, "%s: invalid core capabilities\n", __func__);
|
|
||||||
return size;
|
|
||||||
}
|
|
||||||
num_vpp_pipes = core->capabilities[NUM_VPP_PIPE].value;
|
num_vpp_pipes = core->capabilities[NUM_VPP_PIPE].value;
|
||||||
stage = inst->capabilities[STAGE].value;
|
stage = inst->capabilities[STAGE].value;
|
||||||
f = &inst->fmts[OUTPUT_PORT];
|
f = &inst->fmts[OUTPUT_PORT];
|
||||||
@@ -434,10 +420,7 @@ static u32 msm_vidc_encoder_non_comv_size_iris3(struct msm_vidc_inst* inst)
|
|||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
core = inst->core;
|
core = inst->core;
|
||||||
if (!core->capabilities) {
|
|
||||||
i_vpr_e(inst, "%s: invalid core capabilities\n", __func__);
|
|
||||||
return size;
|
|
||||||
}
|
|
||||||
num_vpp_pipes = core->capabilities[NUM_VPP_PIPE].value;
|
num_vpp_pipes = core->capabilities[NUM_VPP_PIPE].value;
|
||||||
f = &inst->fmts[OUTPUT_PORT];
|
f = &inst->fmts[OUTPUT_PORT];
|
||||||
width = f->fmt.pix_mp.width;
|
width = f->fmt.pix_mp.width;
|
||||||
@@ -465,10 +448,6 @@ static u32 msm_vidc_encoder_line_size_iris3(struct msm_vidc_inst *inst)
|
|||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
core = inst->core;
|
core = inst->core;
|
||||||
if (!core->capabilities) {
|
|
||||||
i_vpr_e(inst, "%s: invalid capabilities\n", __func__);
|
|
||||||
return size;
|
|
||||||
}
|
|
||||||
num_vpp_pipes = core->capabilities[NUM_VPP_PIPE].value;
|
num_vpp_pipes = core->capabilities[NUM_VPP_PIPE].value;
|
||||||
pixfmt = inst->capabilities[PIX_FMTS].value;
|
pixfmt = inst->capabilities[PIX_FMTS].value;
|
||||||
|
|
||||||
|
@@ -30,10 +30,6 @@ static u32 msm_vidc_decoder_bin_size_iris33(struct msm_vidc_inst *inst)
|
|||||||
}
|
}
|
||||||
core = inst->core;
|
core = inst->core;
|
||||||
|
|
||||||
if (!core->capabilities) {
|
|
||||||
i_vpr_e(inst, "%s: invalid capabilities\n", __func__);
|
|
||||||
return size;
|
|
||||||
}
|
|
||||||
num_vpp_pipes = core->capabilities[NUM_VPP_PIPE].value;
|
num_vpp_pipes = core->capabilities[NUM_VPP_PIPE].value;
|
||||||
if (inst->decode_vpp_delay.enable)
|
if (inst->decode_vpp_delay.enable)
|
||||||
vpp_delay = inst->decode_vpp_delay.size;
|
vpp_delay = inst->decode_vpp_delay.size;
|
||||||
@@ -133,10 +129,7 @@ static u32 msm_vidc_decoder_non_comv_size_iris33(struct msm_vidc_inst* inst)
|
|||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
core = inst->core;
|
core = inst->core;
|
||||||
if (!core->capabilities) {
|
|
||||||
i_vpr_e(inst, "%s: invalid core capabilities\n", __func__);
|
|
||||||
return size;
|
|
||||||
}
|
|
||||||
num_vpp_pipes = core->capabilities[NUM_VPP_PIPE].value;
|
num_vpp_pipes = core->capabilities[NUM_VPP_PIPE].value;
|
||||||
|
|
||||||
f = &inst->fmts[INPUT_PORT];
|
f = &inst->fmts[INPUT_PORT];
|
||||||
@@ -166,10 +159,6 @@ static u32 msm_vidc_decoder_line_size_iris33(struct msm_vidc_inst *inst)
|
|||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
core = inst->core;
|
core = inst->core;
|
||||||
if (!core->capabilities) {
|
|
||||||
i_vpr_e(inst, "%s: invalid capabilities\n", __func__);
|
|
||||||
return size;
|
|
||||||
}
|
|
||||||
num_vpp_pipes = core->capabilities[NUM_VPP_PIPE].value;
|
num_vpp_pipes = core->capabilities[NUM_VPP_PIPE].value;
|
||||||
|
|
||||||
color_fmt = v4l2_colorformat_to_driver(inst,
|
color_fmt = v4l2_colorformat_to_driver(inst,
|
||||||
@@ -346,10 +335,7 @@ static u32 msm_vidc_encoder_bin_size_iris33(struct msm_vidc_inst *inst)
|
|||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
core = inst->core;
|
core = inst->core;
|
||||||
if (!core->capabilities) {
|
|
||||||
i_vpr_e(inst, "%s: invalid core capabilities\n", __func__);
|
|
||||||
return size;
|
|
||||||
}
|
|
||||||
num_vpp_pipes = core->capabilities[NUM_VPP_PIPE].value;
|
num_vpp_pipes = core->capabilities[NUM_VPP_PIPE].value;
|
||||||
stage = inst->capabilities[STAGE].value;
|
stage = inst->capabilities[STAGE].value;
|
||||||
f = &inst->fmts[OUTPUT_PORT];
|
f = &inst->fmts[OUTPUT_PORT];
|
||||||
@@ -435,10 +421,7 @@ static u32 msm_vidc_encoder_non_comv_size_iris33(struct msm_vidc_inst* inst)
|
|||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
core = inst->core;
|
core = inst->core;
|
||||||
if (!core->capabilities) {
|
|
||||||
i_vpr_e(inst, "%s: invalid core capabilities\n", __func__);
|
|
||||||
return size;
|
|
||||||
}
|
|
||||||
num_vpp_pipes = core->capabilities[NUM_VPP_PIPE].value;
|
num_vpp_pipes = core->capabilities[NUM_VPP_PIPE].value;
|
||||||
f = &inst->fmts[OUTPUT_PORT];
|
f = &inst->fmts[OUTPUT_PORT];
|
||||||
width = f->fmt.pix_mp.width;
|
width = f->fmt.pix_mp.width;
|
||||||
@@ -466,10 +449,6 @@ static u32 msm_vidc_encoder_line_size_iris33(struct msm_vidc_inst *inst)
|
|||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
core = inst->core;
|
core = inst->core;
|
||||||
if (!core->capabilities) {
|
|
||||||
i_vpr_e(inst, "%s: invalid capabilities\n", __func__);
|
|
||||||
return size;
|
|
||||||
}
|
|
||||||
num_vpp_pipes = core->capabilities[NUM_VPP_PIPE].value;
|
num_vpp_pipes = core->capabilities[NUM_VPP_PIPE].value;
|
||||||
pixfmt = inst->capabilities[PIX_FMTS].value;
|
pixfmt = inst->capabilities[PIX_FMTS].value;
|
||||||
|
|
||||||
|
@@ -571,7 +571,7 @@ static int __power_off_iris33(struct msm_vidc_core *core)
|
|||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
|
||||||
if (!core || !core->capabilities) {
|
if (!core) {
|
||||||
d_vpr_e("%s: invalid params\n", __func__);
|
d_vpr_e("%s: invalid params\n", __func__);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
@@ -87,7 +87,7 @@ struct msm_vidc_core {
|
|||||||
u32 spur_count;
|
u32 spur_count;
|
||||||
u32 reg_count;
|
u32 reg_count;
|
||||||
u32 codecs_count;
|
u32 codecs_count;
|
||||||
struct msm_vidc_core_capability *capabilities;
|
struct msm_vidc_core_capability capabilities[CORE_CAP_MAX+1];
|
||||||
struct msm_vidc_inst_capability *inst_caps;
|
struct msm_vidc_inst_capability *inst_caps;
|
||||||
struct msm_vidc_mem_addr sfr;
|
struct msm_vidc_mem_addr sfr;
|
||||||
struct msm_vidc_mem_addr iface_q_table;
|
struct msm_vidc_mem_addr iface_q_table;
|
||||||
|
@@ -403,7 +403,7 @@ int hfi_packet_sys_init(struct msm_vidc_core *core,
|
|||||||
u32 payload = 0;
|
u32 payload = 0;
|
||||||
u32 synx_client_data[2];
|
u32 synx_client_data[2];
|
||||||
|
|
||||||
if (!core || !pkt || !core->capabilities) {
|
if (!core || !pkt) {
|
||||||
d_vpr_e("%s: Invalid params\n", __func__);
|
d_vpr_e("%s: Invalid params\n", __func__);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
@@ -1019,10 +1019,6 @@ int msm_venc_streamoff_output(struct msm_vidc_inst *inst)
|
|||||||
}
|
}
|
||||||
|
|
||||||
core = inst->core;
|
core = inst->core;
|
||||||
if (!core->capabilities) {
|
|
||||||
i_vpr_e(inst, "%s: core capabilities is NULL\n", __func__);
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* restore LAYER_COUNT max allowed value */
|
/* restore LAYER_COUNT max allowed value */
|
||||||
inst->capabilities[ENH_LAYER_COUNT].max =
|
inst->capabilities[ENH_LAYER_COUNT].max =
|
||||||
|
@@ -699,11 +699,6 @@ static int msm_vidc_allow_secure_session(struct msm_vidc_inst *inst)
|
|||||||
}
|
}
|
||||||
core = inst->core;
|
core = inst->core;
|
||||||
|
|
||||||
if (!core->capabilities) {
|
|
||||||
i_vpr_e(inst, "%s: invalid params\n", __func__);
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
core_lock(core, __func__);
|
core_lock(core, __func__);
|
||||||
list_for_each_entry(i, &core->instances, list) {
|
list_for_each_entry(i, &core->instances, list) {
|
||||||
if (i->capabilities[SECURE_MODE].value)
|
if (i->capabilities[SECURE_MODE].value)
|
||||||
|
@@ -45,7 +45,7 @@ static int debug_level_set(const char *val,
|
|||||||
|
|
||||||
core = *(struct msm_vidc_core **)kp->arg;
|
core = *(struct msm_vidc_core **)kp->arg;
|
||||||
|
|
||||||
if (!core || !core->capabilities) {
|
if (!core) {
|
||||||
d_vpr_e("%s: Invalid core/capabilities\n", __func__);
|
d_vpr_e("%s: Invalid core/capabilities\n", __func__);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -3513,10 +3513,6 @@ static int m2m_queue_init(void *priv, struct vb2_queue *src_vq,
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
core = inst->core;
|
core = inst->core;
|
||||||
if (!core->capabilities) {
|
|
||||||
d_vpr_e("%s: invalid core capabilities\n", __func__);
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
src_vq->supports_requests = core->capabilities[SUPPORTS_REQUESTS].value;
|
src_vq->supports_requests = core->capabilities[SUPPORTS_REQUESTS].value;
|
||||||
src_vq->lock = &inst->request_lock;
|
src_vq->lock = &inst->request_lock;
|
||||||
@@ -3662,11 +3658,6 @@ int msm_vidc_add_session(struct msm_vidc_inst *inst)
|
|||||||
}
|
}
|
||||||
core = inst->core;
|
core = inst->core;
|
||||||
|
|
||||||
if (!core->capabilities) {
|
|
||||||
i_vpr_e(inst, "%s: invalid params\n", __func__);
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
core_lock(core, __func__);
|
core_lock(core, __func__);
|
||||||
if (core->state != MSM_VIDC_CORE_INIT) {
|
if (core->state != MSM_VIDC_CORE_INIT) {
|
||||||
i_vpr_e(inst, "%s: invalid state %s\n",
|
i_vpr_e(inst, "%s: invalid state %s\n",
|
||||||
@@ -4006,22 +3997,6 @@ int msm_vidc_get_inst_capability(struct msm_vidc_inst *inst)
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
int msm_vidc_deinit_core_caps(struct msm_vidc_core *core)
|
|
||||||
{
|
|
||||||
int rc = 0;
|
|
||||||
|
|
||||||
if (!core) {
|
|
||||||
d_vpr_e("%s: invalid params\n", __func__);
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
msm_vidc_vmem_free((void **)&core->capabilities);
|
|
||||||
core->capabilities = NULL;
|
|
||||||
d_vpr_h("%s: Core capabilities freed\n", __func__);
|
|
||||||
|
|
||||||
return rc;
|
|
||||||
}
|
|
||||||
|
|
||||||
int msm_vidc_init_core_caps(struct msm_vidc_core *core)
|
int msm_vidc_init_core_caps(struct msm_vidc_core *core)
|
||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
@@ -4042,11 +4017,6 @@ int msm_vidc_init_core_caps(struct msm_vidc_core *core)
|
|||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = msm_vidc_vmem_alloc((sizeof(struct msm_vidc_core_capability) *
|
|
||||||
(CORE_CAP_MAX + 1)), (void **)&core->capabilities, __func__);
|
|
||||||
if (rc)
|
|
||||||
goto exit;
|
|
||||||
|
|
||||||
num_platform_caps = core->platform->data.core_data_size;
|
num_platform_caps = core->platform->data.core_data_size;
|
||||||
|
|
||||||
/* loop over platform caps */
|
/* loop over platform caps */
|
||||||
@@ -4138,7 +4108,7 @@ int msm_vidc_init_instance_caps(struct msm_vidc_core *core)
|
|||||||
struct msm_platform_inst_capability *platform_cap_data = NULL;
|
struct msm_platform_inst_capability *platform_cap_data = NULL;
|
||||||
struct msm_platform_inst_cap_dependency *platform_cap_dependency_data = NULL;
|
struct msm_platform_inst_cap_dependency *platform_cap_dependency_data = NULL;
|
||||||
|
|
||||||
if (!core || !core->platform || !core->capabilities) {
|
if (!core || !core->platform) {
|
||||||
d_vpr_e("%s: invalid params\n", __func__);
|
d_vpr_e("%s: invalid params\n", __func__);
|
||||||
rc = -EINVAL;
|
rc = -EINVAL;
|
||||||
goto error;
|
goto error;
|
||||||
@@ -4321,7 +4291,7 @@ int msm_vidc_core_init_wait(struct msm_vidc_core *core)
|
|||||||
const int interval = 10;
|
const int interval = 10;
|
||||||
int max_tries, count = 0, rc = 0;
|
int max_tries, count = 0, rc = 0;
|
||||||
|
|
||||||
if (!core || !core->capabilities) {
|
if (!core) {
|
||||||
d_vpr_e("%s: invalid params\n", __func__);
|
d_vpr_e("%s: invalid params\n", __func__);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
@@ -4383,7 +4353,7 @@ int msm_vidc_core_init(struct msm_vidc_core *core)
|
|||||||
enum msm_vidc_allow allow;
|
enum msm_vidc_allow allow;
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
|
||||||
if (!core || !core->capabilities) {
|
if (!core) {
|
||||||
d_vpr_e("%s: invalid params\n", __func__);
|
d_vpr_e("%s: invalid params\n", __func__);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
@@ -4621,7 +4591,7 @@ int msm_vidc_smmu_fault_handler(struct iommu_domain *domain,
|
|||||||
{
|
{
|
||||||
struct msm_vidc_core *core = data;
|
struct msm_vidc_core *core = data;
|
||||||
|
|
||||||
if (!domain || !core || !core->capabilities) {
|
if (!domain || !core) {
|
||||||
d_vpr_e("%s: invalid params %pK %pK\n",
|
d_vpr_e("%s: invalid params %pK %pK\n",
|
||||||
__func__, domain, core);
|
__func__, domain, core);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
@@ -5899,11 +5869,6 @@ static int msm_vidc_check_max_sessions(struct msm_vidc_inst *inst)
|
|||||||
}
|
}
|
||||||
core = inst->core;
|
core = inst->core;
|
||||||
|
|
||||||
if (!core->capabilities) {
|
|
||||||
i_vpr_e(inst, "%s: invalid params\n", __func__);
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
core_lock(core, __func__);
|
core_lock(core, __func__);
|
||||||
list_for_each_entry(i, &core->instances, list) {
|
list_for_each_entry(i, &core->instances, list) {
|
||||||
/* skip image sessions count */
|
/* skip image sessions count */
|
||||||
|
@@ -174,7 +174,7 @@ static int msm_vidc_register_video_device(struct msm_vidc_core *core,
|
|||||||
|
|
||||||
d_vpr_h("%s: domain %d\n", __func__, type);
|
d_vpr_h("%s: domain %d\n", __func__, type);
|
||||||
|
|
||||||
if (!core || !core->capabilities) {
|
if (!core) {
|
||||||
d_vpr_e("%s: invalid params\n", __func__);
|
d_vpr_e("%s: invalid params\n", __func__);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
@@ -675,7 +675,6 @@ static int msm_vidc_remove_video_device(struct platform_device *pdev)
|
|||||||
sysfs_remove_group(&pdev->dev.kobj, &msm_vidc_core_attr_group);
|
sysfs_remove_group(&pdev->dev.kobj, &msm_vidc_core_attr_group);
|
||||||
|
|
||||||
msm_vidc_deinit_instance_caps(core);
|
msm_vidc_deinit_instance_caps(core);
|
||||||
msm_vidc_deinit_core_caps(core);
|
|
||||||
|
|
||||||
msm_vidc_deinit_platform(pdev);
|
msm_vidc_deinit_platform(pdev);
|
||||||
msm_vidc_deinitialize_core(core);
|
msm_vidc_deinitialize_core(core);
|
||||||
@@ -842,7 +841,6 @@ sub_dev_failed:
|
|||||||
init_group_failed:
|
init_group_failed:
|
||||||
msm_vidc_deinit_instance_caps(core);
|
msm_vidc_deinit_instance_caps(core);
|
||||||
init_inst_caps_fail:
|
init_inst_caps_fail:
|
||||||
msm_vidc_deinit_core_caps(core);
|
|
||||||
init_res_failed:
|
init_res_failed:
|
||||||
msm_vidc_deinit_platform(pdev);
|
msm_vidc_deinit_platform(pdev);
|
||||||
init_plat_failed:
|
init_plat_failed:
|
||||||
|
@@ -128,7 +128,7 @@ static int msm_vidc_synx_fence_register(struct msm_vidc_core *core)
|
|||||||
char synx_session_name[MAX_SYNX_FENCE_SESSION_NAME];
|
char synx_session_name[MAX_SYNX_FENCE_SESSION_NAME];
|
||||||
struct synx_queue_desc queue_desc;
|
struct synx_queue_desc queue_desc;
|
||||||
|
|
||||||
if (!core && !core->capabilities) {
|
if (!core) {
|
||||||
d_vpr_e("%s: invalid params\n", __func__);
|
d_vpr_e("%s: invalid params\n", __func__);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
@@ -174,7 +174,7 @@ static int msm_vidc_synx_fence_deregister(struct msm_vidc_core *core)
|
|||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
|
||||||
if (!core || !core->capabilities) {
|
if (!core) {
|
||||||
d_vpr_e("%s: invalid params\n", __func__);
|
d_vpr_e("%s: invalid params\n", __func__);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
@@ -239,10 +239,6 @@ static struct msm_vidc_fence *msm_vidc_synx_fence_create(struct msm_vidc_inst *i
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
core = inst->core;
|
core = inst->core;
|
||||||
if (!core->capabilities) {
|
|
||||||
d_vpr_e("%s: invalid core caps\n", __func__);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* return if synx fence is not supported */
|
/* return if synx fence is not supported */
|
||||||
if (!core->capabilities[SUPPORTS_SYNX_FENCE].value)
|
if (!core->capabilities[SUPPORTS_SYNX_FENCE].value)
|
||||||
@@ -338,10 +334,6 @@ static int msm_vidc_synx_fence_signal(struct msm_vidc_inst *inst, u64 fence_id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
core = inst->core;
|
core = inst->core;
|
||||||
if (!core->capabilities) {
|
|
||||||
d_vpr_e("%s: invalid core caps\n", __func__);
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
fence = msm_vidc_get_synx_fence_from_id(inst, fence_id);
|
fence = msm_vidc_get_synx_fence_from_id(inst, fence_id);
|
||||||
if (!fence) {
|
if (!fence) {
|
||||||
|
@@ -1313,7 +1313,7 @@ static int __set_clk_rate(struct msm_vidc_core *core, struct clock_info *cl,
|
|||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
|
||||||
/* not registered */
|
/* not registered */
|
||||||
if (!core || !cl || !core->capabilities) {
|
if (!core || !cl) {
|
||||||
d_vpr_e("%s: invalid params\n", __func__);
|
d_vpr_e("%s: invalid params\n", __func__);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
@@ -449,7 +449,7 @@ static int __set_clk_rate(struct msm_vidc_core *core, struct clock_info *cl,
|
|||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
|
||||||
/* not registered */
|
/* not registered */
|
||||||
if (!core || !cl || !core->capabilities) {
|
if (!core || !cl) {
|
||||||
d_vpr_e("%s: invalid params\n", __func__);
|
d_vpr_e("%s: invalid params\n", __func__);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
@@ -88,7 +88,7 @@ static bool __valdiate_session(struct msm_vidc_core *core,
|
|||||||
|
|
||||||
static void __schedule_power_collapse_work(struct msm_vidc_core *core)
|
static void __schedule_power_collapse_work(struct msm_vidc_core *core)
|
||||||
{
|
{
|
||||||
if (!core || !core->capabilities) {
|
if (!core) {
|
||||||
d_vpr_e("%s: invalid params\n", __func__);
|
d_vpr_e("%s: invalid params\n", __func__);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -108,7 +108,7 @@ static void __schedule_power_collapse_work(struct msm_vidc_core *core)
|
|||||||
|
|
||||||
static void __cancel_power_collapse_work(struct msm_vidc_core *core)
|
static void __cancel_power_collapse_work(struct msm_vidc_core *core)
|
||||||
{
|
{
|
||||||
if (!core || !core->capabilities) {
|
if (!core) {
|
||||||
d_vpr_e("%s: invalid params\n", __func__);
|
d_vpr_e("%s: invalid params\n", __func__);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1006,7 +1006,7 @@ int venus_hfi_noc_error_info(struct msm_vidc_core *core)
|
|||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
|
||||||
if (!core || !core->capabilities) {
|
if (!core) {
|
||||||
d_vpr_e("%s: Invalid parameters: %pK\n",
|
d_vpr_e("%s: Invalid parameters: %pK\n",
|
||||||
__func__, core);
|
__func__, core);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@@ -539,7 +539,7 @@ int venus_hfi_queue_init(struct msm_vidc_core *core)
|
|||||||
|
|
||||||
d_vpr_h("%s()\n", __func__);
|
d_vpr_h("%s()\n", __func__);
|
||||||
|
|
||||||
if (!core || !core->capabilities) {
|
if (!core) {
|
||||||
d_vpr_h("%s: invalid params\n", __func__);
|
d_vpr_h("%s: invalid params\n", __func__);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user