From dc434cc6a0af37b992a8719970d947a22ad5a486 Mon Sep 17 00:00:00 2001 From: Alpha Lin Date: Mon, 15 Jun 2015 17:10:33 +0800 Subject: [PATCH] VPU: enable auto-freq flag. bug in previous commit, auto-freq flag disable in all the platform. raise freq to 600MHz when 4k avc video decode, could not get the 500 MHz frequency from current clock pll. Signed-off-by: Alpha Lin --- arch/arm/mach-rockchip/vcodec_service.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-rockchip/vcodec_service.c b/arch/arm/mach-rockchip/vcodec_service.c index 967c3d158d3b..414a0921f22a 100755 --- a/arch/arm/mach-rockchip/vcodec_service.c +++ b/arch/arm/mach-rockchip/vcodec_service.c @@ -1275,7 +1275,7 @@ static vpu_reg *reg_init(struct vpu_subdev_data *data, } else if (reg_check_fmt(reg) == VPU_DEC_FMT_H264) { if (reg_probe_width(reg) > 3200) { /*raise frequency for 4k avc.*/ - reg->freq = VPU_FREQ_500M; + reg->freq = VPU_FREQ_600M; } } else { if (reg_check_interlace(reg)) { @@ -2214,6 +2214,9 @@ static int vcodec_subdev_probe(struct platform_device *pdev, rockchip_iovmm_set_fault_handler(dev, vcodec_sysmmu_fault_hdl); } #endif + get_hw_info(data); + pservice->auto_freq = true; + vcodec_exit_mode(data); /* create device node */ ret = alloc_chrdev_region(&data->dev_t, 0, 1, name); @@ -2245,8 +2248,6 @@ static int vcodec_subdev_probe(struct platform_device *pdev, data->child_dev = device_create(data->cls, dev, data->dev_t, NULL, name); - get_hw_info(data); - platform_set_drvdata(pdev, data); INIT_LIST_HEAD(&data->lnk_service); -- 2.34.1