[COMMON] fimc-is2: fix a bug in updating kvaddr_buffer
authorEunyoung Lee <ey470.lee@samsung.com>
Fri, 15 Jun 2018 02:15:38 +0000 (11:15 +0900)
committerCosmin Tanislav <demonsingur@gmail.com>
Mon, 22 Apr 2024 17:22:32 +0000 (20:22 +0300)
Change-Id: Ifbdaa4ab1fde1042b8b1a5a01e6f70b15eb28e13
Signed-off-by: Eunyoung Lee <ey470.lee@samsung.com>
drivers/media/platform/exynos/fimc-is2/fimc-is-video.c

index 39c4478f512542d59af85edfed16e0af7086c7a2..6b9ebdbc544533b624318000fb49ba6e6b4daf89 100644 (file)
@@ -1047,6 +1047,16 @@ int fimc_is_queue_buffer_queue(struct fimc_is_queue *queue,
                                goto exit;
                        }
                }
+               if (frame->kvaddr_buffer[i] != queue->buf_kva[index][i]) {
+                       if (video->resourcemgr->hal_version == IS_HAL_VER_3_2) {
+                               frame->kvaddr_buffer[i] = queue->buf_kva[index][i];
+                       } else {
+                               mverr("kvaddr buffer[%d][%d] is changed(%08X != %08lX)", vctx, video, index, i,
+                                       frame->kvaddr_buffer[i], queue->buf_kva[index][i]);
+                               ret = -EINVAL;
+                               goto exit;
+                       }
+               }
        }
 
        goto exit;