From patchwork Tue Oct 17 21:13:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10012871 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DFBE2600CC for ; Tue, 17 Oct 2017 21:14:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D251528A40 for ; Tue, 17 Oct 2017 21:14:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C71AA28A42; Tue, 17 Oct 2017 21:14:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7859B28A44 for ; Tue, 17 Oct 2017 21:14:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D42376E77B; Tue, 17 Oct 2017 21:13:59 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-it0-x22e.google.com (mail-it0-x22e.google.com [IPv6:2607:f8b0:4001:c0b::22e]) by gabe.freedesktop.org (Postfix) with ESMTPS id BD75E6E77B for ; Tue, 17 Oct 2017 21:13:58 +0000 (UTC) Received: by mail-it0-x22e.google.com with SMTP id c3so4229075itc.3 for ; Tue, 17 Oct 2017 14:13:58 -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=qJu7hAcG/xnTEdZR0hkrfJ6rsSAk2Z9Ii1hVahVySPc=; b=hkFxEtyjEHy0xPxqU2XjzHqEZjTQOctVHZd/XBakQTIkvyM8ncb7uhBXGffeHSG6OL Qa6EikZRzNCioYEK6D8h9sBRbhXNAHrrOntw3P7NtGoeds7wkUalWBmU96Obf2+SiLpq ej4W9/OxMwGX4gHKoDsrueYYflMTOlAQUUkPA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=qJu7hAcG/xnTEdZR0hkrfJ6rsSAk2Z9Ii1hVahVySPc=; b=Ih7UbbSdGZQ/934mZTlVx89b6R4AN87egpBDn/3n7/si9w/Q0muL6HLXcayiBN1KJE 7nHI03yIa69Ij0tpLZUaGZUv2pqoTmbNrcd3vdsfh5ToUDC/AHM/K8PKAh55rxz3iNHh SB7P9ihFO2j6evPIHULF+sYLk/IiUC+rVC0/fzmQW9wSkETZBAUE2IYtgwC9iovugR3t eh2zGvnc9SJHQhxialxYqGTZ8+Ez83FroxaOdhijkbJ8OgCK6jfqiYGv6OfG+cSkdy/S bph1+6xiyAXQ8hkLTSEA9IhOWbk71HT9A88VKW4Q/k+dXo7UQK0PpK52/FGN0DEmXKqh jNFQ== X-Gm-Message-State: AMCzsaU5C0enYDRLtPatvZVkzA8HhWdTNoCDQPJ6DGjwF8sN6zWc2Gkm TnSJbcKDlE+7ea5UYTla7x6Zq0DLL/8= X-Google-Smtp-Source: ABhQp+RAo/0LKSyNToZX+4RcR7lFe4mBpaaBrk2qORdilwgth2q5v5UMbyPq1vTS9FMJ6+zK/nP2Qg== X-Received: by 10.36.77.131 with SMTP id l125mr5915240itb.7.1508274837994; Tue, 17 Oct 2017 14:13:57 -0700 (PDT) Received: from rosewood.cam.corp.google.com ([2620:0:1013:0:f685:3152:9ba1:429a]) by smtp.gmail.com with ESMTPSA id f2sm5220677ioj.73.2017.10.17.14.13.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Oct 2017 14:13:57 -0700 (PDT) From: Sean Paul To: dri-devel@lists.freedesktop.org Subject: [PATCH v3 04/12] drm/panel: vvx10f034n00: Remove enabled/prepared state Date: Tue, 17 Oct 2017 17:13:07 -0400 Message-Id: <20171017211321.7992-5-seanpaul@chromium.org> X-Mailer: git-send-email 2.15.0.rc1.287.g2b38de12cc-goog In-Reply-To: <20171017211321.7992-1-seanpaul@chromium.org> References: <20171017211321.7992-1-seanpaul@chromium.org> Cc: thierry.reding@gmail.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP They're not necessary for atomic drivers, and drm_panel will WARN if the calls are unbalanced. Signed-off-by: Sean Paul --- No changes since v1 .../gpu/drm/panel/panel-panasonic-vvx10f034n00.c | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c b/drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c index 7f915f706fa6..e7efa097151c 100644 --- a/drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c +++ b/drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c @@ -44,9 +44,6 @@ struct wuxga_nt_panel { struct backlight_device *backlight; struct regulator *supply; - bool prepared; - bool enabled; - ktime_t earliest_wake; const struct drm_display_mode *mode; @@ -73,9 +70,6 @@ static int wuxga_nt_panel_disable(struct drm_panel *panel) { struct wuxga_nt_panel *wuxga_nt = to_wuxga_nt_panel(panel); - if (!wuxga_nt->enabled) - return 0; - mipi_dsi_shutdown_peripheral(wuxga_nt->dsi); if (wuxga_nt->backlight) { @@ -84,8 +78,6 @@ static int wuxga_nt_panel_disable(struct drm_panel *panel) backlight_update_status(wuxga_nt->backlight); } - wuxga_nt->enabled = false; - return 0; } @@ -93,12 +85,8 @@ static int wuxga_nt_panel_unprepare(struct drm_panel *panel) { struct wuxga_nt_panel *wuxga_nt = to_wuxga_nt_panel(panel); - if (!wuxga_nt->prepared) - return 0; - regulator_disable(wuxga_nt->supply); wuxga_nt->earliest_wake = ktime_add_ms(ktime_get_real(), MIN_POFF_MS); - wuxga_nt->prepared = false; return 0; } @@ -109,9 +97,6 @@ static int wuxga_nt_panel_prepare(struct drm_panel *panel) int ret; s64 enablewait; - if (wuxga_nt->prepared) - return 0; - /* * If the user re-enabled the panel before the required off-time then * we need to wait the remaining period before re-enabling regulator @@ -141,8 +126,6 @@ static int wuxga_nt_panel_prepare(struct drm_panel *panel) goto poweroff; } - wuxga_nt->prepared = true; - return 0; poweroff: @@ -155,17 +138,12 @@ static int wuxga_nt_panel_enable(struct drm_panel *panel) { struct wuxga_nt_panel *wuxga_nt = to_wuxga_nt_panel(panel); - if (wuxga_nt->enabled) - return 0; - if (wuxga_nt->backlight) { wuxga_nt->backlight->props.power = FB_BLANK_UNBLANK; wuxga_nt->backlight->props.state &= ~BL_CORE_FBBLANK; backlight_update_status(wuxga_nt->backlight); } - wuxga_nt->enabled = true; - return 0; }