From patchwork Thu Sep 21 17:06:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 9964417 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 8BD8D6020C for ; Thu, 21 Sep 2017 17:07:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 77FD6294DE for ; Thu, 21 Sep 2017 17:07:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6CDF229526; Thu, 21 Sep 2017 17:07:40 +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 054C3294DE for ; Thu, 21 Sep 2017 17:07:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5A14F6E8BA; Thu, 21 Sep 2017 17:07:37 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf0-x22e.google.com (mail-pf0-x22e.google.com [IPv6:2607:f8b0:400e:c00::22e]) by gabe.freedesktop.org (Postfix) with ESMTPS id 21B5A6E8BB for ; Thu, 21 Sep 2017 17:07:36 +0000 (UTC) Received: by mail-pf0-x22e.google.com with SMTP id r71so3497639pfe.12 for ; Thu, 21 Sep 2017 10:07:36 -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=FbWi3tfufdJ7zLoAR8xuA7T8qqA8CI/Wqzs141wlWp4=; b=GoYmMz07F0BO0vy0vOk+Xe2LuXqZMGVA2eQL+4CxQGLqljb0euJ7Zhec1Gjx/ESFh1 mS3j/vlbN/WnTUl5HBWo4y1iQcDPEqCRmOfcgsDXquk5kdvfqdMozc8b+mOMgS7lXV4H QIQ+cXFyprdtSJ6CFVT+LDs7COHh9Duj9R0gY= 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=FbWi3tfufdJ7zLoAR8xuA7T8qqA8CI/Wqzs141wlWp4=; b=rus6bFOfH8wcpDdC/4evqVWcLAQ0j2HD+HME53jsZM6+JReJHEb5HlFsPJKOz18tku OJPJoglllAICvGTZBTbeenN+HIhLXUm1er7/4slGM1VAbDUcPHgyc6bSwBSvMxATBeoq 73IO9ofrs/z9pj6wTejJWwJvQF4OOWxXKay2jQJ/Sbp+wSjeVTxsW53Gr5w07mJT0q+m /Ws2+UU3hfprvKM4ontrf2BOYMCAOAFnx++XQu+tmNF6hIYBtwEE4KZAGq1RJ+OJ9+tE M/LuoUs4UU8gTZdI2qWlql/r/AmRlIojsxbkY2OQtK1EtuIb+1KCy5ZBQ/IlN1J7rrcj Y+Ag== X-Gm-Message-State: AHPjjUgub6UKbkRE2LCp3Xy88awN9qMBOnU5AkiNf1+KSzAZa38vk31O HPmaj8l2LOKy9COTeaQBswAhY3+2NKI= X-Google-Smtp-Source: AOwi7QBrAgeV2wbGsJoFuLaqai2csiAe3Zn+08gECm2v31/qJAdcvJwlAH1pDEN3jFAB0CruIyHRug== X-Received: by 10.84.143.195 with SMTP id 61mr6157717plz.251.1506013655572; Thu, 21 Sep 2017 10:07:35 -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.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 21 Sep 2017 10:07:35 -0700 (PDT) From: Sean Paul To: dri-devel@lists.freedesktop.org Subject: [PATCH 08/10] drm/panel: simple: Remove enabled/prepared state Date: Thu, 21 Sep 2017 10:06:19 -0700 Message-Id: <20170921170638.27031-9-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-simple.c | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index a3c96d2ea41c..0e1fbca811a0 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -77,8 +77,6 @@ struct panel_desc { struct panel_simple { struct drm_panel base; - bool prepared; - bool enabled; const struct panel_desc *desc; @@ -163,9 +161,6 @@ static int panel_simple_disable(struct drm_panel *panel) { struct panel_simple *p = to_panel_simple(panel); - if (!p->enabled) - return 0; - if (p->backlight) { p->backlight->props.power = FB_BLANK_POWERDOWN; p->backlight->props.state |= BL_CORE_FBBLANK; @@ -175,8 +170,6 @@ static int panel_simple_disable(struct drm_panel *panel) if (p->desc->delay.disable) msleep(p->desc->delay.disable); - p->enabled = false; - return 0; } @@ -184,9 +177,6 @@ static int panel_simple_unprepare(struct drm_panel *panel) { struct panel_simple *p = to_panel_simple(panel); - if (!p->prepared) - return 0; - gpiod_set_value_cansleep(p->enable_gpio, 0); regulator_disable(p->supply); @@ -194,8 +184,6 @@ static int panel_simple_unprepare(struct drm_panel *panel) if (p->desc->delay.unprepare) msleep(p->desc->delay.unprepare); - p->prepared = false; - return 0; } @@ -204,9 +192,6 @@ static int panel_simple_prepare(struct drm_panel *panel) struct panel_simple *p = to_panel_simple(panel); int err; - if (p->prepared) - return 0; - err = regulator_enable(p->supply); if (err < 0) { dev_err(panel->dev, "failed to enable supply: %d\n", err); @@ -218,8 +203,6 @@ static int panel_simple_prepare(struct drm_panel *panel) if (p->desc->delay.prepare) msleep(p->desc->delay.prepare); - p->prepared = true; - return 0; } @@ -227,9 +210,6 @@ static int panel_simple_enable(struct drm_panel *panel) { struct panel_simple *p = to_panel_simple(panel); - if (p->enabled) - return 0; - if (p->desc->delay.enable) msleep(p->desc->delay.enable); @@ -239,8 +219,6 @@ static int panel_simple_enable(struct drm_panel *panel) backlight_update_status(p->backlight); } - p->enabled = true; - return 0; } @@ -301,8 +279,6 @@ static int panel_simple_probe(struct device *dev, const struct panel_desc *desc) if (!panel) return -ENOMEM; - panel->enabled = false; - panel->prepared = false; panel->desc = desc; panel->supply = devm_regulator_get(dev, "power");