From patchwork Thu Oct 4 15:18:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rahul Sharma X-Patchwork-Id: 1545571 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 6C1123FD9C for ; Thu, 4 Oct 2012 09:21:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 52DE0A0CC7 for ; Thu, 4 Oct 2012 02:21:38 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by gabe.freedesktop.org (Postfix) with ESMTP id 7B733A0C2B for ; Thu, 4 Oct 2012 00:01:30 -0700 (PDT) Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MBC00EMEWQGIZ30@mailout3.samsung.com> for dri-devel@lists.freedesktop.org; Thu, 04 Oct 2012 16:01:27 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.125]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id A6.42.03860.7443D605; Thu, 04 Oct 2012 16:01:27 +0900 (KST) X-AuditID: cbfee61b-b7f2b6d000000f14-9c-506d3447f549 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 75.42.03860.7443D605; Thu, 04 Oct 2012 16:01:27 +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 <0MBC0040MWSZQ360@mmp2.samsung.com> for dri-devel@lists.freedesktop.org; Thu, 04 Oct 2012 16:01:27 +0900 (KST) From: Rahul Sharma To: dri-devel@lists.freedesktop.org Subject: [PATCH v1 09/14] drm: exynos: hdmi: add support for platform variants for mixer Date: Thu, 04 Oct 2012 20:48:51 +0530 Message-id: <1349363936-8531-10-git-send-email-rahul.sharma@samsung.com> X-Mailer: git-send-email 1.7.0.4 In-reply-to: <1349363936-8531-1-git-send-email-rahul.sharma@samsung.com> References: <1349363936-8531-1-git-send-email-rahul.sharma@samsung.com> DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrNLMWRmVeSWpSXmKPExsWyRsSkVtfdJDfAYPt5YYsrX9+zOTB63O8+ zhTAGMVlk5Kak1mWWqRvl8CV0fNtGkvBacGKx2e3sjcwruPrYuTkkBAwkdh/dBEjhC0mceHe ejYQW0hgKaPErr8eXYwcYDVXrvB0MXIBhaczSjx/eo4RwlnNJPFh/UmwBjYBXYnZB5+BDRIR UJb4O3EVWBGzwCImiX93PrCDJIQFoiS2NC0As1kEVCXOLdrDArKBV8BDYvaveogjFCRalx0C K+EECi/8dYMd4iB3iSfXLjFCtApIfJt8iAXiOFmJTQeYQVZJCFxnk3i44TcLxBxJiYMrbrBM YBRewMiwilE0tSC5oDgpPddIrzgxt7g0L10vOT93EyMwBE//eya9g3FVg8UhRgEORiUeXotJ OQFCrIllxZW5hxglOJiVRHg3K+YGCPGmJFZWpRblxxeV5qQWH2L0AbpkIrOUaHI+MD7ySuIN jU3MTY1NLY2MzExNcQgrifM2e6QECAmkJ5akZqemFqQWwYxj4uCUamC0em27hXeHSDKXynLm F21/C9mdw/wrEq8F7nfZ12Foen6Lipjjh8+OL4Mt1t/Z9JTnfkYI48LppxWOOV7wPNJ76a7E y4Se1589L1zRmfJjZ91nt08ec20zrkjpzGJmUrjY7JwSmdBfplJ/qElqyq7ajVruSkmXFVeG O/zf+4OnfeajXVbXMv4osRRnJBpqMRcVJwIALjk7f24CAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupmkeLIzCtJLcpLzFFi42I5/e+xoK67SW6AwadrfBZXvr5nc2D0uN99 nCmAMaqB0SYjNTEltUghNS85PyUzL91WyTs43jne1MzAUNfQ0sJcSSEvMTfVVsnFJ0DXLTMH aKySQlliTilQKCCxuFhJ3w7ThNAQN10LmMYIXd+QILgeIwM0kLCGMaPn2zSWgtOCFY/PbmVv YFzH18XIwSEhYCJx5QpPFyMnkCkmceHeerYuRi4OIYHpjBLPn55jhHBWM0l8WH+SDaSKTUBX YvbBZ4wgtoiAssTfiavAipgFFjFJ/LvzgR0kISwQJbGlaQGYzSKgKnFu0R4WkG28Ah4Ss3/V Q2xTkGhddgishBMovPDXDTBbSMBd4sm1S4wTGHkXMDKsYhRNLUguKE5KzzXSK07MLS7NS9dL zs/dxAgO8WfSOxhXNVgcYhTgYFTi4bWYlBMgxJpYVlyZe4hRgoNZSYR3s2JugBBvSmJlVWpR fnxRaU5q8SFGH6CjJjJLiSbnA+MvryTe0NjE3NTY1NLEwsTMEoewkjhvs0dKgJBAemJJanZq akFqEcw4Jg5OqQbGuL3pnvcKbH/VPGTm7ywzCg2rWBVxbeUHAfOtFt39ZtU5IloKi+Q150fO Ot5ZKP3ehlG3cOnTNeua1B8GJdy+OTVZe9ML25U/L2rluGsJK58R5/DyWf7LLD/h6145+Ufa ibucuY9ujHid9snZJ2iz1qbjZre1koP/vrtSm8na0DljcW23XZUSS3FGoqEWc1FxIgBl1ldB ngIAAA== X-CFilter-Loop: Reflected X-Mailman-Approved-At: Thu, 04 Oct 2012 00:53:23 -0700 Cc: t.stanislaws@samsung.com, l.krishna@samsung.com, joshi@samsung.com, kyungmin.park@samsung.com, fahad.k@samsung.com, rahul.sharma@samsung.com, prashanth.g@samsung.com, s.shirish@samsung.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.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, };