From patchwork Fri Oct 11 00:30:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 3019771 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 082489F1E1 for ; Fri, 11 Oct 2013 00:42:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3E39520255 for ; Fri, 11 Oct 2013 00:42:49 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 559E420254 for ; Fri, 11 Oct 2013 00:42:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 497A4E62E5 for ; Thu, 10 Oct 2013 17:42:48 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ie0-f178.google.com (mail-ie0-f178.google.com [209.85.223.178]) by gabe.freedesktop.org (Postfix) with ESMTP id 2829EE74ED for ; Thu, 10 Oct 2013 17:31:06 -0700 (PDT) Received: by mail-ie0-f178.google.com with SMTP id to1so6935395ieb.9 for ; Thu, 10 Oct 2013 17:31:05 -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=tGbtY0OFK4eFgqgWD5QM/+jv0WDUNpU4oUmR6PV4IdE=; b=gJNvI6MvmpxesRoAzX1dFGEVSCLJFOUT41ePggZ7yHjsAQFYrsdQg85JDmo1qslF8h VHm6u5n+sO4XF18ssOaawsHRGUc8k8+7OT3zk+91oI9uLQhNnrWMPEuzvFeZFT0LAB0S nrSP5WOPbn2P4aynFn90Xb3O2vkL498oqeOqw= 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=tGbtY0OFK4eFgqgWD5QM/+jv0WDUNpU4oUmR6PV4IdE=; b=NS4RvvenOgbY7hrOOkzdhWqAaxgERNGKHjThYACi87lSbCLdpaepRf5vBao0sgx1TR nTxAzSalQzLz/LvHAreltEpaLTZMdWjtWIh5wpqseVmHPTjPaacb2hO/emHNbYmx/l7d cssfBERPiyojHvu0FuKK0DfMr3YCNrfefufxHfEAUg75BKEOJxGbf7lKnb4whRntd4Ld +CSpJb28zBClG4GNcBgeoRFqGpAkJ1wNQdBWI9zK0+Y7LN4TN0UuSkacoHPvn3gwFXh4 J0o5f3ZR0NNlWB4Jh8fLR37tIBwryMmjrBBxIkeXeQIkx2a0ZxLM456c+Gzyu/LHhhAs O8wg== X-Gm-Message-State: ALoCoQlC6PIdv/TZSuX3te8+C8jI5SHC+XEqWBlnbcfKulfHCC6Baw+1t9BUZX04I4R/4YCBaraQ X-Received: by 10.50.7.101 with SMTP id i5mr711658iga.48.1381451465711; Thu, 10 Oct 2013 17:31:05 -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:05 -0700 (PDT) From: Sean Paul To: dri-devel@lists.freedesktop.org, inki.dae@samsung.com Subject: [PATCH 10/23] drm/exynos: Don't keep dpms state in encoder Date: Thu, 10 Oct 2013 20:30:23 -0400 Message-Id: <1381451436-10089-11-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 removes the dpms state tracking in encoder. This state is at best confusing and at worst incorrect since the display drivers can turn on and off without propagating the value. Signed-off-by: Sean Paul --- drivers/gpu/drm/exynos/exynos_drm_encoder.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_encoder.c b/drivers/gpu/drm/exynos/exynos_drm_encoder.c index 7206114..11d2567 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_encoder.c +++ b/drivers/gpu/drm/exynos/exynos_drm_encoder.c @@ -28,33 +28,22 @@ * @drm_encoder: encoder object. * @manager: specific encoder has its own manager to control a hardware * appropriately and we can access a hardware drawing on this manager. - * @dpms: store the encoder dpms value. */ struct exynos_drm_encoder { struct drm_crtc *old_crtc; struct drm_encoder drm_encoder; struct exynos_drm_manager *manager; - int dpms; }; static void exynos_drm_encoder_dpms(struct drm_encoder *encoder, int mode) { - struct drm_device *dev = encoder->dev; struct exynos_drm_manager *manager = exynos_drm_get_manager(encoder); - struct exynos_drm_encoder *exynos_encoder = to_exynos_encoder(encoder); struct exynos_drm_display_ops *display_ops = manager->display_ops; DRM_DEBUG_KMS("encoder dpms: %d\n", mode); - if (exynos_encoder->dpms == mode) { - DRM_DEBUG_KMS("desired dpms mode is same as previous one.\n"); - return; - } - if (display_ops && display_ops->dpms) display_ops->dpms(manager->ctx, mode); - - exynos_encoder->dpms = mode; } static bool @@ -159,12 +148,6 @@ static void exynos_drm_encoder_commit(struct drm_encoder *encoder) if (manager_ops && manager_ops->commit) manager_ops->commit(manager->ctx); - - /* - * In case of setcrtc, there is no way to update encoder's dpms - * so update it here. - */ - exynos_encoder->dpms = DRM_MODE_DPMS_ON; } void exynos_drm_encoder_complete_scanout(struct drm_framebuffer *fb) @@ -283,7 +266,6 @@ exynos_drm_encoder_create(struct drm_device *dev, if (!exynos_encoder) return NULL; - exynos_encoder->dpms = DRM_MODE_DPMS_OFF; exynos_encoder->manager = manager; encoder = &exynos_encoder->drm_encoder; encoder->possible_crtcs = possible_crtcs;