Merge "video: driver: Fix buffer type and region mapping"

This commit is contained in:
qctecmdr
2021-04-09 12:35:39 -07:00
committed by Gerrit - the friendly Code Review server

View File

@@ -835,17 +835,27 @@ u32 msm_vidc_get_buffer_region(struct msm_vidc_inst *inst,
region = MSM_VIDC_NON_SECURE;
break;
case MSM_VIDC_BUF_OUTPUT:
if (is_decode_session(inst))
region = MSM_VIDC_NON_SECURE_PIXEL;
else
if (is_encode_session(inst))
region = MSM_VIDC_NON_SECURE;
else
region = MSM_VIDC_NON_SECURE_PIXEL;
break;
case MSM_VIDC_BUF_DPB:
region = MSM_VIDC_NON_SECURE_PIXEL;
break;
default:
case MSM_VIDC_BUF_INPUT_META:
case MSM_VIDC_BUF_OUTPUT_META:
case MSM_VIDC_BUF_BIN:
case MSM_VIDC_BUF_COMV:
case MSM_VIDC_BUF_NON_COMV:
case MSM_VIDC_BUF_LINE:
case MSM_VIDC_BUF_PERSIST:
case MSM_VIDC_BUF_VPSS:
region = MSM_VIDC_NON_SECURE;
break;
default:
i_vpr_e(inst, "%s: invalid driver buffer type %d\n",
func, buffer_type);
}
} else {
switch (buffer_type) {
@@ -865,19 +875,16 @@ u32 msm_vidc_get_buffer_region(struct msm_vidc_inst *inst,
case MSM_VIDC_BUF_OUTPUT_META:
region = MSM_VIDC_NON_SECURE;
break;
case MSM_VIDC_BUF_BIN:
region = MSM_VIDC_SECURE_BITSTREAM;
case MSM_VIDC_BUF_DPB:
case MSM_VIDC_BUF_VPSS:
region = MSM_VIDC_SECURE_PIXEL;
break;
case MSM_VIDC_BUF_BIN:
case MSM_VIDC_BUF_ARP:
case MSM_VIDC_BUF_COMV:
case MSM_VIDC_BUF_NON_COMV:
case MSM_VIDC_BUF_LINE:
region = MSM_VIDC_SECURE_NONPIXEL;
break;
case MSM_VIDC_BUF_DPB:
region = MSM_VIDC_SECURE_PIXEL;
break;
case MSM_VIDC_BUF_PERSIST:
case MSM_VIDC_BUF_ARP:
region = MSM_VIDC_SECURE_NONPIXEL;
break;
default: