From f7fc5a6f9bc935e99388cbd124f4749c71bdc67a Mon Sep 17 00:00:00 2001 From: cl Date: Tue, 6 Jan 2015 19:40:25 +0800 Subject: [PATCH] ddr_freq: change the type of vop request from andriod Signed-off-by: cl --- arch/arm/mach-rockchip/ddr_freq.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-rockchip/ddr_freq.c b/arch/arm/mach-rockchip/ddr_freq.c index 247a8bb90783..9a9713c8f19f 100644 --- a/arch/arm/mach-rockchip/ddr_freq.c +++ b/arch/arm/mach-rockchip/ddr_freq.c @@ -84,6 +84,18 @@ struct video_info { struct list_head node; }; +struct vop_info { + int state; + int zone_num; + int reserve; + int reserve2; +}; + +struct bpvopinfo { + struct vop_info vopinfo[4]; + int bp_size; + int bp_vop_size; +}; struct ddr { struct dvfs_node *clk_dvfs_node; @@ -617,13 +629,13 @@ static struct miscdevice video_state_dev = { static long ddr_freq_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { - unsigned long bandwidth = *(int*)arg; + struct bpvopinfo *bpvinfo = (struct bpvopinfo *)arg; unsigned long vop_req_freq; int ret = -1; - vop_bandwidth = bandwidth; + vop_bandwidth = bpvinfo->bp_vop_size; vop_bandwidth_update_jiffies = jiffies; - vop_req_freq = req_freq_by_vop(bandwidth); + vop_req_freq = req_freq_by_vop(vop_bandwidth); if (dvfs_clk_get_rate(ddr.clk_dvfs_node) >= vop_req_freq) { ret = 0; } -- 2.34.1