According to RK3288 TRM, the maximum worst case operating frequency of
VPU is 400 MHz, but by default it is set to 200 MHz. To fix (or work
around) performance issues with VP8 encoder, this patch bumps the
frequency to maximum possible value.
BUG=chrome-os-partner:35405
TEST=./video_encode_accelerator_unittest
--test_stream_data=tulip2-1280x720-
1b95123232922fe0067869c74e19cd09.yuv:1280:720:11:out1280x720.ivf:
1200000
--v
Signed-off-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/240644
Reviewed-by: Pawel Osciak <posciak@chromium.org>
Change-Id: I397139fe1195b74b8ebd516eae0968bccff7ef4b
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
return PTR_ERR(vpu->hclk_vcodec);
}
+ /*
+ * Bump ACLK to max. possible freq. (400 MHz) to improve performance.
+ *
+ * VP8 encoding 1280x720@1.2Mbps 200 MHz: 39 fps, 400: MHz 77 fps
+ */
+ clk_set_rate(vpu->aclk_vcodec, 400*1000*1000);
+
res = platform_get_resource(vpu->pdev, IORESOURCE_MEM, 0);
vpu->base = devm_ioremap_resource(vpu->dev, res);
if (IS_ERR(vpu->base))