VPU: enable auto-freq flag.
authorAlpha Lin <alpha.lin@rock-chips.com>
Mon, 15 Jun 2015 09:10:33 +0000 (17:10 +0800)
committerAlpha Lin <alpha.lin@rock-chips.com>
Mon, 15 Jun 2015 09:12:42 +0000 (17:12 +0800)
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 <alpha.lin@rock-chips.com>
arch/arm/mach-rockchip/vcodec_service.c

index 967c3d158d3b6b691be19240642388954396e3f8..414a0921f22acc1a962db9f83c65cccceb345199 100755 (executable)
@@ -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);