From 5a754e153efbeb6bd54bbb723884f2c6835fb92a Mon Sep 17 00:00:00 2001 From: Tao Huang Date: Tue, 8 May 2018 17:21:20 +0800 Subject: [PATCH] PM / devfreq: rockchip_dmc: move some functions Move rockchip_dmcfreq_vop_bandwidth_request and rockchip_dmcfreq_vop_bandwidth_update from rockchip_drm_fb.h to rockchip_dmc.h. Change-Id: I5b023e44b46a6c613af71452a940d31feb9b2d97 Signed-off-by: Tao Huang --- drivers/gpu/drm/rockchip/rockchip_drm_fb.h | 20 -------------------- include/soc/rockchip/rockchip_dmc.h | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_fb.h b/drivers/gpu/drm/rockchip/rockchip_drm_fb.h index a2351124c4c8..6ddfd5e1c8e7 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_fb.h +++ b/drivers/gpu/drm/rockchip/rockchip_drm_fb.h @@ -33,26 +33,6 @@ dma_addr_t rockchip_fb_get_dma_addr(struct drm_framebuffer *fb, unsigned int plane); void *rockchip_fb_get_kvaddr(struct drm_framebuffer *fb, unsigned int plane); -#ifdef CONFIG_ARM_ROCKCHIP_DMC_DEVFREQ -int rockchip_dmcfreq_vop_bandwidth_request(struct devfreq *devfreq, - unsigned int bw_mbyte); -void rockchip_dmcfreq_vop_bandwidth_update(struct devfreq *devfreq, - unsigned int bw_mbyte); -#else -static inline int -rockchip_dmcfreq_vop_bandwidth_request(struct devfreq *devfreq, - unsigned int bw_mbyte) -{ - return 0; -} - -static inline void -rockchip_dmcfreq_vop_bandwidth_update(struct devfreq *devfreq, - unsigned int bw_mbyte) -{ -} -#endif - #define to_rockchip_fb(x) container_of(x, struct rockchip_drm_fb, fb) struct rockchip_drm_fb { diff --git a/include/soc/rockchip/rockchip_dmc.h b/include/soc/rockchip/rockchip_dmc.h index 6c1bb871c972..f8d6addfa8b4 100644 --- a/include/soc/rockchip/rockchip_dmc.h +++ b/include/soc/rockchip/rockchip_dmc.h @@ -26,11 +26,29 @@ static inline int rockchip_drm_register_notifier_to_dmc(struct devfreq *devfreq) #ifdef CONFIG_ARM_ROCKCHIP_DMC_DEVFREQ int rockchip_dmcfreq_wait_complete(void); +int rockchip_dmcfreq_vop_bandwidth_request(struct devfreq *devfreq, + unsigned int bw_mbyte); +void rockchip_dmcfreq_vop_bandwidth_update(struct devfreq *devfreq, + unsigned int bw_mbyte); + #else static inline int rockchip_dmcfreq_wait_complete(void) { return 0; } + +static inline int +rockchip_dmcfreq_vop_bandwidth_request(struct devfreq *devfreq, + unsigned int bw_mbyte) +{ + return 0; +} + +static inline void +rockchip_dmcfreq_vop_bandwidth_update(struct devfreq *devfreq, + unsigned int bw_mbyte) +{ +} #endif #endif