return 0;
}
+/* vcn is disabled by default in vbios, need to re-enable in driver */
+static int rv_smc_enable_vcn(struct pp_smumgr *smumgr)
+{
+ PP_ASSERT_WITH_CODE(!rv_send_msg_to_smc_with_parameter(smumgr,
+ PPSMC_MSG_PowerUpVcn, 0),
+ "Attempt to power up vcn Failed!",
+ return -EINVAL);
+
+ return 0;
+}
+
+static int rv_smc_disable_vcn(struct pp_smumgr *smumgr)
+{
+ PP_ASSERT_WITH_CODE(!rv_send_msg_to_smc_with_parameter(smumgr,
+ PPSMC_MSG_PowerDownVcn, 0),
+ "Attempt to power down vcn Failed!",
+ return -EINVAL);
+
+ return 0;
+}
+
static int rv_smu_fini(struct pp_smumgr *smumgr)
{
struct rv_smumgr *priv =
if (priv) {
rv_smc_disable_sdma(smumgr);
+ rv_smc_disable_vcn(smumgr);
cgs_free_gpu_mem(smumgr->device,
priv->smu_tables.entry[WMTABLE].handle);
cgs_free_gpu_mem(smumgr->device,
return -EINVAL;
if (rv_smc_enable_sdma(smumgr))
return -EINVAL;
+ if (rv_smc_enable_vcn(smumgr))
+ return -EINVAL;
return 0;
}