From patchwork Fri Aug 17 09:50:57 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inki Dae X-Patchwork-Id: 1338341 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 3D36B3FC81 for ; Fri, 17 Aug 2012 10:01:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 29005A0E1F for ; Fri, 17 Aug 2012 03:01:04 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) by gabe.freedesktop.org (Postfix) with ESMTP id 81A4FA0E13 for ; Fri, 17 Aug 2012 02:51:07 -0700 (PDT) Received: from epcpsbgm1.samsung.com (mailout4.samsung.com [203.254.224.34]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0M8W00CDO8OS0300@mailout4.samsung.com> for dri-devel@lists.freedesktop.org; Fri, 17 Aug 2012 18:51:04 +0900 (KST) X-AuditID: cbfee61a-b7fc66d0000043b7-9a-502e14070eb8 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 3F.04.17335.7041E205; Fri, 17 Aug 2012 18:51:04 +0900 (KST) Received: from daeinki-desktop.10.32.193.11 ([10.90.51.53]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0M8W005HH8OZZTB0@mmp2.samsung.com> for dri-devel@lists.freedesktop.org; Fri, 17 Aug 2012 18:51:03 +0900 (KST) From: Inki Dae To: airlied@linux.ie, dri-devel@lists.freedesktop.org Subject: [PATCH 11/13] drm/exynos: changed context name of hdmi and mixer Date: Fri, 17 Aug 2012 18:50:57 +0900 Message-id: <1345197059-25583-12-git-send-email-inki.dae@samsung.com> X-Mailer: git-send-email 1.7.4.1 In-reply-to: <1345197059-25583-1-git-send-email-inki.dae@samsung.com> References: <1345197059-25583-1-git-send-email-inki.dae@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrMJMWRmVeSWpSXmKPExsVy+t9jQV0OEb0Agyk72SyufH3P5sDocb/7 OFMAYxSXTUpqTmZZapG+XQJXxoydX1kKNgdVtHzvZG1g3OHaxcjJISFgIjH/cD8LhC0mceHe erYuRi4OIYHpjBIXL65mh3DWM0lM+rOcFaSKTUBVYuKK+2wgtoiAqUTHpKVg3cwChRILe56C 2cICnhKbVjxlBrFZgOpnvfvLBGLzCrhKPFw2D2qbgsSCe2/B5nACxe8unwxWIyTgItG4uYd1 AiPvAkaGVYyiqQXJBcVJ6bmGesWJucWleel6yfm5mxjBXn8mtYNxZYPFIUYBDkYlHl6BIt0A IdbEsuLK3EOMEhzMSiK8Kz4ChXhTEiurUovy44tKc1KLDzFKc7AoifN6/QdKCaQnlqRmp6YW pBbBZJk4OKUaGC3a/H/eMlp+6eLGzxeLpyj1SUdN3bDh/tJPm7VX10/o/GNT425TOsmLXb7k 0vQLzGpv31THrc1euebRFlvBwrW7TStYTp1X2rn+hFT8n2SD+0fyZV9u97j4wOzF1z3yhYV/ PuRrbQxvsDH89ij98n+GF/FWb+Ma32t4GpypUKi8rb/ibaznuiAlluKMREMt5qLiRADaLoDO 9gEAAA== X-TM-AS-MML: No Cc: kyungmin.park@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 changes ctx variable name in exynos_drm_hdmi_context structure to client because the use of ctx variable makes it confused. Signed-off-by: Inki Dae Signed-off-by: Kyungmin Park --- drivers/gpu/drm/exynos/exynos_drm_hdmi.c | 38 +++++++++++++++--------------- drivers/gpu/drm/exynos/exynos_drm_hdmi.h | 4 +- drivers/gpu/drm/exynos/exynos_hdmi.c | 12 ++++---- drivers/gpu/drm/exynos/exynos_mixer.c | 8 +++--- 4 files changed, 31 insertions(+), 31 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_hdmi.c b/drivers/gpu/drm/exynos/exynos_drm_hdmi.c index 3fdf0b6..bced38e 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_hdmi.c @@ -64,7 +64,7 @@ static bool drm_hdmi_is_connected(struct device *dev) DRM_DEBUG_KMS("%s\n", __FILE__); if (hdmi_ops && hdmi_ops->is_connected) - return hdmi_ops->is_connected(ctx->hdmi_ctx->ctx); + return hdmi_ops->is_connected(ctx->hdmi_ctx->client); return false; } @@ -77,8 +77,8 @@ static int drm_hdmi_get_edid(struct device *dev, DRM_DEBUG_KMS("%s\n", __FILE__); if (hdmi_ops && hdmi_ops->get_edid) - return hdmi_ops->get_edid(ctx->hdmi_ctx->ctx, connector, edid, - len); + return hdmi_ops->get_edid(ctx->hdmi_ctx->client, connector, + edid, len); return 0; } @@ -90,7 +90,7 @@ static int drm_hdmi_check_timing(struct device *dev, void *timing) DRM_DEBUG_KMS("%s\n", __FILE__); if (hdmi_ops && hdmi_ops->check_timing) - return hdmi_ops->check_timing(ctx->hdmi_ctx->ctx, timing); + return hdmi_ops->check_timing(ctx->hdmi_ctx->client, timing); return 0; } @@ -102,7 +102,7 @@ static int drm_hdmi_power_on(struct device *dev, int mode) DRM_DEBUG_KMS("%s\n", __FILE__); if (hdmi_ops && hdmi_ops->power_on) - return hdmi_ops->power_on(ctx->hdmi_ctx->ctx, mode); + return hdmi_ops->power_on(ctx->hdmi_ctx->client, mode); return 0; } @@ -124,7 +124,7 @@ static int drm_hdmi_enable_vblank(struct device *subdrv_dev) DRM_DEBUG_KMS("%s\n", __FILE__); if (mixer_ops && mixer_ops->enable_vblank) - return mixer_ops->enable_vblank(ctx->mixer_ctx->ctx, + return mixer_ops->enable_vblank(ctx->mixer_ctx->client, manager->pipe); return 0; @@ -137,12 +137,12 @@ static void drm_hdmi_disable_vblank(struct device *subdrv_dev) DRM_DEBUG_KMS("%s\n", __FILE__); if (mixer_ops && mixer_ops->disable_vblank) - return mixer_ops->disable_vblank(ctx->mixer_ctx->ctx); + return mixer_ops->disable_vblank(ctx->mixer_ctx->client); } static void drm_hdmi_mode_fixup(struct device *subdrv_dev, struct drm_connector *connector, - const struct drm_display_mode *mode, + struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode) { struct drm_hdmi_context *ctx = to_context(subdrv_dev); @@ -150,7 +150,7 @@ static void drm_hdmi_mode_fixup(struct device *subdrv_dev, DRM_DEBUG_KMS("%s\n", __FILE__); if (hdmi_ops && hdmi_ops->mode_fixup) - hdmi_ops->mode_fixup(ctx->hdmi_ctx->ctx, connector, mode, + hdmi_ops->mode_fixup(ctx->hdmi_ctx->client, connector, mode, adjusted_mode); } @@ -161,7 +161,7 @@ static void drm_hdmi_mode_set(struct device *subdrv_dev, void *mode) DRM_DEBUG_KMS("%s\n", __FILE__); if (hdmi_ops && hdmi_ops->mode_set) - hdmi_ops->mode_set(ctx->hdmi_ctx->ctx, mode); + hdmi_ops->mode_set(ctx->hdmi_ctx->client, mode); } static void drm_hdmi_get_max_resol(struct device *subdrv_dev, @@ -172,7 +172,7 @@ static void drm_hdmi_get_max_resol(struct device *subdrv_dev, DRM_DEBUG_KMS("%s\n", __FILE__); if (hdmi_ops && hdmi_ops->get_max_resol) - hdmi_ops->get_max_resol(ctx->hdmi_ctx->ctx, width, height); + hdmi_ops->get_max_resol(ctx->hdmi_ctx->client, width, height); } static void drm_hdmi_commit(struct device *subdrv_dev) @@ -182,7 +182,7 @@ static void drm_hdmi_commit(struct device *subdrv_dev) DRM_DEBUG_KMS("%s\n", __FILE__); if (hdmi_ops && hdmi_ops->commit) - hdmi_ops->commit(ctx->hdmi_ctx->ctx); + hdmi_ops->commit(ctx->hdmi_ctx->client); } static void drm_hdmi_dpms(struct device *subdrv_dev, int mode) @@ -192,10 +192,10 @@ static void drm_hdmi_dpms(struct device *subdrv_dev, int mode) DRM_DEBUG_KMS("%s\n", __FILE__); if (mixer_ops && mixer_ops->dpms) - mixer_ops->dpms(ctx->mixer_ctx->ctx, mode); + mixer_ops->dpms(ctx->mixer_ctx->client, mode); if (hdmi_ops && hdmi_ops->dpms) - hdmi_ops->dpms(ctx->hdmi_ctx->ctx, mode); + hdmi_ops->dpms(ctx->hdmi_ctx->client, mode); } static void drm_hdmi_apply(struct device *subdrv_dev) @@ -209,11 +209,11 @@ static void drm_hdmi_apply(struct device *subdrv_dev) if (!ctx->enabled[i]) continue; if (mixer_ops && mixer_ops->win_commit) - mixer_ops->win_commit(ctx->mixer_ctx->ctx, i); + mixer_ops->win_commit(ctx->mixer_ctx->client, i); } if (hdmi_ops && hdmi_ops->commit) - hdmi_ops->commit(ctx->hdmi_ctx->ctx); + hdmi_ops->commit(ctx->hdmi_ctx->client); } static struct exynos_drm_manager_ops drm_hdmi_manager_ops = { @@ -235,7 +235,7 @@ static void drm_mixer_mode_set(struct device *subdrv_dev, DRM_DEBUG_KMS("%s\n", __FILE__); if (mixer_ops && mixer_ops->win_mode_set) - mixer_ops->win_mode_set(ctx->mixer_ctx->ctx, overlay); + mixer_ops->win_mode_set(ctx->mixer_ctx->client, overlay); } static void drm_mixer_commit(struct device *subdrv_dev, int zpos) @@ -251,7 +251,7 @@ static void drm_mixer_commit(struct device *subdrv_dev, int zpos) } if (mixer_ops && mixer_ops->win_commit) - mixer_ops->win_commit(ctx->mixer_ctx->ctx, win); + mixer_ops->win_commit(ctx->mixer_ctx->client, win); ctx->enabled[win] = true; } @@ -269,7 +269,7 @@ static void drm_mixer_disable(struct device *subdrv_dev, int zpos) } if (mixer_ops && mixer_ops->win_disable) - mixer_ops->win_disable(ctx->mixer_ctx->ctx, win); + mixer_ops->win_disable(ctx->mixer_ctx->client, win); ctx->enabled[win] = false; } diff --git a/drivers/gpu/drm/exynos/exynos_drm_hdmi.h b/drivers/gpu/drm/exynos/exynos_drm_hdmi.h index a91c420..237434d 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_hdmi.h +++ b/drivers/gpu/drm/exynos/exynos_drm_hdmi.h @@ -33,12 +33,12 @@ * exynos hdmi common context structure. * * @drm_dev: pointer to drm_device. - * @ctx: pointer to the context of specific device driver. + * @client: pointer to the context of specific device driver. * this context should be hdmi_context or mixer_context. */ struct exynos_drm_hdmi_context { struct drm_device *drm_dev; - void *ctx; + void *client; }; struct exynos_hdmi_ops { diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index bb504cb..7538489 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -2108,7 +2108,7 @@ static struct exynos_hdmi_ops hdmi_ops = { static irqreturn_t hdmi_external_irq_thread(int irq, void *arg) { struct exynos_drm_hdmi_context *ctx = arg; - struct hdmi_context *hdata = ctx->ctx; + struct hdmi_context *hdata = ctx->client; if (!hdata->get_hpd) goto out; @@ -2127,7 +2127,7 @@ out: static irqreturn_t hdmi_internal_irq_thread(int irq, void *arg) { struct exynos_drm_hdmi_context *ctx = arg; - struct hdmi_context *hdata = ctx->ctx; + struct hdmi_context *hdata = ctx->client; u32 intc_flag; intc_flag = hdmi_reg_read(hdata, HDMI_INTC_FLAG); @@ -2295,7 +2295,7 @@ static int __devinit hdmi_probe(struct platform_device *pdev) mutex_init(&hdata->hdmi_mutex); - drm_hdmi_ctx->ctx = (void *)hdata; + drm_hdmi_ctx->client = (void *)hdata; hdata->parent_ctx = (void *)drm_hdmi_ctx; platform_set_drvdata(pdev, drm_hdmi_ctx); @@ -2395,7 +2395,7 @@ static int __devexit hdmi_remove(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct exynos_drm_hdmi_context *ctx = platform_get_drvdata(pdev); - struct hdmi_context *hdata = ctx->ctx; + struct hdmi_context *hdata = ctx->client; DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__); @@ -2417,7 +2417,7 @@ static int __devexit hdmi_remove(struct platform_device *pdev) static int hdmi_suspend(struct device *dev) { struct exynos_drm_hdmi_context *ctx = get_hdmi_context(dev); - struct hdmi_context *hdata = ctx->ctx; + struct hdmi_context *hdata = ctx->client; disable_irq(hdata->internal_irq); disable_irq(hdata->external_irq); @@ -2434,7 +2434,7 @@ static int hdmi_suspend(struct device *dev) static int hdmi_resume(struct device *dev) { struct exynos_drm_hdmi_context *ctx = get_hdmi_context(dev); - struct hdmi_context *hdata = ctx->ctx; + struct hdmi_context *hdata = ctx->client; enable_irq(hdata->external_irq); enable_irq(hdata->internal_irq); diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c index 30fcc12..d3ff595 100644 --- a/drivers/gpu/drm/exynos/exynos_mixer.c +++ b/drivers/gpu/drm/exynos/exynos_mixer.c @@ -864,7 +864,7 @@ static void mixer_finish_pageflip(struct drm_device *drm_dev, int crtc) static irqreturn_t mixer_irq_handler(int irq, void *arg) { struct exynos_drm_hdmi_context *drm_hdmi_ctx = arg; - struct mixer_context *ctx = drm_hdmi_ctx->ctx; + struct mixer_context *ctx = drm_hdmi_ctx->client; struct mixer_resources *res = &ctx->mixer_res; u32 val, base, shadow; @@ -909,7 +909,7 @@ out: static int __devinit mixer_resources_init(struct exynos_drm_hdmi_context *ctx, struct platform_device *pdev) { - struct mixer_context *mixer_ctx = ctx->ctx; + struct mixer_context *mixer_ctx = ctx->client; struct device *dev = &pdev->dev; struct mixer_resources *mixer_res = &mixer_ctx->mixer_res; struct resource *res; @@ -1035,7 +1035,7 @@ static int __devinit mixer_probe(struct platform_device *pdev) mutex_init(&ctx->mixer_mutex); ctx->dev = &pdev->dev; - drm_hdmi_ctx->ctx = (void *)ctx; + drm_hdmi_ctx->client = (void *)ctx; platform_set_drvdata(pdev, drm_hdmi_ctx); @@ -1070,7 +1070,7 @@ static int mixer_remove(struct platform_device *pdev) static int mixer_suspend(struct device *dev) { struct exynos_drm_hdmi_context *drm_hdmi_ctx = get_mixer_context(dev); - struct mixer_context *ctx = drm_hdmi_ctx->ctx; + struct mixer_context *ctx = drm_hdmi_ctx->client; mixer_poweroff(ctx);