From patchwork Tue Oct 17 21:13:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10012881 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 5B5B7600CC for ; Tue, 17 Oct 2017 21:14:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4C00F27C2D for ; Tue, 17 Oct 2017 21:14:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3F54E28620; Tue, 17 Oct 2017 21:14:26 +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 D999127C2D for ; Tue, 17 Oct 2017 21:14:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 13CA66E790; Tue, 17 Oct 2017 21:14:19 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-it0-x22c.google.com (mail-it0-x22c.google.com [IPv6:2607:f8b0:4001:c0b::22c]) by gabe.freedesktop.org (Postfix) with ESMTPS id 109DA6E790 for ; Tue, 17 Oct 2017 21:14:17 +0000 (UTC) Received: by mail-it0-x22c.google.com with SMTP id y15so4218749ita.4 for ; Tue, 17 Oct 2017 14:14:17 -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=O9wA5WuZSYjtUra+l3Xrp3XVCKH+WeuMamaDs3rRR/s=; b=X+k+PclJxANVp1ZmDQRZuaWYAHZeQvYKey1OmSEJR6nE45tuHuutdGJM1IDTmHEAKZ 1rxRoBwWPHSzcEgN+Ud/S3yh6iQv7uTp1nTpnE7hUh2p1ic3E4hUVpKLKQ9AhDCFi2hW hdtmTK/ML8dndqonGl0xvec6pKEuR4n7gl/5I= 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=O9wA5WuZSYjtUra+l3Xrp3XVCKH+WeuMamaDs3rRR/s=; b=I8sH/XtlCCVxLlK2Hc0N1ToSo/81jGXUkmoQVZbehyb67GCrmo/org3OLsG/5eO1tK ULq5I4C3ihnPADHSafjztl6Z52pTI8h5hzkKnDOZoCZbcdCf3WoqIjnTofPorlvBw3+z ng9mPnvZgyDQDzR2loFWguF4XyLXv951/lwNy4cCeneRRZ/728oNdihPwe9PlHRxc9ED qlhhzugeESJ4CTfmRzZlCRz0uWC3How4oG5w4eruvuSsZtAr+3S2ZFPAqhurZX4Q4vzS XD2Ise32EYC3jxDP2WIbXDvnuYTVnAdZ0mk4tDu/aoTY7zCVykeVs07Qing/Fauabia4 s7Hw== X-Gm-Message-State: AMCzsaXO3LrrfmysBLHep1oULLffaw1SJCF6g56Ye12EY8FKueOk8IHi T7JqIhMK4r63xoAe1NvpoK89CUhZtW8= X-Google-Smtp-Source: ABhQp+QyHUJIF8KYy3XANcgA6Lvu2XZLmMoJnmOP+IR2HvSiM+6TReuSG1CIlWxJyFyag090FHCEKQ== X-Received: by 10.36.154.66 with SMTP id l63mr7948574ite.118.1508274856210; Tue, 17 Oct 2017 14:14:16 -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.14.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Oct 2017 14:14:15 -0700 (PDT) From: Sean Paul To: dri-devel@lists.freedesktop.org Subject: [PATCH v3 09/12] drm/panel: 43wvf1g: Remove enabled/prepared state Date: Tue, 17 Oct 2017 17:13:12 -0400 Message-Id: <20171017211321.7992-10-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 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");