From: Jeonghee Kim Date: Wed, 16 May 2018 08:54:45 +0000 (+0900) Subject: [COMMON] media: mfc: change compatible and data name X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d1088d35cf7cfb2076eea7b7555e38e157e46e1a;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] media: mfc: change compatible and data name Change-Id: I5178feabee53e01a83a29ada79f7ac6572756699 Signed-off-by: Jeonghee Kim --- diff --git a/drivers/media/platform/exynos/mfc/s5p_mfc.c b/drivers/media/platform/exynos/mfc/s5p_mfc.c index 06eea90ad83e..c8d479477a3c 100644 --- a/drivers/media/platform/exynos/mfc/s5p_mfc.c +++ b/drivers/media/platform/exynos/mfc/s5p_mfc.c @@ -1514,7 +1514,7 @@ static const struct dev_pm_ops s5p_mfc_pm_ops = { ) }; -struct s5p_mfc_buf_size_v6 mfc_buf_size_v6 = { +struct s5p_mfc_ctx_buf_size mfc_ctx_buf_size = { .dev_ctx = PAGE_ALIGN(0x7800), /* 30KB */ .h264_dec_ctx = PAGE_ALIGN(0x200000), /* 1.6MB */ .other_dec_ctx = PAGE_ALIGN(0x7800), /* 30KB */ @@ -1525,27 +1525,21 @@ struct s5p_mfc_buf_size_v6 mfc_buf_size_v6 = { .dbg_info_buf = PAGE_ALIGN(0x1000), /* 4KB for DEBUG INFO */ }; -struct s5p_mfc_buf_size buf_size_v6 = { +struct s5p_mfc_buf_size mfc_buf_size = { .firmware_code = PAGE_ALIGN(0x100000), /* 1MB */ .cpb_buf = PAGE_ALIGN(0x300000), /* 3MB */ - .buf = &mfc_buf_size_v6, + .ctx_buf = &mfc_ctx_buf_size, }; -struct s5p_mfc_buf_align mfc_buf_align_v6 = { - .mfc_base_align = 0, -}; - - -static struct s5p_mfc_variant mfc_drvdata_v6 = { - .buf_size = &buf_size_v6, - .buf_align = &mfc_buf_align_v6, +static struct s5p_mfc_variant mfc_drvdata = { + .buf_size = &mfc_buf_size, .num_entities = 2, }; static const struct of_device_id exynos_mfc_match[] = { { - .compatible = "samsung,mfc-v6", - .data = &mfc_drvdata_v6, + .compatible = "samsung,exynos-mfc", + .data = &mfc_drvdata, }, {}, }; diff --git a/drivers/media/platform/exynos/mfc/s5p_mfc_buf.c b/drivers/media/platform/exynos/mfc/s5p_mfc_buf.c index ab23eb1e8660..7c54563b4f4c 100644 --- a/drivers/media/platform/exynos/mfc/s5p_mfc_buf.c +++ b/drivers/media/platform/exynos/mfc/s5p_mfc_buf.c @@ -107,7 +107,7 @@ void s5p_mfc_release_common_context(struct s5p_mfc_dev *dev) int s5p_mfc_alloc_instance_context(struct s5p_mfc_ctx *ctx) { struct s5p_mfc_dev *dev; - struct s5p_mfc_buf_size_v6 *buf_size; + struct s5p_mfc_ctx_buf_size *buf_size; mfc_debug_enter(); if (!ctx) { @@ -119,7 +119,7 @@ int s5p_mfc_alloc_instance_context(struct s5p_mfc_ctx *ctx) mfc_err_dev("no mfc device to run\n"); return -EINVAL; } - buf_size = dev->variant->buf_size->buf; + buf_size = dev->variant->buf_size->ctx_buf; switch (ctx->codec_mode) { case S5P_FIMV_CODEC_H264_DEC: @@ -445,7 +445,7 @@ void s5p_mfc_release_codec_buffers(struct s5p_mfc_ctx *ctx) /* Allocation buffer of debug infor memory for FW debugging */ int s5p_mfc_alloc_dbg_info_buffer(struct s5p_mfc_dev *dev) { - struct s5p_mfc_buf_size_v6 *buf_size = dev->variant->buf_size->buf; + struct s5p_mfc_ctx_buf_size *buf_size = dev->variant->buf_size->ctx_buf; mfc_debug(2, "Allocate a debug-info buffer.\n"); @@ -484,7 +484,7 @@ int s5p_mfc_release_dbg_info_buffer(struct s5p_mfc_dev *dev) static int mfc_alloc_enc_roi_buffer(struct s5p_mfc_ctx *ctx, struct s5p_mfc_special_buf *roi_buf) { struct s5p_mfc_dev *dev = ctx->dev; - struct s5p_mfc_buf_size_v6 *buf_size = dev->variant->buf_size->buf; + struct s5p_mfc_ctx_buf_size *buf_size = dev->variant->buf_size->ctx_buf; roi_buf->buftype = MFCBUF_NORMAL; roi_buf->size = buf_size->shared_buf; @@ -576,9 +576,8 @@ void s5p_mfc_otf_release_stream_buf(struct s5p_mfc_ctx *ctx) /* Allocate firmware */ int s5p_mfc_alloc_firmware(struct s5p_mfc_dev *dev) { - unsigned int base_align; size_t firmware_size; - struct s5p_mfc_buf_size_v6 *buf_size; + struct s5p_mfc_ctx_buf_size *buf_size; mfc_debug_enter(); @@ -587,8 +586,7 @@ int s5p_mfc_alloc_firmware(struct s5p_mfc_dev *dev) return -EINVAL; } - buf_size = dev->variant->buf_size->buf; - base_align = dev->variant->buf_align->mfc_base_align; + buf_size = dev->variant->buf_size->ctx_buf; firmware_size = dev->variant->buf_size->firmware_code; dev->fw.size = firmware_size + buf_size->dev_ctx; diff --git a/drivers/media/platform/exynos/mfc/s5p_mfc_cmd.c b/drivers/media/platform/exynos/mfc/s5p_mfc_cmd.c index af09a6c9f848..33ba1b88a24a 100644 --- a/drivers/media/platform/exynos/mfc/s5p_mfc_cmd.c +++ b/drivers/media/platform/exynos/mfc/s5p_mfc_cmd.c @@ -1,5 +1,5 @@ /* - * drivers/media/platform/exynos/mfc/s5p_mfc_cmd_v6.c + * drivers/media/platform/exynos/mfc/s5p_mfc_cmd.c * * Copyright (c) 2016 Samsung Electronics Co., Ltd. * http://www.samsung.com/ @@ -24,7 +24,7 @@ int s5p_mfc_cmd_sys_init(struct s5p_mfc_dev *dev, enum mfc_buf_usage_type buf_type) { - struct s5p_mfc_buf_size_v6 *buf_size; + struct s5p_mfc_ctx_buf_size *buf_size; struct s5p_mfc_special_buf *ctx_buf; mfc_debug_enter(); @@ -36,7 +36,7 @@ int s5p_mfc_cmd_sys_init(struct s5p_mfc_dev *dev, s5p_mfc_clean_dev_int_flags(dev); - buf_size = dev->variant->buf_size->buf; + buf_size = dev->variant->buf_size->ctx_buf; ctx_buf = &dev->common_ctx_buf; #ifdef CONFIG_EXYNOS_CONTENT_PATH_PROTECTION if (buf_type == MFCBUF_DRM) diff --git a/drivers/media/platform/exynos/mfc/s5p_mfc_data_struct.h b/drivers/media/platform/exynos/mfc/s5p_mfc_data_struct.h index 0283548f3181..9276f817b9c8 100644 --- a/drivers/media/platform/exynos/mfc/s5p_mfc_data_struct.h +++ b/drivers/media/platform/exynos/mfc/s5p_mfc_data_struct.h @@ -261,11 +261,7 @@ struct s5p_mfc_fw { int drm_status; }; -struct s5p_mfc_buf_align { - unsigned int mfc_base_align; -}; - -struct s5p_mfc_buf_size_v6 { +struct s5p_mfc_ctx_buf_size { size_t dev_ctx; size_t h264_dec_ctx; size_t other_dec_ctx; @@ -279,12 +275,11 @@ struct s5p_mfc_buf_size_v6 { struct s5p_mfc_buf_size { size_t firmware_code; unsigned int cpb_buf; - void *buf; + void *ctx_buf; }; struct s5p_mfc_variant { struct s5p_mfc_buf_size *buf_size; - struct s5p_mfc_buf_align *buf_align; int num_entities; }; diff --git a/drivers/media/platform/exynos/mfc/s5p_mfc_reg.c b/drivers/media/platform/exynos/mfc/s5p_mfc_reg.c index abec9c910e53..1062a8dc29df 100644 --- a/drivers/media/platform/exynos/mfc/s5p_mfc_reg.c +++ b/drivers/media/platform/exynos/mfc/s5p_mfc_reg.c @@ -28,7 +28,7 @@ void s5p_mfc_dbg_disable(struct s5p_mfc_dev *dev) void s5p_mfc_dbg_set_addr(struct s5p_mfc_dev *dev) { - struct s5p_mfc_buf_size_v6 *buf_size = dev->variant->buf_size->buf; + struct s5p_mfc_ctx_buf_size *buf_size = dev->variant->buf_size->ctx_buf; memset((void *)dev->dbg_info_buf.vaddr, 0, buf_size->dbg_info_buf); diff --git a/drivers/media/platform/exynos/mfc/s5p_mfc_watchdog.c b/drivers/media/platform/exynos/mfc/s5p_mfc_watchdog.c index cedaa93d0450..fe779e8ccb7d 100644 --- a/drivers/media/platform/exynos/mfc/s5p_mfc_watchdog.c +++ b/drivers/media/platform/exynos/mfc/s5p_mfc_watchdog.c @@ -29,7 +29,7 @@ static void mfc_dump_regs(struct s5p_mfc_dev *dev) { int i; - struct s5p_mfc_buf_size_v6 *buf_size = NULL; + struct s5p_mfc_ctx_buf_size *buf_size = NULL; int addr[MFC_SFR_AREA_COUNT][2] = { { 0x0, 0x80 }, { 0x1000, 0xCD0 }, @@ -67,7 +67,7 @@ static void mfc_dump_regs(struct s5p_mfc_dev *dev) } if (dbg_enable) { - buf_size = dev->variant->buf_size->buf; + buf_size = dev->variant->buf_size->ctx_buf; printk("[DBG INFO dump]\n"); print_hex_dump(KERN_ERR, "", DUMP_PREFIX_ADDRESS, 32, 4, dev->dbg_info_buf.vaddr, buf_size->dbg_info_buf, false);