From patchwork Wed May 1 19:02:26 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Figa X-Patchwork-Id: 2508721 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 6D643DF230 for ; Wed, 1 May 2013 19:04:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 60814E62A6 for ; Wed, 1 May 2013 12:04:58 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ea0-f181.google.com (mail-ea0-f181.google.com [209.85.215.181]) by gabe.freedesktop.org (Postfix) with ESMTP id 2ADF9E62AF for ; Wed, 1 May 2013 12:02:40 -0700 (PDT) Received: by mail-ea0-f181.google.com with SMTP id a11so754152eae.12 for ; Wed, 01 May 2013 12:02:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=v7YCwTkM7g/ISSoNX/Vi4XT5qiofWAoXCIdSwVegvLo=; b=hQlY/f6n/1jnk5ug3k25oFBdxPLIttdhVHjy3K2vO4HsDyyuHrLneoDloIk866Pc19 YS+ulLVNx11hhTP1juBMl8X1/0i99wirXXhQWFfxWve4lT2gofjuv+QyuZaV47/7WOhm kv8Fh9O8uUO8iZO1Cd9TeKbbbnSLGRK/ZTXfYbNlL9ANlvQ/O2igT5MtuBkFz69T3ObV v9nW3M5JxGvz12GEX6CSTghbcApyVx8KGiJ6AsbwVux4LQkblSvh83m9uNSisoB4NZLv ihnmWaM5F9ZPHckHhCkUGt8bnJTtMSoYYztj+4h7VAcaZLGcgNCVl1A2iSyjljhV83Au n22Q== X-Received: by 10.14.100.1 with SMTP id y1mr11484603eef.9.1367434960333; Wed, 01 May 2013 12:02:40 -0700 (PDT) Received: from flatron.tomeq (87-207-52-162.dynamic.chello.pl. [87.207.52.162]) by mx.google.com with ESMTPSA id cb50sm5126987eeb.14.2013.05.01.12.02.38 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 01 May 2013 12:02:39 -0700 (PDT) From: Tomasz Figa To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/4] drm/exynos: fimd: Hold pointer to driver data in context struct Date: Wed, 1 May 2013 21:02:26 +0200 Message-Id: <1367434949-14838-2-git-send-email-tomasz.figa@gmail.com> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1367434949-14838-1-git-send-email-tomasz.figa@gmail.com> References: <1367434949-14838-1-git-send-email-tomasz.figa@gmail.com> Cc: linux-samsung-soc@vger.kernel.org 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 pointer to driver data to fimd_context structure, to remove the need to call drm_fimd_get_driver_data() each time access to driver data is necessary. Signed-off-by: Tomasz Figa --- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index 746b282..264434f 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c @@ -107,6 +107,7 @@ struct fimd_context { atomic_t wait_vsync_event; struct exynos_drm_panel_info *panel; + struct fimd_driver_data *driver_data; }; #ifdef CONFIG_OF @@ -239,10 +240,9 @@ static void fimd_commit(struct device *dev) struct exynos_drm_panel_info *panel = ctx->panel; struct fb_videomode *timing = &panel->timing; struct fimd_driver_data *driver_data; - struct platform_device *pdev = to_platform_device(dev); u32 val; - driver_data = drm_fimd_get_driver_data(pdev); + driver_data = ctx->driver_data; if (ctx->suspended) return; @@ -949,6 +949,7 @@ static int fimd_probe(struct platform_device *pdev) return ret; } + ctx->driver_data = drm_fimd_get_driver_data(pdev); ctx->vidcon0 = pdata->vidcon0; ctx->vidcon1 = pdata->vidcon1; ctx->default_win = pdata->default_win;