}\r
#endif \r
\r
- kfree(reg);\r
+ kfree(reg);\r
}\r
\r
static void reg_from_wait_to_run(struct vpu_service_info *pservice, vpu_reg *reg)\r
{\r
- list_del_init(®->status_link);\r
+ list_del_init(®->status_link);\r
list_add_tail(®->status_link, &pservice->running);\r
\r
list_del_init(®->session_link);\r
of_property_read_string(np, "name", (const char**)&prop);\r
dev_set_name(dev, prop);\r
\r
- if (strcmp(dev_name(dev), "hevc_service") == 0) {\r
- pservice->dev_id = VCODEC_DEVICE_ID_HEVC;\r
+ if (strcmp(dev_name(dev), "hevc_service") == 0) {\r
+ pservice->dev_id = VCODEC_DEVICE_ID_HEVC;\r
} else if (strcmp(dev_name(dev), "vpu_service") == 0) {\r
- pservice->dev_id = VCODEC_DEVICE_ID_VPU;\r
+ pservice->dev_id = VCODEC_DEVICE_ID_VPU;\r
} else {\r
- dev_err(dev, "Unknown device %s to probe\n", dev_name(dev));\r
- return -1;\r
- }\r
+ dev_err(dev, "Unknown device %s to probe\n", dev_name(dev));\r
+ return -1;\r
+ }\r
\r
wake_lock_init(&pservice->wake_lock, WAKE_LOCK_SUSPEND, "vpu");\r
INIT_LIST_HEAD(&pservice->waiting);\r
pr_info("init success\n");\r
\r
#if defined(CONFIG_VCODEC_MMU) & defined(CONFIG_ION_ROCKCHIP)\r
- pservice->ion_client = rockchip_ion_client_create("vpu");\r
- if (IS_ERR(pservice->ion_client)) {\r
- dev_err(&pdev->dev, "failed to create ion client for vcodec");\r
- return PTR_ERR(pservice->ion_client);\r
- } else {\r
- dev_info(&pdev->dev, "vcodec ion client create success!\n");\r
- }\r
+ pservice->ion_client = rockchip_ion_client_create("vpu");\r
+ if (IS_ERR(pservice->ion_client)) {\r
+ dev_err(&pdev->dev, "failed to create ion client for vcodec");\r
+ return PTR_ERR(pservice->ion_client);\r
+ } else {\r
+ dev_info(&pdev->dev, "vcodec ion client create success!\n");\r
+ }\r
\r
sprintf(mmu_dev_dts_name, "iommu,%s", dev_name(dev));\r
\r
\r
#if defined(CONFIG_OF)\r
static const struct of_device_id vcodec_service_dt_ids[] = {\r
- {.compatible = "vpu_service",},\r
- {.compatible = "rockchip,hevc_service",},\r
+ {.compatible = "vpu_service",},\r
+ {.compatible = "rockchip,hevc_service",},\r
{},\r
};\r
#endif\r
\r
static struct platform_driver vcodec_driver = {\r
- .probe = vcodec_probe,\r
+ .probe = vcodec_probe,\r
.remove = vcodec_remove,\r
.driver = {\r
.name = "vcodec",\r
#if defined(CONFIG_OF)\r
.of_match_table = of_match_ptr(vcodec_service_dt_ids),\r
#endif\r
- },\r
+ },\r
};\r
\r
static void get_hw_info(struct vpu_service_info *pservice)\r
{\r
- if (pservice->dev_id == VCODEC_DEVICE_ID_VPU) {\r
- VPUHwDecConfig_t *dec = &pservice->dec_config;\r
- VPUHwEncConfig_t *enc = &pservice->enc_config;\r
+ VPUHwDecConfig_t *dec = &pservice->dec_config;\r
+ VPUHwEncConfig_t *enc = &pservice->enc_config;\r
+\r
+ if (pservice->dev_id == VCODEC_DEVICE_ID_VPU) { \r
u32 configReg = pservice->dec_dev.hwregs[VPU_DEC_HWCFG0];\r
u32 asicID = pservice->dec_dev.hwregs[0];\r
\r
if (!soc_is_rk3190() && !soc_is_rk3288()) {\r
dec->maxDecPicWidth = configReg & 0x07FFU;\r
} else {\r
- dec->maxDecPicWidth = 3840;\r
+ dec->maxDecPicWidth = 4096;\r
}\r
\r
/* 2nd Config register */\r