[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)
committerSeungchul Kim <sc377.kim@samsung.com>
Mon, 28 May 2018 05:28:28 +0000 (14:28 +0900)
commit705e23412cc20c459d6c486a63af6fda8361c0f1
tree308ea4cf813ea3ff1279dd6aaca823ad87cbcc6f
parent6da36a1073a3b9ccc97445f472db64bfbb74887f
[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