From patchwork Wed Apr 24 07:41:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shaik Ameer Basha X-Patchwork-Id: 2482801 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 2B498DF25A for ; Wed, 24 Apr 2013 07:42:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757659Ab3DXHmX (ORCPT ); Wed, 24 Apr 2013 03:42:23 -0400 Received: from mail-pb0-f53.google.com ([209.85.160.53]:41463 "EHLO mail-pb0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757931Ab3DXHmV (ORCPT ); Wed, 24 Apr 2013 03:42:21 -0400 Received: by mail-pb0-f53.google.com with SMTP id un15so377324pbc.26 for ; Wed, 24 Apr 2013 00:42:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=y/E11OUwRoGd0qxihxa7qJeHnL6elUbiw2axOfyYiiI=; b=gH7rbNxmAgCegjyuTVYmvnj2nZx4201yevE48VsK7s92GXIKOY3ORi6vYbRPGlD5KY 1mxesJnr02uvrGDfPWWUt7gZMrzmOTNL/SnpfKGgwVfyD/CP7YlpWTEuxN3fY3LTJgja Kqe4IVsOnqcjVpX5Wi5SCAd2tr2/Bmg82s1xisLp5QfTxMJewJ/XOFjGwR9ym+9TtjYZ k37Emov2nZXLdvg/PsuH9xs64IAQHuZj0Pe1sp1d75vTDgV8euTdOcGy59Q+i3zscHpx 881i+qzB2PJgMzlSSLsWHjrlFNj3l1TzualYOgETdzlRYEuB3QecF7Bql9dtD6kJjnME Hp1A== X-Received: by 10.68.221.1 with SMTP id qa1mr45257122pbc.125.1366789341091; Wed, 24 Apr 2013 00:42:21 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPSA id lo7sm2513173pab.19.2013.04.24.00.42.18 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 24 Apr 2013 00:42:20 -0700 (PDT) From: Shaik Ameer Basha To: linux-media@vger.kernel.org, devicetree-discuss@lists.ozlabs.org, linux-samsung-soc@vger.kernel.org Cc: s.nawrocki@samsung.com, shaik.samsung@gmail.com, arunkk.samsung@gmail.com Subject: [RFC v2 2/6] fimc-lite: Adding Exynos5 compatibility to fimc-lite driver Date: Wed, 24 Apr 2013 13:11:09 +0530 Message-Id: <1366789273-30184-3-git-send-email-shaik.ameer@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1366789273-30184-1-git-send-email-shaik.ameer@samsung.com> References: <1366789273-30184-1-git-send-email-shaik.ameer@samsung.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org This patch adds, 1] Exynos5 soc compatibility to the fimc-lite driver 2] Multiple dma output buffer support as from Exynos5 onwards, fimc-lite h/w ip supports multiple dma buffers. Signed-off-by: Shaik Ameer Basha --- drivers/media/platform/exynos4-is/fimc-lite.c | 19 ++++++++++++++++++- drivers/media/platform/exynos4-is/fimc-lite.h | 4 +++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/exynos4-is/fimc-lite.c b/drivers/media/platform/exynos4-is/fimc-lite.c index 4878089..cb173ec 100644 --- a/drivers/media/platform/exynos4-is/fimc-lite.c +++ b/drivers/media/platform/exynos4-is/fimc-lite.c @@ -1467,7 +1467,7 @@ static int fimc_lite_probe(struct platform_device *pdev) fimc->index = pdev->id; } - if (!drv_data || fimc->index < 0 || fimc->index >= FIMC_LITE_MAX_DEVS) + if (!drv_data || fimc->index < 0 || fimc->index >= drv_data->num_devs) return -EINVAL; fimc->dd = drv_data; @@ -1625,6 +1625,19 @@ static struct flite_drvdata fimc_lite_drvdata_exynos4 = { .out_width_align = 8, .win_hor_offs_align = 2, .out_hor_offs_align = 8, + .support_multi_dma_buf = false, + .num_devs = 2, +}; + +/* EXYNOS5250 */ +static struct flite_drvdata fimc_lite_drvdata_exynos5 = { + .max_width = 8192, + .max_height = 8192, + .out_width_align = 8, + .win_hor_offs_align = 2, + .out_hor_offs_align = 8, + .support_multi_dma_buf = true, + .num_devs = 3, }; static struct platform_device_id fimc_lite_driver_ids[] = { @@ -1641,6 +1654,10 @@ static const struct of_device_id flite_of_match[] = { .compatible = "samsung,exynos4212-fimc-lite", .data = &fimc_lite_drvdata_exynos4, }, + { + .compatible = "samsung,exynos5250-fimc-lite", + .data = &fimc_lite_drvdata_exynos5, + }, { /* sentinel */ }, }; MODULE_DEVICE_TABLE(of, flite_of_match); diff --git a/drivers/media/platform/exynos4-is/fimc-lite.h b/drivers/media/platform/exynos4-is/fimc-lite.h index 71fed51..a35f29e 100644 --- a/drivers/media/platform/exynos4-is/fimc-lite.h +++ b/drivers/media/platform/exynos4-is/fimc-lite.h @@ -27,7 +27,7 @@ #define FIMC_LITE_DRV_NAME "exynos-fimc-lite" #define FLITE_CLK_NAME "flite" -#define FIMC_LITE_MAX_DEVS 2 +#define FIMC_LITE_MAX_DEVS 3 #define FLITE_REQ_BUFS_MIN 2 /* Bit index definitions for struct fimc_lite::state */ @@ -54,6 +54,8 @@ struct flite_drvdata { unsigned short out_width_align; unsigned short win_hor_offs_align; unsigned short out_hor_offs_align; + unsigned short support_multi_dma_buf; + unsigned short num_devs; }; #define fimc_lite_get_drvdata(_pdev) \