From patchwork Thu Oct 12 17:55:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10002471 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 EC56260216 for ; Thu, 12 Oct 2017 17:56:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E034F28E5B for ; Thu, 12 Oct 2017 17:56:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D527D28E61; Thu, 12 Oct 2017 17:56:48 +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 B016628E5B for ; Thu, 12 Oct 2017 17:56:47 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 31C7E6E905; Thu, 12 Oct 2017 17:56:43 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qt0-x236.google.com (mail-qt0-x236.google.com [IPv6:2607:f8b0:400d:c0d::236]) by gabe.freedesktop.org (Postfix) with ESMTPS id 148086E905 for ; Thu, 12 Oct 2017 17:56:42 +0000 (UTC) Received: by mail-qt0-x236.google.com with SMTP id j58so4045205qtj.0 for ; Thu, 12 Oct 2017 10:56:41 -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=x/gPvv/JVpscHB8s/nv5qTzx8OQ8ml8kXOh8xCuIQD8=; b=WHE+Hdv1x3ne9vfxRSB9B0azvZxUzFqYT+Mn/mhqYSmgAtdZiIvQo9jckHka4F7uE2 VAPYF9Dfx7i/xJOmmP+Ow2HDNBEL7vNjUO2Tvxe1BDreHcW2KDmXHBbIBSTkqen2FfT1 rfwfG2RoHe6m1PZ+jGIN8HlZVEs/qJeDWHN60= 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=x/gPvv/JVpscHB8s/nv5qTzx8OQ8ml8kXOh8xCuIQD8=; b=Z26Rhu9AO3RGuNLJriCmcPofQRMQWOaD1aZXcv+ts48DVQ7UgaTNNJBCIjU4iP7ZXD Dgx5KaprRgmWNZ1RDEM4taEnNJnXmPSyCu5t2dOfq0IU0DsKlxQLjnFYiajm2KFXZDmA BbxckPqDcXJW8iAlDT88PnBK6gH8mT6jc8m8KNp+jg1SROJ5HNZK5oc2FqGHswf52JVe lF/mMD+1PDMyahyTqzNbz5HdyntYp5jJVk8HwWZhwaYSVItD6nb+m6XcLbbhas1yoLsV RND2iTBiwjhPYMvubOndxWQZQNsVj3F8lIqZS71LGrmrrwKoq1khUpHpVTRAn9/sxKw0 +elQ== X-Gm-Message-State: AMCzsaVeNADYFsXmNne07HjJriiwaN6+CgnxmzseKTfWTT7C5ZxHS0N3 FgQuwFugpnblT2/WCbZl+fj2wMqkhCc= X-Google-Smtp-Source: AOwi7QAWJ5JuuEuB+AqNo5nECfm/uQB3zjr2VKOy9KIHnUgySDSE2Tk2D+mE4m7GH3qz+VI97Om+AA== X-Received: by 10.37.178.30 with SMTP id i30mr2283448ybj.284.1507830997176; Thu, 12 Oct 2017 10:56:37 -0700 (PDT) Received: from rosewood.cam.corp.google.com ([2620:0:1013:0:f685:3152:9ba1:429a]) by smtp.gmail.com with ESMTPSA id x140sm5853087ywd.60.2017.10.12.10.56.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Oct 2017 10:56:36 -0700 (PDT) From: Sean Paul To: dri-devel@lists.freedesktop.org Subject: [PATCH v2 08/10] drm/panel: simple: Remove enabled/prepared state Date: Thu, 12 Oct 2017 13:55:35 -0400 Message-Id: <20171012175546.21323-9-seanpaul@chromium.org> X-Mailer: git-send-email 2.15.0.rc0.271.g36b669edcc-goog In-Reply-To: <20171012175546.21323-1-seanpaul@chromium.org> References: <20171012175546.21323-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 --- 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");