From patchwork Wed Oct 16 19:26:39 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 3057341 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E1EF39F2B7 for ; Wed, 16 Oct 2013 20:42:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E52C720489 for ; Wed, 16 Oct 2013 20:42:58 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id A53BC2024C for ; Wed, 16 Oct 2013 20:42:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 98072E77CB for ; Wed, 16 Oct 2013 13:42:57 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qc0-f177.google.com (mail-qc0-f177.google.com [209.85.216.177]) by gabe.freedesktop.org (Postfix) with ESMTP id B89A3E77B0 for ; Wed, 16 Oct 2013 12:27:22 -0700 (PDT) Received: by mail-qc0-f177.google.com with SMTP id u18so857284qcx.8 for ; Wed, 16 Oct 2013 12:27:21 -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=ossT1Hh01e5riMbBeBaV1CrVRxFVAIGcnsJAul/YYEI=; b=aJuQxOo2vaVYPb9O9GhvMt1lMYbFu8mFhcEpKhY2jmOiTXfoY4heHBUrMBJ2l99zom UZPbwekcSvaNVsBKPDhudZRb70zQEhR6u7d5E3eWlDSVzTMW3ru0Xz+pRxdG6pItedjE on7ibCYjVjNprQe0NzRXoN36O5hE0+I9cCz/U= 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=ossT1Hh01e5riMbBeBaV1CrVRxFVAIGcnsJAul/YYEI=; b=MZ+BRlkBf4Ua4L/mwZR/cvefwLNbtrWAJ3JdgIvb92DFV/WWfLx/9ks/YNZ/AfbuOs hOZlK6HngxJ9FuOSFVS4kVA2weXQp5wbZ5AJpoiHGIeM826miik6piU0HJEvEv43xhmj IFQk+jOgUCcWJVOqlYwWHZyH+OQuZhcOD/KYkV3ueUP1CpKCFnT6psYVf3FHN+ifcCjq mb1jKMJdPf3bk4AcmM75ZxBUdP6RCy5zzYbd+dhIV2Wxihk3qMRFb03zAFnVRTKsBeH0 effASgRBmzTmsGgvzal66vq/u3ohVnL81PVJTesSJy3558ZIbDMHNd9RaGup2i2oEMTu 31Ew== X-Gm-Message-State: ALoCoQmIan3yYjAflcKdUPPnBk+LPJD+a6ufbCL0oUBYiaV0+pTDydEN6N7kVBgUSaJL5OMglcTZ X-Received: by 10.224.138.4 with SMTP id y4mr7033291qat.65.1381951641855; Wed, 16 Oct 2013 12:27:21 -0700 (PDT) Received: from seanpaul-glaptop.roam.corp.google.com (cpe-173-095-180-236.nc.res.rr.com. [173.95.180.236]) by mx.google.com with ESMTPSA id 4sm167771575qak.11.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 16 Oct 2013 12:27:21 -0700 (PDT) From: Sean Paul To: dri-devel@lists.freedesktop.org, inki.dae@samsung.com Subject: [PATCH v2 09/26] drm/exynos: Rename display_op power_on to dpms Date: Wed, 16 Oct 2013 15:26:39 -0400 Message-Id: <1381951616-12548-10-git-send-email-seanpaul@chromium.org> X-Mailer: git-send-email 1.8.4 In-Reply-To: <1381951616-12548-1-git-send-email-seanpaul@chromium.org> References: <1381951616-12548-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.6 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 --- Changes in v2: None 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 | 8 ++++---- 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(+), 27 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h b/drivers/gpu/drm/exynos/exynos_drm_drv.h index bff432a..e31c088 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; @@ -138,7 +138,7 @@ struct exynos_drm_display_ops { struct drm_connector *connector); void *(*get_panel)(struct device *dev); int (*check_mode)(struct device *dev, struct drm_display_mode *mode); - int (*power_on)(struct device *dev, int mode); + int (*dpms)(struct device *dev, int mode); }; /* diff --git a/drivers/gpu/drm/exynos/exynos_drm_encoder.c b/drivers/gpu/drm/exynos/exynos_drm_encoder.c index df4b2852..5bf1e1e 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_encoder.c +++ b/drivers/gpu/drm/exynos/exynos_drm_encoder.c @@ -50,8 +50,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 f0ac1d5..b980b05 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c @@ -169,19 +169,11 @@ static int fimd_check_mode(struct device *dev, struct drm_display_mode *mode) return 0; } -static int fimd_display_power_on(struct device *dev, 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(struct exynos_drm_manager *mgr, diff --git a/drivers/gpu/drm/exynos/exynos_drm_hdmi.c b/drivers/gpu/drm/exynos/exynos_drm_hdmi.c index c5de00a..f9a9324 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_hdmi.c @@ -159,12 +159,12 @@ static int drm_hdmi_check_mode(struct device *dev, return drm_hdmi_check_mode_ctx(ctx, mode); } -static int drm_hdmi_power_on(struct device *dev, int mode) +static int drm_hdmi_display_dpms(struct device *dev, int mode) { struct drm_hdmi_context *ctx = to_context(dev); - if (hdmi_ops && hdmi_ops->power_on) - return hdmi_ops->power_on(ctx->hdmi_ctx->ctx, mode); + if (hdmi_ops && hdmi_ops->dpms) + hdmi_ops->dpms(ctx->hdmi_ctx->ctx, mode); return 0; } @@ -175,7 +175,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(struct exynos_drm_manager *mgr) 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 a583a74..d734098 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_vidi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_vidi.c @@ -136,20 +136,12 @@ static int vidi_check_mode(struct device *dev, struct drm_display_mode *mode) return 0; } -static int vidi_display_power_on(struct device *dev, 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 94b1e0c..0b85c48 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -1761,12 +1761,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)