From patchwork Wed Oct 16 19:26:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 3057361 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 ABBD5BF924 for ; Wed, 16 Oct 2013 20:45:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8233720489 for ; Wed, 16 Oct 2013 20:45:13 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 9EEFF2024C for ; Wed, 16 Oct 2013 20:45:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9051CE782B for ; Wed, 16 Oct 2013 13:45:12 -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 D7031E77B3 for ; Wed, 16 Oct 2013 12:27:24 -0700 (PDT) Received: by mail-qc0-f177.google.com with SMTP id u18so857316qcx.8 for ; Wed, 16 Oct 2013 12:27:24 -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=d1wJskMx8eqt8UWllcP6zWUw6B8XP1LF4kouycEGn9I=; b=cJu2NZynfZyDqCYIDX/Ur36rgm8W88nueb0dM18QAuEibO6FL3G/Lp5DbzQ5kr6iRz B0q1EsetNlPV4vYfmq1Se+lLEHxNcbqz+9XhNRA1MAE6lTt6cvdLWbDO29DnSuY80OMm VtYZ31pkFiz1N2b/svRWXQuxzpBlwWCd2rHrg= 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=d1wJskMx8eqt8UWllcP6zWUw6B8XP1LF4kouycEGn9I=; b=MCitb1JctSyOW7qNkYSx8wv7K8QF5OSVwDYUtIFFE0I9K10ihSsAqxJ2OUZUh1yyji 3o7ne9b1DWAK7s7XTAnTbFvW3inFMGq8xlx/50gTPHUettLyIoQB0w4CLwQK0ks26mk3 3PoHLaYng8Yia/y08NKebMHf+QuFtFvCNXwhH8bHHqyof6yNzcvjJlWkWYA1XwBJ2HBQ PSh0E4nAWpbvZkrdWKmv4RsDxrE1d4/epqVlgrS2j1dcoQy1wTw35fwW9eTl43lB4llD B4x2kYLRXMGH+DNxF+sHXqn3aezOBZPPltfVXEZHNozEkqjrS6DRhokDaHIqVfpoBOAa tMLQ== X-Gm-Message-State: ALoCoQmSCUH2e60lI/4R39dR5SGeExLVdf12i3YxlKyf6gBa0GNXmYJOtcRUyuZ5dCy29Ilxh0ts X-Received: by 10.49.41.3 with SMTP id b3mr6074557qel.51.1381951644375; Wed, 16 Oct 2013 12:27:24 -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:23 -0700 (PDT) From: Sean Paul To: dri-devel@lists.freedesktop.org, inki.dae@samsung.com Subject: [PATCH v2 10/26] drm/exynos: Don't keep dpms state in encoder Date: Wed, 16 Oct 2013 15:26:40 -0400 Message-Id: <1381951616-12548-11-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 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 --- Changes in v2: None drivers/gpu/drm/exynos/exynos_drm_encoder.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_encoder.c b/drivers/gpu/drm/exynos/exynos_drm_encoder.c index 5bf1e1e..a823d53 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_encoder.c +++ b/drivers/gpu/drm/exynos/exynos_drm_encoder.c @@ -28,32 +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 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 @@ -157,12 +147,6 @@ static void exynos_drm_encoder_commit(struct drm_encoder *encoder) if (manager_ops && manager_ops->commit) manager_ops->commit(manager); - - /* - * 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) @@ -281,7 +265,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;