diff --git a/driver/platform/pineapple/src/msm_vidc_pineapple.c b/driver/platform/pineapple/src/msm_vidc_pineapple.c index ff057aa49f..eba17c4c08 100644 --- a/driver/platform/pineapple/src/msm_vidc_pineapple.c +++ b/driver/platform/pineapple/src/msm_vidc_pineapple.c @@ -324,7 +324,7 @@ static struct msm_platform_core_capability core_data_pineapple[] = { {ENC_AUTO_FRAMERATE, 1}, {DEVICE_CAPS, V4L2_CAP_VIDEO_M2M_MPLANE | V4L2_CAP_META_CAPTURE | V4L2_CAP_STREAMING}, - {SUPPORTS_SYNX_FENCE, 0}, /* disabled temporarily */ + {SUPPORTS_SYNX_FENCE, 1}, {SUPPORTS_REQUESTS, 1}, }; diff --git a/driver/vidc/inc/msm_vidc_debug.h b/driver/vidc/inc/msm_vidc_debug.h index c9d84c6f00..3ac1444402 100644 --- a/driver/vidc/inc/msm_vidc_debug.h +++ b/driver/vidc/inc/msm_vidc_debug.h @@ -39,6 +39,7 @@ extern int msm_vidc_ddr_bw; extern int msm_vidc_llc_bw; extern bool msm_vidc_fw_dump; extern unsigned int msm_vidc_enable_bugon; +extern bool msm_vidc_disable_synx_fence; /* do not modify the log message as it is used in test scripts */ #define FMT_STRING_SET_CTRL \ diff --git a/driver/vidc/src/msm_vidc_debug.c b/driver/vidc/src/msm_vidc_debug.c index 5fb35624b5..af05a9b725 100644 --- a/driver/vidc/src/msm_vidc_debug.c +++ b/driver/vidc/src/msm_vidc_debug.c @@ -124,6 +124,10 @@ module_param_cb(msm_vidc_fw_dump, &msm_vidc_fw_dump_fops, &g_core, 0644); bool msm_vidc_lossless_encode = !true; EXPORT_SYMBOL(msm_vidc_lossless_encode); +/* disabled synx fence by default temporarily */ +bool msm_vidc_disable_synx_fence = !false; +EXPORT_SYMBOL(msm_vidc_disable_synx_fence); + bool msm_vidc_syscache_disable = !true; EXPORT_SYMBOL(msm_vidc_syscache_disable); @@ -398,6 +402,8 @@ struct dentry* msm_vidc_debugfs_init_drv(void) &msm_vidc_syscache_disable); debugfs_create_bool("lossless_encoding", 0644, dir, &msm_vidc_lossless_encode); + debugfs_create_bool("disable_synx_v2_fence", 0644, dir, + &msm_vidc_disable_synx_fence); debugfs_create_u32("enable_bugon", 0644, dir, &msm_vidc_enable_bugon); diff --git a/driver/vidc/src/msm_vidc_probe.c b/driver/vidc/src/msm_vidc_probe.c index 5539a659ba..e00fcf3ddf 100644 --- a/driver/vidc/src/msm_vidc_probe.c +++ b/driver/vidc/src/msm_vidc_probe.c @@ -568,38 +568,37 @@ static int msm_vidc_component_master_bind(struct device *dev) return rc; } - /* register for synx fence */ if (core->capabilities[SUPPORTS_SYNX_FENCE].value) { - rc = call_fence_op(core, fence_register, core); - if (rc) { - d_vpr_e("%s: failed to register synx fence\n", - __func__); - core->capabilities[SUPPORTS_SYNX_FENCE].value = 0; - /* - * - Bail out the session for time being for this - * case where synx fence register call retunrs error - * to help with debugging - * - Re-initialize fence ops with dma_fence_ops. - * This is required once we start ignoring this - * synx fence register call error. - */ + if (msm_vidc_disable_synx_fence) { + /* override synx fence ops with dma fence ops */ core->fence_ops = get_dma_fence_ops(); if (!core->fence_ops) { d_vpr_e("%s: invalid dma fence ops\n", __func__); return -EINVAL; } - - return rc; - } - } else { - /* - * override synx fence ops with dma fence ops for - * time being until synx fence support is enabled - */ - core->fence_ops = get_dma_fence_ops(); - if (!core->fence_ops) { - d_vpr_e("%s: invalid dma fence ops\n", __func__); - return -EINVAL; + core->capabilities[SUPPORTS_SYNX_FENCE].value = 0; + } else { + /* register for synx fence */ + rc = call_fence_op(core, fence_register, core); + if (rc) { + d_vpr_e("%s: failed to register synx fence\n", + __func__); + core->capabilities[SUPPORTS_SYNX_FENCE].value = 0; + /* + * - Bail out the session for time being for this + * case where synx fence register call retunrs error + * to help with debugging + * - Re-initialize fence ops with dma_fence_ops. + * This is required once we start ignoring this + * synx fence register call error. + */ + core->fence_ops = get_dma_fence_ops(); + if (!core->fence_ops) { + d_vpr_e("%s: invalid dma fence ops\n", __func__); + return -EINVAL; + } + return rc; + } } }