From patchwork Thu Sep 21 17:06:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 9964393 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 1A89F6020C for ; Thu, 21 Sep 2017 17:07:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 06F8C28D37 for ; Thu, 21 Sep 2017 17:07:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EF0F1295FF; Thu, 21 Sep 2017 17:07:04 +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 7B84C28D37 for ; Thu, 21 Sep 2017 17:07:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D58176E8A6; Thu, 21 Sep 2017 17:07:03 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf0-x229.google.com (mail-pf0-x229.google.com [IPv6:2607:f8b0:400e:c00::229]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6473A6E8A6 for ; Thu, 21 Sep 2017 17:07:02 +0000 (UTC) Received: by mail-pf0-x229.google.com with SMTP id m63so3508663pfk.7 for ; Thu, 21 Sep 2017 10:07:02 -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=fhPs8lQaUfHoqeO7W9WysVI28u20xC4E7q2KZX4GaYE=; b=GhujRgYSytRTtIHEzsVwKp8Au38ICXX+PDT5LBr03qpMg6rkUGePfzlGI/n7rKDG0d huTXNGXYEq/CCtxYZyqxClpxi625bb7Tvdjwwnh66c8dRJXTd5XJIEB70kj4WyPaahaN 5igCrC8QArO2yxZFMb0pEXRB27TbJt4QCtrls= 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=fhPs8lQaUfHoqeO7W9WysVI28u20xC4E7q2KZX4GaYE=; b=QuRHsd3wn9gwxprH0kz/ZOAyfvvCjoD3zGezJ+nJAgRZLXE8W+sPvOnM7nv8bLGUAn qT3vuZ9DK+uJr6zNshUr4W+Oio9Tum7YZKHgG+BVC6Rl+20/AK+0b2ScrTR+YqBsNS9W T74telMxP7rfBdsiGUWv968AG/Toa9WReWxleS7UbVQesYG5u0xFUjboG89aliEJ7JTt nYmuEjOt7UpIHodGcd1shRItreQ5wCryDIlVgNIbb15WVEbJSupw9PckDRhEKaXANlI/ edzsAUuNqzBZEiSSyK0tDmFVl+xqcMS7Hu9Czy3s3a6wUkapQhjLB8O09xCt9k0ikFk4 phug== X-Gm-Message-State: AHPjjUjPpKHpuSEImIN9Jo19rMSZwxgYj6dWLRGta7pbHYFK2SSiPCF7 HmXWHBlApW7Dg7G6TOWYpIaTKMBEVl0= X-Google-Smtp-Source: AOwi7QBrQ1YHDioUCWUNSi4oumjNUdd28CzsmSaiUtITr6xTH1SUdtiAVZCAAGgp8PQnsXu2dM67VA== X-Received: by 10.84.133.6 with SMTP id 6mr6045707plf.61.1506013621766; Thu, 21 Sep 2017 10:07:01 -0700 (PDT) Received: from trickycodes.corp.google.com ([172.19.15.95]) by smtp.gmail.com with ESMTPSA id l86sm3317481pfg.155.2017.09.21.10.07.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 21 Sep 2017 10:07:01 -0700 (PDT) From: Sean Paul To: dri-devel@lists.freedesktop.org Subject: [PATCH 02/10] drm/panel: vvx10f034n00: Remove enabled/prepared state Date: Thu, 21 Sep 2017 10:06:13 -0700 Message-Id: <20170921170638.27031-3-seanpaul@chromium.org> X-Mailer: git-send-email 2.14.1.821.g8fa685d3b7-goog In-Reply-To: <20170921170638.27031-1-seanpaul@chromium.org> References: <20170921170638.27031-1-seanpaul@chromium.org> Cc: Thierry Reding 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 --- .../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; }