[COMMON] media: scaler: cleaning up buffer allocation related code
authorJanghyuck Kim <janghyuck.kim@samsung.com>
Fri, 28 Apr 2017 12:45:33 +0000 (21:45 +0900)
committerCosmin Tanislav <demonsingur@gmail.com>
Mon, 22 Apr 2024 17:22:16 +0000 (20:22 +0300)
commit36db59bcaa9db4d2782430d371a3ad8d77c93e1c
tree9acb79f65f04211b069418a1cb1755bad79d8d72
parent3ecaaf5b09de549b71bad343a7d5ddc4e1bb9db6
[COMMON] media: scaler: cleaning up buffer allocation related code

This patch cleans up repetitive code for plane size calculation and
buffer allocation and free of intermediate buffer.

How to calculate plane size varies depending on the pixel format
conditions, however, many repetitive code was used. Common calculation
code is separated by one function.

Intermediate buffer allocation was repetitive and easy to mistake. It is
cleaned up by changing sc_addr structure to use array. It contains
removing redundant code for prefetch buffer.

Change-Id: Iea75d7f204e0addcebfc187b96eb8466320e5fd9
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
drivers/media/platform/exynos/scaler/scaler-core.c
drivers/media/platform/exynos/scaler/scaler-regs.c
drivers/media/platform/exynos/scaler/scaler.h