From patchwork Thu Sep 21 17:06:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 9964413 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 2145B6020C for ; Thu, 21 Sep 2017 17:07:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0CCF226538 for ; Thu, 21 Sep 2017 17:07:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 01AF22679B; Thu, 21 Sep 2017 17:07:33 +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 A13D726538 for ; Thu, 21 Sep 2017 17:07:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0AB146E8AA; Thu, 21 Sep 2017 17:07:32 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf0-x232.google.com (mail-pf0-x232.google.com [IPv6:2607:f8b0:400e:c00::232]) by gabe.freedesktop.org (Postfix) with ESMTPS id 43D9C6E8AA for ; Thu, 21 Sep 2017 17:07:31 +0000 (UTC) Received: by mail-pf0-x232.google.com with SMTP id e1so3517556pfk.1 for ; Thu, 21 Sep 2017 10:07:31 -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=Y2ND0butQ4NUJNKYC6X4C7WLKy/rTkSjAzESk3/WvJI=; b=K7f2yZmAUuchLKk7azvM4Y3M1Kdf54GTvh6HijJSdprHtYmcyZ3VaJ0WFHFM2vz1cW 2YXqSOoO7PhLyZ6Ydnj/05EBVn3RqC36xCTsYcckBa01/ZEycXQgXe1+Rgz54JqiouEO Us66B/L19Qwuw3gvKIJUeCpmFZMPsZhy6NuW8= 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=Y2ND0butQ4NUJNKYC6X4C7WLKy/rTkSjAzESk3/WvJI=; b=U6vf4jNPizAjqZbMxNHWXVJBjNcEVaewsPXHvHFkLDUKHjN5TX/Qa6pWIBLmL6caJL +x2KYXCMb3Z15RQxcxWs3ZLWSYQPtiQVHsyNSHGBTTLsd9UGZAIibIcEMToTdfCSoWMY CF6DYgB6yPiT8AwPqumhnHrEn2PurbaLlncaEPlcKOtnrAuwjqSf+ZBEmbfnJw+W5aN4 TH5B3rZ0U/4fG/CUABRxQBvfzc2gi2XFbvykwSYMy7bJcUvU3EgnoJWjq0Kof3rvDPEW gjrb2oAiHY3UwkZlas9usCRJ75zpKOND8R29l/5Ix/7AZUCISa1vbqH0/nd1KtglObTM Z1fg== X-Gm-Message-State: AHPjjUhRmbIfA98n/iE/0I2CCs3rsLF6jU38gXDwTgLT7mR3brtctPrI f4bhhN6BhGdhUCpAHzT1cjp713DCvTI= X-Google-Smtp-Source: AOwi7QCa/fuUMK+oMJxmd5Wl8rhCmNdW7p7jhIZ8IDUvMjYe1oTVVfVwHvibAN6qu6bjE7hu76Fejw== X-Received: by 10.99.55.85 with SMTP id g21mr6413902pgn.306.1506013650515; Thu, 21 Sep 2017 10:07:30 -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.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 21 Sep 2017 10:07:29 -0700 (PDT) From: Sean Paul To: dri-devel@lists.freedesktop.org Subject: [PATCH 07/10] drm/panel: 43wvf1g: Remove enabled/prepared state Date: Thu, 21 Sep 2017 10:06:18 -0700 Message-Id: <20170921170638.27031-8-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 --- drivers/gpu/drm/panel/panel-seiko-43wvf1g.c | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-seiko-43wvf1g.c b/drivers/gpu/drm/panel/panel-seiko-43wvf1g.c index 71c09ed436ae..51785774efd1 100644 --- a/drivers/gpu/drm/panel/panel-seiko-43wvf1g.c +++ b/drivers/gpu/drm/panel/panel-seiko-43wvf1g.c @@ -44,8 +44,6 @@ struct seiko_panel_desc { struct seiko_panel { struct drm_panel base; - bool prepared; - bool enabled; const struct seiko_panel_desc *desc; struct backlight_device *backlight; struct regulator *dvdd; @@ -126,17 +124,12 @@ static int seiko_panel_disable(struct drm_panel *panel) { struct seiko_panel *p = to_seiko_panel(panel); - if (!p->enabled) - return 0; - if (p->backlight) { p->backlight->props.power = FB_BLANK_POWERDOWN; p->backlight->props.state |= BL_CORE_FBBLANK; backlight_update_status(p->backlight); } - p->enabled = false; - return 0; } @@ -144,9 +137,6 @@ static int seiko_panel_unprepare(struct drm_panel *panel) { struct seiko_panel *p = to_seiko_panel(panel); - if (!p->prepared) - return 0; - regulator_disable(p->avdd); /* Add a 100ms delay as per the panel datasheet */ @@ -154,8 +144,6 @@ static int seiko_panel_unprepare(struct drm_panel *panel) regulator_disable(p->dvdd); - p->prepared = false; - return 0; } @@ -164,9 +152,6 @@ static int seiko_panel_prepare(struct drm_panel *panel) struct seiko_panel *p = to_seiko_panel(panel); int err; - if (p->prepared) - return 0; - err = regulator_enable(p->dvdd); if (err < 0) { dev_err(panel->dev, "failed to enable dvdd: %d\n", err); @@ -182,8 +167,6 @@ static int seiko_panel_prepare(struct drm_panel *panel) goto disable_dvdd; } - p->prepared = true; - return 0; disable_dvdd: @@ -195,17 +178,12 @@ static int seiko_panel_enable(struct drm_panel *panel) { struct seiko_panel *p = to_seiko_panel(panel); - if (p->enabled) - return 0; - if (p->backlight) { p->backlight->props.state &= ~BL_CORE_FBBLANK; p->backlight->props.power = FB_BLANK_UNBLANK; backlight_update_status(p->backlight); } - p->enabled = true; - return 0; } @@ -254,8 +232,6 @@ static int seiko_panel_probe(struct device *dev, if (!panel) return -ENOMEM; - panel->enabled = false; - panel->prepared = false; panel->desc = desc; panel->dvdd = devm_regulator_get(dev, "dvdd");