From patchwork Mon Jun 10 13:23:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arun Kumar K X-Patchwork-Id: 2697531 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id C0FA13FD4E for ; Mon, 10 Jun 2013 13:01:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752279Ab3FJNBy (ORCPT ); Mon, 10 Jun 2013 09:01:54 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:22285 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751034Ab3FJNBy (ORCPT ); Mon, 10 Jun 2013 09:01:54 -0400 Received: from epcpsbgr2.samsung.com (u142.gpu120.samsung.co.kr [203.254.230.142]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MO6008V0HJ443P0@mailout3.samsung.com> for linux-media@vger.kernel.org; Mon, 10 Jun 2013 22:01:52 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.125]) by epcpsbgr2.samsung.com (EPCPMTA) with SMTP id D9.46.08825.04EC5B15; Mon, 10 Jun 2013 22:01:52 +0900 (KST) X-AuditID: cbfee68e-b7f276d000002279-e5-51b5ce40209a Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 3C.67.28381.04EC5B15; Mon, 10 Jun 2013 22:01:52 +0900 (KST) Received: from chromeserver-PowerEdge-T410.sisodomain.com ([107.108.73.106]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MO600DO7HEHPR30@mmp1.samsung.com>; Mon, 10 Jun 2013 22:01:52 +0900 (KST) From: Arun Kumar K To: linux-media@vger.kernel.org Cc: k.debski@samsung.com, jtp.park@samsung.com, s.nawrocki@samsung.com, avnd.kiran@samsung.com, arunkk.samsung@gmail.com Subject: [PATCH 3/6] [media] s5p-mfc: Core support for MFC v7 Date: Mon, 10 Jun 2013 18:53:03 +0530 Message-id: <1370870586-24141-4-git-send-email-arun.kk@samsung.com> X-Mailer: git-send-email 1.7.10.4 In-reply-to: <1370870586-24141-1-git-send-email-arun.kk@samsung.com> References: <1370870586-24141-1-git-send-email-arun.kk@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrGLMWRmVeSWpSXmKPExsWyRsSkVtfh3NZAg7endSxebLzFbvFydh+z xZG1V5ksfry+wGbRs2Erq8XhN+2sDmweO2fdZffo27KK0ePzJrkA5igum5TUnMyy1CJ9uwSu jJs3djIVHBSt+PJrLnMD4yPBLkZODgkBE4nuZQ/ZIGwxiQv31gPZXBxCAksZJeY928sMU7R3 zjZWiMQiRom3568yQjizmSR2XF0A1s4moCFx78RjVhBbREBe4knvDaA4BwezQJXEpdtaIGFh AVuJ9g2HwEpYBFQllp2HWMAr4CzRs6SVFWKZokT3swlgrZwCLhLblnOChIWASk7P6QBbKyHQ zC7xb80rZog5AhLfJh9iAamXEJCV2HQA6mZJiYMrbrBMYBRewMiwilE0tSC5oDgpvchIrzgx t7g0L10vOT93EyMwjE//e9a3g/HmAetDjMlA4yYyS4km5wPjIK8k3tDYzMjC1MTU2Mjc0ow0 YSVxXrUW60AhgfTEktTs1NSC1KL4otKc1OJDjEwcnFINjHEiymtLNzom8gjzCHAbTbmq6Tzn kILkq49Lv4SuFLFbl7E98fNv7ROSWgk7pvrNYz6pIGsjeFbTeMMZ+bOdl6+82TTrgPVar96P yydP5GNhjtxQWe343u1BTYHliYS157+4vC1PPSX4x+xu21nTLP5XyeXvmo49Pj774cSImGvv YydG+v1lzlZiKc5INNRiLipOBAB8evtTeQIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrMIsWRmVeSWpSXmKPExsVy+t9jAV2Hc1sDDbpPKlu82HiL3eLl7D5m iyNrrzJZ/Hh9gc2iZ8NWVovDb9pZHdg8ds66y+7Rt2UVo8fnTXIBzFENjDYZqYkpqUUKqXnJ +SmZeem2St7B8c7xpmYGhrqGlhbmSgp5ibmptkouPgG6bpk5QIuVFMoSc0qBQgGJxcVK+naY JoSGuOlawDRG6PqGBMH1GBmggYQ1jBk3b+xkKjgoWvHl11zmBsZHgl2MnBwSAiYSe+dsY4Ww xSQu3FvP1sXIxSEksIhR4u35q4wQzmwmiR1XF7CBVLEJaEjcO/EYrENEQF7iSe8NoDgHB7NA lcSl21ogYWEBW4n2DYfASlgEVCWWnd/LDGLzCjhL9CxphVqmKNH9bAJYK6eAi8S25ZwgYSGg ktNzOhgnMPIuYGRYxSiaWpBcUJyUnmuoV5yYW1yal66XnJ+7iREcJc+kdjCubLA4xCjAwajE w/vg15ZAIdbEsuLK3EOMEhzMSiK8slu2BgrxpiRWVqUW5ccXleakFh9iTAY6aiKzlGhyPjCC 80riDY1NzE2NTS1NLEzMLEkTVhLnPdBqHSgkkJ5YkpqdmlqQWgSzhYmDU6qB0WjiwmppzZ2r sqt2nc6aek+qcndZ8CI2zrurdTel5+5simV6cZeXv7XY3uPnhEPnXWs+9Gy8VHFm+Z+4RWrs ysv6/CT6vl1at11sBr/K74xZabaVoeyhETmX//FrnIvf/UR84sWVC96+3y5/LrvKYINm5laX S5cMZ1roxWyrecukwpEbcUv/ghJLcUaioRZzUXEiAO+IQkTWAgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Adds variant data and core support for the MFC v7 firmware Signed-off-by: Arun Kumar K --- drivers/media/platform/s5p-mfc/s5p_mfc.c | 32 +++++++++++++++++++++++ drivers/media/platform/s5p-mfc/s5p_mfc_common.h | 2 ++ 2 files changed, 34 insertions(+) diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c index d12faa6..d6be52f 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c @@ -1391,6 +1391,32 @@ static struct s5p_mfc_variant mfc_drvdata_v6 = { .fw_name = "s5p-mfc-v6.fw", }; +struct s5p_mfc_buf_size_v6 mfc_buf_size_v7 = { + .dev_ctx = MFC_CTX_BUF_SIZE_V7, + .h264_dec_ctx = MFC_H264_DEC_CTX_BUF_SIZE_V7, + .other_dec_ctx = MFC_OTHER_DEC_CTX_BUF_SIZE_V7, + .h264_enc_ctx = MFC_H264_ENC_CTX_BUF_SIZE_V7, + .other_enc_ctx = MFC_OTHER_ENC_CTX_BUF_SIZE_V7, +}; + +struct s5p_mfc_buf_size buf_size_v7 = { + .fw = MAX_FW_SIZE_V7, + .cpb = MAX_CPB_SIZE_V7, + .priv = &mfc_buf_size_v7, +}; + +struct s5p_mfc_buf_align mfc_buf_align_v7 = { + .base = 0, +}; + +static struct s5p_mfc_variant mfc_drvdata_v7 = { + .version = MFC_VERSION_V7, + .port_num = MFC_NUM_PORTS_V7, + .buf_size = &buf_size_v7, + .buf_align = &mfc_buf_align_v7, + .fw_name = "s5p-mfc-v7.fw", +}; + static struct platform_device_id mfc_driver_ids[] = { { .name = "s5p-mfc", @@ -1401,6 +1427,9 @@ static struct platform_device_id mfc_driver_ids[] = { }, { .name = "s5p-mfc-v6", .driver_data = (unsigned long)&mfc_drvdata_v6, + }, { + .name = "s5p-mfc-v7", + .driver_data = (unsigned long)&mfc_drvdata_v7, }, {}, }; @@ -1413,6 +1442,9 @@ static const struct of_device_id exynos_mfc_match[] = { }, { .compatible = "samsung,mfc-v6", .data = &mfc_drvdata_v6, + }, { + .compatible = "samsung,mfc-v7", + .data = &mfc_drvdata_v7, }, {}, }; diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h index ef4074c..7281de2 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h @@ -24,6 +24,7 @@ #include #include "regs-mfc.h" #include "regs-mfc-v6.h" +#include "regs-mfc-v7.h" /* Definitions related to MFC memory */ @@ -684,5 +685,6 @@ void set_work_bit_irqsave(struct s5p_mfc_ctx *ctx); (dev->variant->port_num ? 1 : 0) : 0) : 0) #define IS_TWOPORT(dev) (dev->variant->port_num == 2 ? 1 : 0) #define IS_MFCV6(dev) (dev->variant->version >= 0x60 ? 1 : 0) +#define IS_MFCV7(dev) (dev->variant->version >= 0x70 ? 1 : 0) #endif /* S5P_MFC_COMMON_H_ */