From patchwork Thu Jan 30 21:19:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 3559461 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 87F18C02DD for ; Thu, 30 Jan 2014 21:23:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C1D0720173 for ; Thu, 30 Jan 2014 21:22:59 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id F2EB120181 for ; Thu, 30 Jan 2014 21:22:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CBEA4FC906; Thu, 30 Jan 2014 13:22:54 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qa0-f46.google.com (mail-qa0-f46.google.com [209.85.216.46]) by gabe.freedesktop.org (Postfix) with ESMTP id 9F46945106 for ; Thu, 30 Jan 2014 13:20:09 -0800 (PST) Received: by mail-qa0-f46.google.com with SMTP id ii20so5078897qab.5 for ; Thu, 30 Jan 2014 13:20:09 -0800 (PST) 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=nPyXahJixc3GNx3qnymshy+eULGUrG12J6dVUK5ChY4=; b=aLJknsGshN/BJqS8I/MB2I0LZxnvi19OSNthLwY9QRLs2ya9o+xMg5ciCKgO35tk02 Fhg/O6dGPIVCiBwgHovdDLiOcrX3nuVP9xKWfiZI7a4rnKiiLgVnjtA/8Je0imRoqwAp 6xPFUyCff/QRxgYbdJf+upNdYcyMTpiT/YN0M= 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=nPyXahJixc3GNx3qnymshy+eULGUrG12J6dVUK5ChY4=; b=X+EwSxeDyQkjpkp2qffKN8Ec2IP4a5f3LIeEAHdBmkcWMqAHhIFbUiuC3uhVFGii3/ iW29VHV8G7YtJzEO0RttnxVXaA3o64zi1lp6Ny7SrwG8max+TQVYr38N296rauwlfX3P G0W1yFcTYQDDzrzDiPkUerr2QT6HtNrFQ1kBqd3UwZQbjm7Jf04MO2dzKsLNCJ5wbHsz qyY1kf+5MnyHnHX5+jm/0YPGfCJreIXwcJ1RmrpNPGe5fhBI7CejUpMz04CNLeIO1KwS Sc3K8cD+uanr3hY5QgpnDPw7Elnq8otNCt3LYwLIbZK87j9Eyz7DI5y6S4891z/y4eQA E10w== X-Gm-Message-State: ALoCoQlUhP4l9X+Fw/pVXQDrx8tKxfBTpaZ0bXHF3ZsP91jP005tN9Ezpr7FnjeiiinrWceGNo5Y X-Received: by 10.224.14.2 with SMTP id e2mr25475229qaa.73.1391116809107; Thu, 30 Jan 2014 13:20:09 -0800 (PST) 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 r13sm20673608qan.7.2014.01.30.13.20.07 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 30 Jan 2014 13:20:08 -0800 (PST) From: Sean Paul To: dri-devel@lists.freedesktop.org, inki.dae@samsung.com Subject: [PATCH v4 11/34] drm/exynos: Don't keep dpms state in encoder Date: Thu, 30 Jan 2014 16:19:10 -0500 Message-Id: <1391116773-28471-12-git-send-email-seanpaul@chromium.org> X-Mailer: git-send-email 1.8.5.1 In-Reply-To: <1391116773-28471-1-git-send-email-seanpaul@chromium.org> References: <1391116773-28471-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@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.5 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 Changes in v3: None Changes in v4: 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;