[COMMON] media: mfc: change compatible and data name
authorJeonghee Kim <jhhhh.kim@samsung.com>
Wed, 16 May 2018 08:54:45 +0000 (17:54 +0900)
committerSunyoung Kang <sy0816.kang@samsung.com>
Tue, 29 May 2018 06:59:18 +0000 (15:59 +0900)
Change-Id: I5178feabee53e01a83a29ada79f7ac6572756699
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
drivers/media/platform/exynos/mfc/s5p_mfc.c
drivers/media/platform/exynos/mfc/s5p_mfc_buf.c
drivers/media/platform/exynos/mfc/s5p_mfc_cmd.c
drivers/media/platform/exynos/mfc/s5p_mfc_data_struct.h
drivers/media/platform/exynos/mfc/s5p_mfc_reg.c
drivers/media/platform/exynos/mfc/s5p_mfc_watchdog.c

index 06eea90ad83ea7cb0bc08bb27fafda1e512be3cf..c8d479477a3c95444e6deb811b12ef516c80cd2e 100644 (file)
@@ -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,
        },
        {},
 };
index ab23eb1e8660d0e139e5a9935a19594aceea1bc0..7c54563b4f4c1ac905dc4ecf9584c065aa638cad 100644 (file)
@@ -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;
 
index af09a6c9f848595f48e0570057e066ff43eb430c..33ba1b88a24a7e4d1384be0db4da26024038e8f9 100644 (file)
@@ -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)
index 0283548f318158d17744ce560af8e735fadf789f..9276f817b9c88a471431109bb30b45b341be18d1 100644 (file)
@@ -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;
 };
 
index abec9c910e53c1fc83d1f6307db2318f4bcbf2a1..1062a8dc29dffb8d55af6f5977cf2163d4127fff 100644 (file)
@@ -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);
 
index cedaa93d0450378c74eb54d2c5a85a2aedf1d37c..fe779e8ccb7d19ee2cd74088d22e087254198d7d 100644 (file)
@@ -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);