From patchwork Thu Oct 4 15:42:47 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rahul Sharma X-Patchwork-Id: 1545161 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id A17ED3FD9C for ; Thu, 4 Oct 2012 07:28:57 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TJfpd-0004BU-3y; Thu, 04 Oct 2012 07:26:53 +0000 Received: from mailout4.samsung.com ([203.254.224.34]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TJfnr-00038K-1g for linux-arm-kernel@lists.infradead.org; Thu, 04 Oct 2012 07:25:04 +0000 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MBC00CTLXVK9PN0@mailout4.samsung.com> for linux-arm-kernel@lists.infradead.org; Thu, 04 Oct 2012 16:24:50 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.125]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 42.69.03860.2C93D605; Thu, 04 Oct 2012 16:24:50 +0900 (KST) X-AuditID: cbfee61b-b7f2b6d000000f14-5d-506d39c21401 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id B1.69.03860.2C93D605; Thu, 04 Oct 2012 16:24:50 +0900 (KST) Received: from localhost.localdomain ([107.108.73.106]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MBC006I9XWMLU10@mmp2.samsung.com> for linux-arm-kernel@lists.infradead.org; Thu, 04 Oct 2012 16:24:50 +0900 (KST) From: Rahul Sharma To: linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Subject: [PATCH v1 09/14] drm: exynos: hdmi: add support for platform variants for mixer Date: Thu, 04 Oct 2012 21:12:47 +0530 Message-id: <1349365372-21417-10-git-send-email-rahul.sharma@samsung.com> X-Mailer: git-send-email 1.7.0.4 In-reply-to: <1349365372-21417-1-git-send-email-rahul.sharma@samsung.com> References: <1349365372-21417-1-git-send-email-rahul.sharma@samsung.com> DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrNLMWRmVeSWpSXmKPExsWyRsSkVveQZW6AwcMbShabHl9jdWD02Lyk PoAxissmJTUnsyy1SN8ugSuj59s0loLTghWPz25lb2Bcx9fFyMkhIWAisWnjZ3YIW0ziwr31 bF2MXBxCAksZJZ5vucgIUzRn21xmiMR0Rolv964wQjgbmCT2tt8Ha2cT0JWYffAZWIeIgKvE 1i03wWxmgSSJ7z8nMYHYwgJREluaFoDVswioSvRuvskCYvMKeEosODgDapuCROuyQ0A1HByc QPEjPxNBwkICHhKTPnSwQrQKSHybfIgFpERCQFZi0wGw2yQELrNJdN2HGCkhIClxcMUNlgmM wgsYGVYxiqYWJBcUJ6XnGukVJ+YWl+al6yXn525iBIbg6X/PpHcwrmqwOMQowMGoxMNrMSkn QIg1say4MvcQowQHs5II72bF3AAh3pTEyqrUovz4otKc1OJDjD5Al0xklhJNzgfGR15JvKGx ibmpsamlkZGZqSkOYSVx3maPlAAhgfTEktTs1NSC1CKYcUwcnFINjGsdCyfbspixFn4rkkjl tL6axrPw8LEZVZ5nZz1iOXJZmtffL8P6xneLs5rTZu2Y8Iax/2fQmq9Lc9a+SpMqF1/Qb+dl 9cHg5eSafF2vg/pnCw+c51fQFg7OOBR84oWn5FlHTrlX155VLvFVkfeNi2z2LRXKXJPyKrO8 KfPuTe9ozm+7p6vbKbEUZyQaajEXFScCAFiidbFuAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupikeLIzCtJLcpLzFFi42I5/e+xoO4hy9wAg1M9khabHl9jdWD02Lyk PoAxqoHRJiM1MSW1SCE1Lzk/JTMv3VbJOzjeOd7UzMBQ19DSwlxJIS8xN9VWycUnQNctMwdo qpJCWWJOKVAoILG4WEnfDtOE0BA3XQuYxghd35AguB4jAzSQsIYxo+fbNJaC04IVj89uZW9g XMfXxcjJISFgIjFn21xmCFtM4sK99WxdjFwcQgLTGSW+3bvCCOFsYJLY236fHaSKTUBXYvbB Z4wgtoiAq8TWLTfBbGaBJInvPycxgdjCAlESW5oWgNWzCKhK9G6+yQJi8wp4Siw4OIMRYpuC ROuyQ0A1HBycQPEjPxNBwkICHhKTPnSwTmDkXcDIsIpRNLUguaA4KT3XSK84Mbe4NC9dLzk/ dxMjOMCfSe9gXNVgcYhRgINRiYfXYlJOgBBrYllxZe4hRgkOZiUR3s2KuQFCvCmJlVWpRfnx RaU5qcWHGH2AjprILCWanA+MvrySeENjE3NTY1NLEwsTM0scwkrivM0eKQFCAumJJanZqakF qUUw45g4OKUaGKXL1yR/KTvNwvNkxWIuuQipTdNu1+eaPW2xCNsVpmZQGN4odDJrwy9ni1/9 dTxv99rN2xzlKny2xcZDuOOl2TXdxSdCow6tDChMffC9OJDxmm90cG+WjbrmHrG/yT2Cy2U3 vGfOOrH7ZtoZe8nHE1zTHQuq/0y4v2pC/sWABex8co+jLed+V2Ipzkg01GIuKk4EANmEgMqd AgAA X-CFilter-Loop: Reflected X-Spam-Note: CRM114 invocation failed X-Spam-Score: -7.1 (-------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-7.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [203.254.224.34 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.9 DATE_IN_FUTURE_06_12 Date: is 6 to 12 hours after Received: date -2.1 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: t.stanislaws@samsung.com, inki.dae@samsung.com, kyungmin.park@samsung.com, joshi@samsung.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This patch adds the support for multiple mixer versions avaialble in various platform variants. Version is passed as a driver data field instead of paltform data. Signed-off-by: Rahul Sharma --- drivers/gpu/drm/exynos/exynos_mixer.c | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c index 8a43ee1..e312fb1 100644 --- a/drivers/gpu/drm/exynos/exynos_mixer.c +++ b/drivers/gpu/drm/exynos/exynos_mixer.c @@ -73,6 +73,11 @@ struct mixer_resources { struct clk *sclk_dac; }; +enum mixer_version_id { + MXR_VER_0_0_0_16, + MXR_VER_16_0_33_0, +}; + struct mixer_context { struct device *dev; int pipe; @@ -83,6 +88,11 @@ struct mixer_context { struct mutex mixer_mutex; struct mixer_resources mixer_res; struct hdmi_win_data win_data[MIXER_WIN_NR]; + enum mixer_version_id mxr_ver; +}; + +struct mixer_drv_data { + enum mixer_version_id version; }; static const u8 filter_y_horiz_tap8[] = { @@ -1023,11 +1033,25 @@ fail: return ret; } +static struct mixer_drv_data exynos4_mxr_drv_data = { + .version = MXR_VER_0_0_0_16, +}; + +static struct platform_device_id mixer_driver_types[] = { + { + .name = "s5p-mixer", + .driver_data = (unsigned long)&exynos4_mxr_drv_data, + }, { + /* end node */ + } +}; + static int __devinit mixer_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct exynos_drm_hdmi_context *drm_hdmi_ctx; struct mixer_context *ctx; + struct mixer_drv_data *drv; int ret; dev_info(dev, "probe start\n"); @@ -1047,8 +1071,11 @@ static int __devinit mixer_probe(struct platform_device *pdev) mutex_init(&ctx->mixer_mutex); + drv = (struct mixer_drv_data *)platform_get_device_id( + pdev)->driver_data; ctx->dev = &pdev->dev; drm_hdmi_ctx->ctx = (void *)ctx; + ctx->mxr_ver = drv->version; platform_set_drvdata(pdev, drm_hdmi_ctx); @@ -1101,4 +1128,5 @@ struct platform_driver mixer_driver = { }, .probe = mixer_probe, .remove = __devexit_p(mixer_remove), + .id_table = mixer_driver_types, };