From: Eunyoung Lee Date: Tue, 26 Jun 2018 04:13:20 +0000 (+0900) Subject: [COMMON] fimc-is2: seperated RTA_VERSION_OFFSET, DDK_VERSION_OFFSET from FIMC_IS_VERS... X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6f9d148c945557f8496de2e1f049a26934d2fa9e;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] fimc-is2: seperated RTA_VERSION_OFFSET, DDK_VERSION_OFFSET from FIMC_IS_VERSION_OFFSET Change-Id: I19f0e1f2651cc9725f42420226ac99134cc9c9af Signed-off-by: Eunyoung Lee --- diff --git a/drivers/media/platform/exynos/fimc-is2/fimc-is-device-ischain.c b/drivers/media/platform/exynos/fimc-is2/fimc-is-device-ischain.c index 859f18624f76..2dbfa0aeb35a 100644 --- a/drivers/media/platform/exynos/fimc-is2/fimc-is-device-ischain.c +++ b/drivers/media/platform/exynos/fimc-is2/fimc-is-device-ischain.c @@ -879,8 +879,8 @@ void fimc_is_ischain_version(enum fimc_is_bin_type type, const char *load_bin, u } break; case FIMC_IS_BIN_DDK_LIBRARY: - if (size > FIMC_IS_VERSION_OFFSET) { - memcpy(ddk_version_str, &load_bin[size - FIMC_IS_VERSION_OFFSET], + if (size > DDK_VERSION_OFFSET) { + memcpy(ddk_version_str, &load_bin[size - DDK_VERSION_OFFSET], FIMC_IS_VERSION_BIN_SIZE); ddk_version_str[FIMC_IS_VERSION_BIN_SIZE] = '\0'; info("DDK version : %s\n", ddk_version_str); @@ -889,8 +889,8 @@ void fimc_is_ischain_version(enum fimc_is_bin_type type, const char *load_bin, u } break; case FIMC_IS_BIN_RTA_LIBRARY: - if (size > FIMC_IS_VERSION_OFFSET) { - memcpy(rta_version_str, &load_bin[size - FIMC_IS_VERSION_OFFSET], + if (size > RTA_VERSION_OFFSET) { + memcpy(rta_version_str, &load_bin[size - RTA_VERSION_OFFSET], FIMC_IS_VERSION_BIN_SIZE); rta_version_str[FIMC_IS_VERSION_BIN_SIZE] = '\0'; info("RTA version : %s\n", rta_version_str); diff --git a/drivers/media/platform/exynos/fimc-is2/include/fimc-is-binary.h b/drivers/media/platform/exynos/fimc-is2/include/fimc-is-binary.h index ab4ff924023c..d4fed371dfb2 100644 --- a/drivers/media/platform/exynos/fimc-is2/include/fimc-is-binary.h +++ b/drivers/media/platform/exynos/fimc-is2/include/fimc-is-binary.h @@ -146,9 +146,11 @@ #define FIMC_IS_VERSION_BIN_SIZE 44 #ifdef USE_BINARY_PADDING_DATA_ADDED #define FIMC_IS_SIGNATURE_SIZE 528 -#define FIMC_IS_VERSION_OFFSET (FIMC_IS_VERSION_BIN_SIZE+FIMC_IS_SIGNATURE_SIZE) +#define DDK_VERSION_OFFSET (FIMC_IS_VERSION_BIN_SIZE + FIMC_IS_SIGNATURE_SIZE) +#define RTA_VERSION_OFFSET (FIMC_IS_VERSION_BIN_SIZE) #else -#define FIMC_IS_VERSION_OFFSET (FIMC_IS_VERSION_BIN_SIZE) +#define DDK_VERSION_OFFSET (FIMC_IS_VERSION_BIN_SIZE) +#define RTA_VERSION_OFFSET (FIMC_IS_VERSION_BIN_SIZE) #endif #define FIMC_IS_SETFILE_VER_OFFSET 0x40 #define FIMC_IS_SETFILE_VER_SIZE 52