mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
video: rockchip: rga3: using async mode to print log when async is disabled
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com> Change-Id: If97d123618d0ab406e77002d79bd0780162c9c2b
This commit is contained in:
@@ -58,12 +58,12 @@ static inline int rga_dma_fence_get_status(struct dma_fence *fence)
|
||||
#else
|
||||
static inline struct dma_fence *rga_dma_fence_alloc(void)
|
||||
{
|
||||
return NULL;
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
|
||||
static inline int rga_dma_fence_get_fd(struct dma_fence *fence)
|
||||
{
|
||||
return 0;
|
||||
return -1;
|
||||
}
|
||||
|
||||
static inline struct dma_fence *rga_get_dma_fence_from_fd(int fence_fd)
|
||||
@@ -80,7 +80,7 @@ static inline int rga_dma_fence_add_callback(struct dma_fence *fence,
|
||||
dma_fence_func_t func,
|
||||
void *private)
|
||||
{
|
||||
return 0;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline void rga_dma_fence_put(struct dma_fence *fence)
|
||||
@@ -93,7 +93,7 @@ static inline void rga_dma_fence_signal(struct dma_fence *fence, int error)
|
||||
|
||||
static inline int rga_dma_fence_get_status(struct dma_fence *fence)
|
||||
{
|
||||
return 0;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
#endif /* #ifdef CONFIG_SYNC_FILE */
|
||||
|
||||
@@ -936,6 +936,13 @@ static long rga_ioctl(struct file *file, uint32_t cmd, unsigned long arg)
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
if (cmd == RGA_BLIT_ASYNC && !IS_ENABLED(CONFIG_ROCKCHIP_RGA_ASYNC)) {
|
||||
rga_log("The current driver does not support asynchronous mode, please enable CONFIG_ROCKCHIP_RGA_ASYNC.\n");
|
||||
up_read(&rga_drvdata->rwsem);
|
||||
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
switch (cmd) {
|
||||
case RGA_BLIT_SYNC:
|
||||
case RGA_BLIT_ASYNC:
|
||||
|
||||
@@ -1254,9 +1254,9 @@ int rga_request_submit(struct rga_request *request)
|
||||
|
||||
if (request->sync_mode == RGA_BLIT_ASYNC) {
|
||||
release_fence = rga_dma_fence_alloc();
|
||||
if (IS_ERR(release_fence)) {
|
||||
if (IS_ERR_OR_NULL(release_fence)) {
|
||||
rga_req_err(request, "Can not alloc release fence!\n");
|
||||
ret = IS_ERR(release_fence);
|
||||
ret = IS_ERR(release_fence) ? PTR_ERR(release_fence) : -EINVAL;
|
||||
goto err_reset_request;
|
||||
}
|
||||
request->release_fence = release_fence;
|
||||
|
||||
Reference in New Issue
Block a user