video: rockchip: rga3: Fix for CONFIG_ROCKCHIP_FPGA=y

drivers/video/rockchip/rga3/rga_drv.c:1036:3: error: implicit declaration of function 'rga_power_enable_all' [-Werror=implicit-function-declaration]
   rga_power_enable_all();
   ^~~~~~~~~~~~~~~~~~~~
drivers/video/rockchip/rga3/rga_drv.c:1040:3: error: implicit declaration of function 'rga_power_disable_all' [-Werror=implicit-function-declaration]
   rga_power_disable_all();
   ^~~~~~~~~~~~~~~~~~~~~
drivers/video/rockchip/rga3/rga_drv.c: In function 'rga_drv_probe':
drivers/video/rockchip/rga3/rga_drv.c:1526:1: warning: label 'failed' defined but not used [-Wunused-label]
error, forbidden warning:rga_drv.c:1526
 failed:
 ^~~~~~
drivers/video/rockchip/rga3/rga_drv.c:1376:6: warning: unused variable 'i' [-Wunused-variable]
error, forbidden warning:rga_drv.c:1376
  int i, irq;

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I3a7bd21a2351b474df654a81b93f7f0c1560aac1
This commit is contained in:
Yu Qiaowei
2022-07-28 20:16:17 +08:00
parent 4b8c0aef05
commit 0e669c6e25
2 changed files with 14 additions and 1 deletions

View File

@@ -433,8 +433,13 @@ static inline void rga_write(int value, int offset, struct rga_scheduler_t *sche
writel(value, scheduler->rga_base + offset);
}
#ifndef CONFIG_ROCKCHIP_FPGA
int rga_power_enable(struct rga_scheduler_t *scheduler);
int rga_power_disable(struct rga_scheduler_t *scheduler);
#else
static inline int rga_power_enable(struct rga_scheduler_t *scheduler) { return 0; }
static inline int rga_power_disable(struct rga_scheduler_t *scheduler) { return 0; }
#endif
int rga_kernel_commit(struct rga_req *cmd);

View File

@@ -478,6 +478,9 @@ static void rga_power_disable_all(void)
}
}
#else
static inline void rga_power_enable_all(void) {}
static inline void rga_power_disable_all(void) {}
#endif //CONFIG_ROCKCHIP_FPGA
static int rga_session_manager_init(struct rga_session_manager **session_manager_ptr)
@@ -1373,8 +1376,11 @@ static int rga_drv_probe(struct platform_device *pdev)
const struct of_device_id *match = NULL;
struct device *dev = &pdev->dev;
const struct rga_match_data_t *match_data;
int i, irq;
int irq;
struct rga_scheduler_t *scheduler = NULL;
#ifndef CONFIG_ROCKCHIP_FPGA
int i;
#endif
if (!pdev->dev.of_node)
return -EINVAL;
@@ -1523,9 +1529,11 @@ static int rga_drv_probe(struct platform_device *pdev)
return 0;
#ifndef CONFIG_ROCKCHIP_FPGA
failed:
device_init_wakeup(dev, false);
pm_runtime_disable(dev);
#endif //CONFIG_ROCKCHIP_FPGA
return ret;
}