From patchwork Thu Oct 12 17:55:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10002459 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 817D760216 for ; Thu, 12 Oct 2017 17:56:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7581E28E57 for ; Thu, 12 Oct 2017 17:56:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6A66B28E5D; Thu, 12 Oct 2017 17:56:17 +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 297FA28E57 for ; Thu, 12 Oct 2017 17:56:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 883CA6E8EB; Thu, 12 Oct 2017 17:56:15 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qt0-x233.google.com (mail-qt0-x233.google.com [IPv6:2607:f8b0:400d:c0d::233]) by gabe.freedesktop.org (Postfix) with ESMTPS id 539556E8EB for ; Thu, 12 Oct 2017 17:56:14 +0000 (UTC) Received: by mail-qt0-x233.google.com with SMTP id n61so15116740qte.10 for ; Thu, 12 Oct 2017 10:56:14 -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=fnRk9QFT2NdviLvug9skjjDGyqxSbKOinaQV1q159Qo=; b=lna+1eBRG4U1OpYS7cxKJqK4+qojQAk/Ilf7A2wqaHxrcccbbKzj5oa4m71SrN+mT+ dRw4g0y3aWdMRq+RZFEUjvKz6PT2lGItmmFh36u5ThJ/qu7fzSBY9QjhxkQjP04ZU9OI fftUKKDvggyIAgct6wkBXRYdMLTewhxw4hydc= 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=fnRk9QFT2NdviLvug9skjjDGyqxSbKOinaQV1q159Qo=; b=dRgFxCbRp24a3JxJeVewKO14qb0M2nqPmWMpmaDrZrcQxq6y1M05wNFRrt7Chh/2X/ QC0BMko6i/cNSi/7Vhv9kE5uOqv4mfboMMyLxOd8D406Wo1BpLYTZvBFKd1V2abA1EpC 2EEz77Ddn+Ni4UjHAemDMes/v6rkCDVLQ0P0yBSlNxbJeSPoxyJM7BjC27Xt0zVrezrZ KELkCc6WpSrATo98w/cXw4Efxov0raEtyyrCnk5qWp62rGvbvA17GIiJMpCWnT6pObMx EnGKSu7akJVnZrJtD02pe1oph7lo9uF7fXfepDiuriqCzqseDCx2fxQt3sQJiJvbCTaa AXZw== X-Gm-Message-State: AMCzsaWqiqGFIFsTSCC5BN9hgbUQm/qLWBQDaljw/syqXh63fYSGvM61 j8G6lj6ZFoVVy53MpzIqCHDc52bso20= X-Google-Smtp-Source: AOwi7QCoCpyD7aL35AYvvXYx8ca872NHZzMc7xwBy838vLwTQ4l0cRdPBt6TnjFRY2H+N5nrL3UgbQ== X-Received: by 10.37.13.84 with SMTP id 81mr1314682ybn.52.1507830969001; Thu, 12 Oct 2017 10:56:09 -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.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Oct 2017 10:56:08 -0700 (PDT) From: Sean Paul To: dri-devel@lists.freedesktop.org Subject: [PATCH v2 02/10] drm/panel: vvx10f034n00: Remove enabled/prepared state Date: Thu, 12 Oct 2017 13:55:29 -0400 Message-Id: <20171012175546.21323-3-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 --- .../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; }