From patchwork Fri Oct 11 00:30:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 3019761 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id F3E7DBF924 for ; Fri, 11 Oct 2013 00:41:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 08B6F20254 for ; Fri, 11 Oct 2013 00:41:56 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 1211C20253 for ; Fri, 11 Oct 2013 00:41:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 062B2E7B42 for ; Thu, 10 Oct 2013 17:41:55 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ie0-f182.google.com (mail-ie0-f182.google.com [209.85.223.182]) by gabe.freedesktop.org (Postfix) with ESMTP id D86EBE763F for ; Thu, 10 Oct 2013 17:31:04 -0700 (PDT) Received: by mail-ie0-f182.google.com with SMTP id as1so5345601iec.27 for ; Thu, 10 Oct 2013 17:31:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=3BL7Y77GseJEa7QDCXfmrKvFOPWTODlkseZ7oXf1X1c=; b=QRowWrjYTQBvk3umyb5WW/D1ARz2eqFdcJ4DwnExAPYAVc3GOr0lGqgE92Q3B3a6bK tWX31Jv5LpXgwzvMH+Z+yT7W0RqDfbFaMH7NDaU9LoqfJvWWkXCiXaGlQV7Bk1o/CDNR NUNZ18uFoD2rrlZaEp6MvJ0NP/e7BK0n1faP0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=3BL7Y77GseJEa7QDCXfmrKvFOPWTODlkseZ7oXf1X1c=; b=dEZWWayUmUOa96OlLO4LQEYso1crbSLaLik8DCc+Ighwwhb0x2EISgQ6ZR2/pl9Ehx 1Qn3MJDB5f5LCj5ZlbiPHJKcsrTsZTa/41Wp+6dolDgai30yuyZYFetXhV8l2GRBAKya yQduF3Z24tJpaklp4gsKyct0qLz9Jt2hiKKLMCga2p1qfqzauxVL2aw2XUJakn3dIcpc R+Dv36dlaG71UQd01kGHJRdfMuJIzBnTDN1X2X1R3TBpPDfSdohb+hjrL6ShiszSBObL gvaVrqvXP9BG3somxu9eRSUFowWkP2aMAfPBqbBkIRVIJr+zwf5eKgQNNpYjjsWV/obb mXMg== X-Gm-Message-State: ALoCoQmQHrmuraQ2nwx1plm20ud1Dx/veimS1ufnDNhmarBhYfXOZvJ0DEOqJJhECra+5MdQANep X-Received: by 10.50.55.40 with SMTP id o8mr665921igp.25.1381451464352; Thu, 10 Oct 2013 17:31:04 -0700 (PDT) Received: from seanpaul-glaptop.corp.google.com (dhcp-172-19-29-233.mtv.corp.google.com [172.19.29.233]) by mx.google.com with ESMTPSA id p7sm420421iga.3.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Oct 2013 17:31:03 -0700 (PDT) From: Sean Paul To: dri-devel@lists.freedesktop.org, inki.dae@samsung.com Subject: [PATCH 09/23] drm/exynos: Rename display_op power_on to dpms Date: Thu, 10 Oct 2013 20:30:22 -0400 Message-Id: <1381451436-10089-10-git-send-email-seanpaul@chromium.org> X-Mailer: git-send-email 1.8.4 In-Reply-To: <1381451436-10089-1-git-send-email-seanpaul@chromium.org> References: <1381451436-10089-1-git-send-email-seanpaul@chromium.org> Cc: marcheu@chromium.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 X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch renames the display_op power_on to dpms to accurately reflect what the function does. The side-effect of this patch is that the new hdmi dpms callback is now invoked twice in the dpms path. This is safe and will be dealt with when the exynos_drm shim goes away. Signed-off-by: Sean Paul --- drivers/gpu/drm/exynos/exynos_drm_drv.h | 4 ++-- drivers/gpu/drm/exynos/exynos_drm_encoder.c | 4 ++-- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 8 -------- drivers/gpu/drm/exynos/exynos_drm_hdmi.c | 10 ++++------ drivers/gpu/drm/exynos/exynos_drm_hdmi.h | 3 +-- drivers/gpu/drm/exynos/exynos_drm_vidi.c | 8 -------- drivers/gpu/drm/exynos/exynos_hdmi.c | 2 +- 7 files changed, 10 insertions(+), 29 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h b/drivers/gpu/drm/exynos/exynos_drm_drv.h index cbf8fcf..be3d352 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.h +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h @@ -128,7 +128,7 @@ struct exynos_drm_overlay { * @get_edid: get edid modes from display driver. * @get_panel: get panel object from display driver. * @check_mode: check if mode is valid or not. - * @power_on: display device on or off. + * @dpms: display device on or off. */ struct exynos_drm_display_ops { enum exynos_drm_output_type type; @@ -137,7 +137,7 @@ struct exynos_drm_display_ops { struct edid *(*get_edid)(void *ctx, struct drm_connector *connector); void *(*get_panel)(void *ctx); int (*check_mode)(void *ctx, struct drm_display_mode *mode); - int (*power_on)(void *ctx, int mode); + void (*dpms)(void *ctx, int mode); }; /* diff --git a/drivers/gpu/drm/exynos/exynos_drm_encoder.c b/drivers/gpu/drm/exynos/exynos_drm_encoder.c index f701d3e..7206114 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_encoder.c +++ b/drivers/gpu/drm/exynos/exynos_drm_encoder.c @@ -51,8 +51,8 @@ static void exynos_drm_encoder_dpms(struct drm_encoder *encoder, int mode) return; } - if (display_ops && display_ops->power_on) - display_ops->power_on(manager->ctx, mode); + if (display_ops && display_ops->dpms) + display_ops->dpms(manager->ctx, mode); exynos_encoder->dpms = mode; } diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index a8f9772..838c47d 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c @@ -168,19 +168,11 @@ static int fimd_check_mode(void *in_ctx, struct drm_display_mode *mode) return 0; } -static int fimd_display_power_on(void *in_ctx, int mode) -{ - /* TODO */ - - return 0; -} - static struct exynos_drm_display_ops fimd_display_ops = { .type = EXYNOS_DISPLAY_TYPE_LCD, .is_connected = fimd_display_is_connected, .get_panel = fimd_get_panel, .check_mode = fimd_check_mode, - .power_on = fimd_display_power_on, }; static void fimd_win_mode_set(void *in_ctx, struct exynos_drm_overlay *overlay) diff --git a/drivers/gpu/drm/exynos/exynos_drm_hdmi.c b/drivers/gpu/drm/exynos/exynos_drm_hdmi.c index 689758d..8173e44 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_hdmi.c @@ -151,14 +151,12 @@ static int drm_hdmi_check_mode(void *in_ctx, struct drm_display_mode *mode) return 0; } -static int drm_hdmi_power_on(void *in_ctx, int mode) +static void drm_hdmi_display_dpms(void *in_ctx, int mode) { struct drm_hdmi_context *ctx = in_ctx; - if (hdmi_ops && hdmi_ops->power_on) - return hdmi_ops->power_on(ctx->hdmi_ctx->ctx, mode); - - return 0; + if (hdmi_ops && hdmi_ops->dpms) + hdmi_ops->dpms(ctx->hdmi_ctx->ctx, mode); } static struct exynos_drm_display_ops drm_hdmi_display_ops = { @@ -167,7 +165,7 @@ static struct exynos_drm_display_ops drm_hdmi_display_ops = { .is_connected = drm_hdmi_is_connected, .get_edid = drm_hdmi_get_edid, .check_mode = drm_hdmi_check_mode, - .power_on = drm_hdmi_power_on, + .dpms = drm_hdmi_display_dpms, }; static int drm_hdmi_enable_vblank(void *in_ctx) diff --git a/drivers/gpu/drm/exynos/exynos_drm_hdmi.h b/drivers/gpu/drm/exynos/exynos_drm_hdmi.h index cf7b1da..923239b 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_hdmi.h +++ b/drivers/gpu/drm/exynos/exynos_drm_hdmi.h @@ -33,14 +33,13 @@ struct exynos_hdmi_ops { struct edid *(*get_edid)(void *ctx, struct drm_connector *connector); int (*check_mode)(void *ctx, struct drm_display_mode *mode); - int (*power_on)(void *ctx, int mode); + void (*dpms)(void *ctx, int mode); /* manager */ void (*mode_set)(void *ctx, struct drm_display_mode *mode); void (*get_max_resol)(void *ctx, unsigned int *width, unsigned int *height); void (*commit)(void *ctx); - void (*dpms)(void *ctx, int mode); }; struct exynos_mixer_ops { diff --git a/drivers/gpu/drm/exynos/exynos_drm_vidi.c b/drivers/gpu/drm/exynos/exynos_drm_vidi.c index 1220937..35ee49b 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_vidi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_vidi.c @@ -135,20 +135,12 @@ static int vidi_check_mode(void *in_ctx, struct drm_display_mode *mode) return 0; } -static int vidi_display_power_on(void *in_ctx, int mode) -{ - /* TODO */ - - return 0; -} - static struct exynos_drm_display_ops vidi_display_ops = { .type = EXYNOS_DISPLAY_TYPE_VIDI, .is_connected = vidi_display_is_connected, .get_edid = vidi_get_edid, .get_panel = vidi_get_panel, .check_mode = vidi_check_mode, - .power_on = vidi_display_power_on, }; static void vidi_dpms(void *in_ctx, int mode) diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index a3fba8e..037c6fe 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -1760,12 +1760,12 @@ static struct exynos_hdmi_ops hdmi_ops = { .is_connected = hdmi_is_connected, .get_edid = hdmi_get_edid, .check_mode = hdmi_check_mode, + .dpms = hdmi_dpms, /* manager */ .mode_set = hdmi_mode_set, .get_max_resol = hdmi_get_max_resol, .commit = hdmi_commit, - .dpms = hdmi_dpms, }; static irqreturn_t hdmi_irq_thread(int irq, void *arg)