supports hevc decoder = 0x0c000000
supports hevc_hybrid encoder = 0x10000000
supports hevc_hybrid decoder = 0x30000000
+- disable-dcvs-enc : flag to disable DCVS algorithm for encoders
+- disable-dcvs-dec : flag to disable DCVS algorithm for decoders
- qcom,dcvs-tbl : specifies the parameter to configure DCVS algorithm. Video
instance load (in mbs/sec) and corresponding low and high threshold DCVS
load for supported codec formats.
-/* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2015-2019, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
};
};
+&msm_vidc {
+ disable-dcvs-enc;
+ disable-dcvs-dec;
+};
+
&ufs_ice {
status = "ok";
};
-/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2019, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
return rc;
}
+static int msm_vidc_check_dcvs_enabled(struct msm_vidc_platform_resources *res)
+{
+ struct platform_device *pdev = res->pdev;
+
+ if (of_find_property(pdev->dev.of_node, "disable-dcvs-enc", NULL)) {
+ /*
+ * disable-dcvs-enc is an optional property.
+ */
+ dprintk(VIDC_DBG, "disable-dcvs-enc\n");
+ msm_vidc_enc_dcvs_mode = false;
+ }
+ if (of_find_property(pdev->dev.of_node, "disable-dcvs-dec", NULL)) {
+ /*
+ * disable-dcvs-dec is an optional property.
+ */
+ dprintk(VIDC_DBG, "disable-dcvs-dec\n");
+ msm_vidc_dec_dcvs_mode = false;
+ }
+
+ return 0;
+}
+
static int msm_vidc_load_dcvs_table(struct msm_vidc_platform_resources *res)
{
int rc = 0;
goto err_load_freq_table;
}
+ rc = msm_vidc_check_dcvs_enabled(res);
+ if (rc) {
+ dprintk(VIDC_ERR, "Failed to check dcvs flags: %d\n", rc);
+ goto err_load_freq_table;
+ }
+
rc = msm_vidc_load_dcvs_table(res);
if (rc)
dprintk(VIDC_WARN, "Failed to load dcvs table: %d\n", rc);